From d49cd09893f8b7eb16bc91aeb517069bc5fd3243 Mon Sep 17 00:00:00 2001 From: choonkeat Date: Tue, 3 Mar 2026 01:37:06 +0000 Subject: [PATCH 1/2] feat: add tabbed input field groups in form builder left panel Add inputFieldGroups flag that organizes the "Add Form Field" panel into tabbed groups. The old shortTextTypeList format continues to work unchanged via a backward-compatible decoder. When multiple groups are provided, a tab bar appears; with a single group, no tabs are shown. Co-Authored-By: Claude Opus 4.6 --- FLAGS.md | 48 + dist/tiny-form-fields.esm.js | 3129 +++++++++++++++-------------- dist/tiny-form-fields.js | 3129 +++++++++++++++-------------- dist/tiny-form-fields.min.css | 4 +- index.html | 68 +- input.css | 29 + src/ConfigSchema.elm | 21 +- src/Main.elm | 173 +- tests/InputFieldGroupJsonTest.elm | 238 +++ 9 files changed, 3716 insertions(+), 3123 deletions(-) create mode 100644 tests/InputFieldGroupJsonTest.elm diff --git a/FLAGS.md b/FLAGS.md index b6bd4aa..ac8418e 100644 --- a/FLAGS.md +++ b/FLAGS.md @@ -12,6 +12,7 @@ The `flags` argument passed to `Elm.Main.init` is a JSON object that configures [fieldName: string]: string | string[]; }; shortTextTypeList?: Array; + inputFieldGroups?: Array; } // Type definitions @@ -20,6 +21,18 @@ type CustomElement = { inputTag: string; attributes: Record; } + +type InputField = + | { type: "ShortText"; inputType: string; inputTag?: string; attributes?: Record } + | { type: "LongText"; maxLength: number | null } + | { type: "Dropdown"; choices: string[]; filter?: ChoiceFilter } + | { type: "ChooseOne"; choices: string[]; filter?: ChoiceFilter } + | { type: "ChooseMultiple"; choices: string[]; minRequired?: number; maxAllowed?: number; filter?: ChoiceFilter } + +type InputFieldGroup = { + heading: string; + fields: Array; +} ``` ## Fields @@ -131,6 +144,41 @@ Renders as: ``` +### inputFieldGroups +- **Type**: Array of `InputFieldGroup` +- **Default**: Not set (falls back to `shortTextTypeList` behavior) +- **Description**: Organizes the "Add Form Field" panel into tabbed groups. Each group has a heading (shown as a tab label) and a list of field types. When multiple groups are provided, a tab bar appears in the left panel. When only one group is provided, no tab bar is shown. +- **Precedence**: If both `inputFieldGroups` and `shortTextTypeList` are provided, `inputFieldGroups` takes precedence. + +Each `InputFieldGroup` has: +- `heading`: Tab label displayed in the tab bar +- `fields`: Array of `InputField` objects (same format as the `type` field in `formFields`) + +**Example**: +```json +{ + "inputFieldGroups": [ + { + "heading": "Basic", + "fields": [ + { "type": "Dropdown", "choices": ["Red", "Green", "Blue"] }, + { "type": "ChooseOne", "choices": ["Yes", "No"] }, + { "type": "LongText", "maxLength": null }, + { "type": "ShortText", "inputType": "Single-line free text", "attributes": { "type": "text" } } + ] + }, + { + "heading": "Advanced", + "fields": [ + { "type": "ShortText", "inputType": "Email", "attributes": { "type": "email" } }, + { "type": "ShortText", "inputType": "URL", "attributes": { "type": "url" } }, + { "type": "ChooseMultiple", "choices": ["Apple", "Banana", "Cantaloupe"] } + ] + } + ] +} +``` + ## Usage Example ```javascript diff --git a/dist/tiny-form-fields.esm.js b/dist/tiny-form-fields.esm.js index 10a9ba5..e8b588f 100644 --- a/dist/tiny-form-fields.esm.js +++ b/dist/tiny-form-fields.esm.js @@ -77,7 +77,7 @@ function A9(fun, a, b, c, d, e, f, g, h, i) { return fun.a === 9 ? fun.f(a, b, c, d, e, f, g, h, i) : fun(a)(b)(c)(d)(e)(f)(g)(h)(i); } - +console.warn('Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets.'); // EQUALITY @@ -113,7 +113,7 @@ function _Utils_eqHelp(x, y, depth, stack) return true; } - /**_UNUSED/ + /**/ if (x.$ === 'Set_elm_builtin') { x = $elm$core$Set$toList(x); @@ -126,7 +126,7 @@ function _Utils_eqHelp(x, y, depth, stack) } //*/ - /**/ + /**_UNUSED/ if (x.$ < 0) { x = $elm$core$Dict$toList(x); @@ -161,7 +161,7 @@ function _Utils_cmp(x, y, ord) return x === y ? /*EQ*/ 0 : x < y ? /*LT*/ -1 : /*GT*/ 1; } - /**_UNUSED/ + /**/ if (x instanceof String) { var a = x.valueOf(); @@ -170,10 +170,10 @@ function _Utils_cmp(x, y, ord) } //*/ - /**/ + /**_UNUSED/ if (typeof x.$ === 'undefined') //*/ - /**_UNUSED/ + /**/ if (x.$[0] === '#') //*/ { @@ -203,17 +203,17 @@ var _Utils_compare = F2(function(x, y) // COMMON VALUES -var _Utils_Tuple0 = 0; -var _Utils_Tuple0_UNUSED = { $: '#0' }; +var _Utils_Tuple0_UNUSED = 0; +var _Utils_Tuple0 = { $: '#0' }; -function _Utils_Tuple2(a, b) { return { a: a, b: b }; } -function _Utils_Tuple2_UNUSED(a, b) { return { $: '#2', a: a, b: b }; } +function _Utils_Tuple2_UNUSED(a, b) { return { a: a, b: b }; } +function _Utils_Tuple2(a, b) { return { $: '#2', a: a, b: b }; } -function _Utils_Tuple3(a, b, c) { return { a: a, b: b, c: c }; } -function _Utils_Tuple3_UNUSED(a, b, c) { return { $: '#3', a: a, b: b, c: c }; } +function _Utils_Tuple3_UNUSED(a, b, c) { return { a: a, b: b, c: c }; } +function _Utils_Tuple3(a, b, c) { return { $: '#3', a: a, b: b, c: c }; } -function _Utils_chr(c) { return c; } -function _Utils_chr_UNUSED(c) { return new String(c); } +function _Utils_chr_UNUSED(c) { return c; } +function _Utils_chr(c) { return new String(c); } // RECORDS @@ -264,11 +264,11 @@ function _Utils_ap(xs, ys) -var _List_Nil = { $: 0 }; -var _List_Nil_UNUSED = { $: '[]' }; +var _List_Nil_UNUSED = { $: 0 }; +var _List_Nil = { $: '[]' }; -function _List_Cons(hd, tl) { return { $: 1, a: hd, b: tl }; } -function _List_Cons_UNUSED(hd, tl) { return { $: '::', a: hd, b: tl }; } +function _List_Cons_UNUSED(hd, tl) { return { $: 1, a: hd, b: tl }; } +function _List_Cons(hd, tl) { return { $: '::', a: hd, b: tl }; } var _List_cons = F2(_List_Cons); @@ -499,12 +499,12 @@ var _JsArray_appendN = F3(function(n, dest, source) // LOG -var _Debug_log = F2(function(tag, value) +var _Debug_log_UNUSED = F2(function(tag, value) { return value; }); -var _Debug_log_UNUSED = F2(function(tag, value) +var _Debug_log = F2(function(tag, value) { console.log(tag + ': ' + _Debug_toString(value)); return value; @@ -530,12 +530,12 @@ function _Debug_todoCase(moduleName, region, value) // TO STRING -function _Debug_toString(value) +function _Debug_toString_UNUSED(value) { return ''; } -function _Debug_toString_UNUSED(value) +function _Debug_toString(value) { return _Debug_toAnsiString(false, value); } @@ -720,13 +720,13 @@ function _Debug_toHexDigit(n) // CRASH -function _Debug_crash(identifier) +function _Debug_crash_UNUSED(identifier) { throw new Error('https://github.com/elm/core/blob/1.0.0/hints/' + identifier + '.md'); } -function _Debug_crash_UNUSED(identifier, fact1, fact2, fact3, fact4) +function _Debug_crash(identifier, fact1, fact2, fact3, fact4) { switch(identifier) { @@ -784,11 +784,11 @@ function _Debug_crash_UNUSED(identifier, fact1, fact2, fact3, fact4) function _Debug_regionToString(region) { - if (region.bl.aL === region.bN.aL) + if (region.start.line === region.end.line) { - return 'on line ' + region.bl.aL; + return 'on line ' + region.start.line; } - return 'on lines ' + region.bl.aL + ' through ' + region.bN.aL; + return 'on lines ' + region.start.line + ' through ' + region.end.line; } @@ -1212,7 +1212,7 @@ function _Char_toLocaleLower(char) -/**_UNUSED/ +/**/ function _Json_errorToString(error) { return $elm$json$Json$Decode$errorToString(error); @@ -1616,11 +1616,11 @@ var _Json_encode = F2(function(indentLevel, value) return JSON.stringify(_Json_unwrap(value), null, indentLevel) + ''; }); -function _Json_wrap_UNUSED(value) { return { $: 0, a: value }; } -function _Json_unwrap_UNUSED(value) { return value.a; } +function _Json_wrap(value) { return { $: 0, a: value }; } +function _Json_unwrap(value) { return value.a; } -function _Json_wrap(value) { return value; } -function _Json_unwrap(value) { return value; } +function _Json_wrap_UNUSED(value) { return value; } +function _Json_unwrap_UNUSED(value) { return value; } function _Json_emptyArray() { return []; } function _Json_emptyObject() { return {}; } @@ -1857,9 +1857,9 @@ var _Platform_worker = F4(function(impl, flagDecoder, debugMetadata, args) return _Platform_initialize( flagDecoder, args, - impl.ds, - impl.dV, - impl.dS, + impl.init, + impl.update, + impl.subscriptions, function() { return function() {} } ); }); @@ -1872,7 +1872,7 @@ var _Platform_worker = F4(function(impl, flagDecoder, debugMetadata, args) function _Platform_initialize(flagDecoder, args, init, update, subscriptions, stepperBuilder) { var result = A2(_Json_run, flagDecoder, _Json_wrap(args ? args['flags'] : undefined)); - $elm$core$Result$isOk(result) || _Debug_crash(2 /**_UNUSED/, _Json_errorToString(result.a) /**/); + $elm$core$Result$isOk(result) || _Debug_crash(2 /**/, _Json_errorToString(result.a) /**/); var managers = {}; var initPair = init(result.a); var model = initPair.a; @@ -2317,7 +2317,7 @@ function _Platform_setupIncomingPort(name, sendToApp) /* -function _Platform_export(exports) +function _Platform_export_UNUSED(exports) { scope['Elm'] ? _Platform_mergeExportsProd(scope['Elm'], exports) @@ -2342,7 +2342,7 @@ function _Platform_mergeExportsProd(obj, exports) /* -function _Platform_export_UNUSED(exports) +function _Platform_export(exports) { scope['Elm'] ? _Platform_mergeExportsDebug('Elm', scope['Elm'], exports) @@ -2385,10 +2385,10 @@ var _VirtualDom_init = F4(function(virtualNode, flagDecoder, debugMetadata, args { // NOTE: this function needs _Platform_export available to work - /**/ + /**_UNUSED/ var node = args['node']; //*/ - /**_UNUSED/ + /**/ var node = args && args['node'] ? args['node'] : _Debug_crash(0); //*/ @@ -2663,14 +2663,14 @@ function _VirtualDom_noInnerHtmlOrFormAction(key) function _VirtualDom_noJavaScriptUri(value) { return _VirtualDom_RE_js.test(value) - ? /**/''//*//**_UNUSED/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ + ? /**_UNUSED/''//*//**/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ : value; } function _VirtualDom_noJavaScriptOrHtmlUri(value) { return _VirtualDom_RE_js_html.test(value) - ? /**/''//*//**_UNUSED/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ + ? /**_UNUSED/''//*//**/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ : value; } @@ -2678,7 +2678,7 @@ function _VirtualDom_noJavaScriptOrHtmlJson(value) { return (typeof _Json_unwrap(value) === 'string' && _VirtualDom_RE_js_html.test(_Json_unwrap(value))) ? _Json_wrap( - /**/''//*//**_UNUSED/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ + /**_UNUSED/''//*//**/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ ) : value; } @@ -2727,9 +2727,9 @@ var _VirtualDom_mapEventTuple = F2(function(func, tuple) var _VirtualDom_mapEventRecord = F2(function(func, record) { return { - ai: func(record.ai), - bm: record.bm, - bh: record.bh + message: func(record.message), + stopPropagation: record.stopPropagation, + preventDefault: record.preventDefault } }); @@ -2997,11 +2997,11 @@ function _VirtualDom_makeCallback(eventNode, initialHandler) // 3 = Custom var value = result.a; - var message = !tag ? value : tag < 3 ? value.a : value.ai; - var stopPropagation = tag == 1 ? value.b : tag == 3 && value.bm; + var message = !tag ? value : tag < 3 ? value.a : value.message; + var stopPropagation = tag == 1 ? value.b : tag == 3 && value.stopPropagation; var currentEventNode = ( stopPropagation && event.stopPropagation(), - (tag == 2 ? value.b : tag == 3 && value.bh) && event.preventDefault(), + (tag == 2 ? value.b : tag == 3 && value.preventDefault) && event.preventDefault(), eventNode ); var tagger; @@ -3951,15 +3951,15 @@ var _Browser_element = _Debugger_element || F4(function(impl, flagDecoder, debug return _Platform_initialize( flagDecoder, args, - impl.ds, - impl.dV, - impl.dS, + impl.init, + impl.update, + impl.subscriptions, function(sendToApp, initialModel) { - var view = impl.dW; - /**/ + var view = impl.view; + /**_UNUSED/ var domNode = args['node']; //*/ - /**_UNUSED/ + /**/ var domNode = args && args['node'] ? args['node'] : _Debug_crash(0); //*/ var currNode = _VirtualDom_virtualize(domNode); @@ -3987,12 +3987,12 @@ var _Browser_document = _Debugger_document || F4(function(impl, flagDecoder, deb return _Platform_initialize( flagDecoder, args, - impl.ds, - impl.dV, - impl.dS, + impl.init, + impl.update, + impl.subscriptions, function(sendToApp, initialModel) { - var divertHrefToApp = impl.bj && impl.bj(sendToApp) - var view = impl.dW; + var divertHrefToApp = impl.setup && impl.setup(sendToApp) + var view = impl.view; var title = _VirtualDom_doc.title; var bodyNode = _VirtualDom_doc.body; var currNode = _VirtualDom_virtualize(bodyNode); @@ -4000,12 +4000,12 @@ var _Browser_document = _Debugger_document || F4(function(impl, flagDecoder, deb { _VirtualDom_divertHrefToApp = divertHrefToApp; var doc = view(model); - var nextNode = _VirtualDom_node('body')(_List_Nil)(doc.c7); + var nextNode = _VirtualDom_node('body')(_List_Nil)(doc.body); var patches = _VirtualDom_diff(currNode, nextNode); bodyNode = _VirtualDom_applyPatches(bodyNode, currNode, patches, sendToApp); currNode = nextNode; _VirtualDom_divertHrefToApp = 0; - (title !== doc.cV) && (_VirtualDom_doc.title = title = doc.cV); + (title !== doc.title) && (_VirtualDom_doc.title = title = doc.title); }); } ); @@ -4061,12 +4061,12 @@ function _Browser_makeAnimator(model, draw) function _Browser_application(impl) { - var onUrlChange = impl.dJ; - var onUrlRequest = impl.dK; + var onUrlChange = impl.onUrlChange; + var onUrlRequest = impl.onUrlRequest; var key = function() { key.a(onUrlChange(_Browser_getUrl())); }; return _Browser_document({ - bj: function(sendToApp) + setup: function(sendToApp) { key.a = sendToApp; _Browser_window.addEventListener('popstate', key); @@ -4082,9 +4082,9 @@ function _Browser_application(impl) var next = $elm$url$Url$fromString(href).a; sendToApp(onUrlRequest( (next - && curr.cC === next.cC - && curr.b1 === next.b1 - && curr.cw.a === next.cw.a + && curr.protocol === next.protocol + && curr.host === next.host + && curr.port_.a === next.port_.a ) ? $elm$browser$Browser$Internal(next) : $elm$browser$Browser$External(href) @@ -4092,13 +4092,13 @@ function _Browser_application(impl) } }); }, - ds: function(flags) + init: function(flags) { - return A3(impl.ds, flags, _Browser_getUrl(), key); + return A3(impl.init, flags, _Browser_getUrl(), key); }, - dW: impl.dW, - dV: impl.dV, - dS: impl.dS + view: impl.view, + update: impl.update, + subscriptions: impl.subscriptions }); } @@ -4164,17 +4164,17 @@ var _Browser_decodeEvent = F2(function(decoder, event) function _Browser_visibilityInfo() { return (typeof _VirtualDom_doc.hidden !== 'undefined') - ? { dp: 'hidden', db: 'visibilitychange' } + ? { hidden: 'hidden', change: 'visibilitychange' } : (typeof _VirtualDom_doc.mozHidden !== 'undefined') - ? { dp: 'mozHidden', db: 'mozvisibilitychange' } + ? { hidden: 'mozHidden', change: 'mozvisibilitychange' } : (typeof _VirtualDom_doc.msHidden !== 'undefined') - ? { dp: 'msHidden', db: 'msvisibilitychange' } + ? { hidden: 'msHidden', change: 'msvisibilitychange' } : (typeof _VirtualDom_doc.webkitHidden !== 'undefined') - ? { dp: 'webkitHidden', db: 'webkitvisibilitychange' } - : { dp: 'hidden', db: 'visibilitychange' }; + ? { hidden: 'webkitHidden', change: 'webkitvisibilitychange' } + : { hidden: 'hidden', change: 'visibilitychange' }; } @@ -4255,12 +4255,12 @@ var _Browser_call = F2(function(functionName, id) function _Browser_getViewport() { return { - cL: _Browser_getScene(), - cZ: { - c0: _Browser_window.pageXOffset, - c1: _Browser_window.pageYOffset, - c$: _Browser_doc.documentElement.clientWidth, - b$: _Browser_doc.documentElement.clientHeight + scene: _Browser_getScene(), + viewport: { + x: _Browser_window.pageXOffset, + y: _Browser_window.pageYOffset, + width: _Browser_doc.documentElement.clientWidth, + height: _Browser_doc.documentElement.clientHeight } }; } @@ -4270,8 +4270,8 @@ function _Browser_getScene() var body = _Browser_doc.body; var elem = _Browser_doc.documentElement; return { - c$: Math.max(body.scrollWidth, body.offsetWidth, elem.scrollWidth, elem.offsetWidth, elem.clientWidth), - b$: Math.max(body.scrollHeight, body.offsetHeight, elem.scrollHeight, elem.offsetHeight, elem.clientHeight) + width: Math.max(body.scrollWidth, body.offsetWidth, elem.scrollWidth, elem.offsetWidth, elem.clientWidth), + height: Math.max(body.scrollHeight, body.offsetHeight, elem.scrollHeight, elem.offsetHeight, elem.clientHeight) }; } @@ -4294,15 +4294,15 @@ function _Browser_getViewportOf(id) return _Browser_withNode(id, function(node) { return { - cL: { - c$: node.scrollWidth, - b$: node.scrollHeight + scene: { + width: node.scrollWidth, + height: node.scrollHeight }, - cZ: { - c0: node.scrollLeft, - c1: node.scrollTop, - c$: node.clientWidth, - b$: node.clientHeight + viewport: { + x: node.scrollLeft, + y: node.scrollTop, + width: node.clientWidth, + height: node.clientHeight } }; }); @@ -4332,18 +4332,18 @@ function _Browser_getElement(id) var x = _Browser_window.pageXOffset; var y = _Browser_window.pageYOffset; return { - cL: _Browser_getScene(), - cZ: { - c0: x, - c1: y, - c$: _Browser_doc.documentElement.clientWidth, - b$: _Browser_doc.documentElement.clientHeight + scene: _Browser_getScene(), + viewport: { + x: x, + y: y, + width: _Browser_doc.documentElement.clientWidth, + height: _Browser_doc.documentElement.clientHeight }, - di: { - c0: x + rect.left, - c1: y + rect.top, - c$: rect.width, - b$: rect.height + element: { + x: x + rect.left, + y: y + rect.top, + width: rect.width, + height: rect.height } }; }); @@ -4415,15 +4415,15 @@ var _Bitwise_shiftRightZfBy = F2(function(offset, a) { return a >>> offset; }); -var $elm$core$Basics$EQ = 1; -var $elm$core$Basics$GT = 2; -var $elm$core$Basics$LT = 0; +var $elm$core$Basics$EQ = {$: 'EQ'}; +var $elm$core$Basics$GT = {$: 'GT'}; +var $elm$core$Basics$LT = {$: 'LT'}; var $elm$core$List$cons = _List_cons; var $elm$core$Dict$foldr = F3( function (func, acc, t) { foldr: while (true) { - if (t.$ === -2) { + if (t.$ === 'RBEmpty_elm_builtin') { return acc; } else { var key = t.b; @@ -4468,7 +4468,7 @@ var $elm$core$Dict$keys = function (dict) { dict); }; var $elm$core$Set$toList = function (_v0) { - var dict = _v0; + var dict = _v0.a; return $elm$core$Dict$keys(dict); }; var $elm$core$Elm$JsArray$foldr = _JsArray_foldr; @@ -4478,7 +4478,7 @@ var $elm$core$Array$foldr = F3( var tail = _v0.d; var helper = F2( function (node, acc) { - if (!node.$) { + if (node.$ === 'SubTree') { var subTree = node.a; return A3($elm$core$Elm$JsArray$foldr, helper, acc, subTree); } else { @@ -4496,32 +4496,32 @@ var $elm$core$Array$toList = function (array) { return A3($elm$core$Array$foldr, $elm$core$List$cons, _List_Nil, array); }; var $elm$core$Result$Err = function (a) { - return {$: 1, a: a}; + return {$: 'Err', a: a}; }; var $elm$json$Json$Decode$Failure = F2( function (a, b) { - return {$: 3, a: a, b: b}; + return {$: 'Failure', a: a, b: b}; }); var $elm$json$Json$Decode$Field = F2( function (a, b) { - return {$: 0, a: a, b: b}; + return {$: 'Field', a: a, b: b}; }); var $elm$json$Json$Decode$Index = F2( function (a, b) { - return {$: 1, a: a, b: b}; + return {$: 'Index', a: a, b: b}; }); var $elm$core$Result$Ok = function (a) { - return {$: 0, a: a}; + return {$: 'Ok', a: a}; }; var $elm$json$Json$Decode$OneOf = function (a) { - return {$: 2, a: a}; + return {$: 'OneOf', a: a}; }; -var $elm$core$Basics$False = 1; +var $elm$core$Basics$False = {$: 'False'}; var $elm$core$Basics$add = _Basics_add; var $elm$core$Maybe$Just = function (a) { - return {$: 0, a: a}; + return {$: 'Just', a: a}; }; -var $elm$core$Maybe$Nothing = {$: 1}; +var $elm$core$Maybe$Nothing = {$: 'Nothing'}; var $elm$core$String$all = _String_all; var $elm$core$Basics$and = _Basics_and; var $elm$core$Basics$append = _Utils_append; @@ -4646,12 +4646,12 @@ var $elm$json$Json$Decode$errorToStringHelp = F2( errorToStringHelp: while (true) { switch (error.$) { - case 0: + case 'Field': var f = error.a; var err = error.b; var isSimple = function () { var _v1 = $elm$core$String$uncons(f); - if (_v1.$ === 1) { + if (_v1.$ === 'Nothing') { return false; } else { var _v2 = _v1.a; @@ -4666,7 +4666,7 @@ var $elm$json$Json$Decode$errorToStringHelp = F2( error = $temp$error; context = $temp$context; continue errorToStringHelp; - case 1: + case 'Index': var i = error.a; var err = error.b; var indexName = '[' + ($elm$core$String$fromInt(i) + ']'); @@ -4675,7 +4675,7 @@ var $elm$json$Json$Decode$errorToStringHelp = F2( error = $temp$error; context = $temp$context; continue errorToStringHelp; - case 2: + case 'OneOf': var errors = error.a; if (!errors.b) { return 'Ran into a Json.Decode.oneOf with no possibilities' + function () { @@ -4739,7 +4739,7 @@ var $elm$json$Json$Decode$errorToStringHelp = F2( var $elm$core$Array$branchFactor = 32; var $elm$core$Array$Array_elm_builtin = F4( function (a, b, c, d) { - return {$: 0, a: a, b: b, c: c, d: d}; + return {$: 'Array_elm_builtin', a: a, b: b, c: c, d: d}; }); var $elm$core$Elm$JsArray$empty = _JsArray_empty; var $elm$core$Basics$ceiling = _Basics_ceiling; @@ -4754,7 +4754,7 @@ var $elm$core$Array$shiftStep = $elm$core$Basics$ceiling( var $elm$core$Array$empty = A4($elm$core$Array$Array_elm_builtin, 0, $elm$core$Array$shiftStep, $elm$core$Elm$JsArray$empty, $elm$core$Elm$JsArray$empty); var $elm$core$Elm$JsArray$initialize = _JsArray_initialize; var $elm$core$Array$Leaf = function (a) { - return {$: 1, a: a}; + return {$: 'Leaf', a: a}; }; var $elm$core$Basics$apL = F2( function (f, x) { @@ -4774,7 +4774,7 @@ var $elm$core$Basics$max = F2( }); var $elm$core$Basics$mul = _Basics_mul; var $elm$core$Array$SubTree = function (a) { - return {$: 0, a: a}; + return {$: 'SubTree', a: a}; }; var $elm$core$Elm$JsArray$initializeFromList = _JsArray_initializeFromList; var $elm$core$Array$compressNodes = F2( @@ -4821,25 +4821,25 @@ var $elm$core$Array$treeFromBuilder = F2( }); var $elm$core$Array$builderToArray = F2( function (reverseNodeList, builder) { - if (!builder.t) { + if (!builder.nodeListSize) { return A4( $elm$core$Array$Array_elm_builtin, - $elm$core$Elm$JsArray$length(builder.x), + $elm$core$Elm$JsArray$length(builder.tail), $elm$core$Array$shiftStep, $elm$core$Elm$JsArray$empty, - builder.x); + builder.tail); } else { - var treeLen = builder.t * $elm$core$Array$branchFactor; + var treeLen = builder.nodeListSize * $elm$core$Array$branchFactor; var depth = $elm$core$Basics$floor( A2($elm$core$Basics$logBase, $elm$core$Array$branchFactor, treeLen - 1)); - var correctNodeList = reverseNodeList ? $elm$core$List$reverse(builder.y) : builder.y; - var tree = A2($elm$core$Array$treeFromBuilder, correctNodeList, builder.t); + var correctNodeList = reverseNodeList ? $elm$core$List$reverse(builder.nodeList) : builder.nodeList; + var tree = A2($elm$core$Array$treeFromBuilder, correctNodeList, builder.nodeListSize); return A4( $elm$core$Array$Array_elm_builtin, - $elm$core$Elm$JsArray$length(builder.x) + treeLen, + $elm$core$Elm$JsArray$length(builder.tail) + treeLen, A2($elm$core$Basics$max, 5, depth * $elm$core$Array$shiftStep), tree, - builder.x); + builder.tail); } }); var $elm$core$Basics$idiv = _Basics_idiv; @@ -4852,7 +4852,7 @@ var $elm$core$Array$initializeHelp = F5( return A2( $elm$core$Array$builderToArray, false, - {y: nodeList, t: (len / $elm$core$Array$branchFactor) | 0, x: tail}); + {nodeList: nodeList, nodeListSize: (len / $elm$core$Array$branchFactor) | 0, tail: tail}); } else { var leaf = $elm$core$Array$Leaf( A3($elm$core$Elm$JsArray$initialize, $elm$core$Array$branchFactor, fromIndex, fn)); @@ -4882,9 +4882,9 @@ var $elm$core$Array$initialize = F2( return A5($elm$core$Array$initializeHelp, fn, initialFromIndex, len, _List_Nil, tail); } }); -var $elm$core$Basics$True = 0; +var $elm$core$Basics$True = {$: 'True'}; var $elm$core$Result$isOk = function (result) { - if (!result.$) { + if (result.$ === 'Ok') { return true; } else { return false; @@ -4895,31 +4895,33 @@ var $elm$json$Json$Decode$map2 = _Json_map2; var $elm$json$Json$Decode$succeed = _Json_succeed; var $elm$virtual_dom$VirtualDom$toHandlerInt = function (handler) { switch (handler.$) { - case 0: + case 'Normal': return 0; - case 1: + case 'MayStopPropagation': return 1; - case 2: + case 'MayPreventDefault': return 2; default: return 3; } }; var $elm$browser$Browser$External = function (a) { - return {$: 1, a: a}; + return {$: 'External', a: a}; }; var $elm$browser$Browser$Internal = function (a) { - return {$: 0, a: a}; + return {$: 'Internal', a: a}; }; var $elm$core$Basics$identity = function (x) { return x; }; -var $elm$browser$Browser$Dom$NotFound = $elm$core$Basics$identity; -var $elm$url$Url$Http = 0; -var $elm$url$Url$Https = 1; +var $elm$browser$Browser$Dom$NotFound = function (a) { + return {$: 'NotFound', a: a}; +}; +var $elm$url$Url$Http = {$: 'Http'}; +var $elm$url$Url$Https = {$: 'Https'}; var $elm$url$Url$Url = F6( function (protocol, host, port_, path, query, fragment) { - return {bX: fragment, b1: host, z: path, cw: port_, cC: protocol, cD: query}; + return {fragment: fragment, host: host, path: path, port_: port_, protocol: protocol, query: query}; }); var $elm$core$String$contains = _String_contains; var $elm$core$String$length = _String_length; @@ -4955,7 +4957,7 @@ var $elm$url$Url$chompBeforePath = F5( var i = _v0.a; var _v1 = $elm$core$String$toInt( A2($elm$core$String$dropLeft, i + 1, str)); - if (_v1.$ === 1) { + if (_v1.$ === 'Nothing') { return $elm$core$Maybe$Nothing; } else { var port_ = _v1; @@ -5038,24 +5040,26 @@ var $elm$core$String$startsWith = _String_startsWith; var $elm$url$Url$fromString = function (str) { return A2($elm$core$String$startsWith, 'http://', str) ? A2( $elm$url$Url$chompAfterProtocol, - 0, + $elm$url$Url$Http, A2($elm$core$String$dropLeft, 7, str)) : (A2($elm$core$String$startsWith, 'https://', str) ? A2( $elm$url$Url$chompAfterProtocol, - 1, + $elm$url$Url$Https, A2($elm$core$String$dropLeft, 8, str)) : $elm$core$Maybe$Nothing); }; var $elm$core$Basics$never = function (_v0) { never: while (true) { - var nvr = _v0; + var nvr = _v0.a; var $temp$_v0 = nvr; _v0 = $temp$_v0; continue never; } }; -var $elm$core$Task$Perform = $elm$core$Basics$identity; +var $elm$core$Task$Perform = function (a) { + return {$: 'Perform', a: a}; +}; var $elm$core$Task$succeed = _Scheduler_succeed; -var $elm$core$Task$init = $elm$core$Task$succeed(0); +var $elm$core$Task$init = $elm$core$Task$succeed(_Utils_Tuple0); var $elm$core$List$foldrHelper = F4( function (fn, acc, ctr, ls) { if (!ls.b) { @@ -5161,7 +5165,7 @@ var $elm$core$Task$sequence = function (tasks) { var $elm$core$Platform$sendToApp = _Platform_sendToApp; var $elm$core$Task$spawnCmd = F2( function (router, _v0) { - var task = _v0; + var task = _v0.a; return _Scheduler_spawn( A2( $elm$core$Task$andThen, @@ -5173,7 +5177,7 @@ var $elm$core$Task$onEffects = F3( return A2( $elm$core$Task$map, function (_v0) { - return 0; + return _Utils_Tuple0; }, $elm$core$Task$sequence( A2( @@ -5183,122 +5187,105 @@ var $elm$core$Task$onEffects = F3( }); var $elm$core$Task$onSelfMsg = F3( function (_v0, _v1, _v2) { - return $elm$core$Task$succeed(0); + return $elm$core$Task$succeed(_Utils_Tuple0); }); var $elm$core$Task$cmdMap = F2( function (tagger, _v0) { - var task = _v0; - return A2($elm$core$Task$map, tagger, task); + var task = _v0.a; + return $elm$core$Task$Perform( + A2($elm$core$Task$map, tagger, task)); }); _Platform_effectManagers['Task'] = _Platform_createManager($elm$core$Task$init, $elm$core$Task$onEffects, $elm$core$Task$onSelfMsg, $elm$core$Task$cmdMap); var $elm$core$Task$command = _Platform_leaf('Task'); var $elm$core$Task$perform = F2( function (toMessage, task) { return $elm$core$Task$command( - A2($elm$core$Task$map, toMessage, task)); + $elm$core$Task$Perform( + A2($elm$core$Task$map, toMessage, task))); }); var $elm$browser$Browser$element = _Browser_element; var $author$project$Main$Editor = function (a) { - return {$: 0, a: a}; + return {$: 'Editor', a: a}; }; var $author$project$Main$PortOutgoingFormFields = function (a) { - return {$: 0, a: a}; + return {$: 'PortOutgoingFormFields', a: a}; +}; +var $elm$core$List$append = F2( + function (xs, ys) { + if (!ys.b) { + return xs; + } else { + return A3($elm$core$List$foldr, $elm$core$List$cons, ys, xs); + } + }); +var $elm$core$List$concat = function (lists) { + return A3($elm$core$List$foldr, $elm$core$List$append, _List_Nil, lists); +}; +var $elm$core$List$concatMap = F2( + function (f, list) { + return $elm$core$List$concat( + A2($elm$core$List$map, f, list)); + }); +var $elm$core$List$maybeCons = F3( + function (f, mx, xs) { + var _v0 = f(mx); + if (_v0.$ === 'Just') { + var x = _v0.a; + return A2($elm$core$List$cons, x, xs); + } else { + return xs; + } + }); +var $elm$core$List$filterMap = F2( + function (f, xs) { + return A3( + $elm$core$List$foldr, + $elm$core$List$maybeCons(f), + _List_Nil, + xs); + }); +var $author$project$Main$allCustomElementsFromGroups = function (groups) { + return A2( + $elm$core$List$filterMap, + function (inputField) { + if (inputField.$ === 'ShortText') { + var customElement = inputField.a; + return $elm$core$Maybe$Just(customElement); + } else { + return $elm$core$Maybe$Nothing; + } + }, + A2( + $elm$core$List$concatMap, + function ($) { + return $.fields; + }, + groups)); }; var $elm$core$Platform$Cmd$batch = _Platform_batch; var $author$project$Main$Config = F4( - function (viewMode, formFields, formValues, shortTextTypeList) { - return {g: formFields, a7: formValues, al: shortTextTypeList, ac: viewMode}; + function (viewMode, formFields, formValues, inputFieldGroups) { + return {formFields: formFields, formValues: formValues, inputFieldGroups: inputFieldGroups, viewMode: viewMode}; }); var $elm_community$json_extra$Json$Decode$Extra$andMap = $elm$json$Json$Decode$map2($elm$core$Basics$apR); -var $author$project$Main$FormField = F6( - function (label, name, presence, description, type_, visibilityRule) { - return {S: description, d: label, Q: name, q: presence, a: type_, m: visibilityRule}; - }); -var $author$project$Main$AttributeNotNeeded = function (a) { - return {$: 0, a: a}; +var $author$project$Main$ShortText = function (a) { + return {$: 'ShortText', a: a}; }; -var $elm$json$Json$Decode$field = _Json_decodeField; -var $elm$json$Json$Decode$at = F2( - function (fields, decoder) { - return A3($elm$core$List$foldr, $elm$json$Json$Decode$field, decoder, fields); - }); var $author$project$Main$AttributeGiven = function (a) { - return {$: 2, a: a}; + return {$: 'AttributeGiven', a: a}; }; -var $elm$json$Json$Decode$null = _Json_decodeNull; -var $elm$json$Json$Decode$oneOf = _Json_oneOf; -var $author$project$Main$decodeAttributeOptional = F2( - function (maybeNotNeeded, decodeValue) { - return $elm$json$Json$Decode$oneOf( - _List_fromArray( - [ - $elm$json$Json$Decode$null( - $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing)), - A2( - $elm$json$Json$Decode$map, - function (a) { - return _Utils_eq( - $elm$core$Maybe$Just(a), - maybeNotNeeded) ? $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing) : $author$project$Main$AttributeGiven(a); - }, - decodeValue) - ])); - }); -var $elm$json$Json$Decode$string = _Json_decodeString; -var $author$project$Main$decodeFormFieldDescription = $elm$json$Json$Decode$oneOf( - _List_fromArray( - [ - A2( - $elm$json$Json$Decode$at, - _List_fromArray( - ['presence', 'description']), - A2( - $author$project$Main$decodeAttributeOptional, - $elm$core$Maybe$Just(''), - $elm$json$Json$Decode$string)), - A2( - $elm$json$Json$Decode$field, - 'description', - A2( - $author$project$Main$decodeAttributeOptional, - $elm$core$Maybe$Just(''), - $elm$json$Json$Decode$string)), - $elm$json$Json$Decode$succeed( - $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing)) - ])); -var $author$project$Main$decodeFormFieldMaybeName = $elm$json$Json$Decode$oneOf( - _List_fromArray( - [ - A2( - $elm$json$Json$Decode$map, - $elm$core$Maybe$Just, - A2( - $elm$json$Json$Decode$at, - _List_fromArray( - ['presence', 'name']), - $elm$json$Json$Decode$string)), - A2( - $elm$json$Json$Decode$map, - $elm$core$Maybe$Just, - A2($elm$json$Json$Decode$field, 'name', $elm$json$Json$Decode$string)), - $elm$json$Json$Decode$succeed($elm$core$Maybe$Nothing) - ])); var $author$project$Main$ChooseMultiple = function (a) { - return {$: 4, a: a}; + return {$: 'ChooseMultiple', a: a}; }; var $author$project$Main$ChooseOne = function (a) { - return {$: 3, a: a}; + return {$: 'ChooseOne', a: a}; }; var $author$project$Main$Dropdown = function (a) { - return {$: 2, a: a}; + return {$: 'Dropdown', a: a}; }; var $author$project$Main$LongText = function (a) { - return {$: 1, a: a}; -}; -var $author$project$Main$ShortText = function (a) { - return {$: 0, a: a}; + return {$: 'LongText', a: a}; }; -var $elm$json$Json$Decode$andThen = _Json_andThen; var $author$project$Main$choiceDelimiter = ' | '; var $elm$core$String$trim = _String_trim; var $author$project$Main$choiceFromString = function (s) { @@ -5307,8 +5294,8 @@ var $author$project$Main$choiceFromString = function (s) { if (!_v0.b.b) { var value = _v0.a; return { - d: value, - j: $elm$core$String$trim(value) + label: value, + value: $elm$core$String$trim(value) }; } else { if (!_v0.b.b.b) { @@ -5316,33 +5303,96 @@ var $author$project$Main$choiceFromString = function (s) { var _v1 = _v0.b; var label = _v1.a; return { - d: label, - j: $elm$core$String$trim(value) + label: label, + value: $elm$core$String$trim(value) }; } else { var value = _v0.a; var labels = _v0.b; return { - d: A2($elm$core$String$join, $author$project$Main$choiceDelimiter, labels), - j: $elm$core$String$trim(value) + label: A2($elm$core$String$join, $author$project$Main$choiceDelimiter, labels), + value: $elm$core$String$trim(value) }; } } } else { return { - d: s, - j: $elm$core$String$trim(s) + label: s, + value: $elm$core$String$trim(s) }; } }; +var $author$project$Main$allInputField = _List_fromArray( + [ + $author$project$Main$Dropdown( + { + choices: A2( + $elm$core$List$map, + $author$project$Main$choiceFromString, + _List_fromArray( + ['Red', 'Orange', 'Yellow', 'Green', 'Blue', 'Indigo', 'Violet'])), + filter: $elm$core$Maybe$Nothing + }), + $author$project$Main$ChooseOne( + { + choices: A2( + $elm$core$List$map, + $author$project$Main$choiceFromString, + _List_fromArray( + ['Yes', 'No'])), + filter: $elm$core$Maybe$Nothing + }), + $author$project$Main$ChooseMultiple( + { + choices: A2( + $elm$core$List$map, + $author$project$Main$choiceFromString, + _List_fromArray( + ['Apple', 'Banana', 'Cantaloupe', 'Durian'])), + filter: $elm$core$Maybe$Nothing, + maxAllowed: $elm$core$Maybe$Nothing, + minRequired: $elm$core$Maybe$Nothing + }), + $author$project$Main$LongText( + $author$project$Main$AttributeGiven(160)) + ]); +var $author$project$Main$InputFieldGroup = F2( + function (heading, fields) { + return {fields: fields, heading: heading}; + }); +var $elm$json$Json$Decode$andThen = _Json_andThen; +var $author$project$Main$AttributeNotNeeded = function (a) { + return {$: 'AttributeNotNeeded', a: a}; +}; +var $elm$json$Json$Decode$null = _Json_decodeNull; +var $elm$json$Json$Decode$oneOf = _Json_oneOf; +var $author$project$Main$decodeAttributeOptional = F2( + function (maybeNotNeeded, decodeValue) { + return $elm$json$Json$Decode$oneOf( + _List_fromArray( + [ + $elm$json$Json$Decode$null( + $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing)), + A2( + $elm$json$Json$Decode$map, + function (a) { + return _Utils_eq( + $elm$core$Maybe$Just(a), + maybeNotNeeded) ? $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing) : $author$project$Main$AttributeGiven(a); + }, + decodeValue) + ])); + }); +var $elm$json$Json$Decode$string = _Json_decodeString; var $author$project$Main$decodeChoice = A2($elm$json$Json$Decode$map, $author$project$Main$choiceFromString, $elm$json$Json$Decode$string); var $author$project$Main$FilterContainsFieldValueOf = function (a) { - return {$: 1, a: a}; + return {$: 'FilterContainsFieldValueOf', a: a}; }; var $author$project$Main$FilterStartsWithFieldValueOf = function (a) { - return {$: 0, a: a}; + return {$: 'FilterStartsWithFieldValueOf', a: a}; }; var $elm$json$Json$Decode$fail = _Json_fail; +var $elm$json$Json$Decode$field = _Json_decodeField; var $author$project$Main$decodeChoiceFilter = A2( $elm$json$Json$Decode$andThen, function (type_) { @@ -5364,26 +5414,26 @@ var $author$project$Main$decodeChoiceFilter = A2( A2($elm$json$Json$Decode$field, 'type', $elm$json$Json$Decode$string)); var $author$project$Main$RawCustomElement = F3( function (inputType, inputTag, attributes) { - return {p: attributes, N: inputTag, B: inputType}; + return {attributes: attributes, inputTag: inputTag, inputType: inputType}; }); var $author$project$Main$defaultInputTag = 'input'; -var $elm$core$Dict$RBEmpty_elm_builtin = {$: -2}; +var $elm$core$Dict$RBEmpty_elm_builtin = {$: 'RBEmpty_elm_builtin'}; var $elm$core$Dict$empty = $elm$core$Dict$RBEmpty_elm_builtin; -var $elm$core$Dict$Black = 1; +var $elm$core$Dict$Black = {$: 'Black'}; var $elm$core$Dict$RBNode_elm_builtin = F5( function (a, b, c, d, e) { - return {$: -1, a: a, b: b, c: c, d: d, e: e}; + return {$: 'RBNode_elm_builtin', a: a, b: b, c: c, d: d, e: e}; }); -var $elm$core$Dict$Red = 0; +var $elm$core$Dict$Red = {$: 'Red'}; var $elm$core$Dict$balance = F5( function (color, key, value, left, right) { - if ((right.$ === -1) && (!right.a)) { + if ((right.$ === 'RBNode_elm_builtin') && (right.a.$ === 'Red')) { var _v1 = right.a; var rK = right.b; var rV = right.c; var rLeft = right.d; var rRight = right.e; - if ((left.$ === -1) && (!left.a)) { + if ((left.$ === 'RBNode_elm_builtin') && (left.a.$ === 'Red')) { var _v3 = left.a; var lK = left.b; var lV = left.c; @@ -5391,22 +5441,22 @@ var $elm$core$Dict$balance = F5( var lRight = left.e; return A5( $elm$core$Dict$RBNode_elm_builtin, - 0, + $elm$core$Dict$Red, key, value, - A5($elm$core$Dict$RBNode_elm_builtin, 1, lK, lV, lLeft, lRight), - A5($elm$core$Dict$RBNode_elm_builtin, 1, rK, rV, rLeft, rRight)); + A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Black, lK, lV, lLeft, lRight), + A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Black, rK, rV, rLeft, rRight)); } else { return A5( $elm$core$Dict$RBNode_elm_builtin, color, rK, rV, - A5($elm$core$Dict$RBNode_elm_builtin, 0, key, value, left, rLeft), + A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Red, key, value, left, rLeft), rRight); } } else { - if ((((left.$ === -1) && (!left.a)) && (left.d.$ === -1)) && (!left.d.a)) { + if ((((left.$ === 'RBNode_elm_builtin') && (left.a.$ === 'Red')) && (left.d.$ === 'RBNode_elm_builtin')) && (left.d.a.$ === 'Red')) { var _v5 = left.a; var lK = left.b; var lV = left.c; @@ -5419,11 +5469,11 @@ var $elm$core$Dict$balance = F5( var lRight = left.e; return A5( $elm$core$Dict$RBNode_elm_builtin, - 0, + $elm$core$Dict$Red, lK, lV, - A5($elm$core$Dict$RBNode_elm_builtin, 1, llK, llV, llLeft, llRight), - A5($elm$core$Dict$RBNode_elm_builtin, 1, key, value, lRight, right)); + A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Black, llK, llV, llLeft, llRight), + A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Black, key, value, lRight, right)); } else { return A5($elm$core$Dict$RBNode_elm_builtin, color, key, value, left, right); } @@ -5432,8 +5482,8 @@ var $elm$core$Dict$balance = F5( var $elm$core$Basics$compare = _Utils_compare; var $elm$core$Dict$insertHelp = F3( function (key, value, dict) { - if (dict.$ === -2) { - return A5($elm$core$Dict$RBNode_elm_builtin, 0, key, value, $elm$core$Dict$RBEmpty_elm_builtin, $elm$core$Dict$RBEmpty_elm_builtin); + if (dict.$ === 'RBEmpty_elm_builtin') { + return A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Red, key, value, $elm$core$Dict$RBEmpty_elm_builtin, $elm$core$Dict$RBEmpty_elm_builtin); } else { var nColor = dict.a; var nKey = dict.b; @@ -5441,8 +5491,8 @@ var $elm$core$Dict$insertHelp = F3( var nLeft = dict.d; var nRight = dict.e; var _v1 = A2($elm$core$Basics$compare, key, nKey); - switch (_v1) { - case 0: + switch (_v1.$) { + case 'LT': return A5( $elm$core$Dict$balance, nColor, @@ -5450,7 +5500,7 @@ var $elm$core$Dict$insertHelp = F3( nValue, A3($elm$core$Dict$insertHelp, key, value, nLeft), nRight); - case 1: + case 'EQ': return A5($elm$core$Dict$RBNode_elm_builtin, nColor, nKey, value, nLeft, nRight); default: return A5( @@ -5466,13 +5516,13 @@ var $elm$core$Dict$insertHelp = F3( var $elm$core$Dict$insert = F3( function (key, value, dict) { var _v0 = A3($elm$core$Dict$insertHelp, key, value, dict); - if ((_v0.$ === -1) && (!_v0.a)) { + if ((_v0.$ === 'RBNode_elm_builtin') && (_v0.a.$ === 'Red')) { var _v1 = _v0.a; var k = _v0.b; var v = _v0.c; var l = _v0.d; var r = _v0.e; - return A5($elm$core$Dict$RBNode_elm_builtin, 1, k, v, l, r); + return A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Black, k, v, l, r); } else { var x = _v0; return x; @@ -5491,13 +5541,13 @@ var $elm$core$Dict$fromList = function (assocs) { assocs); }; var $author$project$Main$AttributeInvalid = function (a) { - return {$: 1, a: a}; + return {$: 'AttributeInvalid', a: a}; }; var $elm$core$Dict$foldl = F3( function (func, acc, dict) { foldl: while (true) { - if (dict.$ === -2) { + if (dict.$ === 'RBEmpty_elm_builtin') { return acc; } else { var key = dict.b; @@ -5533,7 +5583,7 @@ var $elm$core$Dict$get = F2( function (targetKey, dict) { get: while (true) { - if (dict.$ === -2) { + if (dict.$ === 'RBEmpty_elm_builtin') { return $elm$core$Maybe$Nothing; } else { var key = dict.b; @@ -5541,14 +5591,14 @@ var $elm$core$Dict$get = F2( var left = dict.d; var right = dict.e; var _v1 = A2($elm$core$Basics$compare, targetKey, key); - switch (_v1) { - case 0: + switch (_v1.$) { + case 'LT': var $temp$targetKey = targetKey, $temp$dict = left; targetKey = $temp$targetKey; dict = $temp$dict; continue get; - case 1: + case 'EQ': return $elm$core$Maybe$Just(value); default: var $temp$targetKey = targetKey, @@ -5563,16 +5613,16 @@ var $elm$core$Dict$get = F2( var $elm$core$Basics$neq = _Utils_notEqual; var $author$project$Main$fromRawCustomElement = function (ele) { return { - p: A2( + attributes: A2( $elm$core$Dict$filter, F2( function (k, _v0) { return k !== 'list'; }), - ele.p), - ae: function () { - var _v1 = A2($elm$core$Dict$get, 'list', ele.p); - if (!_v1.$) { + ele.attributes), + datalist: function () { + var _v1 = A2($elm$core$Dict$get, 'list', ele.attributes); + if (_v1.$ === 'Just') { var s = _v1.a; var _v2 = A2( $elm$core$String$split, @@ -5589,11 +5639,11 @@ var $author$project$Main$fromRawCustomElement = function (ele) { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } }(), - N: ele.N, - B: ele.B, - aq: function () { - var _v3 = A2($elm$core$Dict$get, 'max', ele.p); - if (!_v3.$) { + inputTag: ele.inputTag, + inputType: ele.inputType, + max: function () { + var _v3 = A2($elm$core$Dict$get, 'max', ele.attributes); + if (_v3.$ === 'Just') { if (_v3.a === '') { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } else { @@ -5604,15 +5654,15 @@ var $author$project$Main$fromRawCustomElement = function (ele) { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } }(), - ah: function () { - var _v4 = A2($elm$core$Dict$get, 'maxlength', ele.p); - if (!_v4.$) { + maxlength: function () { + var _v4 = A2($elm$core$Dict$get, 'maxlength', ele.attributes); + if (_v4.$ === 'Just') { if (_v4.a === '') { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } else { var value = _v4.a; var _v5 = $elm$core$String$toInt(value); - if (!_v5.$) { + if (_v5.$ === 'Just') { var _int = _v5.a; return $author$project$Main$AttributeGiven(_int); } else { @@ -5623,9 +5673,9 @@ var $author$project$Main$fromRawCustomElement = function (ele) { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } }(), - ar: function () { - var _v6 = A2($elm$core$Dict$get, 'min', ele.p); - if (!_v6.$) { + min: function () { + var _v6 = A2($elm$core$Dict$get, 'min', ele.attributes); + if (_v6.$ === 'Just') { if (_v6.a === '') { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } else { @@ -5636,9 +5686,9 @@ var $author$project$Main$fromRawCustomElement = function (ele) { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } }(), - aM: function () { - var _v7 = A2($elm$core$Dict$get, 'multiple', ele.p); - if (!_v7.$) { + multiple: function () { + var _v7 = A2($elm$core$Dict$get, 'multiple', ele.attributes); + if (_v7.$ === 'Just') { switch (_v7.a) { case '': return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); @@ -5666,7 +5716,7 @@ var $elm_community$json_extra$Json$Decode$Extra$optionalField = F2( $elm$json$Json$Decode$decodeValue, A2($elm$json$Json$Decode$field, fieldName, $elm$json$Json$Decode$value), json); - if (!_v0.$) { + if (_v0.$ === 'Ok') { var val = _v0.a; return A2( $elm$json$Json$Decode$map, @@ -5680,7 +5730,7 @@ var $elm_community$json_extra$Json$Decode$Extra$optionalField = F2( }); var $elm$core$Maybe$withDefault = F2( function (_default, maybe) { - if (!maybe.$) { + if (maybe.$ === 'Just') { var value = maybe.a; return value; } else { @@ -5751,7 +5801,7 @@ var $author$project$Main$decodeInputField = A2( F2( function (choices, filter) { return $author$project$Main$Dropdown( - {k: choices, e: filter}); + {choices: choices, filter: filter}); })))); case 'ChooseOne': return A2( @@ -5768,7 +5818,7 @@ var $author$project$Main$decodeInputField = A2( F2( function (choices, filter) { return $author$project$Main$ChooseOne( - {k: choices, e: filter}); + {choices: choices, filter: filter}); })))); case 'ChooseMultiple': return A2( @@ -5793,82 +5843,309 @@ var $author$project$Main$decodeInputField = A2( F4( function (choices, minRequired, maxAllowed, filter) { return $author$project$Main$ChooseMultiple( - {k: choices, e: filter, T: maxAllowed, P: minRequired}); + {choices: choices, filter: filter, maxAllowed: maxAllowed, minRequired: minRequired}); })))))); default: return $elm$json$Json$Decode$fail('Unknown input field type: ' + type_); } }, A2($elm$json$Json$Decode$field, 'type', $elm$json$Json$Decode$string)); -var $author$project$Main$Optional = 1; -var $author$project$Main$System = 2; -var $author$project$Main$Required = 0; -var $author$project$Main$decodePresenceString = A2( - $elm$json$Json$Decode$andThen, - function (str) { - switch (str) { - case 'Required': - return $elm$json$Json$Decode$succeed(0); - case 'Optional': - return $elm$json$Json$Decode$succeed(1); - case 'System': - return $elm$json$Json$Decode$succeed(2); - default: - return $elm$json$Json$Decode$fail('Unknown presence: ' + str); - } - }, - $elm$json$Json$Decode$string); -var $author$project$Main$decodePresence = $elm$json$Json$Decode$oneOf( - _List_fromArray( - [ - $author$project$Main$decodePresenceString, - A2( - $elm$json$Json$Decode$andThen, - function (type_) { - switch (type_) { - case 'System': - return $elm$json$Json$Decode$succeed(2); - case 'SystemRequired': - return $elm$json$Json$Decode$succeed(2); - case 'SystemOptional': - return $elm$json$Json$Decode$succeed(1); - default: - return $elm$json$Json$Decode$fail('Unknown presence type: ' + type_); - } - }, - A2($elm$json$Json$Decode$field, 'type', $elm$json$Json$Decode$string)) - ])); -var $elm$json$Json$Decode$bool = _Json_decodeBool; -var $author$project$Main$decodeRequired = A2( - $elm$json$Json$Decode$map, - function (b) { - return b ? 0 : 1; - }, - A2($elm$json$Json$Decode$field, 'required', $elm$json$Json$Decode$bool)); -var $author$project$Main$HideWhen = function (a) { - return {$: 1, a: a}; -}; -var $author$project$Main$ShowWhen = function (a) { - return {$: 0, a: a}; +var $author$project$Main$decodeInputFieldGroup = A2( + $elm_community$json_extra$Json$Decode$Extra$andMap, + A2( + $elm$json$Json$Decode$field, + 'fields', + $elm$json$Json$Decode$list($author$project$Main$decodeInputField)), + A2( + $elm_community$json_extra$Json$Decode$Extra$andMap, + A2($elm$json$Json$Decode$field, 'heading', $elm$json$Json$Decode$string), + $elm$json$Json$Decode$succeed($author$project$Main$InputFieldGroup))); +var $author$project$Main$decodeInputFieldGroups = $elm$json$Json$Decode$list($author$project$Main$decodeInputFieldGroup); +var $elm$json$Json$Decode$dict = function (decoder) { + return A2( + $elm$json$Json$Decode$map, + $elm$core$Dict$fromList, + $elm$json$Json$Decode$keyValuePairs(decoder)); }; -var $author$project$Main$Field = F2( +var $elm$core$Tuple$pair = F2( function (a, b) { - return {$: 0, a: a, b: b}; + return _Utils_Tuple2(a, b); }); -var $author$project$Main$EndsWith = function (a) { - return {$: 2, a: a}; -}; -var $author$project$Main$Equals = function (a) { - return {$: 0, a: a}; -}; -var $author$project$Main$EqualsField = function (a) { - return {$: 4, a: a}; -}; +var $author$project$Main$decodeShortTextTypeList = function () { + var decodeInputTagAttributes = A2( + $elm_community$json_extra$Json$Decode$Extra$andMap, + A2( + $elm$json$Json$Decode$map, + $elm$core$Dict$fromList, + A2( + $elm$json$Json$Decode$field, + 'attributes', + $elm$json$Json$Decode$keyValuePairs($elm$json$Json$Decode$string))), + A2( + $elm_community$json_extra$Json$Decode$Extra$andMap, + A2( + $elm$json$Json$Decode$map, + $elm$core$Maybe$withDefault($author$project$Main$defaultInputTag), + A2($elm_community$json_extra$Json$Decode$Extra$optionalField, 'inputTag', $elm$json$Json$Decode$string)), + $elm$json$Json$Decode$succeed($elm$core$Tuple$pair))); + var decodeAttributes = A2( + $elm$json$Json$Decode$map, + function (attributes) { + return _Utils_Tuple2($author$project$Main$defaultInputTag, attributes); + }, + $elm$json$Json$Decode$dict($elm$json$Json$Decode$string)); + var customElementsFrom = function (dict) { + return A2( + $elm$core$List$map, + function (_v0) { + var inputType = _v0.a; + var _v1 = _v0.b; + var inputTag = _v1.a; + var attributes = _v1.b; + return $author$project$Main$fromRawCustomElement( + {attributes: attributes, inputTag: inputTag, inputType: inputType}); + }, + $elm$core$Dict$toList(dict)); + }; + return A2( + $elm$json$Json$Decode$map, + $elm$core$List$concatMap(customElementsFrom), + $elm$json$Json$Decode$list( + $elm$json$Json$Decode$dict( + $elm$json$Json$Decode$oneOf( + _List_fromArray( + [decodeInputTagAttributes, decodeAttributes]))))); +}(); +var $elm$core$List$filter = F2( + function (isGood, list) { + return A3( + $elm$core$List$foldr, + F2( + function (x, xs) { + return isGood(x) ? A2($elm$core$List$cons, x, xs) : xs; + }), + _List_Nil, + list); + }); +var $elm$core$List$any = F2( + function (isOkay, list) { + any: + while (true) { + if (!list.b) { + return false; + } else { + var x = list.a; + var xs = list.b; + if (isOkay(x)) { + return true; + } else { + var $temp$isOkay = isOkay, + $temp$list = xs; + isOkay = $temp$isOkay; + list = $temp$list; + continue any; + } + } + } + }); +var $elm$core$List$member = F2( + function (x, xs) { + return A2( + $elm$core$List$any, + function (a) { + return _Utils_eq(a, x); + }, + xs); + }); +var $elm$core$Basics$not = _Basics_not; +var $elm$core$Maybe$andThen = F2( + function (callback, maybeValue) { + if (maybeValue.$ === 'Just') { + var value = maybeValue.a; + return callback(value); + } else { + return $elm$core$Maybe$Nothing; + } + }); +var $elm$json$Json$Decode$nullable = function (decoder) { + return $elm$json$Json$Decode$oneOf( + _List_fromArray( + [ + $elm$json$Json$Decode$null($elm$core$Maybe$Nothing), + A2($elm$json$Json$Decode$map, $elm$core$Maybe$Just, decoder) + ])); +}; +var $elm_community$json_extra$Json$Decode$Extra$optionalNullableField = F2( + function (fieldName, decoder) { + return A2( + $elm$json$Json$Decode$map, + $elm$core$Maybe$andThen($elm$core$Basics$identity), + A2( + $elm_community$json_extra$Json$Decode$Extra$optionalField, + fieldName, + $elm$json$Json$Decode$nullable(decoder))); + }); +var $author$project$Main$decodeConfigInputFieldGroups = function () { + var defaultShortTextTypeList = _List_fromArray( + [ + $author$project$Main$fromRawCustomElement( + { + attributes: $elm$core$Dict$fromList( + _List_fromArray( + [ + _Utils_Tuple2('type', 'text') + ])), + inputTag: $author$project$Main$defaultInputTag, + inputType: 'Single-line free text' + }) + ]); + var fromShortTextTypeList = function (shortTextTypes) { + var effectiveList = _Utils_ap( + A2( + $elm$core$List$filter, + function (a) { + return !A2($elm$core$List$member, a, shortTextTypes); + }, + defaultShortTextTypeList), + shortTextTypes); + return _List_fromArray( + [ + { + fields: _Utils_ap( + $author$project$Main$allInputField, + A2($elm$core$List$map, $author$project$Main$ShortText, effectiveList)), + heading: '' + } + ]); + }; + return $elm$json$Json$Decode$oneOf( + _List_fromArray( + [ + A2($elm$json$Json$Decode$field, 'inputFieldGroups', $author$project$Main$decodeInputFieldGroups), + A2( + $elm$json$Json$Decode$map, + fromShortTextTypeList, + A2( + $elm$json$Json$Decode$map, + $elm$core$Maybe$withDefault(defaultShortTextTypeList), + A2($elm_community$json_extra$Json$Decode$Extra$optionalNullableField, 'shortTextTypeList', $author$project$Main$decodeShortTextTypeList))) + ])); +}(); +var $author$project$Main$FormField = F6( + function (label, name, presence, description, type_, visibilityRule) { + return {description: description, label: label, name: name, presence: presence, type_: type_, visibilityRule: visibilityRule}; + }); +var $elm$json$Json$Decode$at = F2( + function (fields, decoder) { + return A3($elm$core$List$foldr, $elm$json$Json$Decode$field, decoder, fields); + }); +var $author$project$Main$decodeFormFieldDescription = $elm$json$Json$Decode$oneOf( + _List_fromArray( + [ + A2( + $elm$json$Json$Decode$at, + _List_fromArray( + ['presence', 'description']), + A2( + $author$project$Main$decodeAttributeOptional, + $elm$core$Maybe$Just(''), + $elm$json$Json$Decode$string)), + A2( + $elm$json$Json$Decode$field, + 'description', + A2( + $author$project$Main$decodeAttributeOptional, + $elm$core$Maybe$Just(''), + $elm$json$Json$Decode$string)), + $elm$json$Json$Decode$succeed( + $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing)) + ])); +var $author$project$Main$decodeFormFieldMaybeName = $elm$json$Json$Decode$oneOf( + _List_fromArray( + [ + A2( + $elm$json$Json$Decode$map, + $elm$core$Maybe$Just, + A2( + $elm$json$Json$Decode$at, + _List_fromArray( + ['presence', 'name']), + $elm$json$Json$Decode$string)), + A2( + $elm$json$Json$Decode$map, + $elm$core$Maybe$Just, + A2($elm$json$Json$Decode$field, 'name', $elm$json$Json$Decode$string)), + $elm$json$Json$Decode$succeed($elm$core$Maybe$Nothing) + ])); +var $author$project$Main$Optional = {$: 'Optional'}; +var $author$project$Main$System = {$: 'System'}; +var $author$project$Main$Required = {$: 'Required'}; +var $author$project$Main$decodePresenceString = A2( + $elm$json$Json$Decode$andThen, + function (str) { + switch (str) { + case 'Required': + return $elm$json$Json$Decode$succeed($author$project$Main$Required); + case 'Optional': + return $elm$json$Json$Decode$succeed($author$project$Main$Optional); + case 'System': + return $elm$json$Json$Decode$succeed($author$project$Main$System); + default: + return $elm$json$Json$Decode$fail('Unknown presence: ' + str); + } + }, + $elm$json$Json$Decode$string); +var $author$project$Main$decodePresence = $elm$json$Json$Decode$oneOf( + _List_fromArray( + [ + $author$project$Main$decodePresenceString, + A2( + $elm$json$Json$Decode$andThen, + function (type_) { + switch (type_) { + case 'System': + return $elm$json$Json$Decode$succeed($author$project$Main$System); + case 'SystemRequired': + return $elm$json$Json$Decode$succeed($author$project$Main$System); + case 'SystemOptional': + return $elm$json$Json$Decode$succeed($author$project$Main$Optional); + default: + return $elm$json$Json$Decode$fail('Unknown presence type: ' + type_); + } + }, + A2($elm$json$Json$Decode$field, 'type', $elm$json$Json$Decode$string)) + ])); +var $elm$json$Json$Decode$bool = _Json_decodeBool; +var $author$project$Main$decodeRequired = A2( + $elm$json$Json$Decode$map, + function (b) { + return b ? $author$project$Main$Required : $author$project$Main$Optional; + }, + A2($elm$json$Json$Decode$field, 'required', $elm$json$Json$Decode$bool)); +var $author$project$Main$HideWhen = function (a) { + return {$: 'HideWhen', a: a}; +}; +var $author$project$Main$ShowWhen = function (a) { + return {$: 'ShowWhen', a: a}; +}; +var $author$project$Main$Field = F2( + function (a, b) { + return {$: 'Field', a: a, b: b}; + }); +var $author$project$Main$EndsWith = function (a) { + return {$: 'EndsWith', a: a}; +}; +var $author$project$Main$Equals = function (a) { + return {$: 'Equals', a: a}; +}; +var $author$project$Main$EqualsField = function (a) { + return {$: 'EqualsField', a: a}; +}; var $author$project$Main$GreaterThan = function (a) { - return {$: 3, a: a}; + return {$: 'GreaterThan', a: a}; }; var $author$project$Main$StringContains = function (a) { - return {$: 1, a: a}; + return {$: 'StringContains', a: a}; }; var $author$project$Main$decodeComparison = A2( $elm$json$Json$Decode$andThen, @@ -5945,33 +6222,6 @@ var $author$project$Main$decodeVisibilityRule = A2( } }, A2($elm$json$Json$Decode$field, 'type', $elm$json$Json$Decode$string)); -var $elm$core$Maybe$andThen = F2( - function (callback, maybeValue) { - if (!maybeValue.$) { - var value = maybeValue.a; - return callback(value); - } else { - return $elm$core$Maybe$Nothing; - } - }); -var $elm$json$Json$Decode$nullable = function (decoder) { - return $elm$json$Json$Decode$oneOf( - _List_fromArray( - [ - $elm$json$Json$Decode$null($elm$core$Maybe$Nothing), - A2($elm$json$Json$Decode$map, $elm$core$Maybe$Just, decoder) - ])); -}; -var $elm_community$json_extra$Json$Decode$Extra$optionalNullableField = F2( - function (fieldName, decoder) { - return A2( - $elm$json$Json$Decode$map, - $elm$core$Maybe$andThen($elm$core$Basics$identity), - A2( - $elm_community$json_extra$Json$Decode$Extra$optionalField, - fieldName, - $elm$json$Json$Decode$nullable(decoder))); - }); var $author$project$Main$decodeFormField = A2( $elm_community$json_extra$Json$Decode$Extra$andMap, A2( @@ -6015,119 +6265,48 @@ var $elm$core$Array$fromListHelp = F3( return A2( $elm$core$Array$builderToArray, true, - {y: nodeList, t: nodeListSize, x: jsArray}); + {nodeList: nodeList, nodeListSize: nodeListSize, tail: jsArray}); } else { - var $temp$list = remainingItems, - $temp$nodeList = A2( - $elm$core$List$cons, - $elm$core$Array$Leaf(jsArray), - nodeList), - $temp$nodeListSize = nodeListSize + 1; - list = $temp$list; - nodeList = $temp$nodeList; - nodeListSize = $temp$nodeListSize; - continue fromListHelp; - } - } - }); -var $elm$core$Array$fromList = function (list) { - if (!list.b) { - return $elm$core$Array$empty; - } else { - return A3($elm$core$Array$fromListHelp, list, _List_Nil, 0); - } -}; -var $author$project$Main$decodeFormFields = A2( - $elm$json$Json$Decode$map, - $elm$core$Array$fromList, - $elm$json$Json$Decode$list($author$project$Main$decodeFormField)); -var $elm$core$List$append = F2( - function (xs, ys) { - if (!ys.b) { - return xs; - } else { - return A3($elm$core$List$foldr, $elm$core$List$cons, ys, xs); - } - }); -var $elm$core$List$concat = function (lists) { - return A3($elm$core$List$foldr, $elm$core$List$append, _List_Nil, lists); -}; -var $elm$core$List$concatMap = F2( - function (f, list) { - return $elm$core$List$concat( - A2($elm$core$List$map, f, list)); - }); -var $elm$json$Json$Decode$dict = function (decoder) { - return A2( - $elm$json$Json$Decode$map, - $elm$core$Dict$fromList, - $elm$json$Json$Decode$keyValuePairs(decoder)); -}; -var $elm$core$Tuple$pair = F2( - function (a, b) { - return _Utils_Tuple2(a, b); - }); -var $author$project$Main$decodeShortTextTypeList = function () { - var decodeInputTagAttributes = A2( - $elm_community$json_extra$Json$Decode$Extra$andMap, - A2( - $elm$json$Json$Decode$map, - $elm$core$Dict$fromList, - A2( - $elm$json$Json$Decode$field, - 'attributes', - $elm$json$Json$Decode$keyValuePairs($elm$json$Json$Decode$string))), - A2( - $elm_community$json_extra$Json$Decode$Extra$andMap, - A2( - $elm$json$Json$Decode$map, - $elm$core$Maybe$withDefault($author$project$Main$defaultInputTag), - A2($elm_community$json_extra$Json$Decode$Extra$optionalField, 'inputTag', $elm$json$Json$Decode$string)), - $elm$json$Json$Decode$succeed($elm$core$Tuple$pair))); - var decodeAttributes = A2( - $elm$json$Json$Decode$map, - function (attributes) { - return _Utils_Tuple2($author$project$Main$defaultInputTag, attributes); - }, - $elm$json$Json$Decode$dict($elm$json$Json$Decode$string)); - var customElementsFrom = function (dict) { - return A2( - $elm$core$List$map, - function (_v0) { - var inputType = _v0.a; - var _v1 = _v0.b; - var inputTag = _v1.a; - var attributes = _v1.b; - return $author$project$Main$fromRawCustomElement( - {p: attributes, N: inputTag, B: inputType}); - }, - $elm$core$Dict$toList(dict)); - }; - return A2( - $elm$json$Json$Decode$map, - $elm$core$List$concatMap(customElementsFrom), - $elm$json$Json$Decode$list( - $elm$json$Json$Decode$dict( - $elm$json$Json$Decode$oneOf( - _List_fromArray( - [decodeInputTagAttributes, decodeAttributes]))))); -}(); + var $temp$list = remainingItems, + $temp$nodeList = A2( + $elm$core$List$cons, + $elm$core$Array$Leaf(jsArray), + nodeList), + $temp$nodeListSize = nodeListSize + 1; + list = $temp$list; + nodeList = $temp$nodeList; + nodeListSize = $temp$nodeListSize; + continue fromListHelp; + } + } + }); +var $elm$core$Array$fromList = function (list) { + if (!list.b) { + return $elm$core$Array$empty; + } else { + return A3($elm$core$Array$fromListHelp, list, _List_Nil, 0); + } +}; +var $author$project$Main$decodeFormFields = A2( + $elm$json$Json$Decode$map, + $elm$core$Array$fromList, + $elm$json$Json$Decode$list($author$project$Main$decodeFormField)); var $elm_community$json_extra$Json$Decode$Extra$fromMaybe = F2( function (error, val) { - if (!val.$) { + if (val.$ === 'Just') { var v = val.a; return $elm$json$Json$Decode$succeed(v); } else { return $elm$json$Json$Decode$fail(error); } }); -var $author$project$Main$CollectData = {$: 1}; +var $author$project$Main$CollectData = {$: 'CollectData'}; var $author$project$Main$viewModeFromString = function (str) { switch (str) { case 'Editor': return $elm$core$Maybe$Just( $author$project$Main$Editor( - {aB: $elm$core$Maybe$Nothing})); + {maybeAnimate: $elm$core$Maybe$Nothing})); case 'CollectData': return $elm$core$Maybe$Just($author$project$Main$CollectData); default: @@ -6141,23 +6320,7 @@ var $author$project$Main$decodeViewMode = A2( var $elm$json$Json$Encode$null = _Json_encodeNull; var $author$project$Main$decodeConfig = A2( $elm_community$json_extra$Json$Decode$Extra$andMap, - A2( - $elm$json$Json$Decode$map, - $elm$core$Maybe$withDefault( - _List_fromArray( - [ - $author$project$Main$fromRawCustomElement( - { - p: $elm$core$Dict$fromList( - _List_fromArray( - [ - _Utils_Tuple2('type', 'text') - ])), - N: $author$project$Main$defaultInputTag, - B: 'Single-line free text' - }) - ])), - A2($elm_community$json_extra$Json$Decode$Extra$optionalNullableField, 'shortTextTypeList', $author$project$Main$decodeShortTextTypeList)), + $author$project$Main$decodeConfigInputFieldGroups, A2( $elm_community$json_extra$Json$Decode$Extra$andMap, A2( @@ -6176,7 +6339,7 @@ var $author$project$Main$decodeConfig = A2( $elm$json$Json$Decode$map, $elm$core$Maybe$withDefault( $author$project$Main$Editor( - {aB: $elm$core$Maybe$Nothing})), + {maybeAnimate: $elm$core$Maybe$Nothing})), A2($elm_community$json_extra$Json$Decode$Extra$optionalNullableField, 'viewMode', $author$project$Main$decodeViewMode)), $elm$json$Json$Decode$succeed($author$project$Main$Config))))); var $elm$core$List$singleton = function (value) { @@ -6194,9 +6357,9 @@ var $author$project$Main$decodeListOrSingleton = function (decoder) { var $author$project$Main$encodeAttributeOptional = F2( function (encodeValue, attributeOptional) { switch (attributeOptional.$) { - case 0: + case 'AttributeNotNeeded': return $elm$json$Json$Encode$null; - case 1: + case 'AttributeInvalid': return $elm$json$Json$Encode$null; default: var value = attributeOptional.a; @@ -6205,10 +6368,10 @@ var $author$project$Main$encodeAttributeOptional = F2( }); var $author$project$Main$choiceToString = function (choice) { return _Utils_eq( - $elm$core$String$trim(choice.d), - $elm$core$String$trim(choice.j)) ? choice.d : _Utils_ap( - choice.j, - _Utils_ap($author$project$Main$choiceDelimiter, choice.d)); + $elm$core$String$trim(choice.label), + $elm$core$String$trim(choice.value)) ? choice.label : _Utils_ap( + choice.value, + _Utils_ap($author$project$Main$choiceDelimiter, choice.label)); }; var $elm$json$Json$Encode$string = _Json_wrap; var $author$project$Main$encodeChoice = function (choice) { @@ -6225,11 +6388,11 @@ var $elm$json$Json$Encode$object = function (pairs) { var v = _v0.b; return A3(_Json_addField, k, v, obj); }), - _Json_emptyObject(0), + _Json_emptyObject(_Utils_Tuple0), pairs)); }; var $author$project$Main$encodeChoiceFilter = function (filter) { - if (!filter.$) { + if (filter.$ === 'FilterStartsWithFieldValueOf') { var fieldName = filter.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6264,17 +6427,17 @@ var $elm$core$Tuple$mapSecond = F2( func(y)); }); var $author$project$Main$encodePairsFromRawCustomElements = function (customElement) { - var inputTagAttrs = _Utils_eq(customElement.N, $author$project$Main$defaultInputTag) ? _List_Nil : _List_fromArray( + var inputTagAttrs = _Utils_eq(customElement.inputTag, $author$project$Main$defaultInputTag) ? _List_Nil : _List_fromArray( [ _Utils_Tuple2( 'inputTag', - $elm$json$Json$Encode$string(customElement.N)) + $elm$json$Json$Encode$string(customElement.inputTag)) ]); var encodedAttrs = function () { var _v0 = A2( $elm$core$List$map, $elm$core$Tuple$mapSecond($elm$json$Json$Encode$string), - $elm$core$Dict$toList(customElement.p)); + $elm$core$Dict$toList(customElement.attributes)); if (!_v0.b) { return _List_Nil; } else { @@ -6291,13 +6454,13 @@ var $author$project$Main$encodePairsFromRawCustomElements = function (customElem $elm$core$List$cons, _Utils_Tuple2( 'inputType', - $elm$json$Json$Encode$string(customElement.B)), + $elm$json$Json$Encode$string(customElement.inputType)), _Utils_ap(inputTagAttrs, encodedAttrs)); }; var $author$project$Main$toRawCustomElement = function (ele) { var addMultipleIfGiven = function (dict) { - var _v7 = ele.aM; - if (_v7.$ === 2) { + var _v7 = ele.multiple; + if (_v7.$ === 'AttributeGiven') { if (_v7.a) { return A3($elm$core$Dict$insert, 'multiple', 'true', dict); } else { @@ -6314,8 +6477,8 @@ var $author$project$Main$toRawCustomElement = function (ele) { } }; var addMinIfGiven = function (dict) { - var _v5 = ele.ar; - if (_v5.$ === 2) { + var _v5 = ele.min; + if (_v5.$ === 'AttributeGiven') { var value = _v5.a; return A3($elm$core$Dict$insert, 'min', value, dict); } else { @@ -6329,8 +6492,8 @@ var $author$project$Main$toRawCustomElement = function (ele) { } }; var addMaxLengthIfGiven = function (dict) { - var _v3 = ele.ah; - if (_v3.$ === 2) { + var _v3 = ele.maxlength; + if (_v3.$ === 'AttributeGiven') { var _int = _v3.a; return A3( $elm$core$Dict$insert, @@ -6348,8 +6511,8 @@ var $author$project$Main$toRawCustomElement = function (ele) { } }; var addMaxIfGiven = function (dict) { - var _v1 = ele.aq; - if (_v1.$ === 2) { + var _v1 = ele.max; + if (_v1.$ === 'AttributeGiven') { var value = _v1.a; return A3($elm$core$Dict$insert, 'max', value, dict); } else { @@ -6363,9 +6526,9 @@ var $author$project$Main$toRawCustomElement = function (ele) { } }; var addDatalistIfGiven = function (dict) { - var _v0 = ele.ae; + var _v0 = ele.datalist; switch (_v0.$) { - case 2: + case 'AttributeGiven': var list = _v0.a; return A3( $elm$core$Dict$insert, @@ -6375,37 +6538,26 @@ var $author$project$Main$toRawCustomElement = function (ele) { '\n', A2($elm$core$List$map, $author$project$Main$choiceToString, list)), dict); - case 1: + case 'AttributeInvalid': return dict; default: return dict; } }; return { - p: addMaxIfGiven( + attributes: addMaxIfGiven( addMinIfGiven( addDatalistIfGiven( addMultipleIfGiven( - addMaxLengthIfGiven(ele.p))))), - N: ele.N, - B: ele.B + addMaxLengthIfGiven(ele.attributes))))), + inputTag: ele.inputTag, + inputType: ele.inputType }; }; var $author$project$Main$encodePairsFromCustomElement = function (customElement) { return $author$project$Main$encodePairsFromRawCustomElements( $author$project$Main$toRawCustomElement(customElement)); }; -var $elm$core$List$filter = F2( - function (isGood, list) { - return A3( - $elm$core$List$foldr, - F2( - function (x, xs) { - return isGood(x) ? A2($elm$core$List$cons, x, xs) : xs; - }), - _List_Nil, - list); - }); var $elm$json$Json$Encode$int = _Json_wrap; var $elm$json$Json$Encode$list = F2( function (func, entries) { @@ -6413,12 +6565,12 @@ var $elm$json$Json$Encode$list = F2( A3( $elm$core$List$foldl, _Json_addEntry(func), - _Json_emptyArray(0), + _Json_emptyArray(_Utils_Tuple0), entries)); }); var $author$project$Main$encodeInputField = function (inputField) { switch (inputField.$) { - case 0: + case 'ShortText': var customElement = inputField.a; return $elm$json$Json$Encode$object( A2( @@ -6427,7 +6579,7 @@ var $author$project$Main$encodeInputField = function (inputField) { 'type', $elm$json$Json$Encode$string('ShortText')), $author$project$Main$encodePairsFromCustomElement(customElement))); - case 1: + case 'LongText': var optionalMaxLength = inputField.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6439,9 +6591,9 @@ var $author$project$Main$encodeInputField = function (inputField) { 'maxLength', A2($author$project$Main$encodeAttributeOptional, $elm$json$Json$Encode$int, optionalMaxLength)) ])); - case 2: - var choices = inputField.a.k; - var filter = inputField.a.e; + case 'Dropdown': + var choices = inputField.a.choices; + var filter = inputField.a.filter; return $elm$json$Json$Encode$object( _Utils_ap( _List_fromArray( @@ -6457,13 +6609,13 @@ var $author$project$Main$encodeInputField = function (inputField) { A2( $elm$core$List$filter, function (_v1) { - var value = _v1.j; + var value = _v1.value; return $elm$core$String$trim(value) !== ''; }, choices))) ]), function () { - if (!filter.$) { + if (filter.$ === 'Just') { var f = filter.a; return _List_fromArray( [ @@ -6475,9 +6627,9 @@ var $author$project$Main$encodeInputField = function (inputField) { return _List_Nil; } }())); - case 3: - var choices = inputField.a.k; - var filter = inputField.a.e; + case 'ChooseOne': + var choices = inputField.a.choices; + var filter = inputField.a.filter; return $elm$json$Json$Encode$object( _Utils_ap( _List_fromArray( @@ -6493,13 +6645,13 @@ var $author$project$Main$encodeInputField = function (inputField) { A2( $elm$core$List$filter, function (_v3) { - var value = _v3.j; + var value = _v3.value; return $elm$core$String$trim(value) !== ''; }, choices))) ]), function () { - if (!filter.$) { + if (filter.$ === 'Just') { var f = filter.a; return _List_fromArray( [ @@ -6512,10 +6664,10 @@ var $author$project$Main$encodeInputField = function (inputField) { } }())); default: - var choices = inputField.a.k; - var minRequired = inputField.a.P; - var maxAllowed = inputField.a.T; - var filter = inputField.a.e; + var choices = inputField.a.choices; + var minRequired = inputField.a.minRequired; + var maxAllowed = inputField.a.maxAllowed; + var filter = inputField.a.filter; return $elm$json$Json$Encode$object( _Utils_ap( _List_fromArray( @@ -6531,14 +6683,14 @@ var $author$project$Main$encodeInputField = function (inputField) { A2( $elm$core$List$filter, function (_v5) { - var value = _v5.j; + var value = _v5.value; return $elm$core$String$trim(value) !== ''; }, choices))) ]), _Utils_ap( function () { - if (!minRequired.$) { + if (minRequired.$ === 'Just') { var min = minRequired.a; return _List_fromArray( [ @@ -6552,7 +6704,7 @@ var $author$project$Main$encodeInputField = function (inputField) { }(), _Utils_ap( function () { - if (!maxAllowed.$) { + if (maxAllowed.$ === 'Just') { var max = maxAllowed.a; return _List_fromArray( [ @@ -6565,7 +6717,7 @@ var $author$project$Main$encodeInputField = function (inputField) { } }(), function () { - if (!filter.$) { + if (filter.$ === 'Just') { var f = filter.a; return _List_fromArray( [ @@ -6580,10 +6732,10 @@ var $author$project$Main$encodeInputField = function (inputField) { } }; var $author$project$Main$encodePresence = function (presence) { - switch (presence) { - case 0: + switch (presence.$) { + case 'Required': return $elm$json$Json$Encode$string('Required'); - case 1: + case 'Optional': return $elm$json$Json$Encode$string('Optional'); default: return $elm$json$Json$Encode$string('System'); @@ -6591,7 +6743,7 @@ var $author$project$Main$encodePresence = function (presence) { }; var $author$project$Main$encodeComparison = function (comparison) { switch (comparison.$) { - case 0: + case 'Equals': var value = comparison.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6603,7 +6755,7 @@ var $author$project$Main$encodeComparison = function (comparison) { 'value', $elm$json$Json$Encode$string(value)) ])); - case 1: + case 'StringContains': var value = comparison.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6615,7 +6767,7 @@ var $author$project$Main$encodeComparison = function (comparison) { 'value', $elm$json$Json$Encode$string(value)) ])); - case 2: + case 'EndsWith': var value = comparison.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6627,7 +6779,7 @@ var $author$project$Main$encodeComparison = function (comparison) { 'value', $elm$json$Json$Encode$string(value)) ])); - case 3: + case 'GreaterThan': var value = comparison.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6671,7 +6823,7 @@ var $author$project$Main$encodeCondition = function (condition) { ])); }; var $author$project$Main$encodeVisibilityRule = function (rule) { - if (!rule.$) { + if (rule.$ === 'ShowWhen') { var conditions = rule.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6715,12 +6867,12 @@ var $author$project$Main$encodeFormFields = function (formFields) { [ _Utils_Tuple2( 'label', - $elm$json$Json$Encode$string(formField.d)), + $elm$json$Json$Encode$string(formField.label)), _Utils_Tuple2( 'name', function () { - var _v0 = formField.Q; - if (!_v0.$) { + var _v0 = formField.name; + if (_v0.$ === 'Just') { var name = _v0.a; return $elm$json$Json$Encode$string(name); } else { @@ -6729,22 +6881,22 @@ var $author$project$Main$encodeFormFields = function (formFields) { }()), _Utils_Tuple2( 'presence', - $author$project$Main$encodePresence(formField.q)), + $author$project$Main$encodePresence(formField.presence)), _Utils_Tuple2( 'description', - A2($author$project$Main$encodeAttributeOptional, $elm$json$Json$Encode$string, formField.S)), + A2($author$project$Main$encodeAttributeOptional, $elm$json$Json$Encode$string, formField.description)), _Utils_Tuple2( 'type', - $author$project$Main$encodeInputField(formField.a)), + $author$project$Main$encodeInputField(formField.type_)), _Utils_Tuple2( 'visibilityRule', - A2($elm$json$Json$Encode$list, $author$project$Main$encodeVisibilityRule, formField.m)) + A2($elm$json$Json$Encode$list, $author$project$Main$encodeVisibilityRule, formField.visibilityRule)) ]))); }, $elm$core$Array$toList(formFields))); }; var $author$project$Main$encodePortOutgoingValue = function (value) { - if (!value.$) { + if (value.$ === 'PortOutgoingFormFields') { var formFields = value.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6769,7 +6921,7 @@ var $author$project$Main$encodePortOutgoingValue = function (value) { } }; var $author$project$Main$fieldNameOf = function (formField) { - return A2($elm$core$Maybe$withDefault, formField.d, formField.Q); + return A2($elm$core$Maybe$withDefault, formField.label, formField.name); }; var $elm$core$Array$filter = F2( function (isGood, array) { @@ -6783,46 +6935,16 @@ var $elm$core$Array$filter = F2( _List_Nil, array)); }); -var $elm$core$List$any = F2( - function (isOkay, list) { - any: - while (true) { - if (!list.b) { - return false; - } else { - var x = list.a; - var xs = list.b; - if (isOkay(x)) { - return true; - } else { - var $temp$isOkay = isOkay, - $temp$list = xs; - isOkay = $temp$isOkay; - list = $temp$list; - continue any; - } - } - } - }); -var $elm$core$List$member = F2( - function (x, xs) { - return A2( - $elm$core$List$any, - function (a) { - return _Utils_eq(a, x); - }, - xs); - }); var $author$project$Main$filterValuesByFieldChoices = F2( function (field, values) { - var _v0 = field.a; + var _v0 = field.type_; switch (_v0.$) { - case 2: - var choices = _v0.a.k; + case 'Dropdown': + var choices = _v0.a.choices; var validChoiceValues = A2( $elm$core$List$map, function ($) { - return $.j; + return $.value; }, choices); return A2( @@ -6831,12 +6953,12 @@ var $author$project$Main$filterValuesByFieldChoices = F2( return A2($elm$core$List$member, value, validChoiceValues); }, values); - case 3: - var choices = _v0.a.k; + case 'ChooseOne': + var choices = _v0.a.choices; var validChoiceValues = A2( $elm$core$List$map, function ($) { - return $.j; + return $.value; }, choices); return A2( @@ -6845,12 +6967,12 @@ var $author$project$Main$filterValuesByFieldChoices = F2( return A2($elm$core$List$member, value, validChoiceValues); }, values); - case 4: - var choices = _v0.a.k; + case 'ChooseMultiple': + var choices = _v0.a.choices; var validChoiceValues = A2( $elm$core$List$map, function ($) { - return $.j; + return $.value; }, choices); return A2( @@ -6875,20 +6997,20 @@ var $elm$core$List$isEmpty = function (xs) { } }; var $author$project$Main$isUsingFilter = function (formField) { - var _v0 = formField.a; + var _v0 = formField.type_; switch (_v0.$) { - case 0: + case 'ShortText': return false; - case 1: + case 'LongText': return false; - case 4: - var filter = _v0.a.e; + case 'ChooseMultiple': + var filter = _v0.a.filter; return !_Utils_eq(filter, $elm$core$Maybe$Nothing); - case 3: - var filter = _v0.a.e; + case 'ChooseOne': + var filter = _v0.a.filter; return !_Utils_eq(filter, $elm$core$Maybe$Nothing); default: - var filter = _v0.a.e; + var filter = _v0.a.filter; return !_Utils_eq(filter, $elm$core$Maybe$Nothing); } }; @@ -6898,7 +7020,7 @@ var $elm$core$Array$length = function (_v0) { }; var $elm$core$Maybe$map = F2( function (f, maybe) { - if (!maybe.$) { + if (maybe.$ === 'Just') { var value = maybe.a; return $elm$core$Maybe$Just( f(value)); @@ -6907,7 +7029,7 @@ var $elm$core$Maybe$map = F2( } }); var $elm$core$Result$toMaybe = function (result) { - if (!result.$) { + if (result.$ === 'Ok') { var v = result.a; return $elm$core$Maybe$Just(v); } else { @@ -6926,32 +7048,10 @@ var $author$project$Main$maybeDecode = F3( jsonValue))); }); var $elm$core$Platform$Cmd$none = $elm$core$Platform$Cmd$batch(_List_Nil); -var $elm$core$Basics$not = _Basics_not; var $author$project$Main$outgoing = _Platform_outgoingPort('outgoing', $elm$core$Basics$identity); var $author$project$Main$init = function (flags) { - var defaultShortTextTypeList = _List_fromArray( - [ - $author$project$Main$fromRawCustomElement( - { - p: $elm$core$Dict$fromList( - _List_fromArray( - [ - _Utils_Tuple2('type', 'text') - ])), - N: $author$project$Main$defaultInputTag, - B: 'Single-line free text' - }) - ]); - var defaultShortTextTypeListWithout = function (shortTextTypeList) { - return A2( - $elm$core$List$filter, - function (a) { - return !A2($elm$core$List$member, a, shortTextTypeList); - }, - defaultShortTextTypeList); - }; var _v0 = A2($elm$json$Json$Decode$decodeValue, $author$project$Main$decodeConfig, flags); - if (!_v0.$) { + if (_v0.$ === 'Ok') { var config = _v0.a; var initialTrackedFormValues = $elm$core$Dict$fromList( A2( @@ -6959,8 +7059,8 @@ var $author$project$Main$init = function (flags) { function (field) { var fieldName = $author$project$Main$fieldNameOf(field); var rawValues = function () { - var _v1 = field.a; - if (_v1.$ === 4) { + var _v1 = field.type_; + if (_v1.$ === 'ChooseMultiple') { return A2( $elm$core$Maybe$withDefault, _List_Nil, @@ -6968,7 +7068,7 @@ var $author$project$Main$init = function (flags) { $author$project$Main$maybeDecode, fieldName, $author$project$Main$decodeListOrSingleton($elm$json$Json$Decode$string), - config.a7)); + config.formValues)); } else { return A2( $elm$core$Maybe$withDefault, @@ -6976,94 +7076,94 @@ var $author$project$Main$init = function (flags) { A2( $elm$core$Maybe$map, $elm$core$List$singleton, - A3($author$project$Main$maybeDecode, fieldName, $elm$json$Json$Decode$string, config.a7))); + A3($author$project$Main$maybeDecode, fieldName, $elm$json$Json$Decode$string, config.formValues))); } }(); var filteredValues = A2($author$project$Main$filterValuesByFieldChoices, field, rawValues); return _Utils_Tuple2(fieldName, filteredValues); }, - $elm$core$Array$toList(config.g))); - var effectiveShortTextTypeList = _Utils_ap( - defaultShortTextTypeListWithout(config.al), - config.al); + $elm$core$Array$toList(config.formFields))); + var allCustomElements = $author$project$Main$allCustomElementsFromGroups(config.inputFieldGroups); return _Utils_Tuple2( { - r: $elm$core$Maybe$Nothing, - g: config.g, - aW: $elm$core$Maybe$Nothing, - _: !$elm$core$Array$isEmpty( + activeFieldGroupIndex: 0, + dragged: $elm$core$Maybe$Nothing, + formFields: config.formFields, + initError: $elm$core$Maybe$Nothing, + inputFieldGroups: config.inputFieldGroups, + needsFormLogic: !$elm$core$Array$isEmpty( A2( $elm$core$Array$filter, function (f) { - return $author$project$Main$isUsingFilter(f) || (!$elm$core$List$isEmpty(f.m)); + return $author$project$Main$isUsingFilter(f) || (!$elm$core$List$isEmpty(f.visibilityRule)); }, - config.g)), - aa: $elm$core$Array$length(config.g) + 1, - F: $elm$core$Maybe$Nothing, - ak: $elm$core$Dict$fromList( + config.formFields)), + nextQuestionNumber: $elm$core$Array$length(config.formFields) + 1, + selectedFieldIndex: $elm$core$Maybe$Nothing, + shortTextTypeDict: $elm$core$Dict$fromList( A2( $elm$core$List$map, function (customElement) { - return _Utils_Tuple2(customElement.B, customElement); + return _Utils_Tuple2(customElement.inputType, customElement); }, - effectiveShortTextTypeList)), - al: effectiveShortTextTypeList, - v: initialTrackedFormValues, - ac: config.ac + allCustomElements)), + trackedFormValues: initialTrackedFormValues, + viewMode: config.viewMode }, $elm$core$Platform$Cmd$batch( _List_fromArray( [ $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( - $author$project$Main$PortOutgoingFormFields(config.g))) + $author$project$Main$PortOutgoingFormFields(config.formFields))) ]))); } else { var err = _v0.a; return _Utils_Tuple2( { - r: $elm$core$Maybe$Nothing, - g: $elm$core$Array$empty, - aW: $elm$core$Maybe$Just( + activeFieldGroupIndex: 0, + dragged: $elm$core$Maybe$Nothing, + formFields: $elm$core$Array$empty, + initError: $elm$core$Maybe$Just( $elm$json$Json$Decode$errorToString(err)), - _: false, - aa: 1, - F: $elm$core$Maybe$Nothing, - ak: $elm$core$Dict$empty, - al: _List_Nil, - v: $elm$core$Dict$empty, - ac: $author$project$Main$Editor( - {aB: $elm$core$Maybe$Nothing}) + inputFieldGroups: _List_Nil, + needsFormLogic: false, + nextQuestionNumber: 1, + selectedFieldIndex: $elm$core$Maybe$Nothing, + shortTextTypeDict: $elm$core$Dict$empty, + trackedFormValues: $elm$core$Dict$empty, + viewMode: $author$project$Main$Editor( + {maybeAnimate: $elm$core$Maybe$Nothing}) }, $elm$core$Platform$Cmd$none); } }; var $author$project$Main$OnPortIncoming = function (a) { - return {$: 1, a: a}; + return {$: 'OnPortIncoming', a: a}; }; var $author$project$Main$incoming = _Platform_incomingPort('incoming', $elm$json$Json$Decode$value); var $author$project$Main$subscriptions = function (_v0) { return $author$project$Main$incoming($author$project$Main$OnPortIncoming); }; -var $author$project$Main$AnimateYellowFade = 0; +var $author$project$Main$AnimateYellowFade = {$: 'AnimateYellowFade'}; var $author$project$Main$DoSleepDo = F2( function (a, b) { - return {$: 14, a: a, b: b}; + return {$: 'DoSleepDo', a: a, b: b}; }); var $author$project$Main$DragExisting = function (a) { - return {$: 0, a: a}; + return {$: 'DragExisting', a: a}; }; var $author$project$Main$DragNew = function (a) { - return {$: 1, a: a}; + return {$: 'DragNew', a: a}; }; var $author$project$Main$Drop = function (a) { - return {$: 13, a: a}; + return {$: 'Drop', a: a}; }; var $author$project$Main$PortOutgoingFormValues = function (a) { - return {$: 1, a: a}; + return {$: 'PortOutgoingFormValues', a: a}; }; var $author$project$Main$SetEditorAnimate = function (a) { - return {$: 7, a: a}; + return {$: 'SetEditorAnimate', a: a}; }; var $elm$core$Basics$always = F2( function (a, _v0) { @@ -7089,7 +7189,7 @@ var $elm$json$Json$Encode$dict = F3( toValue(value), obj); }), - _Json_emptyObject(0), + _Json_emptyObject(_Utils_Tuple0), dictionary)); }); var $elm$core$List$head = function (list) { @@ -7114,9 +7214,9 @@ var $elm$core$Array$indexedMap = F2( var tree = _v0.c; var tail = _v0.d; var initialBuilder = { - y: _List_Nil, - t: 0, - x: A3( + nodeList: _List_Nil, + nodeListSize: 0, + tail: A3( $elm$core$Elm$JsArray$indexedMap, func, $elm$core$Array$tailIndex(len), @@ -7124,18 +7224,18 @@ var $elm$core$Array$indexedMap = F2( }; var helper = F2( function (node, builder) { - if (!node.$) { + if (node.$ === 'SubTree') { var subTree = node.a; return A3($elm$core$Elm$JsArray$foldl, helper, builder, subTree); } else { var leaf = node.a; - var offset = builder.t * $elm$core$Array$branchFactor; + var offset = builder.nodeListSize * $elm$core$Array$branchFactor; var mappedLeaf = $elm$core$Array$Leaf( A3($elm$core$Elm$JsArray$indexedMap, func, offset, leaf)); return { - y: A2($elm$core$List$cons, mappedLeaf, builder.y), - t: builder.t + 1, - x: builder.x + nodeList: A2($elm$core$List$cons, mappedLeaf, builder.nodeList), + nodeListSize: builder.nodeListSize + 1, + tail: builder.tail }; } }); @@ -7146,13 +7246,13 @@ var $elm$core$Array$indexedMap = F2( }); var $author$project$Main$mustBeOptional = function (inputField) { switch (inputField.$) { - case 0: + case 'ShortText': return false; - case 1: + case 'LongText': return false; - case 2: + case 'Dropdown': return false; - case 3: + case 'ChooseOne': return false; default: return true; @@ -7168,7 +7268,7 @@ var $elm$core$Array$getHelp = F3( while (true) { var pos = $elm$core$Array$bitMask & (index >>> shift); var _v0 = A2($elm$core$Elm$JsArray$unsafeGet, pos, tree); - if (!_v0.$) { + if (_v0.$ === 'SubTree') { var subTree = _v0.a; var $temp$shift = shift - $elm$core$Array$shiftStep, $temp$index = index, @@ -7354,32 +7454,32 @@ var $elm_community$list_extra$List$Extra$splitAt = F2( }); var $author$project$Main$onDropped = F2( function (targetIndex, model) { - var _v0 = model.r; - if (!_v0.$) { - if (!_v0.a.$) { - var dragIndex = _v0.a.a.a6; - var dropIndex = _v0.a.a.G; - if (targetIndex.$ === 1) { + var _v0 = model.dragged; + if (_v0.$ === 'Just') { + if (_v0.a.$ === 'DragExisting') { + var dragIndex = _v0.a.a.dragIndex; + var dropIndex = _v0.a.a.dropIndex; + if (targetIndex.$ === 'Nothing') { return _Utils_update( model, - {r: $elm$core$Maybe$Nothing}); + {dragged: $elm$core$Maybe$Nothing}); } else { var index = targetIndex.a; - if (!dropIndex.$) { + if (dropIndex.$ === 'Just') { var _v3 = dropIndex.a; var dropTargetIndex = _v3.a; if (_Utils_eq(dragIndex, index) || (!_Utils_eq(index, dropTargetIndex))) { return _Utils_update( model, - {r: $elm$core$Maybe$Nothing}); + {dragged: $elm$core$Maybe$Nothing}); } else { var newFormFields = $elm$core$Array$fromList( function (list) { - var draggedField = A2($elm$core$Array$get, dragIndex, model.g); + var draggedField = A2($elm$core$Array$get, dragIndex, model.formFields); var _v5 = A2($elm_community$list_extra$List$Extra$splitAt, index, list); var before = _v5.a; var after = _v5.b; - if (!draggedField.$) { + if (draggedField.$ === 'Just') { var field = draggedField.a; return $elm$core$List$concat( _List_fromArray( @@ -7405,33 +7505,33 @@ var $author$project$Main$onDropped = F2( A2( $elm$core$List$indexedMap, $elm$core$Tuple$pair, - $elm$core$Array$toList(model.g)))))); + $elm$core$Array$toList(model.formFields)))))); return _Utils_update( model, - {r: $elm$core$Maybe$Nothing, g: newFormFields}); + {dragged: $elm$core$Maybe$Nothing, formFields: newFormFields}); } } else { return _Utils_update( model, - {r: $elm$core$Maybe$Nothing}); + {dragged: $elm$core$Maybe$Nothing}); } } } else { - var field = _v0.a.a.bU; - var dropIndex = _v0.a.a.G; - if (targetIndex.$ === 1) { + var field = _v0.a.a.field; + var dropIndex = _v0.a.a.dropIndex; + if (targetIndex.$ === 'Nothing') { return _Utils_update( model, - {r: $elm$core$Maybe$Nothing}); + {dragged: $elm$core$Maybe$Nothing}); } else { var index = targetIndex.a; - if (!dropIndex.$) { + if (dropIndex.$ === 'Just') { var _v9 = dropIndex.a; var dropTargetIndex = _v9.a; if (!_Utils_eq(index, dropTargetIndex)) { return _Utils_update( model, - {r: $elm$core$Maybe$Nothing}); + {dragged: $elm$core$Maybe$Nothing}); } else { var newFormFields = $elm$core$Array$fromList( function (list) { @@ -7442,22 +7542,22 @@ var $author$project$Main$onDropped = F2( before, A2($elm$core$List$cons, field, after)); }( - $elm$core$Array$toList(model.g))); + $elm$core$Array$toList(model.formFields))); return _Utils_update( model, - {r: $elm$core$Maybe$Nothing, g: newFormFields, aa: model.aa + 1}); + {dragged: $elm$core$Maybe$Nothing, formFields: newFormFields, nextQuestionNumber: model.nextQuestionNumber + 1}); } } else { return _Utils_update( model, - {r: $elm$core$Maybe$Nothing}); + {dragged: $elm$core$Maybe$Nothing}); } } } } else { return _Utils_update( model, - {r: $elm$core$Maybe$Nothing}); + {dragged: $elm$core$Maybe$Nothing}); } }); var $elm$core$Elm$JsArray$push = _JsArray_push; @@ -7481,7 +7581,7 @@ var $elm$core$Array$insertTailInTree = F4( } } else { var value = A2($elm$core$Elm$JsArray$unsafeGet, pos, tree); - if (!value.$) { + if (value.$ === 'SubTree') { var subTree = value.a; var newSub = $elm$core$Array$SubTree( A4($elm$core$Array$insertTailInTree, shift - $elm$core$Array$shiftStep, index, tail, subTree)); @@ -7542,14 +7642,14 @@ var $elm$core$Array$push = F2( var $elm$core$Process$sleep = _Process_sleep; var $author$project$Main$stringFromInputField = function (inputField) { switch (inputField.$) { - case 0: - var inputType = inputField.a.B; + case 'ShortText': + var inputType = inputField.a.inputType; return inputType; - case 1: + case 'LongText': return 'Multi-line description'; - case 2: + case 'Dropdown': return 'Dropdown'; - case 3: + case 'ChooseOne': return 'Radio buttons'; default: return 'Checkboxes'; @@ -7559,7 +7659,7 @@ var $elm$core$Array$setHelp = F4( function (shift, index, value, tree) { var pos = $elm$core$Array$bitMask & (index >>> shift); var _v0 = A2($elm$core$Elm$JsArray$unsafeGet, pos, tree); - if (!_v0.$) { + if (_v0.$ === 'SubTree') { var subTree = _v0.a; var newSub = A4($elm$core$Array$setHelp, shift - $elm$core$Array$shiftStep, index, value, subTree); return A3( @@ -7602,7 +7702,7 @@ var $author$project$Main$swapArrayIndex = F3( var maybeJ = A2($elm$core$Array$get, j, arr); var maybeI = A2($elm$core$Array$get, i, arr); var _v0 = _Utils_Tuple2(maybeI, maybeJ); - if ((!_v0.a.$) && (!_v0.b.$)) { + if ((_v0.a.$ === 'Just') && (_v0.b.$ === 'Just')) { var iVal = _v0.a.a; var jVal = _v0.b.a; return A3( @@ -7635,42 +7735,42 @@ var $elm$core$Array$toIndexedList = function (array) { }; var $author$project$Main$updateDragged = F2( function (maybeDroppable, dragged) { - if (maybeDroppable.$ === 1) { + if (maybeDroppable.$ === 'Nothing') { return dragged; } else { var _v1 = maybeDroppable.a; var targetField = _v1.b; - if (!dragged.$) { + if (dragged.$ === 'DragExisting') { var details = dragged.a; - var _v3 = details.G; - if (!_v3.$) { + var _v3 = details.dropIndex; + if (_v3.$ === 'Just') { var _v4 = _v3.a; var existingField = _v4.b; return _Utils_eq(existingField, targetField) ? dragged : $author$project$Main$DragExisting( _Utils_update( details, - {G: maybeDroppable})); + {dropIndex: maybeDroppable})); } else { return $author$project$Main$DragExisting( _Utils_update( details, - {G: maybeDroppable})); + {dropIndex: maybeDroppable})); } } else { var details = dragged.a; - var _v5 = details.G; - if (!_v5.$) { + var _v5 = details.dropIndex; + if (_v5.$ === 'Just') { var _v6 = _v5.a; var existingField = _v6.b; return _Utils_eq(existingField, targetField) ? dragged : $author$project$Main$DragNew( _Utils_update( details, - {G: maybeDroppable})); + {dropIndex: maybeDroppable})); } else { return $author$project$Main$DragNew( _Utils_update( details, - {G: maybeDroppable})); + {dropIndex: maybeDroppable})); } } } @@ -7705,15 +7805,15 @@ var $elm_community$list_extra$List$Extra$removeAt = F2( var $author$project$Main$toggleAttributeOptional = F2( function (toggle, attributeOptional) { switch (attributeOptional.$) { - case 0: - if (attributeOptional.a.$ === 1) { + case 'AttributeNotNeeded': + if (attributeOptional.a.$ === 'Nothing') { var _v1 = attributeOptional.a; return toggle ? $author$project$Main$AttributeInvalid('') : attributeOptional; } else { var a = attributeOptional.a.a; return toggle ? $author$project$Main$AttributeGiven(a) : attributeOptional; } - case 1: + case 'AttributeInvalid': return toggle ? attributeOptional : $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); default: var a = attributeOptional.a; @@ -7726,16 +7826,16 @@ var $author$project$Main$updateComparison = F2( switch (comparisonType) { case 'Equals': switch (comparison.$) { - case 0: + case 'Equals': var str = comparison.a; return $author$project$Main$Equals(str); - case 1: + case 'StringContains': var str = comparison.a; return $author$project$Main$Equals(str); - case 2: + case 'EndsWith': var str = comparison.a; return $author$project$Main$Equals(str); - case 3: + case 'GreaterThan': var str = comparison.a; return $author$project$Main$Equals(str); default: @@ -7744,16 +7844,16 @@ var $author$project$Main$updateComparison = F2( } case 'StringContains': switch (comparison.$) { - case 0: + case 'Equals': var str = comparison.a; return $author$project$Main$StringContains(str); - case 1: + case 'StringContains': var str = comparison.a; return $author$project$Main$StringContains(str); - case 2: + case 'EndsWith': var str = comparison.a; return $author$project$Main$StringContains(str); - case 3: + case 'GreaterThan': var str = comparison.a; return $author$project$Main$StringContains(str); default: @@ -7762,16 +7862,16 @@ var $author$project$Main$updateComparison = F2( } case 'EndsWith': switch (comparison.$) { - case 0: + case 'Equals': var str = comparison.a; return $author$project$Main$EndsWith(str); - case 1: + case 'StringContains': var str = comparison.a; return $author$project$Main$EndsWith(str); - case 2: + case 'EndsWith': var str = comparison.a; return $author$project$Main$EndsWith(str); - case 3: + case 'GreaterThan': var str = comparison.a; return $author$project$Main$EndsWith(str); default: @@ -7780,16 +7880,16 @@ var $author$project$Main$updateComparison = F2( } case 'GreaterThan': switch (comparison.$) { - case 0: + case 'Equals': var str = comparison.a; return $author$project$Main$GreaterThan(str); - case 1: + case 'StringContains': var str = comparison.a; return $author$project$Main$GreaterThan(str); - case 2: + case 'EndsWith': var str = comparison.a; return $author$project$Main$GreaterThan(str); - case 3: + case 'GreaterThan': var str = comparison.a; return $author$project$Main$GreaterThan(str); default: @@ -7798,16 +7898,16 @@ var $author$project$Main$updateComparison = F2( } case 'EqualsField': switch (comparison.$) { - case 0: + case 'Equals': var str = comparison.a; return $author$project$Main$EqualsField(str); - case 1: + case 'StringContains': var str = comparison.a; return $author$project$Main$EqualsField(str); - case 2: + case 'EndsWith': var str = comparison.a; return $author$project$Main$EqualsField(str); - case 3: + case 'GreaterThan': var str = comparison.a; return $author$project$Main$EqualsField(str); default: @@ -7830,13 +7930,13 @@ var $author$project$Main$updateComparisonInCondition = F2( var $author$project$Main$updateComparisonValue = F2( function (newValue, comparison) { switch (comparison.$) { - case 0: + case 'Equals': return $author$project$Main$Equals(newValue); - case 1: + case 'StringContains': return $author$project$Main$StringContains(newValue); - case 2: + case 'EndsWith': return $author$project$Main$EndsWith(newValue); - case 3: + case 'GreaterThan': return $author$project$Main$GreaterThan(newValue); default: return $author$project$Main$EqualsField(newValue); @@ -7854,7 +7954,7 @@ var $author$project$Main$updateConditions = F3( }); var $author$project$Main$updateConditionsInRule = F2( function (updater, rule) { - if (!rule.$) { + if (rule.$ === 'ShowWhen') { var conditions = rule.a; return $author$project$Main$ShowWhen( updater(conditions)); @@ -7884,7 +7984,7 @@ var $author$project$Main$updateVisibilityRuleAt = F3( rules); }); var $author$project$Main$visibilityRuleCondition = function (rule) { - if (!rule.$) { + if (rule.$ === 'ShowWhen') { var conditions = rule.a; return conditions; } else { @@ -7895,43 +7995,43 @@ var $author$project$Main$visibilityRuleCondition = function (rule) { var $author$project$Main$updateFormField = F5( function (msg, fieldIndex, string, formFields, formField) { switch (msg.$) { - case 0: + case 'OnLabelInput': return _Utils_update( formField, - {d: string}); - case 1: + {label: string}); + case 'OnDescriptionInput': return (string === '') ? _Utils_update( formField, { - S: $author$project$Main$AttributeInvalid('') + description: $author$project$Main$AttributeInvalid('') }) : _Utils_update( formField, { - S: $author$project$Main$AttributeGiven(string) + description: $author$project$Main$AttributeGiven(string) }); - case 2: + case 'OnDescriptionToggle': var bool = msg.a; return _Utils_update( formField, { - S: A2($author$project$Main$toggleAttributeOptional, bool, formField.S) + description: A2($author$project$Main$toggleAttributeOptional, bool, formField.description) }); - case 3: + case 'OnRequiredInput': var bool = msg.a; return bool ? _Utils_update( formField, - {q: 0}) : _Utils_update( + {presence: $author$project$Main$Required}) : _Utils_update( formField, - {q: 1}); - case 16: + {presence: $author$project$Main$Optional}); + case 'OnCheckboxMinRequiredInput': var minStr = msg.a; - var _v1 = formField.a; - if (_v1.$ === 4) { + var _v1 = formField.type_; + if (_v1.$ === 'ChooseMultiple') { var settings = _v1.a; var newMinRequired = $elm$core$String$isEmpty(minStr) ? $elm$core$Maybe$Nothing : $elm$core$String$toInt(minStr); var adjustedMinRequired = function () { - var _v3 = _Utils_Tuple2(newMinRequired, settings.T); - if ((!_v3.a.$) && (!_v3.b.$)) { + var _v3 = _Utils_Tuple2(newMinRequired, settings.maxAllowed); + if ((_v3.a.$ === 'Just') && (_v3.b.$ === 'Just')) { var min = _v3.a.a; var max = _v3.b.a; return (_Utils_cmp(min, max) > 0) ? $elm$core$Maybe$Just(max) : $elm$core$Maybe$Just(min); @@ -7941,12 +8041,12 @@ var $author$project$Main$updateFormField = F5( } }(); var finalMinRequired = function () { - if (!adjustedMinRequired.$) { + if (adjustedMinRequired.$ === 'Just') { var min = adjustedMinRequired.a; return (_Utils_cmp( min, - $elm$core$List$length(settings.k)) > 0) ? $elm$core$Maybe$Just( - $elm$core$List$length(settings.k)) : $elm$core$Maybe$Just(min); + $elm$core$List$length(settings.choices)) > 0) ? $elm$core$Maybe$Just( + $elm$core$List$length(settings.choices)) : $elm$core$Maybe$Just(min); } else { return $elm$core$Maybe$Nothing; } @@ -7954,23 +8054,23 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - a: $author$project$Main$ChooseMultiple( + type_: $author$project$Main$ChooseMultiple( _Utils_update( settings, - {P: finalMinRequired})) + {minRequired: finalMinRequired})) }); } else { return formField; } - case 17: + case 'OnCheckboxMaxAllowedInput': var maxStr = msg.a; - var _v4 = formField.a; - if (_v4.$ === 4) { + var _v4 = formField.type_; + if (_v4.$ === 'ChooseMultiple') { var settings = _v4.a; var newMaxAllowed = $elm$core$String$isEmpty(maxStr) ? $elm$core$Maybe$Nothing : $elm$core$String$toInt(maxStr); var adjustedMaxAllowed = function () { - var _v6 = _Utils_Tuple2(newMaxAllowed, settings.P); - if ((!_v6.a.$) && (!_v6.b.$)) { + var _v6 = _Utils_Tuple2(newMaxAllowed, settings.minRequired); + if ((_v6.a.$ === 'Just') && (_v6.b.$ === 'Just')) { var max = _v6.a.a; var min = _v6.b.a; return (_Utils_cmp(max, min) < 0) ? $elm$core$Maybe$Just(min) : $elm$core$Maybe$Just(max); @@ -7980,12 +8080,12 @@ var $author$project$Main$updateFormField = F5( } }(); var finalMaxAllowed = function () { - if (!adjustedMaxAllowed.$) { + if (adjustedMaxAllowed.$ === 'Just') { var max = adjustedMaxAllowed.a; return (_Utils_cmp( max, - $elm$core$List$length(settings.k)) > 0) ? $elm$core$Maybe$Just( - $elm$core$List$length(settings.k)) : $elm$core$Maybe$Just(max); + $elm$core$List$length(settings.choices)) > 0) ? $elm$core$Maybe$Just( + $elm$core$List$length(settings.choices)) : $elm$core$Maybe$Just(max); } else { return $elm$core$Maybe$Nothing; } @@ -7993,82 +8093,82 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - a: $author$project$Main$ChooseMultiple( + type_: $author$project$Main$ChooseMultiple( _Utils_update( settings, - {T: finalMaxAllowed})) + {maxAllowed: finalMaxAllowed})) }); } else { return formField; } - case 20: + case 'OnDateMinInput': var minStr = msg.a; - var _v7 = formField.a; - if (!_v7.$) { + var _v7 = formField.type_; + if (_v7.$ === 'ShortText') { var customElement = _v7.a; var newCustomElement = _Utils_update( customElement, { - ar: $elm$core$String$isEmpty(minStr) ? $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing) : $author$project$Main$AttributeGiven(minStr) + min: $elm$core$String$isEmpty(minStr) ? $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing) : $author$project$Main$AttributeGiven(minStr) }); return _Utils_update( formField, { - a: $author$project$Main$ShortText(newCustomElement) + type_: $author$project$Main$ShortText(newCustomElement) }); } else { return formField; } - case 21: + case 'OnDateMaxInput': var maxStr = msg.a; - var _v8 = formField.a; - if (!_v8.$) { + var _v8 = formField.type_; + if (_v8.$ === 'ShortText') { var customElement = _v8.a; var newCustomElement = _Utils_update( customElement, { - aq: $elm$core$String$isEmpty(maxStr) ? $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing) : $author$project$Main$AttributeGiven(maxStr) + max: $elm$core$String$isEmpty(maxStr) ? $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing) : $author$project$Main$AttributeGiven(maxStr) }); return _Utils_update( formField, { - a: $author$project$Main$ShortText(newCustomElement) + type_: $author$project$Main$ShortText(newCustomElement) }); } else { return formField; } - case 4: - var _v9 = formField.a; + case 'OnChoicesInput': + var _v9 = formField.type_; switch (_v9.$) { - case 0: + case 'ShortText': return formField; - case 1: + case 'LongText': return formField; - case 2: + case 'Dropdown': var settings = _v9.a; return _Utils_update( formField, { - a: $author$project$Main$Dropdown( + type_: $author$project$Main$Dropdown( _Utils_update( settings, { - k: A2( + choices: A2( $elm$core$List$map, $author$project$Main$choiceFromString, $elm$core$String$lines(string)) })) }); - case 3: + case 'ChooseOne': var settings = _v9.a; return _Utils_update( formField, { - a: $author$project$Main$ChooseOne( + type_: $author$project$Main$ChooseOne( _Utils_update( settings, { - k: A2( + choices: A2( $elm$core$List$map, $author$project$Main$choiceFromString, $elm$core$String$lines(string)) @@ -8082,8 +8182,8 @@ var $author$project$Main$updateFormField = F5( $elm$core$String$lines(string)); var newChoicesCount = $elm$core$List$length(newChoices); var newMaxAllowed = function () { - var _v11 = settings.T; - if (!_v11.$) { + var _v11 = settings.maxAllowed; + if (_v11.$ === 'Just') { var max = _v11.a; return (_Utils_cmp(max, newChoicesCount) > 0) ? ((newChoicesCount > 0) ? $elm$core$Maybe$Just(newChoicesCount) : $elm$core$Maybe$Nothing) : $elm$core$Maybe$Just(max); } else { @@ -8091,8 +8191,8 @@ var $author$project$Main$updateFormField = F5( } }(); var newMinRequired = function () { - var _v10 = settings.P; - if (!_v10.$) { + var _v10 = settings.minRequired; + if (_v10.$ === 'Just') { var min = _v10.a; return (_Utils_cmp(min, newChoicesCount) > 0) ? ((newChoicesCount > 0) ? $elm$core$Maybe$Just(newChoicesCount) : $elm$core$Maybe$Nothing) : $elm$core$Maybe$Just(min); } else { @@ -8102,79 +8202,79 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - a: $author$project$Main$ChooseMultiple( + type_: $author$project$Main$ChooseMultiple( _Utils_update( settings, - {k: newChoices, T: newMaxAllowed, P: newMinRequired})) + {choices: newChoices, maxAllowed: newMaxAllowed, minRequired: newMinRequired})) }); } - case 5: + case 'OnMultipleToggle': var bool = msg.a; - var _v12 = formField.a; + var _v12 = formField.type_; switch (_v12.$) { - case 0: + case 'ShortText': var customElement = _v12.a; var newCustomElement = _Utils_update( customElement, { - aM: $author$project$Main$AttributeGiven(bool) + multiple: $author$project$Main$AttributeGiven(bool) }); return _Utils_update( formField, { - a: $author$project$Main$ShortText(newCustomElement) + type_: $author$project$Main$ShortText(newCustomElement) }); - case 1: + case 'LongText': return formField; - case 2: + case 'Dropdown': return formField; - case 3: + case 'ChooseOne': return formField; default: return formField; } - case 6: + case 'OnMaxLengthToggle': var bool = msg.a; - var _v13 = formField.a; + var _v13 = formField.type_; switch (_v13.$) { - case 0: + case 'ShortText': var customElement = _v13.a; var newCustomElement = _Utils_update( customElement, { - ah: A2($author$project$Main$toggleAttributeOptional, bool, customElement.ah) + maxlength: A2($author$project$Main$toggleAttributeOptional, bool, customElement.maxlength) }); return _Utils_update( formField, { - a: $author$project$Main$ShortText(newCustomElement) + type_: $author$project$Main$ShortText(newCustomElement) }); - case 1: + case 'LongText': var maxlength = _v13.a; return _Utils_update( formField, { - a: $author$project$Main$LongText( + type_: $author$project$Main$LongText( A2($author$project$Main$toggleAttributeOptional, bool, maxlength)) }); - case 2: + case 'Dropdown': return formField; - case 3: + case 'ChooseOne': return formField; default: return formField; } - case 7: - var _v14 = formField.a; + case 'OnMaxLengthInput': + var _v14 = formField.type_; switch (_v14.$) { - case 0: + case 'ShortText': var customElement = _v14.a; var newCustomElement = _Utils_update( customElement, { - ah: function () { + maxlength: function () { var _v15 = $elm$core$String$toInt(string); - if (!_v15.$) { + if (_v15.$ === 'Just') { var i = _v15.a; return $author$project$Main$AttributeGiven(i); } else { @@ -8185,12 +8285,12 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - a: $author$project$Main$ShortText(newCustomElement) + type_: $author$project$Main$ShortText(newCustomElement) }); - case 1: + case 'LongText': var newMaxlength = function () { var _v16 = $elm$core$String$toInt(string); - if (!_v16.$) { + if (_v16.$ === 'Just') { var i = _v16.a; return $author$project$Main$AttributeGiven(i); } else { @@ -8200,85 +8300,85 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - a: $author$project$Main$LongText(newMaxlength) + type_: $author$project$Main$LongText(newMaxlength) }); - case 2: + case 'Dropdown': return formField; - case 3: + case 'ChooseOne': return formField; default: return formField; } - case 18: + case 'OnDateMinToggle': var bool = msg.a; - var _v17 = formField.a; - if (!_v17.$) { + var _v17 = formField.type_; + if (_v17.$ === 'ShortText') { var customElement = _v17.a; var newCustomElement = _Utils_update( customElement, { - ar: A2($author$project$Main$toggleAttributeOptional, bool, customElement.ar) + min: A2($author$project$Main$toggleAttributeOptional, bool, customElement.min) }); return _Utils_update( formField, { - a: $author$project$Main$ShortText(newCustomElement) + type_: $author$project$Main$ShortText(newCustomElement) }); } else { return formField; } - case 19: + case 'OnDateMaxToggle': var bool = msg.a; - var _v18 = formField.a; - if (!_v18.$) { + var _v18 = formField.type_; + if (_v18.$ === 'ShortText') { var customElement = _v18.a; var newCustomElement = _Utils_update( customElement, { - aq: A2($author$project$Main$toggleAttributeOptional, bool, customElement.aq) + max: A2($author$project$Main$toggleAttributeOptional, bool, customElement.max) }); return _Utils_update( formField, { - a: $author$project$Main$ShortText(newCustomElement) + type_: $author$project$Main$ShortText(newCustomElement) }); } else { return formField; } - case 8: + case 'OnDatalistToggle': var bool = msg.a; - var _v19 = formField.a; + var _v19 = formField.type_; switch (_v19.$) { - case 0: + case 'ShortText': var customElement = _v19.a; var newCustomElement = _Utils_update( customElement, { - ae: A2($author$project$Main$toggleAttributeOptional, bool, customElement.ae) + datalist: A2($author$project$Main$toggleAttributeOptional, bool, customElement.datalist) }); return _Utils_update( formField, { - a: $author$project$Main$ShortText(newCustomElement) + type_: $author$project$Main$ShortText(newCustomElement) }); - case 1: + case 'LongText': return formField; - case 2: + case 'Dropdown': return formField; - case 3: + case 'ChooseOne': return formField; default: return formField; } - case 9: - var _v20 = formField.a; + case 'OnDatalistInput': + var _v20 = formField.type_; switch (_v20.$) { - case 0: + case 'ShortText': var customElement = _v20.a; var newCustomElement = _Utils_update( customElement, { - ae: function () { + datalist: function () { var _v21 = A2($elm$core$String$split, '\n', string); if (!_v21.b) { return $author$project$Main$AttributeInvalid(string); @@ -8292,24 +8392,24 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - a: $author$project$Main$ShortText(newCustomElement) + type_: $author$project$Main$ShortText(newCustomElement) }); - case 1: + case 'LongText': return formField; - case 2: + case 'Dropdown': return formField; - case 3: + case 'ChooseOne': return formField; default: return formField; } - case 10: + case 'OnVisibilityRuleTypeInput': if (msg.b === '\n') { var ruleIndex = msg.a; return _Utils_update( formField, { - m: A2($elm_community$list_extra$List$Extra$removeAt, ruleIndex, formField.m) + visibilityRule: A2($elm_community$list_extra$List$Extra$removeAt, ruleIndex, formField.visibilityRule) }); } else { var ruleIndex = msg.a; @@ -8317,7 +8417,7 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - m: A3( + visibilityRule: A3( $author$project$Main$updateVisibilityRuleAt, ruleIndex, function (rule) { @@ -8332,17 +8432,17 @@ var $author$project$Main$updateFormField = F5( return rule; } }, - formField.m) + formField.visibilityRule) }); } - case 11: + case 'OnVisibilityConditionTypeInput': var ruleIndex = msg.a; var conditionIndex = msg.b; var str = msg.c; return _Utils_update( formField, { - m: A3( + visibilityRule: A3( $author$project$Main$updateVisibilityRuleAt, ruleIndex, $author$project$Main$updateConditionsInRule( @@ -8351,21 +8451,21 @@ var $author$project$Main$updateFormField = F5( conditionIndex, $author$project$Main$updateComparisonInCondition( $author$project$Main$updateComparison(str)))), - formField.m) + formField.visibilityRule) }); - case 12: + case 'OnVisibilityConditionFieldInput': if (msg.c === '\n') { var ruleIndex = msg.a; var conditionIndex = msg.b; return _Utils_update( formField, { - m: A3( + visibilityRule: A3( $author$project$Main$updateVisibilityRuleAt, ruleIndex, $author$project$Main$updateConditionsInRule( $elm_community$list_extra$List$Extra$removeAt(conditionIndex)), - formField.m) + formField.visibilityRule) }); } else { var ruleIndex = msg.a; @@ -8374,7 +8474,7 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - m: A3( + visibilityRule: A3( $author$project$Main$updateVisibilityRuleAt, ruleIndex, $author$project$Main$updateConditionsInRule( @@ -8383,17 +8483,17 @@ var $author$project$Main$updateFormField = F5( conditionIndex, $author$project$Main$updateFieldnameInCondition( $elm$core$Basics$always(newFieldName)))), - formField.m) + formField.visibilityRule) }); } - case 13: + case 'OnVisibilityConditionValueInput': var ruleIndex = msg.a; var conditionIndex = msg.b; var newValue = msg.c; return _Utils_update( formField, { - m: A3( + visibilityRule: A3( $author$project$Main$updateVisibilityRuleAt, ruleIndex, $author$project$Main$updateConditionsInRule( @@ -8402,14 +8502,14 @@ var $author$project$Main$updateFormField = F5( conditionIndex, $author$project$Main$updateComparisonInCondition( $author$project$Main$updateComparisonValue(newValue)))), - formField.m) + formField.visibilityRule) }); - case 14: + case 'OnAddVisibilityRule': return _Utils_update( formField, { - m: _Utils_ap( - formField.m, + visibilityRule: _Utils_ap( + formField.visibilityRule, _List_fromArray( [ $author$project$Main$ShowWhen( @@ -8422,7 +8522,7 @@ var $author$project$Main$updateFormField = F5( ])) ])) }); - case 15: + case 'OnVisibilityConditionDuplicate': var ruleIndex = msg.a; var newCondition = function (conditions) { var _v24 = $elm$core$List$reverse(conditions); @@ -8442,11 +8542,11 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - m: A3( + visibilityRule: A3( $author$project$Main$updateVisibilityRuleAt, ruleIndex, function (rule) { - if (!rule.$) { + if (rule.$ === 'ShowWhen') { var conditions = rule.a; return $author$project$Main$ShowWhen( _Utils_ap( @@ -8466,56 +8566,56 @@ var $author$project$Main$updateFormField = F5( ]))); } }, - formField.m) + formField.visibilityRule) }); - case 22: + case 'OnFilterToggle': var checked = msg.a; - var _v25 = formField.a; + var _v25 = formField.type_; switch (_v25.$) { - case 2: + case 'Dropdown': var settings = _v25.a; var newFilter = checked ? $elm$core$Maybe$Just( $author$project$Main$FilterStartsWithFieldValueOf('')) : $elm$core$Maybe$Nothing; return _Utils_update( formField, { - a: $author$project$Main$Dropdown( + type_: $author$project$Main$Dropdown( _Utils_update( settings, - {e: newFilter})) + {filter: newFilter})) }); - case 3: + case 'ChooseOne': var settings = _v25.a; var newFilter = checked ? $elm$core$Maybe$Just( $author$project$Main$FilterStartsWithFieldValueOf('')) : $elm$core$Maybe$Nothing; return _Utils_update( formField, { - a: $author$project$Main$ChooseOne( + type_: $author$project$Main$ChooseOne( _Utils_update( settings, - {e: newFilter})) + {filter: newFilter})) }); - case 4: + case 'ChooseMultiple': var settings = _v25.a; var newFilter = checked ? $elm$core$Maybe$Just( $author$project$Main$FilterStartsWithFieldValueOf('')) : $elm$core$Maybe$Nothing; return _Utils_update( formField, { - a: $author$project$Main$ChooseMultiple( + type_: $author$project$Main$ChooseMultiple( _Utils_update( settings, - {e: newFilter})) + {filter: newFilter})) }); default: return formField; } - case 23: + case 'OnFilterTypeSelect': var filterType = msg.a; var updateFilter = function (existingFilter) { - if (!existingFilter.$) { - if (!existingFilter.a.$) { + if (existingFilter.$ === 'Just') { + if (existingFilter.a.$ === 'FilterStartsWithFieldValueOf') { var fieldName = existingFilter.a.a; return (filterType === 'contains') ? $elm$core$Maybe$Just( $author$project$Main$FilterContainsFieldValueOf(fieldName)) : existingFilter; @@ -8530,42 +8630,42 @@ var $author$project$Main$updateFormField = F5( $author$project$Main$FilterContainsFieldValueOf('')) : $elm$core$Maybe$Nothing); } }; - var _v26 = formField.a; + var _v26 = formField.type_; switch (_v26.$) { - case 2: + case 'Dropdown': var settings = _v26.a; return _Utils_update( formField, { - a: $author$project$Main$Dropdown( + type_: $author$project$Main$Dropdown( _Utils_update( settings, { - e: updateFilter(settings.e) + filter: updateFilter(settings.filter) })) }); - case 3: + case 'ChooseOne': var settings = _v26.a; return _Utils_update( formField, { - a: $author$project$Main$ChooseOne( + type_: $author$project$Main$ChooseOne( _Utils_update( settings, { - e: updateFilter(settings.e) + filter: updateFilter(settings.filter) })) }); - case 4: + case 'ChooseMultiple': var settings = _v26.a; return _Utils_update( formField, { - a: $author$project$Main$ChooseMultiple( + type_: $author$project$Main$ChooseMultiple( _Utils_update( settings, { - e: updateFilter(settings.e) + filter: updateFilter(settings.filter) })) }); default: @@ -8574,8 +8674,8 @@ var $author$project$Main$updateFormField = F5( default: var fieldName = msg.a; var updateSourceField = function (existingFilter) { - if (!existingFilter.$) { - if (!existingFilter.a.$) { + if (existingFilter.$ === 'Just') { + if (existingFilter.a.$ === 'FilterStartsWithFieldValueOf') { return $elm$core$Maybe$Just( $author$project$Main$FilterStartsWithFieldValueOf(fieldName)); } else { @@ -8587,42 +8687,42 @@ var $author$project$Main$updateFormField = F5( $author$project$Main$FilterStartsWithFieldValueOf(fieldName)); } }; - var _v28 = formField.a; + var _v28 = formField.type_; switch (_v28.$) { - case 2: + case 'Dropdown': var settings = _v28.a; return _Utils_update( formField, { - a: $author$project$Main$Dropdown( + type_: $author$project$Main$Dropdown( _Utils_update( settings, { - e: updateSourceField(settings.e) + filter: updateSourceField(settings.filter) })) }); - case 3: + case 'ChooseOne': var settings = _v28.a; return _Utils_update( formField, { - a: $author$project$Main$ChooseOne( + type_: $author$project$Main$ChooseOne( _Utils_update( settings, { - e: updateSourceField(settings.e) + filter: updateSourceField(settings.filter) })) }); - case 4: + case 'ChooseMultiple': var settings = _v28.a; return _Utils_update( formField, { - a: $author$project$Main$ChooseMultiple( + type_: $author$project$Main$ChooseMultiple( _Utils_update( settings, { - e: updateSourceField(settings.e) + filter: updateSourceField(settings.filter) })) }); default: @@ -8632,43 +8732,43 @@ var $author$project$Main$updateFormField = F5( }); var $author$project$Main$when = F2( function (bool, condition) { - return bool ? condition.a1 : condition.aV; + return bool ? condition._true : condition._false; }); var $author$project$Main$update = F2( function (msg, model) { update: while (true) { switch (msg.$) { - case 0: + case 'NoOp': return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none); - case 1: + case 'OnPortIncoming': var value = msg.a; var _v1 = A2($elm$json$Json$Decode$decodeValue, $author$project$Main$decodePortIncomingValue, value); - if (!_v1.$) { + if (_v1.$ === 'Ok') { var _v2 = _v1.a; return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none); } else { return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none); } - case 2: + case 'AddFormField': var fieldType = msg.a; var newFormField = { - S: $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing), - d: $author$project$Main$stringFromInputField(fieldType) + (' question ' + $elm$core$String$fromInt(model.aa)), - Q: $elm$core$Maybe$Nothing, - q: A2( + description: $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing), + label: $author$project$Main$stringFromInputField(fieldType) + (' question ' + $elm$core$String$fromInt(model.nextQuestionNumber)), + name: $elm$core$Maybe$Nothing, + presence: A2( $author$project$Main$when, $author$project$Main$mustBeOptional(fieldType), - {aV: 0, a1: 1}), - a: fieldType, - m: _List_Nil + {_false: $author$project$Main$Required, _true: $author$project$Main$Optional}), + type_: fieldType, + visibilityRule: _List_Nil }; - var newFormFields = A2($elm$core$Array$push, newFormField, model.g); + var newFormFields = A2($elm$core$Array$push, newFormField, model.formFields); var newIndex = $elm$core$Array$length(newFormFields) - 1; return _Utils_Tuple2( _Utils_update( model, - {g: newFormFields, aa: model.aa + 1}), + {formFields: newFormFields, nextQuestionNumber: model.nextQuestionNumber + 1}), $elm$core$Platform$Cmd$batch( _List_fromArray( [ @@ -8686,11 +8786,11 @@ var $author$project$Main$update = F2( [ $author$project$Main$SetEditorAnimate( $elm$core$Maybe$Just( - _Utils_Tuple2(newIndex, 0))), + _Utils_Tuple2(newIndex, $author$project$Main$AnimateYellowFade))), $author$project$Main$SetEditorAnimate($elm$core$Maybe$Nothing) ])))) ]))); - case 3: + case 'DeleteFormField': var fieldIndex = msg.a; var newFormFields = $elm$core$Array$fromList( A2( @@ -8702,41 +8802,41 @@ var $author$project$Main$update = F2( var i = _v3.a; return !_Utils_eq(i, fieldIndex); }, - $elm$core$Array$toIndexedList(model.g)))); + $elm$core$Array$toIndexedList(model.formFields)))); return _Utils_Tuple2( _Utils_update( model, - {g: newFormFields, F: $elm$core$Maybe$Nothing}), + {formFields: newFormFields, selectedFieldIndex: $elm$core$Maybe$Nothing}), $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( $author$project$Main$PortOutgoingFormFields(newFormFields)))); - case 4: + case 'MoveFormFieldUp': var fieldIndex = msg.a; - var newFormFields = A3($author$project$Main$swapArrayIndex, fieldIndex, fieldIndex - 1, model.g); + var newFormFields = A3($author$project$Main$swapArrayIndex, fieldIndex, fieldIndex - 1, model.formFields); return _Utils_Tuple2( _Utils_update( model, { - g: newFormFields, - F: $elm$core$Maybe$Just(fieldIndex - 1) + formFields: newFormFields, + selectedFieldIndex: $elm$core$Maybe$Just(fieldIndex - 1) }), $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( $author$project$Main$PortOutgoingFormFields(newFormFields)))); - case 5: + case 'MoveFormFieldDown': var fieldIndex = msg.a; - var newFormFields = A3($author$project$Main$swapArrayIndex, fieldIndex, fieldIndex + 1, model.g); + var newFormFields = A3($author$project$Main$swapArrayIndex, fieldIndex, fieldIndex + 1, model.formFields); return _Utils_Tuple2( _Utils_update( model, { - g: newFormFields, - F: $elm$core$Maybe$Just(fieldIndex + 1) + formFields: newFormFields, + selectedFieldIndex: $elm$core$Maybe$Just(fieldIndex + 1) }), $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( $author$project$Main$PortOutgoingFormFields(newFormFields)))); - case 6: + case 'OnFormField': var fmsg = msg.a; var fieldIndex = msg.b; var string = msg.c; @@ -8744,41 +8844,41 @@ var $author$project$Main$update = F2( $elm$core$Array$indexedMap, F2( function (i, formField) { - return _Utils_eq(i, fieldIndex) ? A5($author$project$Main$updateFormField, fmsg, fieldIndex, string, model.g, formField) : formField; + return _Utils_eq(i, fieldIndex) ? A5($author$project$Main$updateFormField, fmsg, fieldIndex, string, model.formFields, formField) : formField; }), - model.g); + model.formFields); return _Utils_Tuple2( _Utils_update( model, - {g: newFormFields}), + {formFields: newFormFields}), $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( $author$project$Main$PortOutgoingFormFields(newFormFields)))); - case 7: + case 'SetEditorAnimate': var maybeAnimate = msg.a; return _Utils_Tuple2( _Utils_update( model, { - ac: $author$project$Main$Editor( - {aB: maybeAnimate}) + viewMode: $author$project$Main$Editor( + {maybeAnimate: maybeAnimate}) }), $elm$core$Platform$Cmd$none); - case 8: + case 'SelectField': var fieldIndex = msg.a; - var _v4 = _Utils_Tuple2(model.F, fieldIndex); - if ((!_v4.a.$) && (_v4.b.$ === 1)) { + var _v4 = _Utils_Tuple2(model.selectedFieldIndex, fieldIndex); + if ((_v4.a.$ === 'Just') && (_v4.b.$ === 'Nothing')) { var prevIndex = _v4.a.a; var _v5 = _v4.b; return _Utils_Tuple2( _Utils_update( model, { - F: $elm$core$Maybe$Nothing, - ac: $author$project$Main$Editor( + selectedFieldIndex: $elm$core$Maybe$Nothing, + viewMode: $author$project$Main$Editor( { - aB: $elm$core$Maybe$Just( - _Utils_Tuple2(prevIndex, 0)) + maybeAnimate: $elm$core$Maybe$Just( + _Utils_Tuple2(prevIndex, $author$project$Main$AnimateYellowFade)) }) }), $elm$core$Platform$Cmd$none); @@ -8786,41 +8886,41 @@ var $author$project$Main$update = F2( return _Utils_Tuple2( _Utils_update( model, - {F: fieldIndex}), + {selectedFieldIndex: fieldIndex}), $elm$core$Platform$Cmd$none); } - case 9: + case 'DragStart': var fieldIndex = msg.a; return _Utils_Tuple2( _Utils_update( model, { - r: $elm$core$Maybe$Just( + dragged: $elm$core$Maybe$Just( $author$project$Main$DragExisting( - {a6: fieldIndex, G: $elm$core$Maybe$Nothing})), - F: $elm$core$Maybe$Nothing + {dragIndex: fieldIndex, dropIndex: $elm$core$Maybe$Nothing})), + selectedFieldIndex: $elm$core$Maybe$Nothing }), $elm$core$Platform$Cmd$none); - case 10: + case 'DragStartNew': var fieldIndex = msg.a; return _Utils_Tuple2( _Utils_update( model, { - r: $elm$core$Maybe$Just( + dragged: $elm$core$Maybe$Just( $author$project$Main$DragNew( { - G: $elm$core$Maybe$Just( + dropIndex: $elm$core$Maybe$Just( _Utils_Tuple2(0, $elm$core$Maybe$Nothing)), - bU: fieldIndex + field: fieldIndex })) }), $elm$core$Platform$Cmd$none); - case 11: - var _v6 = model.r; - if (!_v6.$) { - if (!_v6.a.$) { - var dropIndex = _v6.a.a.G; + case 'DragEnd': + var _v6 = model.dragged; + if (_v6.$ === 'Just') { + if (_v6.a.$ === 'DragExisting') { + var dropIndex = _v6.a.a.dropIndex; var $temp$msg = $author$project$Main$Drop( A2($elm$core$Maybe$map, $elm$core$Tuple$first, dropIndex)), $temp$model = model; @@ -8828,7 +8928,7 @@ var $author$project$Main$update = F2( model = $temp$model; continue update; } else { - var dropIndex = _v6.a.a.G; + var dropIndex = _v6.a.a.dropIndex; var $temp$msg = $author$project$Main$Drop( A2($elm$core$Maybe$map, $elm$core$Tuple$first, dropIndex)), $temp$model = model; @@ -8840,30 +8940,30 @@ var $author$project$Main$update = F2( return _Utils_Tuple2( _Utils_update( model, - {r: $elm$core$Maybe$Nothing}), + {dragged: $elm$core$Maybe$Nothing}), $elm$core$Platform$Cmd$none); } - case 12: + case 'DragOver': var maybeDroppable = msg.a; return _Utils_Tuple2( _Utils_update( model, { - r: A2( + dragged: A2( $elm$core$Maybe$map, $author$project$Main$updateDragged(maybeDroppable), - model.r) + model.dragged) }), $elm$core$Platform$Cmd$none); - case 13: + case 'Drop': var targetFieldIndex = msg.a; var newModel = A2($author$project$Main$onDropped, targetFieldIndex, model); return _Utils_Tuple2( newModel, - (!_Utils_eq(newModel.g, model.g)) ? $author$project$Main$outgoing( + (!_Utils_eq(newModel.formFields, model.formFields)) ? $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( - $author$project$Main$PortOutgoingFormFields(newModel.g))) : $elm$core$Platform$Cmd$none); - case 14: + $author$project$Main$PortOutgoingFormFields(newModel.formFields))) : $elm$core$Platform$Cmd$none); + case 'DoSleepDo': if (!msg.b.b) { return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none); } else { @@ -8887,6 +8987,13 @@ var $author$project$Main$update = F2( $elm$core$Process$sleep(duration)) ]))); } + case 'SelectFieldGroup': + var index = msg.a; + return _Utils_Tuple2( + _Utils_update( + model, + {activeFieldGroupIndex: index}), + $elm$core$Platform$Cmd$none); default: var fieldName = msg.a; var value = msg.b; @@ -8898,16 +9005,16 @@ var $author$project$Main$update = F2( $author$project$Main$fieldNameOf(f), fieldName); }, - $elm$core$Array$toList(model.g))); + $elm$core$Array$toList(model.formFields))); var currentValues = A2( $elm$core$Maybe$withDefault, _List_Nil, - A2($elm$core$Dict$get, fieldName, model.v)); + A2($elm$core$Dict$get, fieldName, model.trackedFormValues)); var newValues = function () { - if (!formField.$) { + if (formField.$ === 'Just') { var field = formField.a; - var _v11 = field.a; - if (_v11.$ === 4) { + var _v11 = field.type_; + if (_v11.$ === 'ChooseMultiple') { return A2($elm$core$List$member, value, currentValues) ? A2( $elm$core$List$filter, $elm$core$Basics$neq(value), @@ -8921,7 +9028,7 @@ var $author$project$Main$update = F2( [value]); } }(); - var newTrackedFormValues = A3($elm$core$Dict$insert, fieldName, newValues, model.v); + var newTrackedFormValues = A3($elm$core$Dict$insert, fieldName, newValues, model.trackedFormValues); var formValues = A3( $elm$json$Json$Encode$dict, $elm$core$Basics$identity, @@ -8940,7 +9047,7 @@ var $author$project$Main$update = F2( return _Utils_Tuple2( _Utils_update( model, - {v: newTrackedFormValues}), + {trackedFormValues: newTrackedFormValues}), $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( $author$project$Main$PortOutgoingFormValues(formValues)))); @@ -8963,7 +9070,7 @@ var $elm$html$Html$text = $elm$virtual_dom$VirtualDom$text; var $elm$html$Html$input = _VirtualDom_node('input'); var $elm$html$Html$Attributes$name = $elm$html$Html$Attributes$stringProperty('name'); var $author$project$Main$stringFromViewMode = function (viewMode) { - if (!viewMode.$) { + if (viewMode.$ === 'Editor') { return 'Editor'; } else { return 'CollectData'; @@ -8971,45 +9078,11 @@ var $author$project$Main$stringFromViewMode = function (viewMode) { }; var $elm$html$Html$Attributes$type_ = $elm$html$Html$Attributes$stringProperty('type'); var $elm$html$Html$Attributes$value = $elm$html$Html$Attributes$stringProperty('value'); -var $author$project$Main$DragEnd = {$: 11}; -var $author$project$Main$NoOp = {$: 0}; +var $author$project$Main$DragEnd = {$: 'DragEnd'}; +var $author$project$Main$NoOp = {$: 'NoOp'}; var $author$project$Main$SelectField = function (a) { - return {$: 8, a: a}; + return {$: 'SelectField', a: a}; }; -var $author$project$Main$allInputField = _List_fromArray( - [ - $author$project$Main$Dropdown( - { - k: A2( - $elm$core$List$map, - $author$project$Main$choiceFromString, - _List_fromArray( - ['Red', 'Orange', 'Yellow', 'Green', 'Blue', 'Indigo', 'Violet'])), - e: $elm$core$Maybe$Nothing - }), - $author$project$Main$ChooseOne( - { - k: A2( - $elm$core$List$map, - $author$project$Main$choiceFromString, - _List_fromArray( - ['Yes', 'No'])), - e: $elm$core$Maybe$Nothing - }), - $author$project$Main$ChooseMultiple( - { - k: A2( - $elm$core$List$map, - $author$project$Main$choiceFromString, - _List_fromArray( - ['Apple', 'Banana', 'Cantaloupe', 'Durian'])), - e: $elm$core$Maybe$Nothing, - T: $elm$core$Maybe$Nothing, - P: $elm$core$Maybe$Nothing - }), - $author$project$Main$LongText( - $author$project$Main$AttributeGiven(160)) - ]); var $elm$html$Html$Attributes$classList = function (classes) { return $elm$html$Html$Attributes$class( A2( @@ -9020,33 +9093,15 @@ var $elm$html$Html$Attributes$classList = function (classes) { $elm$core$Tuple$first, A2($elm$core$List$filter, $elm$core$Tuple$second, classes)))); }; -var $elm$core$List$maybeCons = F3( - function (f, mx, xs) { - var _v0 = f(mx); - if (!_v0.$) { - var x = _v0.a; - return A2($elm$core$List$cons, x, xs); - } else { - return xs; - } - }); -var $elm$core$List$filterMap = F2( - function (f, xs) { - return A3( - $elm$core$List$foldr, - $elm$core$List$maybeCons(f), - _List_Nil, - xs); - }); var $author$project$Main$fieldsWithPlaceholder = F2( function (fields, dragged) { - if (dragged.$ === 1) { + if (dragged.$ === 'Nothing') { return A2($elm$core$List$map, $elm$core$Maybe$Just, fields); } else { - if (!dragged.a.$) { - var dragIndex = dragged.a.a.a6; - var dropIndex = dragged.a.a.G; - if (dropIndex.$ === 1) { + if (dragged.a.$ === 'DragExisting') { + var dragIndex = dragged.a.a.dragIndex; + var dropIndex = dragged.a.a.dropIndex; + if (dropIndex.$ === 'Nothing') { return A2($elm$core$List$map, $elm$core$Maybe$Just, fields); } else { var _v2 = dropIndex.a; @@ -9077,8 +9132,8 @@ var $author$project$Main$fieldsWithPlaceholder = F2( ])); } } else { - var dropIndex = dragged.a.a.G; - if (dropIndex.$ === 1) { + var dropIndex = dragged.a.a.dropIndex; + if (dropIndex.$ === 'Nothing') { return A2($elm$core$List$map, $elm$core$Maybe$Just, fields); } else { var _v4 = dropIndex.a; @@ -9098,7 +9153,7 @@ var $author$project$Main$fieldsWithPlaceholder = F2( }); var $elm$html$Html$h2 = _VirtualDom_node('h2'); var $elm$virtual_dom$VirtualDom$Normal = function (a) { - return {$: 0, a: a}; + return {$: 'Normal', a: a}; }; var $elm$virtual_dom$VirtualDom$on = _VirtualDom_on; var $elm$html$Html$Events$on = F2( @@ -9115,7 +9170,7 @@ var $elm$html$Html$Events$onClick = function (msg) { $elm$json$Json$Decode$succeed(msg)); }; var $elm$virtual_dom$VirtualDom$MayPreventDefault = function (a) { - return {$: 2, a: a}; + return {$: 'MayPreventDefault', a: a}; }; var $elm$html$Html$Events$preventDefaultOn = F2( function (event, decoder) { @@ -9125,7 +9180,7 @@ var $elm$html$Html$Events$preventDefaultOn = F2( $elm$virtual_dom$VirtualDom$MayPreventDefault(decoder)); }); var $author$project$Main$DragStart = function (a) { - return {$: 9, a: a}; + return {$: 'DragStart', a: a}; }; var $elm$virtual_dom$VirtualDom$attribute = F2( function (key, value) { @@ -9188,7 +9243,7 @@ var $author$project$Main$dragHandleIcon = A2( _List_Nil) ])); var $author$project$Main$DragOver = function (a) { - return {$: 12, a: a}; + return {$: 'DragOver', a: a}; }; var $author$project$Main$dragOverDecoder = F2( function (index, maybeFormField) { @@ -9204,7 +9259,7 @@ var $author$project$Main$isConditionReferencingField = F2( var conditionFieldName = condition.a; var comparison = condition.b; return _Utils_eq(conditionFieldName, fieldName) || function () { - if (comparison.$ === 4) { + if (comparison.$ === 'EqualsField') { var targetFieldName = comparison.a; return _Utils_eq(targetFieldName, fieldName); } else { @@ -9214,8 +9269,8 @@ var $author$project$Main$isConditionReferencingField = F2( }); var $author$project$Main$isFieldUsedInChoiceFilter = F2( function (fieldName, maybeFilter) { - if (!maybeFilter.$) { - if (!maybeFilter.a.$) { + if (maybeFilter.$ === 'Just') { + if (maybeFilter.a.$ === 'FilterStartsWithFieldValueOf') { var sourceField = maybeFilter.a.a; return _Utils_eq(sourceField, fieldName); } else { @@ -9229,14 +9284,14 @@ var $author$project$Main$isFieldUsedInChoiceFilter = F2( var $author$project$Main$isFieldUsedInFilter = F2( function (fieldName, inputField) { switch (inputField.$) { - case 2: - var filter = inputField.a.e; + case 'Dropdown': + var filter = inputField.a.filter; return A2($author$project$Main$isFieldUsedInChoiceFilter, fieldName, filter); - case 3: - var filter = inputField.a.e; + case 'ChooseOne': + var filter = inputField.a.filter; return A2($author$project$Main$isFieldUsedInChoiceFilter, fieldName, filter); - case 4: - var filter = inputField.a.e; + case 'ChooseMultiple': + var filter = inputField.a.filter; return A2($author$project$Main$isFieldUsedInChoiceFilter, fieldName, filter); default: return false; @@ -9248,7 +9303,7 @@ var $author$project$Main$isFieldReferencedBy = F2( var isUsedInChoiceFilters = A2( $elm$core$List$any, function (field) { - return A2($author$project$Main$isFieldUsedInFilter, fieldName, field.a); + return A2($author$project$Main$isFieldUsedInFilter, fieldName, field.type_); }, fieldList); var isUsedInVisibilityRules = A2( @@ -9257,7 +9312,7 @@ var $author$project$Main$isFieldReferencedBy = F2( return A2( $elm$core$List$any, function (rule) { - if (!rule.$) { + if (rule.$ === 'ShowWhen') { var conditions = rule.a; return A2( $elm$core$List$any, @@ -9271,13 +9326,13 @@ var $author$project$Main$isFieldReferencedBy = F2( conditions); } }, - field.m); + field.visibilityRule); }, fieldList); - return {a3: isUsedInChoiceFilters, a4: isUsedInVisibilityRules}; + return {usedInChoiceFilters: isUsedInChoiceFilters, usedInVisibilityRules: isUsedInVisibilityRules}; }); var $elm$virtual_dom$VirtualDom$MayStopPropagation = function (a) { - return {$: 1, a: a}; + return {$: 'MayStopPropagation', a: a}; }; var $elm$html$Html$Events$stopPropagationOn = F2( function (event, decoder) { @@ -9290,43 +9345,43 @@ var $elm$html$Html$Attributes$title = $elm$html$Html$Attributes$stringProperty(' var $elm$html$Html$Attributes$for = $elm$html$Html$Attributes$stringProperty('htmlFor'); var $elm$html$Html$label = _VirtualDom_node('label'); var $author$project$Main$maybeMaxLengthOf = function (formField) { - var _v0 = formField.a; + var _v0 = formField.type_; switch (_v0.$) { - case 0: - var maxlength = _v0.a.ah; + case 'ShortText': + var maxlength = _v0.a.maxlength; switch (maxlength.$) { - case 2: + case 'AttributeGiven': var i = maxlength.a; return $elm$core$Maybe$Just(i); - case 1: + case 'AttributeInvalid': return $elm$core$Maybe$Nothing; default: return $elm$core$Maybe$Nothing; } - case 1: + case 'LongText': var maxlength = _v0.a; switch (maxlength.$) { - case 2: + case 'AttributeGiven': var i = maxlength.a; return $elm$core$Maybe$Just(i); - case 1: + case 'AttributeInvalid': return $elm$core$Maybe$Nothing; default: return $elm$core$Maybe$Nothing; } - case 2: + case 'Dropdown': return $elm$core$Maybe$Nothing; - case 3: + case 'ChooseOne': return $elm$core$Maybe$Nothing; default: return $elm$core$Maybe$Nothing; } }; var $author$project$Main$requiredData = function (presence) { - switch (presence) { - case 0: + switch (presence.$) { + case 'Required': return true; - case 1: + case 'Optional': return false; default: return true; @@ -9365,14 +9420,14 @@ var $author$project$Main$attributesFromTuple = function (_v0) { A2($elm$html$Html$Attributes$attribute, k, v)); }; var $author$project$Main$isOptionalTemporalInput = function (formField) { - var _v0 = _Utils_Tuple2(formField.q, formField.a); - if ((_v0.a === 1) && (!_v0.b.$)) { + var _v0 = _Utils_Tuple2(formField.presence, formField.type_); + if ((_v0.a.$ === 'Optional') && (_v0.b.$ === 'ShortText')) { var _v1 = _v0.a; var customElement = _v0.b.a; var inputType = A2( $elm$core$Maybe$withDefault, '', - A2($elm$core$Dict$get, 'type', customElement.p)); + A2($elm$core$Dict$get, 'type', customElement.attributes)); return A2( $elm$core$List$member, inputType, @@ -9410,14 +9465,14 @@ var $author$project$Main$defaultValue = function (str) { var $elm$core$String$toLower = _String_toLower; var $author$project$Main$filterChoices = F3( function (maybeFilter, formValues, choices) { - if (!maybeFilter.$) { - if (!maybeFilter.a.$) { + if (maybeFilter.$ === 'Just') { + if (maybeFilter.a.$ === 'FilterStartsWithFieldValueOf') { var fieldName = maybeFilter.a.a; var _v1 = A2( $elm$core$Maybe$andThen, $elm$core$List$head, A2($elm$core$Dict$get, fieldName, formValues)); - if (!_v1.$) { + if (_v1.$ === 'Just') { var filterValue = _v1.a; return $elm$core$String$isEmpty(filterValue) ? _List_Nil : A2( $elm$core$List$filter, @@ -9425,10 +9480,10 @@ var $author$project$Main$filterChoices = F3( return A2( $elm$core$String$startsWith, $elm$core$String$toLower(filterValue), - $elm$core$String$toLower(choice.j)) || A2( + $elm$core$String$toLower(choice.value)) || A2( $elm$core$String$startsWith, $elm$core$String$toLower(filterValue), - $elm$core$String$toLower(choice.d)); + $elm$core$String$toLower(choice.label)); }, choices); } else { @@ -9440,7 +9495,7 @@ var $author$project$Main$filterChoices = F3( $elm$core$Maybe$andThen, $elm$core$List$head, A2($elm$core$Dict$get, fieldName, formValues)); - if (!_v2.$) { + if (_v2.$ === 'Just') { var filterValue = _v2.a; return $elm$core$String$isEmpty(filterValue) ? _List_Nil : A2( $elm$core$List$filter, @@ -9448,10 +9503,10 @@ var $author$project$Main$filterChoices = F3( return A2( $elm$core$String$contains, $elm$core$String$toLower(filterValue), - $elm$core$String$toLower(choice.j)) || A2( + $elm$core$String$toLower(choice.value)) || A2( $elm$core$String$contains, $elm$core$String$toLower(filterValue), - $elm$core$String$toLower(choice.d)); + $elm$core$String$toLower(choice.label)); }, choices); } else { @@ -9530,21 +9585,21 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( var disabledMode = A2( $elm$core$List$member, A2($elm$html$Html$Attributes$attribute, 'disabled', 'disabled'), - config.Y); + config.customAttrs); var chosenForYou = function (choices) { - var _v13 = formField.q; - switch (_v13) { - case 1: + var _v13 = formField.presence; + switch (_v13.$) { + case 'Optional': return false; - case 0: + case 'Required': return $elm$core$List$length(choices) === 1; default: return $elm$core$List$length(choices) === 1; } }; - var _v0 = formField.a; + var _v0 = formField.type_; switch (_v0.$) { - case 0: + case 'ShortText': var customElement = _v0.a; var extraAttrs = A2( $elm$core$List$filterMap, @@ -9559,12 +9614,12 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( A2( $elm$core$Maybe$andThen, $elm$core$List$head, - A2($elm$core$Dict$get, fieldName, config.v))), + A2($elm$core$Dict$get, fieldName, config.trackedFormValues))), A2( $elm$core$List$map, $author$project$Main$attributesFromTuple, - $elm$core$Dict$toList(customElement.p)))); - var extraAttrKeys = $elm$core$Dict$keys(customElement.p); + $elm$core$Dict$toList(customElement.attributes)))); + var extraAttrKeys = $elm$core$Dict$keys(customElement.attributes); var shortTextAttrs = A2( $elm$core$List$filterMap, $author$project$Main$attributesFromTuple, @@ -9581,13 +9636,13 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( A2( $elm$core$Maybe$map, function ($) { - return $.p; + return $.attributes; }, - A2($elm$core$Dict$get, customElement.B, config.ak)))))); + A2($elm$core$Dict$get, customElement.inputType, config.shortTextTypeDict)))))); var _v1 = function () { - var _v2 = customElement.ae; + var _v2 = customElement.datalist; switch (_v2.$) { - case 2: + case 'AttributeGiven': var list = _v2.a; return _Utils_Tuple2( _List_fromArray( @@ -9607,15 +9662,15 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$html$Html$option, _List_fromArray( [ - $elm$html$Html$Attributes$value(choice.j) + $elm$html$Html$Attributes$value(choice.value) ]), _List_fromArray( [ - $elm$html$Html$text(choice.d) + $elm$html$Html$text(choice.label) ])); }, list))); - case 0: + case 'AttributeNotNeeded': return _Utils_Tuple2( _List_Nil, $elm$html$Html$text('')); @@ -9634,18 +9689,18 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( [ A3( $elm$html$Html$node, - customElement.N, + customElement.inputTag, _Utils_ap( _List_fromArray( [ A2( $elm$html$Html$Attributes$attribute, 'class', - A3($author$project$Main$buildInputClassString, formField, fieldName, config.v)), + A3($author$project$Main$buildInputClassString, formField, fieldName, config.trackedFormValues)), $elm$html$Html$Attributes$name(fieldName), $elm$html$Html$Attributes$id(fieldID), $elm$html$Html$Attributes$required( - $author$project$Main$requiredData(formField.q)) + $author$project$Main$requiredData(formField.presence)) ]), _Utils_ap( dataListAttrs, @@ -9654,12 +9709,12 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( _Utils_ap( extraAttrs, _Utils_ap( - config.Y, - config.aO(fieldName)))))), + config.customAttrs, + config.onInput(fieldName)))))), _List_Nil), dataListElement ])); - case 1: + case 'LongText': var extraAttrs = A2( $elm$core$List$filterMap, $elm$core$Basics$identity, @@ -9679,7 +9734,7 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( A2( $elm$core$Maybe$andThen, $elm$core$List$head, - A2($elm$core$Dict$get, fieldName, config.v))) + A2($elm$core$Dict$get, fieldName, config.trackedFormValues))) ])); return A2( $author$project$Main$textarea, @@ -9690,28 +9745,28 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$html$Html$Attributes$name(fieldName), $elm$html$Html$Attributes$id(fieldID), $elm$html$Html$Attributes$required( - $author$project$Main$requiredData(formField.q)), + $author$project$Main$requiredData(formField.presence)), $elm$html$Html$Attributes$placeholder(' ') ]), _Utils_ap( extraAttrs, _Utils_ap( - config.Y, - config.aO(fieldName)))), + config.customAttrs, + config.onInput(fieldName)))), _List_Nil); - case 2: - var choices = _v0.a.k; - var filter = _v0.a.e; + case 'Dropdown': + var choices = _v0.a.choices; + var filter = _v0.a.filter; var valueString = A2( $elm$core$Maybe$withDefault, '', A2( $elm$core$Maybe$andThen, $elm$core$List$head, - A2($elm$core$Dict$get, fieldName, config.v))); - var filteredChoices = disabledMode ? choices : A3($author$project$Main$filterChoices, filter, config.v, choices); + A2($elm$core$Dict$get, fieldName, config.trackedFormValues))); + var filteredChoices = disabledMode ? choices : A3($author$project$Main$filterChoices, filter, config.trackedFormValues, choices); var noChoicesAfterFiltering = (!$elm$core$List$isEmpty(choices)) && $elm$core$List$isEmpty(filteredChoices); - return (noChoicesAfterFiltering && config._) ? A2($elm$html$Html$div, _List_Nil, _List_Nil) : A2( + return (noChoicesAfterFiltering && config.needsFormLogic) ? A2($elm$html$Html$div, _List_Nil, _List_Nil) : A2( $elm$html$Html$div, _List_fromArray( [ @@ -9728,9 +9783,9 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$html$Html$Attributes$name(fieldName), $elm$html$Html$Attributes$id(fieldID), disabledMode ? $elm$html$Html$Attributes$class('tff-select-disabled') : $elm$html$Html$Attributes$required( - $author$project$Main$requiredData(formField.q)) + $author$project$Main$requiredData(formField.presence)) ]), - config.bf(fieldName)), + config.onChange(fieldName)), A2( $elm$core$List$cons, A2( @@ -9743,7 +9798,7 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( (valueString === '') && (!chosenForYou(filteredChoices))), A2($elm$html$Html$Attributes$attribute, 'value', '') ]), - config.Y), + config.customAttrs), _List_fromArray( [ $elm$html$Html$text('-- Select an option --') @@ -9755,32 +9810,32 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$html$Html$option, A2( $elm$core$List$cons, - $elm$html$Html$Attributes$value(choice.j), + $elm$html$Html$Attributes$value(choice.value), A2( $elm$core$List$cons, $author$project$Main$defaultSelected( - _Utils_eq(valueString, choice.j) || chosenForYou(filteredChoices)), - config.Y)), + _Utils_eq(valueString, choice.value) || chosenForYou(filteredChoices)), + config.customAttrs)), _List_fromArray( [ - $elm$html$Html$text(choice.d) + $elm$html$Html$text(choice.label) ])); }, filteredChoices))) ])); - case 3: - var choices = _v0.a.k; - var filter = _v0.a.e; + case 'ChooseOne': + var choices = _v0.a.choices; + var filter = _v0.a.filter; var valueString = A2( $elm$core$Maybe$withDefault, '', A2( $elm$core$Maybe$andThen, $elm$core$List$head, - A2($elm$core$Dict$get, fieldName, config.v))); - var filteredChoices = disabledMode ? choices : A3($author$project$Main$filterChoices, filter, config.v, choices); + A2($elm$core$Dict$get, fieldName, config.trackedFormValues))); + var filteredChoices = disabledMode ? choices : A3($author$project$Main$filterChoices, filter, config.trackedFormValues, choices); var noChoicesAfterFiltering = (!$elm$core$List$isEmpty(choices)) && $elm$core$List$isEmpty(filteredChoices); - return (noChoicesAfterFiltering && config._) ? A2($elm$html$Html$div, _List_Nil, _List_Nil) : A2( + return (noChoicesAfterFiltering && config.needsFormLogic) ? A2($elm$html$Html$div, _List_Nil, _List_Nil) : A2( $elm$html$Html$div, _List_fromArray( [ @@ -9821,37 +9876,37 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$html$Html$Attributes$type_('radio'), $elm$html$Html$Attributes$tabindex(0), $elm$html$Html$Attributes$name(fieldName), - $elm$html$Html$Attributes$value(choice.j), + $elm$html$Html$Attributes$value(choice.value), $elm$html$Html$Attributes$checked( - _Utils_eq(valueString, choice.j) || chosenForYou(filteredChoices)), + _Utils_eq(valueString, choice.value) || chosenForYou(filteredChoices)), $elm$html$Html$Attributes$required( - $author$project$Main$requiredData(formField.q)) + $author$project$Main$requiredData(formField.presence)) ]), _Utils_ap( - config.Y, - config.aO(fieldName))), + config.customAttrs, + config.onInput(fieldName))), _List_Nil), $elm$html$Html$text(' '), - $elm$html$Html$text(choice.d) + $elm$html$Html$text(choice.label) ])) ])); }, filteredChoices)) ])); default: - var choices = _v0.a.k; - var minRequired = _v0.a.P; - var maxAllowed = _v0.a.T; - var filter = _v0.a.e; + var choices = _v0.a.choices; + var minRequired = _v0.a.minRequired; + var maxAllowed = _v0.a.maxAllowed; + var filter = _v0.a.filter; var values = A2( $elm$core$Maybe$withDefault, _List_Nil, - A2($elm$core$Dict$get, fieldName, config.v)); + A2($elm$core$Dict$get, fieldName, config.trackedFormValues)); var selectedCount = $elm$core$List$length(values); var validationElement = function () { var effectiveMin = function () { - var _v10 = _Utils_Tuple2(formField.q, minRequired); - if ((_v10.a === 2) && (_v10.b.$ === 1)) { + var _v10 = _Utils_Tuple2(formField.presence, minRequired); + if ((_v10.a.$ === 'System') && (_v10.b.$ === 'Nothing')) { var _v11 = _v10.a; var _v12 = _v10.b; return $elm$core$Maybe$Just(1); @@ -9893,8 +9948,8 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( }(); var isValid = function () { var _v5 = _Utils_Tuple2(minRequired, maxAllowed); - if (!_v5.a.$) { - if (!_v5.b.$) { + if (_v5.a.$ === 'Just') { + if (_v5.b.$ === 'Just') { var min = _v5.a.a; var max = _v5.b.a; return (_Utils_cmp(selectedCount, min) > -1) && (_Utils_cmp(selectedCount, max) < 1); @@ -9904,7 +9959,7 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( return _Utils_cmp(selectedCount, min) > -1; } } else { - if (!_v5.b.$) { + if (_v5.b.$ === 'Just') { var _v7 = _v5.a; var max = _v5.b.a; return _Utils_cmp(selectedCount, max) < 1; @@ -9915,9 +9970,9 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( } } }(); - var filteredChoices = disabledMode ? choices : A3($author$project$Main$filterChoices, filter, config.v, choices); + var filteredChoices = disabledMode ? choices : A3($author$project$Main$filterChoices, filter, config.trackedFormValues, choices); var noChoicesAfterFiltering = (!$elm$core$List$isEmpty(choices)) && $elm$core$List$isEmpty(filteredChoices); - return (noChoicesAfterFiltering && config._) ? A2($elm$html$Html$div, _List_Nil, _List_Nil) : A2( + return (noChoicesAfterFiltering && config.needsFormLogic) ? A2($elm$html$Html$div, _List_Nil, _List_Nil) : A2( $elm$html$Html$div, _List_fromArray( [ @@ -9938,14 +9993,14 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$core$List$map, function (choice) { var alreadyFull = function () { - if (!maxAllowed.$) { + if (maxAllowed.$ === 'Just') { var m = maxAllowed.a; return _Utils_cmp(selectedCount, m) > -1; } else { return false; } }(); - var shouldDisable = alreadyFull && (!A2($elm$core$List$member, choice.j, values)); + var shouldDisable = alreadyFull && (!A2($elm$core$List$member, choice.value, values)); return A2( $elm$html$Html$div, _List_fromArray( @@ -9970,9 +10025,9 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$html$Html$Attributes$type_('checkbox'), $elm$html$Html$Attributes$tabindex(0), $elm$html$Html$Attributes$name(fieldName), - $elm$html$Html$Attributes$value(choice.j), + $elm$html$Html$Attributes$value(choice.value), $elm$html$Html$Attributes$checked( - A2($elm$core$List$member, choice.j, values) || chosenForYou(filteredChoices)) + A2($elm$core$List$member, choice.value, values) || chosenForYou(filteredChoices)) ]), _Utils_ap( shouldDisable ? _List_fromArray( @@ -9980,11 +10035,11 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( A2($elm$html$Html$Attributes$attribute, 'disabled', 'disabled') ]) : _List_Nil, _Utils_ap( - config.Y, - A2(config.bg, fieldName, choice)))), + config.customAttrs, + A2(config.onChooseMany, fieldName, choice)))), _List_Nil), $elm$html$Html$text(' '), - $elm$html$Html$text(choice.d) + $elm$html$Html$text(choice.label) ])) ])); }, @@ -10007,8 +10062,8 @@ var $author$project$Main$viewFormFieldPreview = F3( $elm$html$Html$Attributes$class( 'tff-field-group' + A2( $author$project$Main$when, - $author$project$Main$requiredData(formField.q), - {aV: '', a1: ' tff-required'})) + $author$project$Main$requiredData(formField.presence), + {_false: '', _true: ' tff-required'})) ]), _List_fromArray( [ @@ -10021,16 +10076,16 @@ var $author$project$Main$viewFormFieldPreview = F3( ]), _List_fromArray( [ - $elm$html$Html$text(formField.d), + $elm$html$Html$text(formField.label), function () { - var _v0 = formField.q; - switch (_v0) { - case 0: + var _v0 = formField.presence; + switch (_v0.$) { + case 'Required': return $elm$html$Html$text(''); - case 1: - var _v1 = formField.a; - if (_v1.$ === 4) { - var minRequired = _v1.a.P; + case 'Optional': + var _v1 = formField.type_; + if (_v1.$ === 'ChooseMultiple') { + var minRequired = _v1.a.minRequired; return (!_Utils_eq(minRequired, $elm$core$Maybe$Nothing)) ? $elm$html$Html$text('') : $elm$html$Html$text(' (optional)'); } else { return $elm$html$Html$text(' (optional)'); @@ -10051,11 +10106,11 @@ var $author$project$Main$viewFormFieldPreview = F3( [ $elm$html$Html$text( function () { - var _v2 = formField.S; + var _v2 = formField.description; switch (_v2.$) { - case 0: + case 'AttributeNotNeeded': return ''; - case 1: + case 'AttributeInvalid': var s = _v2.a; return s; default: @@ -10065,7 +10120,7 @@ var $author$project$Main$viewFormFieldPreview = F3( }()), function () { var _v3 = $author$project$Main$maybeMaxLengthOf(formField); - if (!_v3.$) { + if (_v3.$ === 'Just') { var maxLength = _v3.a; return $elm$html$Html$text( ' (max ' + ($elm$core$String$fromInt(maxLength) + ' characters)')); @@ -10079,7 +10134,7 @@ var $author$project$Main$viewFormFieldPreview = F3( }); var $author$project$Main$renderFormBuilderField = F4( function (maybeAnimate, model, index, maybeFormField) { - if (maybeFormField.$ === 1) { + if (maybeFormField.$ === 'Nothing') { return A2( $elm$html$Html$div, _List_fromArray( @@ -10114,7 +10169,7 @@ var $author$project$Main$renderFormBuilderField = F4( A2( $elm$html$Html$Attributes$attribute, 'data-input-field', - $author$project$Main$stringFromInputField(formField.a)), + $author$project$Main$stringFromInputField(formField.type_)), A2( $elm$html$Html$Events$preventDefaultOn, 'dragover', @@ -10144,7 +10199,7 @@ var $author$project$Main$renderFormBuilderField = F4( _Utils_Tuple2( 'tff-animate-fadeOut', function () { - if ((!maybeAnimate.$) && (maybeAnimate.a.b === 1)) { + if ((maybeAnimate.$ === 'Just') && (maybeAnimate.a.b.$ === 'AnimateFadeOut')) { var _v2 = maybeAnimate.a; var i = _v2.a; var _v3 = _v2.b; @@ -10156,7 +10211,7 @@ var $author$project$Main$renderFormBuilderField = F4( _Utils_Tuple2( 'tff-animate-yellowFade', function () { - if ((!maybeAnimate.$) && (!maybeAnimate.a.b)) { + if ((maybeAnimate.$ === 'Just') && (maybeAnimate.a.b.$ === 'AnimateYellowFade')) { var _v5 = maybeAnimate.a; var i = _v5.a; var _v6 = _v5.b; @@ -10178,7 +10233,7 @@ var $author$project$Main$renderFormBuilderField = F4( $elm$html$Html$Attributes$attribute, 'data-selected', _Utils_eq( - model.F, + model.selectedFieldIndex, $elm$core$Maybe$Just(index)) ? 'true' : 'false'), A2($elm$html$Html$Attributes$attribute, 'draggable', 'true'), A2( @@ -10202,25 +10257,25 @@ var $author$project$Main$renderFormBuilderField = F4( _List_fromArray( [$author$project$Main$dragHandleIcon])), function () { - var hasVisibilityRules = !$elm$core$List$isEmpty(formField.m); + var hasVisibilityRules = !$elm$core$List$isEmpty(formField.visibilityRule); var hasFilterChoices = function () { - var _v7 = formField.a; + var _v7 = formField.type_; switch (_v7.$) { - case 2: - var filter = _v7.a.e; + case 'Dropdown': + var filter = _v7.a.filter; return !_Utils_eq(filter, $elm$core$Maybe$Nothing); - case 3: - var filter = _v7.a.e; + case 'ChooseOne': + var filter = _v7.a.filter; return !_Utils_eq(filter, $elm$core$Maybe$Nothing); - case 4: - var filter = _v7.a.e; + case 'ChooseMultiple': + var filter = _v7.a.filter; return !_Utils_eq(filter, $elm$core$Maybe$Nothing); default: return false; } }(); var fieldName = $author$project$Main$fieldNameOf(formField); - var referencedInfo = A2($author$project$Main$isFieldReferencedBy, fieldName, model.g); + var referencedInfo = A2($author$project$Main$isFieldReferencedBy, fieldName, model.formFields); return A2( $elm$html$Html$div, _List_fromArray( @@ -10229,57 +10284,57 @@ var $author$project$Main$renderFormBuilderField = F4( ]), _List_fromArray( [ - (hasVisibilityRules || referencedInfo.a4) ? A2( + (hasVisibilityRules || referencedInfo.usedInVisibilityRules) ? A2( $elm$html$Html$div, _List_fromArray( [ $elm$html$Html$Attributes$class( hasVisibilityRules ? 'tff-logic-indicator tff-logic-indicator-blue' : 'tff-logic-indicator tff-logic-indicator-gray'), $elm$html$Html$Attributes$title( - (hasVisibilityRules && referencedInfo.a4) ? 'This field has visibility logic and other fields\' visibility depends on it' : (hasVisibilityRules ? 'This field has visibility logic' : 'Other fields\' visibility depends on this field\'s value')) + (hasVisibilityRules && referencedInfo.usedInVisibilityRules) ? 'This field has visibility logic and other fields\' visibility depends on it' : (hasVisibilityRules ? 'This field has visibility logic' : 'Other fields\' visibility depends on this field\'s value')) ]), _List_fromArray( [ $elm$html$Html$text( - (hasVisibilityRules && referencedInfo.a4) ? 'Contains & affects logic' : (hasVisibilityRules ? 'Contains logic' : 'Affects logic')) + (hasVisibilityRules && referencedInfo.usedInVisibilityRules) ? 'Contains & affects logic' : (hasVisibilityRules ? 'Contains logic' : 'Affects logic')) ])) : $elm$html$Html$text(''), - (hasFilterChoices || referencedInfo.a3) ? A2( + (hasFilterChoices || referencedInfo.usedInChoiceFilters) ? A2( $elm$html$Html$div, _List_fromArray( [ $elm$html$Html$Attributes$class( hasFilterChoices ? 'tff-logic-indicator tff-logic-indicator-orange' : 'tff-logic-indicator tff-logic-indicator-gray'), $elm$html$Html$Attributes$title( - (hasFilterChoices && referencedInfo.a3) ? 'This field filters choices and other fields\' choices depend on it' : (hasFilterChoices ? 'This field filters choices based on another field' : 'Other fields\' choices depend on this field\'s value')) + (hasFilterChoices && referencedInfo.usedInChoiceFilters) ? 'This field filters choices and other fields\' choices depend on it' : (hasFilterChoices ? 'This field filters choices based on another field' : 'Other fields\' choices depend on this field\'s value')) ]), _List_fromArray( [ $elm$html$Html$text( - (hasFilterChoices && referencedInfo.a3) ? 'Filters & affects choices' : (hasFilterChoices ? 'Filters choices' : 'Affects choices')) + (hasFilterChoices && referencedInfo.usedInChoiceFilters) ? 'Filters & affects choices' : (hasFilterChoices ? 'Filters choices' : 'Affects choices')) ])) : $elm$html$Html$text('') ])); }(), A3( $author$project$Main$viewFormFieldPreview, { - Y: _List_fromArray( + customAttrs: _List_fromArray( [ A2($elm$html$Html$Attributes$attribute, 'disabled', 'disabled') ]), - g: model.g, - _: false, - bf: function (_v8) { + formFields: model.formFields, + needsFormLogic: false, + onChange: function (_v8) { return _List_Nil; }, - bg: F2( + onChooseMany: F2( function (_v9, _v10) { return _List_Nil; }), - aO: function (_v11) { + onInput: function (_v11) { return _List_Nil; }, - ak: model.ak, - v: model.v + shortTextTypeDict: model.shortTextTypeDict, + trackedFormValues: model.trackedFormValues }, index, formField) @@ -10289,10 +10344,10 @@ var $author$project$Main$renderFormBuilderField = F4( } }); var $author$project$Main$AddFormField = function (a) { - return {$: 2, a: a}; + return {$: 'AddFormField', a: a}; }; var $author$project$Main$DragStartNew = function (a) { - return {$: 10, a: a}; + return {$: 'DragStartNew', a: a}; }; var $author$project$Main$viewAddQuestionsList = F2( function (nextQuestionNumber, inputFields) { @@ -10320,15 +10375,15 @@ var $author$project$Main$viewAddQuestionsList = F2( $elm$json$Json$Decode$succeed( $author$project$Main$DragStartNew( { - S: $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing), - d: $author$project$Main$stringFromInputField(inputField) + (' question ' + $elm$core$String$fromInt(nextQuestionNumber)), - Q: $elm$core$Maybe$Nothing, - q: A2( + description: $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing), + label: $author$project$Main$stringFromInputField(inputField) + (' question ' + $elm$core$String$fromInt(nextQuestionNumber)), + name: $elm$core$Maybe$Nothing, + presence: A2( $author$project$Main$when, $author$project$Main$mustBeOptional(inputField), - {aV: 0, a1: 1}), - a: inputField, - m: _List_Nil + {_false: $author$project$Main$Required, _true: $author$project$Main$Optional}), + type_: inputField, + visibilityRule: _List_Nil }))), A2( $elm$html$Html$Events$on, @@ -10343,36 +10398,74 @@ var $author$project$Main$viewAddQuestionsList = F2( }, inputFields)); }); +var $author$project$Main$SelectFieldGroup = function (a) { + return {$: 'SelectFieldGroup', a: a}; +}; var $elm$html$Html$button = _VirtualDom_node('button'); -var $author$project$Main$AnimateFadeOut = 1; +var $author$project$Main$viewFieldGroupTabs = F2( + function (activeIndex, groups) { + return A2( + $elm$html$Html$div, + _List_fromArray( + [ + $elm$html$Html$Attributes$class('tff-field-group-tabs') + ]), + A2( + $elm$core$List$indexedMap, + F2( + function (index, group) { + return A2( + $elm$html$Html$button, + _List_fromArray( + [ + $elm$html$Html$Attributes$class('tff-field-group-tab'), + $elm$html$Html$Attributes$classList( + _List_fromArray( + [ + _Utils_Tuple2( + 'tff-field-group-tab-active', + _Utils_eq(index, activeIndex)) + ])), + $elm$html$Html$Attributes$type_('button'), + $elm$html$Html$Events$onClick( + $author$project$Main$SelectFieldGroup(index)) + ]), + _List_fromArray( + [ + $elm$html$Html$text(group.heading) + ])); + }), + groups)); + }); +var $author$project$Main$AnimateFadeOut = {$: 'AnimateFadeOut'}; var $author$project$Main$DeleteFormField = function (a) { - return {$: 3, a: a}; + return {$: 'DeleteFormField', a: a}; }; var $author$project$Main$MoveFormFieldDown = function (a) { - return {$: 5, a: a}; + return {$: 'MoveFormFieldDown', a: a}; }; var $author$project$Main$MoveFormFieldUp = function (a) { - return {$: 4, a: a}; + return {$: 'MoveFormFieldUp', a: a}; }; -var $author$project$Main$OnDescriptionInput = {$: 1}; +var $author$project$Main$OnDescriptionInput = {$: 'OnDescriptionInput'}; var $author$project$Main$OnDescriptionToggle = function (a) { - return {$: 2, a: a}; + return {$: 'OnDescriptionToggle', a: a}; }; var $author$project$Main$OnFormField = F3( function (a, b, c) { - return {$: 6, a: a, b: b, c: c}; + return {$: 'OnFormField', a: a, b: b, c: c}; }); -var $author$project$Main$OnLabelInput = {$: 0}; +var $author$project$Main$OnLabelInput = {$: 'OnLabelInput'}; var $author$project$Main$OnMultipleToggle = function (a) { - return {$: 5, a: a}; + return {$: 'OnMultipleToggle', a: a}; }; var $author$project$Main$OnRequiredInput = function (a) { - return {$: 3, a: a}; + return {$: 'OnRequiredInput', a: a}; }; var $author$project$Main$allowsTogglingMultiple = function (inputField) { switch (inputField.$) { - case 0: - var attributes = inputField.a.p; + case 'ShortText': + var attributes = inputField.a.attributes; return A2( $elm$core$List$member, A2($elm$core$Dict$get, 'multiple', attributes), @@ -10381,11 +10474,11 @@ var $author$project$Main$allowsTogglingMultiple = function (inputField) { $elm$core$Maybe$Just('true'), $elm$core$Maybe$Just('false') ])); - case 1: + case 'LongText': return false; - case 2: + case 'Dropdown': return false; - case 3: + case 'ChooseOne': return false; default: return false; @@ -10397,7 +10490,7 @@ var $author$project$Main$hasDuplicateLabel = F3( $elm$core$List$any, function (_v1) { var f = _v1.b; - return _Utils_eq(f.d, newLabel); + return _Utils_eq(f.label, newLabel); }, A2( $elm$core$List$filter, @@ -10427,7 +10520,7 @@ var $elm$html$Html$Events$onCheck = function (tagger) { var $author$project$Main$inputAttributeOptional = F2( function (options, attributeOptional) { switch (attributeOptional.$) { - case 0: + case 'AttributeNotNeeded': return A2( $elm$html$Html$div, _List_fromArray( @@ -10451,14 +10544,14 @@ var $author$project$Main$inputAttributeOptional = F2( $elm$html$Html$Attributes$type_('checkbox'), $elm$html$Html$Attributes$tabindex(0), $elm$html$Html$Attributes$checked(false), - $elm$html$Html$Events$onCheck(options.ab) + $elm$html$Html$Events$onCheck(options.onCheck) ]), _List_Nil), $elm$html$Html$text(' '), - $elm$html$Html$text(options.d) + $elm$html$Html$text(options.label) ])) ])); - case 1: + case 'AttributeInvalid': var str = attributeOptional.a; return A2( $elm$html$Html$div, @@ -10483,13 +10576,13 @@ var $author$project$Main$inputAttributeOptional = F2( $elm$html$Html$Attributes$type_('checkbox'), $elm$html$Html$Attributes$tabindex(0), $elm$html$Html$Attributes$checked(true), - $elm$html$Html$Events$onCheck(options.ab) + $elm$html$Html$Events$onCheck(options.onCheck) ]), _List_Nil), $elm$html$Html$text(' '), - $elm$html$Html$text(options.d) + $elm$html$Html$text(options.label) ])), - options.af( + options.htmlNode( $elm$core$Result$Err(str)) ])); default: @@ -10517,36 +10610,36 @@ var $author$project$Main$inputAttributeOptional = F2( $elm$html$Html$Attributes$type_('checkbox'), $elm$html$Html$Attributes$tabindex(0), $elm$html$Html$Attributes$checked(true), - $elm$html$Html$Events$onCheck(options.ab) + $elm$html$Html$Events$onCheck(options.onCheck) ]), _List_Nil), $elm$html$Html$text(' '), - $elm$html$Html$text(options.d) + $elm$html$Html$text(options.label) ])), - options.af( + options.htmlNode( $elm$core$Result$Ok(a)) ])); } }); var $author$project$Main$maybeMultipleOf = function (formField) { - var _v0 = formField.a; + var _v0 = formField.type_; switch (_v0.$) { - case 0: - var multiple = _v0.a.aM; + case 'ShortText': + var multiple = _v0.a.multiple; switch (multiple.$) { - case 2: + case 'AttributeGiven': var i = multiple.a; return $elm$core$Maybe$Just(i); - case 1: + case 'AttributeInvalid': return $elm$core$Maybe$Nothing; default: return $elm$core$Maybe$Nothing; } - case 1: + case 'LongText': return $elm$core$Maybe$Nothing; - case 2: + case 'Dropdown': return $elm$core$Maybe$Nothing; - case 3: + case 'ChooseOne': return $elm$core$Maybe$Nothing; default: return $elm$core$Maybe$Nothing; @@ -10571,40 +10664,40 @@ var $elm$html$Html$Events$onInput = function (tagger) { }; var $elm$html$Html$Attributes$pattern = $elm$html$Html$Attributes$stringProperty('pattern'); var $author$project$Main$OnCheckboxMaxAllowedInput = function (a) { - return {$: 17, a: a}; + return {$: 'OnCheckboxMaxAllowedInput', a: a}; }; var $author$project$Main$OnCheckboxMinRequiredInput = function (a) { - return {$: 16, a: a}; + return {$: 'OnCheckboxMinRequiredInput', a: a}; }; -var $author$project$Main$OnChoicesInput = {$: 4}; -var $author$project$Main$OnDatalistInput = {$: 9}; +var $author$project$Main$OnChoicesInput = {$: 'OnChoicesInput'}; +var $author$project$Main$OnDatalistInput = {$: 'OnDatalistInput'}; var $author$project$Main$OnDatalistToggle = function (a) { - return {$: 8, a: a}; + return {$: 'OnDatalistToggle', a: a}; }; var $author$project$Main$OnDateMaxInput = function (a) { - return {$: 21, a: a}; + return {$: 'OnDateMaxInput', a: a}; }; var $author$project$Main$OnDateMaxToggle = function (a) { - return {$: 19, a: a}; + return {$: 'OnDateMaxToggle', a: a}; }; var $author$project$Main$OnDateMinInput = function (a) { - return {$: 20, a: a}; + return {$: 'OnDateMinInput', a: a}; }; var $author$project$Main$OnDateMinToggle = function (a) { - return {$: 18, a: a}; + return {$: 'OnDateMinToggle', a: a}; }; var $author$project$Main$OnFilterSourceFieldSelect = function (a) { - return {$: 24, a: a}; + return {$: 'OnFilterSourceFieldSelect', a: a}; }; var $author$project$Main$OnFilterToggle = function (a) { - return {$: 22, a: a}; + return {$: 'OnFilterToggle', a: a}; }; var $author$project$Main$OnFilterTypeSelect = function (a) { - return {$: 23, a: a}; + return {$: 'OnFilterTypeSelect', a: a}; }; -var $author$project$Main$OnMaxLengthInput = {$: 7}; +var $author$project$Main$OnMaxLengthInput = {$: 'OnMaxLengthInput'}; var $author$project$Main$OnMaxLengthToggle = function (a) { - return {$: 6, a: a}; + return {$: 'OnMaxLengthToggle', a: a}; }; var $elm$html$Html$Attributes$max = $elm$html$Html$Attributes$stringProperty('max'); var $elm$html$Html$Attributes$min = $elm$html$Html$Attributes$stringProperty('min'); @@ -10626,7 +10719,7 @@ var $author$project$Main$otherQuestionTitles = F2( $elm$core$List$map, function (_v1) { var f = _v1.b; - return {d: f.d, Q: f.Q}; + return {label: f.label, name: f.name}; }, A2( $elm$core$List$filter, @@ -10649,8 +10742,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( var filterSettings = function (filter) { if (!_Utils_eq(filter, $elm$core$Maybe$Nothing)) { var sourceFieldName = function () { - if (!filter.$) { - if (!filter.a.$) { + if (filter.$ === 'Just') { + if (filter.a.$ === 'FilterStartsWithFieldValueOf') { var name = filter.a.a; return name; } else { @@ -10663,8 +10756,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( }(); var otherFields = A2($author$project$Main$otherQuestionTitles, formFields, index); var filterType = function () { - if (!filter.$) { - if (!filter.a.$) { + if (filter.$ === 'Just') { + if (filter.a.$ === 'FilterStartsWithFieldValueOf') { return 'startswith'; } else { return 'contains'; @@ -10789,7 +10882,7 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( A2( $elm$core$List$map, function (field) { - var fieldValue = A2($elm$core$Maybe$withDefault, field.d, field.Q); + var fieldValue = A2($elm$core$Maybe$withDefault, field.label, field.name); var isSelected = _Utils_eq(fieldValue, sourceFieldName); return A2( $elm$html$Html$option, @@ -10804,7 +10897,7 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( 'value of ' + A2( $elm$json$Json$Encode$encode, 0, - $elm$json$Json$Encode$string(field.d))) + $elm$json$Json$Encode$string(field.label))) ])); }, otherFields))) @@ -10891,11 +10984,11 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( $elm$html$Html$Attributes$required(true), $elm$html$Html$Attributes$readonly( function () { - var _v8 = formField.q; - switch (_v8) { - case 0: + var _v8 = formField.presence; + switch (_v8.$) { + case 'Required': return false; - case 1: + case 'Optional': return false; default: return true; @@ -10910,9 +11003,9 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( _List_Nil) ])); }; - var _v0 = formField.a; + var _v0 = formField.type_; switch (_v0.$) { - case 0: + case 'ShortText': var customElement = _v0.a; var maybeShortTextTypeMaxLength = A2( $elm$core$Maybe$andThen, @@ -10923,27 +11016,27 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( A2( $elm$core$Maybe$map, function ($) { - return $.p; + return $.attributes; }, $elm$core$List$head( A2( $elm$core$List$filter, function (_v6) { - var inputType = _v6.B; - return _Utils_eq(inputType, customElement.B); + var inputType = _v6.inputType; + return _Utils_eq(inputType, customElement.inputType); }, shortTextTypeList))))); return _Utils_ap( _List_fromArray( [ function () { - if (maybeShortTextTypeMaxLength.$ === 1) { + if (maybeShortTextTypeMaxLength.$ === 'Nothing') { return A2( $author$project$Main$inputAttributeOptional, { - af: function (result) { + htmlNode: function (result) { var valueString = function () { - if (!result.$) { + if (result.$ === 'Ok') { var i = result.a; return $elm$core$String$fromInt(i); } else { @@ -10965,8 +11058,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ]), _List_Nil); }, - d: 'Limit number of characters', - ab: function (b) { + label: 'Limit number of characters', + onCheck: function (b) { return A3( $author$project$Main$OnFormField, $author$project$Main$OnMaxLengthToggle(b), @@ -10974,7 +11067,7 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ''); } }, - customElement.ah); + customElement.maxlength); } else { var i = maybeShortTextTypeMaxLength.a; return A2( @@ -10992,8 +11085,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( A2( $author$project$Main$inputAttributeOptional, { - af: function (result) { - if (!result.$) { + htmlNode: function (result) { + if (result.$ === 'Ok') { var a = result.a; return A2( $author$project$Main$textarea, @@ -11029,8 +11122,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( _List_Nil); } }, - d: 'Suggested values', - ab: function (b) { + label: 'Suggested values', + onCheck: function (b) { return A3( $author$project$Main$OnFormField, $author$project$Main$OnDatalistToggle(b), @@ -11038,18 +11131,18 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ''); } }, - customElement.ae) + customElement.datalist) ]), - ((customElement.B === 'date') || (A2( + ((customElement.inputType === 'date') || (A2( $elm$core$Maybe$withDefault, '', - A2($elm$core$Dict$get, 'type', customElement.p)) === 'date')) ? _List_fromArray( + A2($elm$core$Dict$get, 'type', customElement.attributes)) === 'date')) ? _List_fromArray( [ A2( $author$project$Main$inputAttributeOptional, { - af: function (result) { - if (!result.$) { + htmlNode: function (result) { + if (result.$ === 'Ok') { var dateStr = result.a; return A2( $elm$html$Html$input, @@ -11091,8 +11184,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( _List_Nil); } }, - d: 'Minimum date', - ab: function (b) { + label: 'Minimum date', + onCheck: function (b) { return A3( $author$project$Main$OnFormField, $author$project$Main$OnDateMinToggle(b), @@ -11100,12 +11193,12 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ''); } }, - customElement.ar), + customElement.min), A2( $author$project$Main$inputAttributeOptional, { - af: function (result) { - if (!result.$) { + htmlNode: function (result) { + if (result.$ === 'Ok') { var dateStr = result.a; return A2( $elm$html$Html$input, @@ -11147,8 +11240,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( _List_Nil); } }, - d: 'Maximum date', - ab: function (b) { + label: 'Maximum date', + onCheck: function (b) { return A3( $author$project$Main$OnFormField, $author$project$Main$OnDateMaxToggle(b), @@ -11156,17 +11249,17 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ''); } }, - customElement.aq) + customElement.max) ]) : _List_Nil); - case 1: + case 'LongText': var optionalMaxLength = _v0.a; return _List_fromArray( [ A2( $author$project$Main$inputAttributeOptional, { - af: function (result) { - if (!result.$) { + htmlNode: function (result) { + if (result.$ === 'Ok') { var i = result.a; return A2( $elm$html$Html$input, @@ -11199,8 +11292,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( _List_Nil); } }, - d: 'Limit number of characters', - ab: function (b) { + label: 'Limit number of characters', + onCheck: function (b) { return A3( $author$project$Main$OnFormField, $author$project$Main$OnMaxLengthToggle(b), @@ -11210,9 +11303,9 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( }, optionalMaxLength) ]); - case 2: - var choices = _v0.a.k; - var filter = _v0.a.e; + case 'Dropdown': + var choices = _v0.a.choices; + var filter = _v0.a.filter; return _Utils_ap( _List_fromArray( [ @@ -11220,9 +11313,9 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( filterCheckbox(filter) ]), filterSettings(filter)); - case 3: - var choices = _v0.a.k; - var filter = _v0.a.e; + case 'ChooseOne': + var choices = _v0.a.choices; + var filter = _v0.a.filter; return _Utils_ap( _List_fromArray( [ @@ -11231,10 +11324,10 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ]), filterSettings(filter)); default: - var choices = _v0.a.k; - var minRequired = _v0.a.P; - var maxAllowed = _v0.a.T; - var filter = _v0.a.e; + var choices = _v0.a.choices; + var minRequired = _v0.a.minRequired; + var maxAllowed = _v0.a.maxAllowed; + var filter = _v0.a.filter; return _Utils_ap( _List_fromArray( [ @@ -11276,7 +11369,7 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( '', A2($elm$core$Maybe$map, $elm$core$String$fromInt, minRequired))), $elm$html$Html$Attributes$min( - (formField.q === 2) ? '1' : '0'), + _Utils_eq(formField.presence, $author$project$Main$System) ? '1' : '0'), A2( $elm$core$Maybe$withDefault, $elm$html$Html$Attributes$max( @@ -11298,7 +11391,7 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ''); }) ]), - (formField.q === 2) ? _List_fromArray( + _Utils_eq(formField.presence, $author$project$Main$System) ? _List_fromArray( [ $elm$html$Html$Attributes$required(true) ]) : _List_Nil), @@ -11360,7 +11453,7 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ]))); } }); -var $author$project$Main$OnAddVisibilityRule = {$: 14}; +var $author$project$Main$OnAddVisibilityRule = {$: 'OnAddVisibilityRule'}; var $elm$core$List$intersperse = F2( function (sep, xs) { if (!xs.b) { @@ -11380,23 +11473,23 @@ var $elm$core$List$intersperse = F2( } }); var $author$project$Main$OnVisibilityConditionDuplicate = function (a) { - return {$: 15, a: a}; + return {$: 'OnVisibilityConditionDuplicate', a: a}; }; var $author$project$Main$OnVisibilityConditionFieldInput = F3( function (a, b, c) { - return {$: 12, a: a, b: b, c: c}; + return {$: 'OnVisibilityConditionFieldInput', a: a, b: b, c: c}; }); var $author$project$Main$OnVisibilityConditionTypeInput = F3( function (a, b, c) { - return {$: 11, a: a, b: b, c: c}; + return {$: 'OnVisibilityConditionTypeInput', a: a, b: b, c: c}; }); var $author$project$Main$OnVisibilityConditionValueInput = F3( function (a, b, c) { - return {$: 13, a: a, b: b, c: c}; + return {$: 'OnVisibilityConditionValueInput', a: a, b: b, c: c}; }); var $author$project$Main$OnVisibilityRuleTypeInput = F2( function (a, b) { - return {$: 10, a: a, b: b}; + return {$: 'OnVisibilityRuleTypeInput', a: a, b: b}; }); var $author$project$Main$comparisonOf = function (condition) { var comparison = condition.b; @@ -11405,32 +11498,32 @@ var $author$project$Main$comparisonOf = function (condition) { var $author$project$Main$isComparingWith = F2( function (expected, given) { switch (expected.$) { - case 0: - if (!given.$) { + case 'Equals': + if (given.$ === 'Equals') { return true; } else { return false; } - case 1: - if (given.$ === 1) { + case 'StringContains': + if (given.$ === 'StringContains') { return true; } else { return false; } - case 2: - if (given.$ === 2) { + case 'EndsWith': + if (given.$ === 'EndsWith') { return true; } else { return false; } - case 3: - if (given.$ === 3) { + case 'GreaterThan': + if (given.$ === 'GreaterThan') { return true; } else { return false; } default: - if (given.$ === 4) { + if (given.$ === 'EqualsField') { return true; } else { return false; @@ -11438,14 +11531,14 @@ var $author$project$Main$isComparingWith = F2( } }); var $author$project$Main$isHideWhen = function (rule) { - if (!rule.$) { + if (rule.$ === 'ShowWhen') { return false; } else { return true; } }; var $author$project$Main$isShowWhen = function (rule) { - if (!rule.$) { + if (rule.$ === 'ShowWhen') { return true; } else { return false; @@ -11457,9 +11550,9 @@ var $elm$core$Basics$composeR = F3( f(x)); }); var $author$project$Main$selectInputGroup = function (_v0) { - var selectAttrs = _v0.cN; - var options = _v0.cs; - var inputNode = _v0.b5; + var selectAttrs = _v0.selectAttrs; + var options = _v0.options; + var inputNode = _v0.inputNode; var optionToNode = function (opt) { return A2( $elm$html$Html$option, @@ -11469,15 +11562,15 @@ var $author$project$Main$selectInputGroup = function (_v0) { _List_fromArray( [ $elm$core$Maybe$Just( - $elm$html$Html$Attributes$value(opt.j)), - opt.bi ? $elm$core$Maybe$Just( + $elm$html$Html$Attributes$value(opt.value)), + opt.selected ? $elm$core$Maybe$Just( $elm$html$Html$Attributes$selected(true)) : $elm$core$Maybe$Nothing, - opt.bL ? $elm$core$Maybe$Just( + opt.disabled ? $elm$core$Maybe$Just( A2($elm$html$Html$Attributes$attribute, 'disabled', 'disabled')) : $elm$core$Maybe$Nothing ])), _List_fromArray( [ - $elm$html$Html$text(opt.d) + $elm$html$Html$text(opt.label) ])); }; var calculatedAttrs = A2( @@ -11491,13 +11584,13 @@ var $author$project$Main$selectInputGroup = function (_v0) { A2( $elm$core$Basics$composeR, function ($) { - return $.j; + return $.value; }, $elm$html$Html$Attributes$value), A2( $elm$core$List$filter, function ($) { - return $.bi; + return $.selected; }, options))); return A2( @@ -11555,12 +11648,12 @@ var $author$project$Main$visibilityRuleSection = F4( $elm$core$Array$toList(formFields))); var datalistId = 'datalist-' + ($elm$core$String$fromInt(fieldIndex) + ('-' + ($elm$core$String$fromInt(ruleIndex) + ('-' + $elm$core$String$fromInt(conditionIndex))))); var datalistElement = function () { - if (!selectedField.$) { + if (selectedField.$ === 'Just') { var field = selectedField.a; - var _v8 = field.a; + var _v8 = field.type_; switch (_v8.$) { - case 2: - var choices = _v8.a.k; + case 'Dropdown': + var choices = _v8.a.choices; return $elm$core$Maybe$Just( A2( $elm$html$Html$datalist, @@ -11575,13 +11668,13 @@ var $author$project$Main$visibilityRuleSection = F4( $elm$html$Html$option, _List_fromArray( [ - $elm$html$Html$Attributes$value(c.j) + $elm$html$Html$Attributes$value(c.value) ]), _List_Nil); }, choices))); - case 3: - var choices = _v8.a.k; + case 'ChooseOne': + var choices = _v8.a.choices; return $elm$core$Maybe$Just( A2( $elm$html$Html$datalist, @@ -11596,13 +11689,13 @@ var $author$project$Main$visibilityRuleSection = F4( $elm$html$Html$option, _List_fromArray( [ - $elm$html$Html$Attributes$value(c.j) + $elm$html$Html$Attributes$value(c.value) ]), _List_Nil); }, choices))); - case 4: - var choices = _v8.a.k; + case 'ChooseMultiple': + var choices = _v8.a.choices; return $elm$core$Maybe$Just( A2( $elm$html$Html$datalist, @@ -11617,7 +11710,7 @@ var $author$project$Main$visibilityRuleSection = F4( $elm$html$Html$option, _List_fromArray( [ - $elm$html$Html$Attributes$value(c.j) + $elm$html$Html$Attributes$value(c.value) ]), _List_Nil); }, @@ -11630,7 +11723,7 @@ var $author$project$Main$visibilityRuleSection = F4( } }(); var datalistAttr = function () { - if (!datalistElement.$) { + if (datalistElement.$ === 'Just') { return _List_fromArray( [ A2($elm$html$Html$Attributes$attribute, 'list', datalistId) @@ -11712,7 +11805,7 @@ var $author$project$Main$visibilityRuleSection = F4( 'value of ' + A2( $elm$json$Json$Encode$encode, 0, - $elm$json$Json$Encode$string(field.d))) + $elm$json$Json$Encode$string(field.label))) ])); }, A2($author$project$Main$otherQuestionTitles, formFields, fieldIndex)))) @@ -11720,20 +11813,20 @@ var $author$project$Main$visibilityRuleSection = F4( function () { var optionRecord = F4( function (value, label, selected, disabled) { - return {bL: disabled, d: label, bi: selected, j: value}; + return {disabled: disabled, label: label, selected: selected, value: value}; }); var comparisonValueString = function () { switch (rule.b.$) { - case 0: + case 'Equals': var v = rule.b.a; return v; - case 1: + case 'StringContains': var v = rule.b.a; return v; - case 2: + case 'EndsWith': var v = rule.b.a; return v; - case 3: + case 'GreaterThan': var v = rule.b.a; return v; default: @@ -11767,7 +11860,7 @@ var $author$project$Main$visibilityRuleSection = F4( datalistAttr), _List_Nil), function () { - if (!datalistElement.$) { + if (datalistElement.$ === 'Just') { var element = datalistElement.a; return _List_fromArray( [element]); @@ -11779,7 +11872,7 @@ var $author$project$Main$visibilityRuleSection = F4( var candidateFieldsExceptSelf = A2( $elm$core$List$filter, function (f) { - var fn = A2($elm$core$Maybe$withDefault, f.d, f.Q); + var fn = A2($elm$core$Maybe$withDefault, f.label, f.name); return !_Utils_eq(fn, selectedFieldName); }, candidateFields); @@ -11835,7 +11928,7 @@ var $author$project$Main$visibilityRuleSection = F4( var otherFields = A2( $elm$core$List$filter, function (f) { - var fn = A2($elm$core$Maybe$withDefault, f.d, f.Q); + var fn = A2($elm$core$Maybe$withDefault, f.label, f.name); return !_Utils_eq(fn, selectedFieldName); }, candidateFields); @@ -11881,7 +11974,7 @@ var $author$project$Main$visibilityRuleSection = F4( A2( $elm$core$List$map, function (f) { - var fn = A2($elm$core$Maybe$withDefault, f.d, f.Q); + var fn = A2($elm$core$Maybe$withDefault, f.label, f.name); return A2( $elm$html$Html$option, _List_fromArray( @@ -11896,7 +11989,7 @@ var $author$project$Main$visibilityRuleSection = F4( 'value of ' + A2( $elm$json$Json$Encode$encode, 0, - $elm$json$Json$Encode$string(f.d))) + $elm$json$Json$Encode$string(f.label))) ])); }, otherFields))), @@ -11904,7 +11997,7 @@ var $author$project$Main$visibilityRuleSection = F4( ])); var inputNode = function () { var _v3 = $author$project$Main$comparisonOf(rule); - if (_v3.$ === 4) { + if (_v3.$ === 'EqualsField') { return equalsFieldDisabled ? A2( $elm$html$Html$input, _List_fromArray( @@ -11921,9 +12014,9 @@ var $author$project$Main$visibilityRuleSection = F4( }(); return $author$project$Main$selectInputGroup( { - b5: inputNode, - cs: optionsList, - cN: _List_fromArray( + inputNode: inputNode, + options: optionsList, + selectAttrs: _List_fromArray( [ $author$project$Main$onChange( function (str) { @@ -11984,7 +12077,7 @@ var $author$project$Main$visibilityRuleSection = F4( $elm$html$Html$Attributes$required(true), $elm$html$Html$Attributes$value( function () { - if (!visibilityRule.$) { + if (visibilityRule.$ === 'ShowWhen') { return 'ShowWhen'; } else { return 'HideWhen'; @@ -12110,7 +12203,7 @@ var $author$project$Main$visibilityRulesSection = F3( A2( $elm$core$List$indexedMap, A2($author$project$Main$visibilityRuleSection, index, formFields), - formField.m))), + formField.visibilityRule))), A2( $elm$html$Html$div, _List_fromArray( @@ -12137,7 +12230,7 @@ var $author$project$Main$visibilityRulesSection = F3( }); var $author$project$Main$viewFormFieldBuilder = F5( function (shortTextTypeList, index, totalLength, formFields, formField) { - var isDuplicateLabel = A3($author$project$Main$hasDuplicateLabel, index, formField.d, formFields); + var isDuplicateLabel = A3($author$project$Main$hasDuplicateLabel, index, formField.label, formFields); var patternAttr = isDuplicateLabel ? _List_fromArray( [ $elm$html$Html$Attributes$pattern('^$') @@ -12162,7 +12255,7 @@ var $author$project$Main$viewFormFieldBuilder = F5( [ $author$project$Main$SetEditorAnimate( $elm$core$Maybe$Just( - _Utils_Tuple2(index, 1))), + _Utils_Tuple2(index, $author$project$Main$AnimateFadeOut))), $author$project$Main$DeleteFormField(index) ]))) ]), @@ -12195,7 +12288,7 @@ var $author$project$Main$viewFormFieldBuilder = F5( $elm$html$Html$Attributes$type_('checkbox'), $elm$html$Html$Attributes$tabindex(0), $elm$html$Html$Attributes$checked( - $author$project$Main$requiredData(formField.q)), + $author$project$Main$requiredData(formField.presence)), $elm$html$Html$Events$onCheck( function (b) { return A3( @@ -12251,7 +12344,7 @@ var $author$project$Main$viewFormFieldBuilder = F5( $elm$html$Html$text(' '), $elm$html$Html$text( 'Accept multiple ' + $elm$core$String$toLower( - $author$project$Main$stringFromInputField(formField.a))) + $author$project$Main$stringFromInputField(formField.type_))) ])) ])); var buildFieldClass = 'tff-build-field'; @@ -12282,7 +12375,7 @@ var $author$project$Main$viewFormFieldBuilder = F5( _List_fromArray( [ $elm$html$Html$text( - $author$project$Main$stringFromInputField(formField.a) + ' question title') + $author$project$Main$stringFromInputField(formField.type_) + ' question title') ])), A2( $elm$html$Html$input, @@ -12291,7 +12384,7 @@ var $author$project$Main$viewFormFieldBuilder = F5( [ $elm$html$Html$Attributes$type_('text'), $elm$html$Html$Attributes$id('label-' + idSuffix), - $elm$html$Html$Attributes$value(formField.d), + $elm$html$Html$Attributes$value(formField.label), $elm$html$Html$Attributes$required(true), $elm$html$Html$Events$onInput( A2($author$project$Main$OnFormField, $author$project$Main$OnLabelInput, index)), @@ -12311,27 +12404,27 @@ var $author$project$Main$viewFormFieldBuilder = F5( ])) : $elm$html$Html$text('') ])), function () { - if ($author$project$Main$mustBeOptional(formField.a)) { + if ($author$project$Main$mustBeOptional(formField.type_)) { return $elm$html$Html$text(''); } else { - var _v0 = formField.q; - switch (_v0) { - case 0: + var _v0 = formField.presence; + switch (_v0.$) { + case 'Required': return configureRequiredCheckbox; - case 1: + case 'Optional': return configureRequiredCheckbox; default: return $elm$html$Html$text(''); } } }(), - $author$project$Main$allowsTogglingMultiple(formField.a) ? configureMultipleCheckbox : $elm$html$Html$text(''), + $author$project$Main$allowsTogglingMultiple(formField.type_) ? configureMultipleCheckbox : $elm$html$Html$text(''), A2( $author$project$Main$inputAttributeOptional, { - af: function (result) { + htmlNode: function (result) { var valueString = function () { - if (!result.$) { + if (result.$ === 'Ok') { var a = result.a; return a; } else { @@ -12351,8 +12444,8 @@ var $author$project$Main$viewFormFieldBuilder = F5( ]), _List_Nil); }, - d: 'Question description', - ab: function (b) { + label: 'Question description', + onCheck: function (b) { return A3( $author$project$Main$OnFormField, $author$project$Main$OnDescriptionToggle(b), @@ -12360,7 +12453,7 @@ var $author$project$Main$viewFormFieldBuilder = F5( ''); } }, - formField.S) + formField.description) ]), _Utils_ap( A4($author$project$Main$viewFormFieldOptionsBuilder, shortTextTypeList, index, formFields, formField), @@ -12413,11 +12506,11 @@ var $author$project$Main$viewFormFieldBuilder = F5( ])) ])), function () { - var _v2 = formField.q; - switch (_v2) { - case 0: + var _v2 = formField.presence; + switch (_v2.$) { + case 'Required': return deleteFieldButton; - case 1: + case 'Optional': return deleteFieldButton; default: return $elm$html$Html$text(''); @@ -12433,7 +12526,7 @@ var $author$project$Main$viewRightPanel = function (modelData) { A2( $elm$core$List$cons, 'tff-right-panel', - (!_Utils_eq(modelData.F, $elm$core$Maybe$Nothing)) ? _List_fromArray( + (!_Utils_eq(modelData.selectedFieldIndex, $elm$core$Maybe$Nothing)) ? _List_fromArray( ['tff-panel-visible']) : _List_Nil)); return A2( $elm$html$Html$div, @@ -12481,18 +12574,18 @@ var $author$project$Main$viewRightPanel = function (modelData) { _List_fromArray( [ function () { - var _v0 = modelData.F; - if (!_v0.$) { + var _v0 = modelData.selectedFieldIndex; + if (_v0.$ === 'Just') { var index = _v0.a; - var _v1 = A2($elm$core$Array$get, index, modelData.g); - if (!_v1.$) { + var _v1 = A2($elm$core$Array$get, index, modelData.formFields); + if (_v1.$ === 'Just') { var formField = _v1.a; return A5( $author$project$Main$viewFormFieldBuilder, - modelData.al, + $author$project$Main$allCustomElementsFromGroups(modelData.inputFieldGroups), index, - $elm$core$Array$length(modelData.g), - modelData.g, + $elm$core$Array$length(modelData.formFields), + modelData.formFields, formField); } else { return $elm$html$Html$text('Select a field to edit its settings'); @@ -12508,14 +12601,18 @@ var $author$project$Main$viewFormBuilder = F2( function (maybeAnimate, model) { var maybeFieldsList = A2( $author$project$Main$fieldsWithPlaceholder, - $elm$core$Array$toList(model.g), - model.r); - var extraOptions = A2( - $elm$core$List$map, - function (customElement) { - return $author$project$Main$ShortText(customElement); - }, - model.al); + $elm$core$Array$toList(model.formFields), + model.dragged); + var activeFields = A2( + $elm$core$Maybe$withDefault, + _List_Nil, + A2( + $elm$core$Maybe$map, + function ($) { + return $.fields; + }, + $elm$core$List$head( + A2($elm$core$List$drop, model.activeFieldGroupIndex, model.inputFieldGroups)))); return _List_fromArray( [ A2( @@ -12541,26 +12638,32 @@ var $author$project$Main$viewFormBuilder = F2( [ _Utils_Tuple2( 'tff-panel-hidden', - !_Utils_eq(model.F, $elm$core$Maybe$Nothing)) + !_Utils_eq(model.selectedFieldIndex, $elm$core$Maybe$Nothing)) ])) ]), - _List_fromArray( - [ - A2( - $elm$html$Html$h2, - _List_fromArray( + _Utils_ap( + _List_fromArray( + [ + A2( + $elm$html$Html$h2, + _List_fromArray( + [ + $elm$html$Html$Attributes$class('tff-panel-header') + ]), + _List_fromArray( + [ + $elm$html$Html$text('Add Form Field') + ])) + ]), + _Utils_ap( + ($elm$core$List$length(model.inputFieldGroups) > 1) ? _List_fromArray( [ - $elm$html$Html$Attributes$class('tff-panel-header') - ]), + A2($author$project$Main$viewFieldGroupTabs, model.activeFieldGroupIndex, model.inputFieldGroups) + ]) : _List_Nil, _List_fromArray( [ - $elm$html$Html$text('Add Form Field') - ])), - A2( - $author$project$Main$viewAddQuestionsList, - model.aa, - _Utils_ap($author$project$Main$allInputField, extraOptions)) - ])), + A2($author$project$Main$viewAddQuestionsList, model.nextQuestionNumber, activeFields) + ])))), A2( $elm$html$Html$div, _List_fromArray( @@ -12571,7 +12674,7 @@ var $author$project$Main$viewFormBuilder = F2( [ _Utils_Tuple2( 'tff-panel-hidden', - !_Utils_eq(model.F, $elm$core$Maybe$Nothing)) + !_Utils_eq(model.selectedFieldIndex, $elm$core$Maybe$Nothing)) ])), $elm$html$Html$Events$onClick( $author$project$Main$SelectField($elm$core$Maybe$Nothing)) @@ -12599,7 +12702,7 @@ var $author$project$Main$viewFormBuilder = F2( }); var $author$project$Main$OnFormValuesUpdated = F2( function (a, b) { - return {$: 15, a: a, b: b}; + return {$: 'OnFormValuesUpdated', a: a, b: b}; }); var $author$project$Main$fieldHasEmptyFilter = F2( function (formField, trackedFormValues) { @@ -12616,8 +12719,8 @@ var $author$project$Main$fieldHasEmptyFilter = F2( A2($elm$core$Dict$get, fieldName, trackedFormValues)))); }; var getFilterField = function (filter) { - if (!filter.$) { - if (!filter.a.$) { + if (filter.$ === 'Just') { + if (filter.a.$ === 'FilterStartsWithFieldValueOf') { var fieldName = filter.a.a; return $elm$core$Maybe$Just(fieldName); } else { @@ -12628,10 +12731,10 @@ var $author$project$Main$fieldHasEmptyFilter = F2( return $elm$core$Maybe$Nothing; } }; - var _v0 = formField.a; + var _v0 = formField.type_; switch (_v0.$) { - case 2: - var filter = _v0.a.e; + case 'Dropdown': + var filter = _v0.a.filter; return A2( $elm$core$Maybe$withDefault, false, @@ -12639,8 +12742,8 @@ var $author$project$Main$fieldHasEmptyFilter = F2( $elm$core$Maybe$map, isFilterFieldEmpty, getFilterField(filter))); - case 3: - var filter = _v0.a.e; + case 'ChooseOne': + var filter = _v0.a.filter; return A2( $elm$core$Maybe$withDefault, false, @@ -12648,8 +12751,8 @@ var $author$project$Main$fieldHasEmptyFilter = F2( $elm$core$Maybe$map, isFilterFieldEmpty, getFilterField(filter))); - case 4: - var filter = _v0.a.e; + case 'ChooseMultiple': + var filter = _v0.a.filter; return A2( $elm$core$Maybe$withDefault, false, @@ -12662,17 +12765,17 @@ var $author$project$Main$fieldHasEmptyFilter = F2( } }); var $author$project$Main$isChooseManyUsingMinMax = function (formField) { - var _v0 = formField.a; + var _v0 = formField.type_; switch (_v0.$) { - case 0: + case 'ShortText': return false; - case 1: + case 'LongText': return false; - case 4: - var minRequired = _v0.a.P; - var maxAllowed = _v0.a.T; - return (!_Utils_eq(minRequired, $elm$core$Maybe$Nothing)) || ((!_Utils_eq(maxAllowed, $elm$core$Maybe$Nothing)) || (formField.q === 2)); - case 3: + case 'ChooseMultiple': + var minRequired = _v0.a.minRequired; + var maxAllowed = _v0.a.maxAllowed; + return (!_Utils_eq(minRequired, $elm$core$Maybe$Nothing)) || ((!_Utils_eq(maxAllowed, $elm$core$Maybe$Nothing)) || _Utils_eq(formField.presence, $author$project$Main$System)); + case 'ChooseOne': return false; default: return false; @@ -12697,7 +12800,7 @@ var $author$project$Main$evaluateCondition = F2( var fieldName = condition.a; var comparison = condition.b; switch (comparison.$) { - case 0: + case 'Equals': var givenValue = comparison.a; return A2( $elm$core$List$member, @@ -12706,7 +12809,7 @@ var $author$project$Main$evaluateCondition = F2( $elm$core$Maybe$withDefault, _List_Nil, A2($elm$core$Dict$get, fieldName, trackedFormValues))); - case 1: + case 'StringContains': var givenValue = comparison.a; return A2( $elm$core$List$any, @@ -12715,7 +12818,7 @@ var $author$project$Main$evaluateCondition = F2( $elm$core$Maybe$withDefault, _List_Nil, A2($elm$core$Dict$get, fieldName, trackedFormValues))); - case 2: + case 'EndsWith': var givenValue = comparison.a; return A2( $elm$core$List$any, @@ -12724,13 +12827,13 @@ var $author$project$Main$evaluateCondition = F2( $elm$core$Maybe$withDefault, _List_Nil, A2($elm$core$Dict$get, fieldName, trackedFormValues))); - case 3: + case 'GreaterThan': var givenValue = comparison.a; return A2( $elm$core$List$any, function (formValue) { var _v2 = $elm$core$String$toFloat(givenValue); - if (!_v2.$) { + if (_v2.$ === 'Just') { var givenFloat = _v2.a; return A2( $elm$core$Maybe$withDefault, @@ -12771,7 +12874,7 @@ var $author$project$Main$isVisibilityRuleSatisfied = F2( return $elm$core$List$isEmpty(rules) || A2( $elm$core$List$any, function (rule) { - if (!rule.$) { + if (rule.$ === 'ShowWhen') { var conditions = rule.a; return A2( $elm$core$List$all, @@ -12793,7 +12896,7 @@ var $elm$core$Array$foldl = F3( var tail = _v0.d; var helper = F2( function (node, acc) { - if (!node.$) { + if (node.$ === 'SubTree') { var subTree = node.a; return A3($elm$core$Elm$JsArray$foldl, helper, acc, subTree); } else { @@ -12819,9 +12922,9 @@ var $author$project$Main$sanitizeFormValuesHelper = F3( F2( function (field, acc) { var fieldName = $author$project$Main$fieldNameOf(field); - if (A2($author$project$Main$isVisibilityRuleSatisfied, field.m, currentValues)) { + if (A2($author$project$Main$isVisibilityRuleSatisfied, field.visibilityRule, currentValues)) { var _v0 = A2($elm$core$Dict$get, fieldName, currentValues); - if (!_v0.$) { + if (_v0.$ === 'Just') { var fieldValues = _v0.a; return A3($elm$core$Dict$insert, fieldName, fieldValues, acc); } else { @@ -12857,10 +12960,10 @@ var $author$project$Main$sanitizeFormValues = F2( }); var $author$project$Main$viewFormPreview = F2( function (customAttrs, _v0) { - var formFields = _v0.g; - var needsFormLogic = _v0._; - var trackedFormValues = _v0.v; - var shortTextTypeDict = _v0.ak; + var formFields = _v0.formFields; + var needsFormLogic = _v0.needsFormLogic; + var trackedFormValues = _v0.trackedFormValues; + var shortTextTypeDict = _v0.shortTextTypeDict; var onInputAttrs = function (fieldName) { return _List_fromArray( [ @@ -12879,7 +12982,7 @@ var $author$project$Main$viewFormPreview = F2( [ $elm$html$Html$Events$onCheck( function (_v5) { - return A2($author$project$Main$OnFormValuesUpdated, fieldName, choice.j); + return A2($author$project$Main$OnFormValuesUpdated, fieldName, choice.value); }) ]); }); @@ -12900,21 +13003,21 @@ var $author$project$Main$viewFormPreview = F2( $elm$core$Array$toList(formFields)); var needsEventHandlers = needsFormLogic || (isAnyChooseManyUsingMinMax || hasOptionalTemporalInputs); var config = { - Y: customAttrs, - g: formFields, - _: needsFormLogic, - bf: needsEventHandlers ? onChangeAttrs : function (_v1) { + customAttrs: customAttrs, + formFields: formFields, + needsFormLogic: needsFormLogic, + onChange: needsEventHandlers ? onChangeAttrs : function (_v1) { return _List_Nil; }, - bg: needsEventHandlers ? onChooseManyAttrs : F2( + onChooseMany: needsEventHandlers ? onChooseManyAttrs : F2( function (_v2, _v3) { return _List_Nil; }), - aO: needsEventHandlers ? onInputAttrs : function (_v4) { + onInput: needsEventHandlers ? onInputAttrs : function (_v4) { return _List_Nil; }, - ak: shortTextTypeDict, - v: trackedFormValues + shortTextTypeDict: shortTextTypeDict, + trackedFormValues: trackedFormValues }; return $elm$core$Array$toList( A2( @@ -12925,7 +13028,7 @@ var $author$project$Main$viewFormPreview = F2( function (formField) { return A2( $author$project$Main$isVisibilityRuleSatisfied, - formField.m, + formField.visibilityRule, A2($author$project$Main$sanitizeFormValues, formFields, trackedFormValues)) && (!A2($author$project$Main$fieldHasEmptyFilter, formField, trackedFormValues)); }, formFields))); @@ -12936,11 +13039,11 @@ var $author$project$Main$viewMain = function (model) { _List_fromArray( [ $elm$html$Html$Attributes$class( - 'tff tff-container tff-mode-' + $author$project$Main$stringFromViewMode(model.ac)) + 'tff tff-container tff-mode-' + $author$project$Main$stringFromViewMode(model.viewMode)) ]), function () { - var _v0 = model.ac; - if (!_v0.$) { + var _v0 = model.viewMode; + if (_v0.$ === 'Editor') { var editorAttr = _v0.a; return A2( $elm$core$List$cons, @@ -12954,18 +13057,18 @@ var $author$project$Main$viewMain = function (model) { A2( $elm$json$Json$Encode$encode, 0, - $author$project$Main$encodeFormFields(model.g))) + $author$project$Main$encodeFormFields(model.formFields))) ]), _List_Nil), - A2($author$project$Main$viewFormBuilder, editorAttr.aB, model)); + A2($author$project$Main$viewFormBuilder, editorAttr.maybeAnimate, model)); } else { return A2($author$project$Main$viewFormPreview, _List_Nil, model); } }()); }; var $author$project$Main$view = function (model) { - var _v0 = model.aW; - if (!_v0.$) { + var _v0 = model.initError; + if (_v0.$ === 'Just') { var errString = _v0.a; return A2( $elm$html$Html$div, @@ -12995,7 +13098,7 @@ var $author$project$Main$view = function (model) { } }; var $author$project$Main$main = $elm$browser$Browser$element( - {ds: $author$project$Main$init, dS: $author$project$Main$subscriptions, dV: $author$project$Main$update, dW: $author$project$Main$view}); + {init: $author$project$Main$init, subscriptions: $author$project$Main$subscriptions, update: $author$project$Main$update, view: $author$project$Main$view}); /* _Platform_export({'Main':{'init':$author$project$Main$main($elm$json$Json$Decode$value)(0)}});}(this)); */ diff --git a/dist/tiny-form-fields.js b/dist/tiny-form-fields.js index a9f1d4d..09a64e0 100644 --- a/dist/tiny-form-fields.js +++ b/dist/tiny-form-fields.js @@ -77,7 +77,7 @@ function A9(fun, a, b, c, d, e, f, g, h, i) { return fun.a === 9 ? fun.f(a, b, c, d, e, f, g, h, i) : fun(a)(b)(c)(d)(e)(f)(g)(h)(i); } - +console.warn('Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets.'); // EQUALITY @@ -113,7 +113,7 @@ function _Utils_eqHelp(x, y, depth, stack) return true; } - /**_UNUSED/ + /**/ if (x.$ === 'Set_elm_builtin') { x = $elm$core$Set$toList(x); @@ -126,7 +126,7 @@ function _Utils_eqHelp(x, y, depth, stack) } //*/ - /**/ + /**_UNUSED/ if (x.$ < 0) { x = $elm$core$Dict$toList(x); @@ -161,7 +161,7 @@ function _Utils_cmp(x, y, ord) return x === y ? /*EQ*/ 0 : x < y ? /*LT*/ -1 : /*GT*/ 1; } - /**_UNUSED/ + /**/ if (x instanceof String) { var a = x.valueOf(); @@ -170,10 +170,10 @@ function _Utils_cmp(x, y, ord) } //*/ - /**/ + /**_UNUSED/ if (typeof x.$ === 'undefined') //*/ - /**_UNUSED/ + /**/ if (x.$[0] === '#') //*/ { @@ -203,17 +203,17 @@ var _Utils_compare = F2(function(x, y) // COMMON VALUES -var _Utils_Tuple0 = 0; -var _Utils_Tuple0_UNUSED = { $: '#0' }; +var _Utils_Tuple0_UNUSED = 0; +var _Utils_Tuple0 = { $: '#0' }; -function _Utils_Tuple2(a, b) { return { a: a, b: b }; } -function _Utils_Tuple2_UNUSED(a, b) { return { $: '#2', a: a, b: b }; } +function _Utils_Tuple2_UNUSED(a, b) { return { a: a, b: b }; } +function _Utils_Tuple2(a, b) { return { $: '#2', a: a, b: b }; } -function _Utils_Tuple3(a, b, c) { return { a: a, b: b, c: c }; } -function _Utils_Tuple3_UNUSED(a, b, c) { return { $: '#3', a: a, b: b, c: c }; } +function _Utils_Tuple3_UNUSED(a, b, c) { return { a: a, b: b, c: c }; } +function _Utils_Tuple3(a, b, c) { return { $: '#3', a: a, b: b, c: c }; } -function _Utils_chr(c) { return c; } -function _Utils_chr_UNUSED(c) { return new String(c); } +function _Utils_chr_UNUSED(c) { return c; } +function _Utils_chr(c) { return new String(c); } // RECORDS @@ -264,11 +264,11 @@ function _Utils_ap(xs, ys) -var _List_Nil = { $: 0 }; -var _List_Nil_UNUSED = { $: '[]' }; +var _List_Nil_UNUSED = { $: 0 }; +var _List_Nil = { $: '[]' }; -function _List_Cons(hd, tl) { return { $: 1, a: hd, b: tl }; } -function _List_Cons_UNUSED(hd, tl) { return { $: '::', a: hd, b: tl }; } +function _List_Cons_UNUSED(hd, tl) { return { $: 1, a: hd, b: tl }; } +function _List_Cons(hd, tl) { return { $: '::', a: hd, b: tl }; } var _List_cons = F2(_List_Cons); @@ -499,12 +499,12 @@ var _JsArray_appendN = F3(function(n, dest, source) // LOG -var _Debug_log = F2(function(tag, value) +var _Debug_log_UNUSED = F2(function(tag, value) { return value; }); -var _Debug_log_UNUSED = F2(function(tag, value) +var _Debug_log = F2(function(tag, value) { console.log(tag + ': ' + _Debug_toString(value)); return value; @@ -530,12 +530,12 @@ function _Debug_todoCase(moduleName, region, value) // TO STRING -function _Debug_toString(value) +function _Debug_toString_UNUSED(value) { return ''; } -function _Debug_toString_UNUSED(value) +function _Debug_toString(value) { return _Debug_toAnsiString(false, value); } @@ -720,13 +720,13 @@ function _Debug_toHexDigit(n) // CRASH -function _Debug_crash(identifier) +function _Debug_crash_UNUSED(identifier) { throw new Error('https://github.com/elm/core/blob/1.0.0/hints/' + identifier + '.md'); } -function _Debug_crash_UNUSED(identifier, fact1, fact2, fact3, fact4) +function _Debug_crash(identifier, fact1, fact2, fact3, fact4) { switch(identifier) { @@ -784,11 +784,11 @@ function _Debug_crash_UNUSED(identifier, fact1, fact2, fact3, fact4) function _Debug_regionToString(region) { - if (region.bl.aL === region.bN.aL) + if (region.start.line === region.end.line) { - return 'on line ' + region.bl.aL; + return 'on line ' + region.start.line; } - return 'on lines ' + region.bl.aL + ' through ' + region.bN.aL; + return 'on lines ' + region.start.line + ' through ' + region.end.line; } @@ -1212,7 +1212,7 @@ function _Char_toLocaleLower(char) -/**_UNUSED/ +/**/ function _Json_errorToString(error) { return $elm$json$Json$Decode$errorToString(error); @@ -1616,11 +1616,11 @@ var _Json_encode = F2(function(indentLevel, value) return JSON.stringify(_Json_unwrap(value), null, indentLevel) + ''; }); -function _Json_wrap_UNUSED(value) { return { $: 0, a: value }; } -function _Json_unwrap_UNUSED(value) { return value.a; } +function _Json_wrap(value) { return { $: 0, a: value }; } +function _Json_unwrap(value) { return value.a; } -function _Json_wrap(value) { return value; } -function _Json_unwrap(value) { return value; } +function _Json_wrap_UNUSED(value) { return value; } +function _Json_unwrap_UNUSED(value) { return value; } function _Json_emptyArray() { return []; } function _Json_emptyObject() { return {}; } @@ -1857,9 +1857,9 @@ var _Platform_worker = F4(function(impl, flagDecoder, debugMetadata, args) return _Platform_initialize( flagDecoder, args, - impl.ds, - impl.dV, - impl.dS, + impl.init, + impl.update, + impl.subscriptions, function() { return function() {} } ); }); @@ -1872,7 +1872,7 @@ var _Platform_worker = F4(function(impl, flagDecoder, debugMetadata, args) function _Platform_initialize(flagDecoder, args, init, update, subscriptions, stepperBuilder) { var result = A2(_Json_run, flagDecoder, _Json_wrap(args ? args['flags'] : undefined)); - $elm$core$Result$isOk(result) || _Debug_crash(2 /**_UNUSED/, _Json_errorToString(result.a) /**/); + $elm$core$Result$isOk(result) || _Debug_crash(2 /**/, _Json_errorToString(result.a) /**/); var managers = {}; var initPair = init(result.a); var model = initPair.a; @@ -2316,7 +2316,7 @@ function _Platform_setupIncomingPort(name, sendToApp) // -function _Platform_export(exports) +function _Platform_export_UNUSED(exports) { scope['Elm'] ? _Platform_mergeExportsProd(scope['Elm'], exports) @@ -2337,7 +2337,7 @@ function _Platform_mergeExportsProd(obj, exports) } -function _Platform_export_UNUSED(exports) +function _Platform_export(exports) { scope['Elm'] ? _Platform_mergeExportsDebug('Elm', scope['Elm'], exports) @@ -2377,10 +2377,10 @@ var _VirtualDom_init = F4(function(virtualNode, flagDecoder, debugMetadata, args { // NOTE: this function needs _Platform_export available to work - /**/ + /**_UNUSED/ var node = args['node']; //*/ - /**_UNUSED/ + /**/ var node = args && args['node'] ? args['node'] : _Debug_crash(0); //*/ @@ -2655,14 +2655,14 @@ function _VirtualDom_noInnerHtmlOrFormAction(key) function _VirtualDom_noJavaScriptUri(value) { return _VirtualDom_RE_js.test(value) - ? /**/''//*//**_UNUSED/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ + ? /**_UNUSED/''//*//**/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ : value; } function _VirtualDom_noJavaScriptOrHtmlUri(value) { return _VirtualDom_RE_js_html.test(value) - ? /**/''//*//**_UNUSED/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ + ? /**_UNUSED/''//*//**/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ : value; } @@ -2670,7 +2670,7 @@ function _VirtualDom_noJavaScriptOrHtmlJson(value) { return (typeof _Json_unwrap(value) === 'string' && _VirtualDom_RE_js_html.test(_Json_unwrap(value))) ? _Json_wrap( - /**/''//*//**_UNUSED/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ + /**_UNUSED/''//*//**/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ ) : value; } @@ -2719,9 +2719,9 @@ var _VirtualDom_mapEventTuple = F2(function(func, tuple) var _VirtualDom_mapEventRecord = F2(function(func, record) { return { - ai: func(record.ai), - bm: record.bm, - bh: record.bh + message: func(record.message), + stopPropagation: record.stopPropagation, + preventDefault: record.preventDefault } }); @@ -2989,11 +2989,11 @@ function _VirtualDom_makeCallback(eventNode, initialHandler) // 3 = Custom var value = result.a; - var message = !tag ? value : tag < 3 ? value.a : value.ai; - var stopPropagation = tag == 1 ? value.b : tag == 3 && value.bm; + var message = !tag ? value : tag < 3 ? value.a : value.message; + var stopPropagation = tag == 1 ? value.b : tag == 3 && value.stopPropagation; var currentEventNode = ( stopPropagation && event.stopPropagation(), - (tag == 2 ? value.b : tag == 3 && value.bh) && event.preventDefault(), + (tag == 2 ? value.b : tag == 3 && value.preventDefault) && event.preventDefault(), eventNode ); var tagger; @@ -3943,15 +3943,15 @@ var _Browser_element = _Debugger_element || F4(function(impl, flagDecoder, debug return _Platform_initialize( flagDecoder, args, - impl.ds, - impl.dV, - impl.dS, + impl.init, + impl.update, + impl.subscriptions, function(sendToApp, initialModel) { - var view = impl.dW; - /**/ + var view = impl.view; + /**_UNUSED/ var domNode = args['node']; //*/ - /**_UNUSED/ + /**/ var domNode = args && args['node'] ? args['node'] : _Debug_crash(0); //*/ var currNode = _VirtualDom_virtualize(domNode); @@ -3979,12 +3979,12 @@ var _Browser_document = _Debugger_document || F4(function(impl, flagDecoder, deb return _Platform_initialize( flagDecoder, args, - impl.ds, - impl.dV, - impl.dS, + impl.init, + impl.update, + impl.subscriptions, function(sendToApp, initialModel) { - var divertHrefToApp = impl.bj && impl.bj(sendToApp) - var view = impl.dW; + var divertHrefToApp = impl.setup && impl.setup(sendToApp) + var view = impl.view; var title = _VirtualDom_doc.title; var bodyNode = _VirtualDom_doc.body; var currNode = _VirtualDom_virtualize(bodyNode); @@ -3992,12 +3992,12 @@ var _Browser_document = _Debugger_document || F4(function(impl, flagDecoder, deb { _VirtualDom_divertHrefToApp = divertHrefToApp; var doc = view(model); - var nextNode = _VirtualDom_node('body')(_List_Nil)(doc.c7); + var nextNode = _VirtualDom_node('body')(_List_Nil)(doc.body); var patches = _VirtualDom_diff(currNode, nextNode); bodyNode = _VirtualDom_applyPatches(bodyNode, currNode, patches, sendToApp); currNode = nextNode; _VirtualDom_divertHrefToApp = 0; - (title !== doc.cV) && (_VirtualDom_doc.title = title = doc.cV); + (title !== doc.title) && (_VirtualDom_doc.title = title = doc.title); }); } ); @@ -4053,12 +4053,12 @@ function _Browser_makeAnimator(model, draw) function _Browser_application(impl) { - var onUrlChange = impl.dJ; - var onUrlRequest = impl.dK; + var onUrlChange = impl.onUrlChange; + var onUrlRequest = impl.onUrlRequest; var key = function() { key.a(onUrlChange(_Browser_getUrl())); }; return _Browser_document({ - bj: function(sendToApp) + setup: function(sendToApp) { key.a = sendToApp; _Browser_window.addEventListener('popstate', key); @@ -4074,9 +4074,9 @@ function _Browser_application(impl) var next = $elm$url$Url$fromString(href).a; sendToApp(onUrlRequest( (next - && curr.cC === next.cC - && curr.b1 === next.b1 - && curr.cw.a === next.cw.a + && curr.protocol === next.protocol + && curr.host === next.host + && curr.port_.a === next.port_.a ) ? $elm$browser$Browser$Internal(next) : $elm$browser$Browser$External(href) @@ -4084,13 +4084,13 @@ function _Browser_application(impl) } }); }, - ds: function(flags) + init: function(flags) { - return A3(impl.ds, flags, _Browser_getUrl(), key); + return A3(impl.init, flags, _Browser_getUrl(), key); }, - dW: impl.dW, - dV: impl.dV, - dS: impl.dS + view: impl.view, + update: impl.update, + subscriptions: impl.subscriptions }); } @@ -4156,17 +4156,17 @@ var _Browser_decodeEvent = F2(function(decoder, event) function _Browser_visibilityInfo() { return (typeof _VirtualDom_doc.hidden !== 'undefined') - ? { dp: 'hidden', db: 'visibilitychange' } + ? { hidden: 'hidden', change: 'visibilitychange' } : (typeof _VirtualDom_doc.mozHidden !== 'undefined') - ? { dp: 'mozHidden', db: 'mozvisibilitychange' } + ? { hidden: 'mozHidden', change: 'mozvisibilitychange' } : (typeof _VirtualDom_doc.msHidden !== 'undefined') - ? { dp: 'msHidden', db: 'msvisibilitychange' } + ? { hidden: 'msHidden', change: 'msvisibilitychange' } : (typeof _VirtualDom_doc.webkitHidden !== 'undefined') - ? { dp: 'webkitHidden', db: 'webkitvisibilitychange' } - : { dp: 'hidden', db: 'visibilitychange' }; + ? { hidden: 'webkitHidden', change: 'webkitvisibilitychange' } + : { hidden: 'hidden', change: 'visibilitychange' }; } @@ -4247,12 +4247,12 @@ var _Browser_call = F2(function(functionName, id) function _Browser_getViewport() { return { - cL: _Browser_getScene(), - cZ: { - c0: _Browser_window.pageXOffset, - c1: _Browser_window.pageYOffset, - c$: _Browser_doc.documentElement.clientWidth, - b$: _Browser_doc.documentElement.clientHeight + scene: _Browser_getScene(), + viewport: { + x: _Browser_window.pageXOffset, + y: _Browser_window.pageYOffset, + width: _Browser_doc.documentElement.clientWidth, + height: _Browser_doc.documentElement.clientHeight } }; } @@ -4262,8 +4262,8 @@ function _Browser_getScene() var body = _Browser_doc.body; var elem = _Browser_doc.documentElement; return { - c$: Math.max(body.scrollWidth, body.offsetWidth, elem.scrollWidth, elem.offsetWidth, elem.clientWidth), - b$: Math.max(body.scrollHeight, body.offsetHeight, elem.scrollHeight, elem.offsetHeight, elem.clientHeight) + width: Math.max(body.scrollWidth, body.offsetWidth, elem.scrollWidth, elem.offsetWidth, elem.clientWidth), + height: Math.max(body.scrollHeight, body.offsetHeight, elem.scrollHeight, elem.offsetHeight, elem.clientHeight) }; } @@ -4286,15 +4286,15 @@ function _Browser_getViewportOf(id) return _Browser_withNode(id, function(node) { return { - cL: { - c$: node.scrollWidth, - b$: node.scrollHeight + scene: { + width: node.scrollWidth, + height: node.scrollHeight }, - cZ: { - c0: node.scrollLeft, - c1: node.scrollTop, - c$: node.clientWidth, - b$: node.clientHeight + viewport: { + x: node.scrollLeft, + y: node.scrollTop, + width: node.clientWidth, + height: node.clientHeight } }; }); @@ -4324,18 +4324,18 @@ function _Browser_getElement(id) var x = _Browser_window.pageXOffset; var y = _Browser_window.pageYOffset; return { - cL: _Browser_getScene(), - cZ: { - c0: x, - c1: y, - c$: _Browser_doc.documentElement.clientWidth, - b$: _Browser_doc.documentElement.clientHeight + scene: _Browser_getScene(), + viewport: { + x: x, + y: y, + width: _Browser_doc.documentElement.clientWidth, + height: _Browser_doc.documentElement.clientHeight }, - di: { - c0: x + rect.left, - c1: y + rect.top, - c$: rect.width, - b$: rect.height + element: { + x: x + rect.left, + y: y + rect.top, + width: rect.width, + height: rect.height } }; }); @@ -4407,15 +4407,15 @@ var _Bitwise_shiftRightZfBy = F2(function(offset, a) { return a >>> offset; }); -var $elm$core$Basics$EQ = 1; -var $elm$core$Basics$GT = 2; -var $elm$core$Basics$LT = 0; +var $elm$core$Basics$EQ = {$: 'EQ'}; +var $elm$core$Basics$GT = {$: 'GT'}; +var $elm$core$Basics$LT = {$: 'LT'}; var $elm$core$List$cons = _List_cons; var $elm$core$Dict$foldr = F3( function (func, acc, t) { foldr: while (true) { - if (t.$ === -2) { + if (t.$ === 'RBEmpty_elm_builtin') { return acc; } else { var key = t.b; @@ -4460,7 +4460,7 @@ var $elm$core$Dict$keys = function (dict) { dict); }; var $elm$core$Set$toList = function (_v0) { - var dict = _v0; + var dict = _v0.a; return $elm$core$Dict$keys(dict); }; var $elm$core$Elm$JsArray$foldr = _JsArray_foldr; @@ -4470,7 +4470,7 @@ var $elm$core$Array$foldr = F3( var tail = _v0.d; var helper = F2( function (node, acc) { - if (!node.$) { + if (node.$ === 'SubTree') { var subTree = node.a; return A3($elm$core$Elm$JsArray$foldr, helper, acc, subTree); } else { @@ -4488,32 +4488,32 @@ var $elm$core$Array$toList = function (array) { return A3($elm$core$Array$foldr, $elm$core$List$cons, _List_Nil, array); }; var $elm$core$Result$Err = function (a) { - return {$: 1, a: a}; + return {$: 'Err', a: a}; }; var $elm$json$Json$Decode$Failure = F2( function (a, b) { - return {$: 3, a: a, b: b}; + return {$: 'Failure', a: a, b: b}; }); var $elm$json$Json$Decode$Field = F2( function (a, b) { - return {$: 0, a: a, b: b}; + return {$: 'Field', a: a, b: b}; }); var $elm$json$Json$Decode$Index = F2( function (a, b) { - return {$: 1, a: a, b: b}; + return {$: 'Index', a: a, b: b}; }); var $elm$core$Result$Ok = function (a) { - return {$: 0, a: a}; + return {$: 'Ok', a: a}; }; var $elm$json$Json$Decode$OneOf = function (a) { - return {$: 2, a: a}; + return {$: 'OneOf', a: a}; }; -var $elm$core$Basics$False = 1; +var $elm$core$Basics$False = {$: 'False'}; var $elm$core$Basics$add = _Basics_add; var $elm$core$Maybe$Just = function (a) { - return {$: 0, a: a}; + return {$: 'Just', a: a}; }; -var $elm$core$Maybe$Nothing = {$: 1}; +var $elm$core$Maybe$Nothing = {$: 'Nothing'}; var $elm$core$String$all = _String_all; var $elm$core$Basics$and = _Basics_and; var $elm$core$Basics$append = _Utils_append; @@ -4638,12 +4638,12 @@ var $elm$json$Json$Decode$errorToStringHelp = F2( errorToStringHelp: while (true) { switch (error.$) { - case 0: + case 'Field': var f = error.a; var err = error.b; var isSimple = function () { var _v1 = $elm$core$String$uncons(f); - if (_v1.$ === 1) { + if (_v1.$ === 'Nothing') { return false; } else { var _v2 = _v1.a; @@ -4658,7 +4658,7 @@ var $elm$json$Json$Decode$errorToStringHelp = F2( error = $temp$error; context = $temp$context; continue errorToStringHelp; - case 1: + case 'Index': var i = error.a; var err = error.b; var indexName = '[' + ($elm$core$String$fromInt(i) + ']'); @@ -4667,7 +4667,7 @@ var $elm$json$Json$Decode$errorToStringHelp = F2( error = $temp$error; context = $temp$context; continue errorToStringHelp; - case 2: + case 'OneOf': var errors = error.a; if (!errors.b) { return 'Ran into a Json.Decode.oneOf with no possibilities' + function () { @@ -4731,7 +4731,7 @@ var $elm$json$Json$Decode$errorToStringHelp = F2( var $elm$core$Array$branchFactor = 32; var $elm$core$Array$Array_elm_builtin = F4( function (a, b, c, d) { - return {$: 0, a: a, b: b, c: c, d: d}; + return {$: 'Array_elm_builtin', a: a, b: b, c: c, d: d}; }); var $elm$core$Elm$JsArray$empty = _JsArray_empty; var $elm$core$Basics$ceiling = _Basics_ceiling; @@ -4746,7 +4746,7 @@ var $elm$core$Array$shiftStep = $elm$core$Basics$ceiling( var $elm$core$Array$empty = A4($elm$core$Array$Array_elm_builtin, 0, $elm$core$Array$shiftStep, $elm$core$Elm$JsArray$empty, $elm$core$Elm$JsArray$empty); var $elm$core$Elm$JsArray$initialize = _JsArray_initialize; var $elm$core$Array$Leaf = function (a) { - return {$: 1, a: a}; + return {$: 'Leaf', a: a}; }; var $elm$core$Basics$apL = F2( function (f, x) { @@ -4766,7 +4766,7 @@ var $elm$core$Basics$max = F2( }); var $elm$core$Basics$mul = _Basics_mul; var $elm$core$Array$SubTree = function (a) { - return {$: 0, a: a}; + return {$: 'SubTree', a: a}; }; var $elm$core$Elm$JsArray$initializeFromList = _JsArray_initializeFromList; var $elm$core$Array$compressNodes = F2( @@ -4813,25 +4813,25 @@ var $elm$core$Array$treeFromBuilder = F2( }); var $elm$core$Array$builderToArray = F2( function (reverseNodeList, builder) { - if (!builder.t) { + if (!builder.nodeListSize) { return A4( $elm$core$Array$Array_elm_builtin, - $elm$core$Elm$JsArray$length(builder.x), + $elm$core$Elm$JsArray$length(builder.tail), $elm$core$Array$shiftStep, $elm$core$Elm$JsArray$empty, - builder.x); + builder.tail); } else { - var treeLen = builder.t * $elm$core$Array$branchFactor; + var treeLen = builder.nodeListSize * $elm$core$Array$branchFactor; var depth = $elm$core$Basics$floor( A2($elm$core$Basics$logBase, $elm$core$Array$branchFactor, treeLen - 1)); - var correctNodeList = reverseNodeList ? $elm$core$List$reverse(builder.y) : builder.y; - var tree = A2($elm$core$Array$treeFromBuilder, correctNodeList, builder.t); + var correctNodeList = reverseNodeList ? $elm$core$List$reverse(builder.nodeList) : builder.nodeList; + var tree = A2($elm$core$Array$treeFromBuilder, correctNodeList, builder.nodeListSize); return A4( $elm$core$Array$Array_elm_builtin, - $elm$core$Elm$JsArray$length(builder.x) + treeLen, + $elm$core$Elm$JsArray$length(builder.tail) + treeLen, A2($elm$core$Basics$max, 5, depth * $elm$core$Array$shiftStep), tree, - builder.x); + builder.tail); } }); var $elm$core$Basics$idiv = _Basics_idiv; @@ -4844,7 +4844,7 @@ var $elm$core$Array$initializeHelp = F5( return A2( $elm$core$Array$builderToArray, false, - {y: nodeList, t: (len / $elm$core$Array$branchFactor) | 0, x: tail}); + {nodeList: nodeList, nodeListSize: (len / $elm$core$Array$branchFactor) | 0, tail: tail}); } else { var leaf = $elm$core$Array$Leaf( A3($elm$core$Elm$JsArray$initialize, $elm$core$Array$branchFactor, fromIndex, fn)); @@ -4874,9 +4874,9 @@ var $elm$core$Array$initialize = F2( return A5($elm$core$Array$initializeHelp, fn, initialFromIndex, len, _List_Nil, tail); } }); -var $elm$core$Basics$True = 0; +var $elm$core$Basics$True = {$: 'True'}; var $elm$core$Result$isOk = function (result) { - if (!result.$) { + if (result.$ === 'Ok') { return true; } else { return false; @@ -4887,31 +4887,33 @@ var $elm$json$Json$Decode$map2 = _Json_map2; var $elm$json$Json$Decode$succeed = _Json_succeed; var $elm$virtual_dom$VirtualDom$toHandlerInt = function (handler) { switch (handler.$) { - case 0: + case 'Normal': return 0; - case 1: + case 'MayStopPropagation': return 1; - case 2: + case 'MayPreventDefault': return 2; default: return 3; } }; var $elm$browser$Browser$External = function (a) { - return {$: 1, a: a}; + return {$: 'External', a: a}; }; var $elm$browser$Browser$Internal = function (a) { - return {$: 0, a: a}; + return {$: 'Internal', a: a}; }; var $elm$core$Basics$identity = function (x) { return x; }; -var $elm$browser$Browser$Dom$NotFound = $elm$core$Basics$identity; -var $elm$url$Url$Http = 0; -var $elm$url$Url$Https = 1; +var $elm$browser$Browser$Dom$NotFound = function (a) { + return {$: 'NotFound', a: a}; +}; +var $elm$url$Url$Http = {$: 'Http'}; +var $elm$url$Url$Https = {$: 'Https'}; var $elm$url$Url$Url = F6( function (protocol, host, port_, path, query, fragment) { - return {bX: fragment, b1: host, z: path, cw: port_, cC: protocol, cD: query}; + return {fragment: fragment, host: host, path: path, port_: port_, protocol: protocol, query: query}; }); var $elm$core$String$contains = _String_contains; var $elm$core$String$length = _String_length; @@ -4947,7 +4949,7 @@ var $elm$url$Url$chompBeforePath = F5( var i = _v0.a; var _v1 = $elm$core$String$toInt( A2($elm$core$String$dropLeft, i + 1, str)); - if (_v1.$ === 1) { + if (_v1.$ === 'Nothing') { return $elm$core$Maybe$Nothing; } else { var port_ = _v1; @@ -5030,24 +5032,26 @@ var $elm$core$String$startsWith = _String_startsWith; var $elm$url$Url$fromString = function (str) { return A2($elm$core$String$startsWith, 'http://', str) ? A2( $elm$url$Url$chompAfterProtocol, - 0, + $elm$url$Url$Http, A2($elm$core$String$dropLeft, 7, str)) : (A2($elm$core$String$startsWith, 'https://', str) ? A2( $elm$url$Url$chompAfterProtocol, - 1, + $elm$url$Url$Https, A2($elm$core$String$dropLeft, 8, str)) : $elm$core$Maybe$Nothing); }; var $elm$core$Basics$never = function (_v0) { never: while (true) { - var nvr = _v0; + var nvr = _v0.a; var $temp$_v0 = nvr; _v0 = $temp$_v0; continue never; } }; -var $elm$core$Task$Perform = $elm$core$Basics$identity; +var $elm$core$Task$Perform = function (a) { + return {$: 'Perform', a: a}; +}; var $elm$core$Task$succeed = _Scheduler_succeed; -var $elm$core$Task$init = $elm$core$Task$succeed(0); +var $elm$core$Task$init = $elm$core$Task$succeed(_Utils_Tuple0); var $elm$core$List$foldrHelper = F4( function (fn, acc, ctr, ls) { if (!ls.b) { @@ -5153,7 +5157,7 @@ var $elm$core$Task$sequence = function (tasks) { var $elm$core$Platform$sendToApp = _Platform_sendToApp; var $elm$core$Task$spawnCmd = F2( function (router, _v0) { - var task = _v0; + var task = _v0.a; return _Scheduler_spawn( A2( $elm$core$Task$andThen, @@ -5165,7 +5169,7 @@ var $elm$core$Task$onEffects = F3( return A2( $elm$core$Task$map, function (_v0) { - return 0; + return _Utils_Tuple0; }, $elm$core$Task$sequence( A2( @@ -5175,122 +5179,105 @@ var $elm$core$Task$onEffects = F3( }); var $elm$core$Task$onSelfMsg = F3( function (_v0, _v1, _v2) { - return $elm$core$Task$succeed(0); + return $elm$core$Task$succeed(_Utils_Tuple0); }); var $elm$core$Task$cmdMap = F2( function (tagger, _v0) { - var task = _v0; - return A2($elm$core$Task$map, tagger, task); + var task = _v0.a; + return $elm$core$Task$Perform( + A2($elm$core$Task$map, tagger, task)); }); _Platform_effectManagers['Task'] = _Platform_createManager($elm$core$Task$init, $elm$core$Task$onEffects, $elm$core$Task$onSelfMsg, $elm$core$Task$cmdMap); var $elm$core$Task$command = _Platform_leaf('Task'); var $elm$core$Task$perform = F2( function (toMessage, task) { return $elm$core$Task$command( - A2($elm$core$Task$map, toMessage, task)); + $elm$core$Task$Perform( + A2($elm$core$Task$map, toMessage, task))); }); var $elm$browser$Browser$element = _Browser_element; var $author$project$Main$Editor = function (a) { - return {$: 0, a: a}; + return {$: 'Editor', a: a}; }; var $author$project$Main$PortOutgoingFormFields = function (a) { - return {$: 0, a: a}; + return {$: 'PortOutgoingFormFields', a: a}; +}; +var $elm$core$List$append = F2( + function (xs, ys) { + if (!ys.b) { + return xs; + } else { + return A3($elm$core$List$foldr, $elm$core$List$cons, ys, xs); + } + }); +var $elm$core$List$concat = function (lists) { + return A3($elm$core$List$foldr, $elm$core$List$append, _List_Nil, lists); +}; +var $elm$core$List$concatMap = F2( + function (f, list) { + return $elm$core$List$concat( + A2($elm$core$List$map, f, list)); + }); +var $elm$core$List$maybeCons = F3( + function (f, mx, xs) { + var _v0 = f(mx); + if (_v0.$ === 'Just') { + var x = _v0.a; + return A2($elm$core$List$cons, x, xs); + } else { + return xs; + } + }); +var $elm$core$List$filterMap = F2( + function (f, xs) { + return A3( + $elm$core$List$foldr, + $elm$core$List$maybeCons(f), + _List_Nil, + xs); + }); +var $author$project$Main$allCustomElementsFromGroups = function (groups) { + return A2( + $elm$core$List$filterMap, + function (inputField) { + if (inputField.$ === 'ShortText') { + var customElement = inputField.a; + return $elm$core$Maybe$Just(customElement); + } else { + return $elm$core$Maybe$Nothing; + } + }, + A2( + $elm$core$List$concatMap, + function ($) { + return $.fields; + }, + groups)); }; var $elm$core$Platform$Cmd$batch = _Platform_batch; var $author$project$Main$Config = F4( - function (viewMode, formFields, formValues, shortTextTypeList) { - return {g: formFields, a7: formValues, al: shortTextTypeList, ac: viewMode}; + function (viewMode, formFields, formValues, inputFieldGroups) { + return {formFields: formFields, formValues: formValues, inputFieldGroups: inputFieldGroups, viewMode: viewMode}; }); var $elm_community$json_extra$Json$Decode$Extra$andMap = $elm$json$Json$Decode$map2($elm$core$Basics$apR); -var $author$project$Main$FormField = F6( - function (label, name, presence, description, type_, visibilityRule) { - return {S: description, d: label, Q: name, q: presence, a: type_, m: visibilityRule}; - }); -var $author$project$Main$AttributeNotNeeded = function (a) { - return {$: 0, a: a}; +var $author$project$Main$ShortText = function (a) { + return {$: 'ShortText', a: a}; }; -var $elm$json$Json$Decode$field = _Json_decodeField; -var $elm$json$Json$Decode$at = F2( - function (fields, decoder) { - return A3($elm$core$List$foldr, $elm$json$Json$Decode$field, decoder, fields); - }); var $author$project$Main$AttributeGiven = function (a) { - return {$: 2, a: a}; + return {$: 'AttributeGiven', a: a}; }; -var $elm$json$Json$Decode$null = _Json_decodeNull; -var $elm$json$Json$Decode$oneOf = _Json_oneOf; -var $author$project$Main$decodeAttributeOptional = F2( - function (maybeNotNeeded, decodeValue) { - return $elm$json$Json$Decode$oneOf( - _List_fromArray( - [ - $elm$json$Json$Decode$null( - $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing)), - A2( - $elm$json$Json$Decode$map, - function (a) { - return _Utils_eq( - $elm$core$Maybe$Just(a), - maybeNotNeeded) ? $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing) : $author$project$Main$AttributeGiven(a); - }, - decodeValue) - ])); - }); -var $elm$json$Json$Decode$string = _Json_decodeString; -var $author$project$Main$decodeFormFieldDescription = $elm$json$Json$Decode$oneOf( - _List_fromArray( - [ - A2( - $elm$json$Json$Decode$at, - _List_fromArray( - ['presence', 'description']), - A2( - $author$project$Main$decodeAttributeOptional, - $elm$core$Maybe$Just(''), - $elm$json$Json$Decode$string)), - A2( - $elm$json$Json$Decode$field, - 'description', - A2( - $author$project$Main$decodeAttributeOptional, - $elm$core$Maybe$Just(''), - $elm$json$Json$Decode$string)), - $elm$json$Json$Decode$succeed( - $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing)) - ])); -var $author$project$Main$decodeFormFieldMaybeName = $elm$json$Json$Decode$oneOf( - _List_fromArray( - [ - A2( - $elm$json$Json$Decode$map, - $elm$core$Maybe$Just, - A2( - $elm$json$Json$Decode$at, - _List_fromArray( - ['presence', 'name']), - $elm$json$Json$Decode$string)), - A2( - $elm$json$Json$Decode$map, - $elm$core$Maybe$Just, - A2($elm$json$Json$Decode$field, 'name', $elm$json$Json$Decode$string)), - $elm$json$Json$Decode$succeed($elm$core$Maybe$Nothing) - ])); var $author$project$Main$ChooseMultiple = function (a) { - return {$: 4, a: a}; + return {$: 'ChooseMultiple', a: a}; }; var $author$project$Main$ChooseOne = function (a) { - return {$: 3, a: a}; + return {$: 'ChooseOne', a: a}; }; var $author$project$Main$Dropdown = function (a) { - return {$: 2, a: a}; + return {$: 'Dropdown', a: a}; }; var $author$project$Main$LongText = function (a) { - return {$: 1, a: a}; -}; -var $author$project$Main$ShortText = function (a) { - return {$: 0, a: a}; + return {$: 'LongText', a: a}; }; -var $elm$json$Json$Decode$andThen = _Json_andThen; var $author$project$Main$choiceDelimiter = ' | '; var $elm$core$String$trim = _String_trim; var $author$project$Main$choiceFromString = function (s) { @@ -5299,8 +5286,8 @@ var $author$project$Main$choiceFromString = function (s) { if (!_v0.b.b) { var value = _v0.a; return { - d: value, - j: $elm$core$String$trim(value) + label: value, + value: $elm$core$String$trim(value) }; } else { if (!_v0.b.b.b) { @@ -5308,33 +5295,96 @@ var $author$project$Main$choiceFromString = function (s) { var _v1 = _v0.b; var label = _v1.a; return { - d: label, - j: $elm$core$String$trim(value) + label: label, + value: $elm$core$String$trim(value) }; } else { var value = _v0.a; var labels = _v0.b; return { - d: A2($elm$core$String$join, $author$project$Main$choiceDelimiter, labels), - j: $elm$core$String$trim(value) + label: A2($elm$core$String$join, $author$project$Main$choiceDelimiter, labels), + value: $elm$core$String$trim(value) }; } } } else { return { - d: s, - j: $elm$core$String$trim(s) + label: s, + value: $elm$core$String$trim(s) }; } }; +var $author$project$Main$allInputField = _List_fromArray( + [ + $author$project$Main$Dropdown( + { + choices: A2( + $elm$core$List$map, + $author$project$Main$choiceFromString, + _List_fromArray( + ['Red', 'Orange', 'Yellow', 'Green', 'Blue', 'Indigo', 'Violet'])), + filter: $elm$core$Maybe$Nothing + }), + $author$project$Main$ChooseOne( + { + choices: A2( + $elm$core$List$map, + $author$project$Main$choiceFromString, + _List_fromArray( + ['Yes', 'No'])), + filter: $elm$core$Maybe$Nothing + }), + $author$project$Main$ChooseMultiple( + { + choices: A2( + $elm$core$List$map, + $author$project$Main$choiceFromString, + _List_fromArray( + ['Apple', 'Banana', 'Cantaloupe', 'Durian'])), + filter: $elm$core$Maybe$Nothing, + maxAllowed: $elm$core$Maybe$Nothing, + minRequired: $elm$core$Maybe$Nothing + }), + $author$project$Main$LongText( + $author$project$Main$AttributeGiven(160)) + ]); +var $author$project$Main$InputFieldGroup = F2( + function (heading, fields) { + return {fields: fields, heading: heading}; + }); +var $elm$json$Json$Decode$andThen = _Json_andThen; +var $author$project$Main$AttributeNotNeeded = function (a) { + return {$: 'AttributeNotNeeded', a: a}; +}; +var $elm$json$Json$Decode$null = _Json_decodeNull; +var $elm$json$Json$Decode$oneOf = _Json_oneOf; +var $author$project$Main$decodeAttributeOptional = F2( + function (maybeNotNeeded, decodeValue) { + return $elm$json$Json$Decode$oneOf( + _List_fromArray( + [ + $elm$json$Json$Decode$null( + $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing)), + A2( + $elm$json$Json$Decode$map, + function (a) { + return _Utils_eq( + $elm$core$Maybe$Just(a), + maybeNotNeeded) ? $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing) : $author$project$Main$AttributeGiven(a); + }, + decodeValue) + ])); + }); +var $elm$json$Json$Decode$string = _Json_decodeString; var $author$project$Main$decodeChoice = A2($elm$json$Json$Decode$map, $author$project$Main$choiceFromString, $elm$json$Json$Decode$string); var $author$project$Main$FilterContainsFieldValueOf = function (a) { - return {$: 1, a: a}; + return {$: 'FilterContainsFieldValueOf', a: a}; }; var $author$project$Main$FilterStartsWithFieldValueOf = function (a) { - return {$: 0, a: a}; + return {$: 'FilterStartsWithFieldValueOf', a: a}; }; var $elm$json$Json$Decode$fail = _Json_fail; +var $elm$json$Json$Decode$field = _Json_decodeField; var $author$project$Main$decodeChoiceFilter = A2( $elm$json$Json$Decode$andThen, function (type_) { @@ -5356,26 +5406,26 @@ var $author$project$Main$decodeChoiceFilter = A2( A2($elm$json$Json$Decode$field, 'type', $elm$json$Json$Decode$string)); var $author$project$Main$RawCustomElement = F3( function (inputType, inputTag, attributes) { - return {p: attributes, N: inputTag, B: inputType}; + return {attributes: attributes, inputTag: inputTag, inputType: inputType}; }); var $author$project$Main$defaultInputTag = 'input'; -var $elm$core$Dict$RBEmpty_elm_builtin = {$: -2}; +var $elm$core$Dict$RBEmpty_elm_builtin = {$: 'RBEmpty_elm_builtin'}; var $elm$core$Dict$empty = $elm$core$Dict$RBEmpty_elm_builtin; -var $elm$core$Dict$Black = 1; +var $elm$core$Dict$Black = {$: 'Black'}; var $elm$core$Dict$RBNode_elm_builtin = F5( function (a, b, c, d, e) { - return {$: -1, a: a, b: b, c: c, d: d, e: e}; + return {$: 'RBNode_elm_builtin', a: a, b: b, c: c, d: d, e: e}; }); -var $elm$core$Dict$Red = 0; +var $elm$core$Dict$Red = {$: 'Red'}; var $elm$core$Dict$balance = F5( function (color, key, value, left, right) { - if ((right.$ === -1) && (!right.a)) { + if ((right.$ === 'RBNode_elm_builtin') && (right.a.$ === 'Red')) { var _v1 = right.a; var rK = right.b; var rV = right.c; var rLeft = right.d; var rRight = right.e; - if ((left.$ === -1) && (!left.a)) { + if ((left.$ === 'RBNode_elm_builtin') && (left.a.$ === 'Red')) { var _v3 = left.a; var lK = left.b; var lV = left.c; @@ -5383,22 +5433,22 @@ var $elm$core$Dict$balance = F5( var lRight = left.e; return A5( $elm$core$Dict$RBNode_elm_builtin, - 0, + $elm$core$Dict$Red, key, value, - A5($elm$core$Dict$RBNode_elm_builtin, 1, lK, lV, lLeft, lRight), - A5($elm$core$Dict$RBNode_elm_builtin, 1, rK, rV, rLeft, rRight)); + A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Black, lK, lV, lLeft, lRight), + A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Black, rK, rV, rLeft, rRight)); } else { return A5( $elm$core$Dict$RBNode_elm_builtin, color, rK, rV, - A5($elm$core$Dict$RBNode_elm_builtin, 0, key, value, left, rLeft), + A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Red, key, value, left, rLeft), rRight); } } else { - if ((((left.$ === -1) && (!left.a)) && (left.d.$ === -1)) && (!left.d.a)) { + if ((((left.$ === 'RBNode_elm_builtin') && (left.a.$ === 'Red')) && (left.d.$ === 'RBNode_elm_builtin')) && (left.d.a.$ === 'Red')) { var _v5 = left.a; var lK = left.b; var lV = left.c; @@ -5411,11 +5461,11 @@ var $elm$core$Dict$balance = F5( var lRight = left.e; return A5( $elm$core$Dict$RBNode_elm_builtin, - 0, + $elm$core$Dict$Red, lK, lV, - A5($elm$core$Dict$RBNode_elm_builtin, 1, llK, llV, llLeft, llRight), - A5($elm$core$Dict$RBNode_elm_builtin, 1, key, value, lRight, right)); + A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Black, llK, llV, llLeft, llRight), + A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Black, key, value, lRight, right)); } else { return A5($elm$core$Dict$RBNode_elm_builtin, color, key, value, left, right); } @@ -5424,8 +5474,8 @@ var $elm$core$Dict$balance = F5( var $elm$core$Basics$compare = _Utils_compare; var $elm$core$Dict$insertHelp = F3( function (key, value, dict) { - if (dict.$ === -2) { - return A5($elm$core$Dict$RBNode_elm_builtin, 0, key, value, $elm$core$Dict$RBEmpty_elm_builtin, $elm$core$Dict$RBEmpty_elm_builtin); + if (dict.$ === 'RBEmpty_elm_builtin') { + return A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Red, key, value, $elm$core$Dict$RBEmpty_elm_builtin, $elm$core$Dict$RBEmpty_elm_builtin); } else { var nColor = dict.a; var nKey = dict.b; @@ -5433,8 +5483,8 @@ var $elm$core$Dict$insertHelp = F3( var nLeft = dict.d; var nRight = dict.e; var _v1 = A2($elm$core$Basics$compare, key, nKey); - switch (_v1) { - case 0: + switch (_v1.$) { + case 'LT': return A5( $elm$core$Dict$balance, nColor, @@ -5442,7 +5492,7 @@ var $elm$core$Dict$insertHelp = F3( nValue, A3($elm$core$Dict$insertHelp, key, value, nLeft), nRight); - case 1: + case 'EQ': return A5($elm$core$Dict$RBNode_elm_builtin, nColor, nKey, value, nLeft, nRight); default: return A5( @@ -5458,13 +5508,13 @@ var $elm$core$Dict$insertHelp = F3( var $elm$core$Dict$insert = F3( function (key, value, dict) { var _v0 = A3($elm$core$Dict$insertHelp, key, value, dict); - if ((_v0.$ === -1) && (!_v0.a)) { + if ((_v0.$ === 'RBNode_elm_builtin') && (_v0.a.$ === 'Red')) { var _v1 = _v0.a; var k = _v0.b; var v = _v0.c; var l = _v0.d; var r = _v0.e; - return A5($elm$core$Dict$RBNode_elm_builtin, 1, k, v, l, r); + return A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Black, k, v, l, r); } else { var x = _v0; return x; @@ -5483,13 +5533,13 @@ var $elm$core$Dict$fromList = function (assocs) { assocs); }; var $author$project$Main$AttributeInvalid = function (a) { - return {$: 1, a: a}; + return {$: 'AttributeInvalid', a: a}; }; var $elm$core$Dict$foldl = F3( function (func, acc, dict) { foldl: while (true) { - if (dict.$ === -2) { + if (dict.$ === 'RBEmpty_elm_builtin') { return acc; } else { var key = dict.b; @@ -5525,7 +5575,7 @@ var $elm$core$Dict$get = F2( function (targetKey, dict) { get: while (true) { - if (dict.$ === -2) { + if (dict.$ === 'RBEmpty_elm_builtin') { return $elm$core$Maybe$Nothing; } else { var key = dict.b; @@ -5533,14 +5583,14 @@ var $elm$core$Dict$get = F2( var left = dict.d; var right = dict.e; var _v1 = A2($elm$core$Basics$compare, targetKey, key); - switch (_v1) { - case 0: + switch (_v1.$) { + case 'LT': var $temp$targetKey = targetKey, $temp$dict = left; targetKey = $temp$targetKey; dict = $temp$dict; continue get; - case 1: + case 'EQ': return $elm$core$Maybe$Just(value); default: var $temp$targetKey = targetKey, @@ -5555,16 +5605,16 @@ var $elm$core$Dict$get = F2( var $elm$core$Basics$neq = _Utils_notEqual; var $author$project$Main$fromRawCustomElement = function (ele) { return { - p: A2( + attributes: A2( $elm$core$Dict$filter, F2( function (k, _v0) { return k !== 'list'; }), - ele.p), - ae: function () { - var _v1 = A2($elm$core$Dict$get, 'list', ele.p); - if (!_v1.$) { + ele.attributes), + datalist: function () { + var _v1 = A2($elm$core$Dict$get, 'list', ele.attributes); + if (_v1.$ === 'Just') { var s = _v1.a; var _v2 = A2( $elm$core$String$split, @@ -5581,11 +5631,11 @@ var $author$project$Main$fromRawCustomElement = function (ele) { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } }(), - N: ele.N, - B: ele.B, - aq: function () { - var _v3 = A2($elm$core$Dict$get, 'max', ele.p); - if (!_v3.$) { + inputTag: ele.inputTag, + inputType: ele.inputType, + max: function () { + var _v3 = A2($elm$core$Dict$get, 'max', ele.attributes); + if (_v3.$ === 'Just') { if (_v3.a === '') { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } else { @@ -5596,15 +5646,15 @@ var $author$project$Main$fromRawCustomElement = function (ele) { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } }(), - ah: function () { - var _v4 = A2($elm$core$Dict$get, 'maxlength', ele.p); - if (!_v4.$) { + maxlength: function () { + var _v4 = A2($elm$core$Dict$get, 'maxlength', ele.attributes); + if (_v4.$ === 'Just') { if (_v4.a === '') { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } else { var value = _v4.a; var _v5 = $elm$core$String$toInt(value); - if (!_v5.$) { + if (_v5.$ === 'Just') { var _int = _v5.a; return $author$project$Main$AttributeGiven(_int); } else { @@ -5615,9 +5665,9 @@ var $author$project$Main$fromRawCustomElement = function (ele) { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } }(), - ar: function () { - var _v6 = A2($elm$core$Dict$get, 'min', ele.p); - if (!_v6.$) { + min: function () { + var _v6 = A2($elm$core$Dict$get, 'min', ele.attributes); + if (_v6.$ === 'Just') { if (_v6.a === '') { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } else { @@ -5628,9 +5678,9 @@ var $author$project$Main$fromRawCustomElement = function (ele) { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } }(), - aM: function () { - var _v7 = A2($elm$core$Dict$get, 'multiple', ele.p); - if (!_v7.$) { + multiple: function () { + var _v7 = A2($elm$core$Dict$get, 'multiple', ele.attributes); + if (_v7.$ === 'Just') { switch (_v7.a) { case '': return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); @@ -5658,7 +5708,7 @@ var $elm_community$json_extra$Json$Decode$Extra$optionalField = F2( $elm$json$Json$Decode$decodeValue, A2($elm$json$Json$Decode$field, fieldName, $elm$json$Json$Decode$value), json); - if (!_v0.$) { + if (_v0.$ === 'Ok') { var val = _v0.a; return A2( $elm$json$Json$Decode$map, @@ -5672,7 +5722,7 @@ var $elm_community$json_extra$Json$Decode$Extra$optionalField = F2( }); var $elm$core$Maybe$withDefault = F2( function (_default, maybe) { - if (!maybe.$) { + if (maybe.$ === 'Just') { var value = maybe.a; return value; } else { @@ -5743,7 +5793,7 @@ var $author$project$Main$decodeInputField = A2( F2( function (choices, filter) { return $author$project$Main$Dropdown( - {k: choices, e: filter}); + {choices: choices, filter: filter}); })))); case 'ChooseOne': return A2( @@ -5760,7 +5810,7 @@ var $author$project$Main$decodeInputField = A2( F2( function (choices, filter) { return $author$project$Main$ChooseOne( - {k: choices, e: filter}); + {choices: choices, filter: filter}); })))); case 'ChooseMultiple': return A2( @@ -5785,82 +5835,309 @@ var $author$project$Main$decodeInputField = A2( F4( function (choices, minRequired, maxAllowed, filter) { return $author$project$Main$ChooseMultiple( - {k: choices, e: filter, T: maxAllowed, P: minRequired}); + {choices: choices, filter: filter, maxAllowed: maxAllowed, minRequired: minRequired}); })))))); default: return $elm$json$Json$Decode$fail('Unknown input field type: ' + type_); } }, A2($elm$json$Json$Decode$field, 'type', $elm$json$Json$Decode$string)); -var $author$project$Main$Optional = 1; -var $author$project$Main$System = 2; -var $author$project$Main$Required = 0; -var $author$project$Main$decodePresenceString = A2( - $elm$json$Json$Decode$andThen, - function (str) { - switch (str) { - case 'Required': - return $elm$json$Json$Decode$succeed(0); - case 'Optional': - return $elm$json$Json$Decode$succeed(1); - case 'System': - return $elm$json$Json$Decode$succeed(2); - default: - return $elm$json$Json$Decode$fail('Unknown presence: ' + str); - } - }, - $elm$json$Json$Decode$string); -var $author$project$Main$decodePresence = $elm$json$Json$Decode$oneOf( - _List_fromArray( - [ - $author$project$Main$decodePresenceString, - A2( - $elm$json$Json$Decode$andThen, - function (type_) { - switch (type_) { - case 'System': - return $elm$json$Json$Decode$succeed(2); - case 'SystemRequired': - return $elm$json$Json$Decode$succeed(2); - case 'SystemOptional': - return $elm$json$Json$Decode$succeed(1); - default: - return $elm$json$Json$Decode$fail('Unknown presence type: ' + type_); - } - }, - A2($elm$json$Json$Decode$field, 'type', $elm$json$Json$Decode$string)) - ])); -var $elm$json$Json$Decode$bool = _Json_decodeBool; -var $author$project$Main$decodeRequired = A2( - $elm$json$Json$Decode$map, - function (b) { - return b ? 0 : 1; - }, - A2($elm$json$Json$Decode$field, 'required', $elm$json$Json$Decode$bool)); -var $author$project$Main$HideWhen = function (a) { - return {$: 1, a: a}; -}; -var $author$project$Main$ShowWhen = function (a) { - return {$: 0, a: a}; +var $author$project$Main$decodeInputFieldGroup = A2( + $elm_community$json_extra$Json$Decode$Extra$andMap, + A2( + $elm$json$Json$Decode$field, + 'fields', + $elm$json$Json$Decode$list($author$project$Main$decodeInputField)), + A2( + $elm_community$json_extra$Json$Decode$Extra$andMap, + A2($elm$json$Json$Decode$field, 'heading', $elm$json$Json$Decode$string), + $elm$json$Json$Decode$succeed($author$project$Main$InputFieldGroup))); +var $author$project$Main$decodeInputFieldGroups = $elm$json$Json$Decode$list($author$project$Main$decodeInputFieldGroup); +var $elm$json$Json$Decode$dict = function (decoder) { + return A2( + $elm$json$Json$Decode$map, + $elm$core$Dict$fromList, + $elm$json$Json$Decode$keyValuePairs(decoder)); }; -var $author$project$Main$Field = F2( +var $elm$core$Tuple$pair = F2( function (a, b) { - return {$: 0, a: a, b: b}; + return _Utils_Tuple2(a, b); }); -var $author$project$Main$EndsWith = function (a) { - return {$: 2, a: a}; -}; -var $author$project$Main$Equals = function (a) { - return {$: 0, a: a}; -}; -var $author$project$Main$EqualsField = function (a) { - return {$: 4, a: a}; -}; +var $author$project$Main$decodeShortTextTypeList = function () { + var decodeInputTagAttributes = A2( + $elm_community$json_extra$Json$Decode$Extra$andMap, + A2( + $elm$json$Json$Decode$map, + $elm$core$Dict$fromList, + A2( + $elm$json$Json$Decode$field, + 'attributes', + $elm$json$Json$Decode$keyValuePairs($elm$json$Json$Decode$string))), + A2( + $elm_community$json_extra$Json$Decode$Extra$andMap, + A2( + $elm$json$Json$Decode$map, + $elm$core$Maybe$withDefault($author$project$Main$defaultInputTag), + A2($elm_community$json_extra$Json$Decode$Extra$optionalField, 'inputTag', $elm$json$Json$Decode$string)), + $elm$json$Json$Decode$succeed($elm$core$Tuple$pair))); + var decodeAttributes = A2( + $elm$json$Json$Decode$map, + function (attributes) { + return _Utils_Tuple2($author$project$Main$defaultInputTag, attributes); + }, + $elm$json$Json$Decode$dict($elm$json$Json$Decode$string)); + var customElementsFrom = function (dict) { + return A2( + $elm$core$List$map, + function (_v0) { + var inputType = _v0.a; + var _v1 = _v0.b; + var inputTag = _v1.a; + var attributes = _v1.b; + return $author$project$Main$fromRawCustomElement( + {attributes: attributes, inputTag: inputTag, inputType: inputType}); + }, + $elm$core$Dict$toList(dict)); + }; + return A2( + $elm$json$Json$Decode$map, + $elm$core$List$concatMap(customElementsFrom), + $elm$json$Json$Decode$list( + $elm$json$Json$Decode$dict( + $elm$json$Json$Decode$oneOf( + _List_fromArray( + [decodeInputTagAttributes, decodeAttributes]))))); +}(); +var $elm$core$List$filter = F2( + function (isGood, list) { + return A3( + $elm$core$List$foldr, + F2( + function (x, xs) { + return isGood(x) ? A2($elm$core$List$cons, x, xs) : xs; + }), + _List_Nil, + list); + }); +var $elm$core$List$any = F2( + function (isOkay, list) { + any: + while (true) { + if (!list.b) { + return false; + } else { + var x = list.a; + var xs = list.b; + if (isOkay(x)) { + return true; + } else { + var $temp$isOkay = isOkay, + $temp$list = xs; + isOkay = $temp$isOkay; + list = $temp$list; + continue any; + } + } + } + }); +var $elm$core$List$member = F2( + function (x, xs) { + return A2( + $elm$core$List$any, + function (a) { + return _Utils_eq(a, x); + }, + xs); + }); +var $elm$core$Basics$not = _Basics_not; +var $elm$core$Maybe$andThen = F2( + function (callback, maybeValue) { + if (maybeValue.$ === 'Just') { + var value = maybeValue.a; + return callback(value); + } else { + return $elm$core$Maybe$Nothing; + } + }); +var $elm$json$Json$Decode$nullable = function (decoder) { + return $elm$json$Json$Decode$oneOf( + _List_fromArray( + [ + $elm$json$Json$Decode$null($elm$core$Maybe$Nothing), + A2($elm$json$Json$Decode$map, $elm$core$Maybe$Just, decoder) + ])); +}; +var $elm_community$json_extra$Json$Decode$Extra$optionalNullableField = F2( + function (fieldName, decoder) { + return A2( + $elm$json$Json$Decode$map, + $elm$core$Maybe$andThen($elm$core$Basics$identity), + A2( + $elm_community$json_extra$Json$Decode$Extra$optionalField, + fieldName, + $elm$json$Json$Decode$nullable(decoder))); + }); +var $author$project$Main$decodeConfigInputFieldGroups = function () { + var defaultShortTextTypeList = _List_fromArray( + [ + $author$project$Main$fromRawCustomElement( + { + attributes: $elm$core$Dict$fromList( + _List_fromArray( + [ + _Utils_Tuple2('type', 'text') + ])), + inputTag: $author$project$Main$defaultInputTag, + inputType: 'Single-line free text' + }) + ]); + var fromShortTextTypeList = function (shortTextTypes) { + var effectiveList = _Utils_ap( + A2( + $elm$core$List$filter, + function (a) { + return !A2($elm$core$List$member, a, shortTextTypes); + }, + defaultShortTextTypeList), + shortTextTypes); + return _List_fromArray( + [ + { + fields: _Utils_ap( + $author$project$Main$allInputField, + A2($elm$core$List$map, $author$project$Main$ShortText, effectiveList)), + heading: '' + } + ]); + }; + return $elm$json$Json$Decode$oneOf( + _List_fromArray( + [ + A2($elm$json$Json$Decode$field, 'inputFieldGroups', $author$project$Main$decodeInputFieldGroups), + A2( + $elm$json$Json$Decode$map, + fromShortTextTypeList, + A2( + $elm$json$Json$Decode$map, + $elm$core$Maybe$withDefault(defaultShortTextTypeList), + A2($elm_community$json_extra$Json$Decode$Extra$optionalNullableField, 'shortTextTypeList', $author$project$Main$decodeShortTextTypeList))) + ])); +}(); +var $author$project$Main$FormField = F6( + function (label, name, presence, description, type_, visibilityRule) { + return {description: description, label: label, name: name, presence: presence, type_: type_, visibilityRule: visibilityRule}; + }); +var $elm$json$Json$Decode$at = F2( + function (fields, decoder) { + return A3($elm$core$List$foldr, $elm$json$Json$Decode$field, decoder, fields); + }); +var $author$project$Main$decodeFormFieldDescription = $elm$json$Json$Decode$oneOf( + _List_fromArray( + [ + A2( + $elm$json$Json$Decode$at, + _List_fromArray( + ['presence', 'description']), + A2( + $author$project$Main$decodeAttributeOptional, + $elm$core$Maybe$Just(''), + $elm$json$Json$Decode$string)), + A2( + $elm$json$Json$Decode$field, + 'description', + A2( + $author$project$Main$decodeAttributeOptional, + $elm$core$Maybe$Just(''), + $elm$json$Json$Decode$string)), + $elm$json$Json$Decode$succeed( + $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing)) + ])); +var $author$project$Main$decodeFormFieldMaybeName = $elm$json$Json$Decode$oneOf( + _List_fromArray( + [ + A2( + $elm$json$Json$Decode$map, + $elm$core$Maybe$Just, + A2( + $elm$json$Json$Decode$at, + _List_fromArray( + ['presence', 'name']), + $elm$json$Json$Decode$string)), + A2( + $elm$json$Json$Decode$map, + $elm$core$Maybe$Just, + A2($elm$json$Json$Decode$field, 'name', $elm$json$Json$Decode$string)), + $elm$json$Json$Decode$succeed($elm$core$Maybe$Nothing) + ])); +var $author$project$Main$Optional = {$: 'Optional'}; +var $author$project$Main$System = {$: 'System'}; +var $author$project$Main$Required = {$: 'Required'}; +var $author$project$Main$decodePresenceString = A2( + $elm$json$Json$Decode$andThen, + function (str) { + switch (str) { + case 'Required': + return $elm$json$Json$Decode$succeed($author$project$Main$Required); + case 'Optional': + return $elm$json$Json$Decode$succeed($author$project$Main$Optional); + case 'System': + return $elm$json$Json$Decode$succeed($author$project$Main$System); + default: + return $elm$json$Json$Decode$fail('Unknown presence: ' + str); + } + }, + $elm$json$Json$Decode$string); +var $author$project$Main$decodePresence = $elm$json$Json$Decode$oneOf( + _List_fromArray( + [ + $author$project$Main$decodePresenceString, + A2( + $elm$json$Json$Decode$andThen, + function (type_) { + switch (type_) { + case 'System': + return $elm$json$Json$Decode$succeed($author$project$Main$System); + case 'SystemRequired': + return $elm$json$Json$Decode$succeed($author$project$Main$System); + case 'SystemOptional': + return $elm$json$Json$Decode$succeed($author$project$Main$Optional); + default: + return $elm$json$Json$Decode$fail('Unknown presence type: ' + type_); + } + }, + A2($elm$json$Json$Decode$field, 'type', $elm$json$Json$Decode$string)) + ])); +var $elm$json$Json$Decode$bool = _Json_decodeBool; +var $author$project$Main$decodeRequired = A2( + $elm$json$Json$Decode$map, + function (b) { + return b ? $author$project$Main$Required : $author$project$Main$Optional; + }, + A2($elm$json$Json$Decode$field, 'required', $elm$json$Json$Decode$bool)); +var $author$project$Main$HideWhen = function (a) { + return {$: 'HideWhen', a: a}; +}; +var $author$project$Main$ShowWhen = function (a) { + return {$: 'ShowWhen', a: a}; +}; +var $author$project$Main$Field = F2( + function (a, b) { + return {$: 'Field', a: a, b: b}; + }); +var $author$project$Main$EndsWith = function (a) { + return {$: 'EndsWith', a: a}; +}; +var $author$project$Main$Equals = function (a) { + return {$: 'Equals', a: a}; +}; +var $author$project$Main$EqualsField = function (a) { + return {$: 'EqualsField', a: a}; +}; var $author$project$Main$GreaterThan = function (a) { - return {$: 3, a: a}; + return {$: 'GreaterThan', a: a}; }; var $author$project$Main$StringContains = function (a) { - return {$: 1, a: a}; + return {$: 'StringContains', a: a}; }; var $author$project$Main$decodeComparison = A2( $elm$json$Json$Decode$andThen, @@ -5937,33 +6214,6 @@ var $author$project$Main$decodeVisibilityRule = A2( } }, A2($elm$json$Json$Decode$field, 'type', $elm$json$Json$Decode$string)); -var $elm$core$Maybe$andThen = F2( - function (callback, maybeValue) { - if (!maybeValue.$) { - var value = maybeValue.a; - return callback(value); - } else { - return $elm$core$Maybe$Nothing; - } - }); -var $elm$json$Json$Decode$nullable = function (decoder) { - return $elm$json$Json$Decode$oneOf( - _List_fromArray( - [ - $elm$json$Json$Decode$null($elm$core$Maybe$Nothing), - A2($elm$json$Json$Decode$map, $elm$core$Maybe$Just, decoder) - ])); -}; -var $elm_community$json_extra$Json$Decode$Extra$optionalNullableField = F2( - function (fieldName, decoder) { - return A2( - $elm$json$Json$Decode$map, - $elm$core$Maybe$andThen($elm$core$Basics$identity), - A2( - $elm_community$json_extra$Json$Decode$Extra$optionalField, - fieldName, - $elm$json$Json$Decode$nullable(decoder))); - }); var $author$project$Main$decodeFormField = A2( $elm_community$json_extra$Json$Decode$Extra$andMap, A2( @@ -6007,119 +6257,48 @@ var $elm$core$Array$fromListHelp = F3( return A2( $elm$core$Array$builderToArray, true, - {y: nodeList, t: nodeListSize, x: jsArray}); + {nodeList: nodeList, nodeListSize: nodeListSize, tail: jsArray}); } else { - var $temp$list = remainingItems, - $temp$nodeList = A2( - $elm$core$List$cons, - $elm$core$Array$Leaf(jsArray), - nodeList), - $temp$nodeListSize = nodeListSize + 1; - list = $temp$list; - nodeList = $temp$nodeList; - nodeListSize = $temp$nodeListSize; - continue fromListHelp; - } - } - }); -var $elm$core$Array$fromList = function (list) { - if (!list.b) { - return $elm$core$Array$empty; - } else { - return A3($elm$core$Array$fromListHelp, list, _List_Nil, 0); - } -}; -var $author$project$Main$decodeFormFields = A2( - $elm$json$Json$Decode$map, - $elm$core$Array$fromList, - $elm$json$Json$Decode$list($author$project$Main$decodeFormField)); -var $elm$core$List$append = F2( - function (xs, ys) { - if (!ys.b) { - return xs; - } else { - return A3($elm$core$List$foldr, $elm$core$List$cons, ys, xs); - } - }); -var $elm$core$List$concat = function (lists) { - return A3($elm$core$List$foldr, $elm$core$List$append, _List_Nil, lists); -}; -var $elm$core$List$concatMap = F2( - function (f, list) { - return $elm$core$List$concat( - A2($elm$core$List$map, f, list)); - }); -var $elm$json$Json$Decode$dict = function (decoder) { - return A2( - $elm$json$Json$Decode$map, - $elm$core$Dict$fromList, - $elm$json$Json$Decode$keyValuePairs(decoder)); -}; -var $elm$core$Tuple$pair = F2( - function (a, b) { - return _Utils_Tuple2(a, b); - }); -var $author$project$Main$decodeShortTextTypeList = function () { - var decodeInputTagAttributes = A2( - $elm_community$json_extra$Json$Decode$Extra$andMap, - A2( - $elm$json$Json$Decode$map, - $elm$core$Dict$fromList, - A2( - $elm$json$Json$Decode$field, - 'attributes', - $elm$json$Json$Decode$keyValuePairs($elm$json$Json$Decode$string))), - A2( - $elm_community$json_extra$Json$Decode$Extra$andMap, - A2( - $elm$json$Json$Decode$map, - $elm$core$Maybe$withDefault($author$project$Main$defaultInputTag), - A2($elm_community$json_extra$Json$Decode$Extra$optionalField, 'inputTag', $elm$json$Json$Decode$string)), - $elm$json$Json$Decode$succeed($elm$core$Tuple$pair))); - var decodeAttributes = A2( - $elm$json$Json$Decode$map, - function (attributes) { - return _Utils_Tuple2($author$project$Main$defaultInputTag, attributes); - }, - $elm$json$Json$Decode$dict($elm$json$Json$Decode$string)); - var customElementsFrom = function (dict) { - return A2( - $elm$core$List$map, - function (_v0) { - var inputType = _v0.a; - var _v1 = _v0.b; - var inputTag = _v1.a; - var attributes = _v1.b; - return $author$project$Main$fromRawCustomElement( - {p: attributes, N: inputTag, B: inputType}); - }, - $elm$core$Dict$toList(dict)); - }; - return A2( - $elm$json$Json$Decode$map, - $elm$core$List$concatMap(customElementsFrom), - $elm$json$Json$Decode$list( - $elm$json$Json$Decode$dict( - $elm$json$Json$Decode$oneOf( - _List_fromArray( - [decodeInputTagAttributes, decodeAttributes]))))); -}(); + var $temp$list = remainingItems, + $temp$nodeList = A2( + $elm$core$List$cons, + $elm$core$Array$Leaf(jsArray), + nodeList), + $temp$nodeListSize = nodeListSize + 1; + list = $temp$list; + nodeList = $temp$nodeList; + nodeListSize = $temp$nodeListSize; + continue fromListHelp; + } + } + }); +var $elm$core$Array$fromList = function (list) { + if (!list.b) { + return $elm$core$Array$empty; + } else { + return A3($elm$core$Array$fromListHelp, list, _List_Nil, 0); + } +}; +var $author$project$Main$decodeFormFields = A2( + $elm$json$Json$Decode$map, + $elm$core$Array$fromList, + $elm$json$Json$Decode$list($author$project$Main$decodeFormField)); var $elm_community$json_extra$Json$Decode$Extra$fromMaybe = F2( function (error, val) { - if (!val.$) { + if (val.$ === 'Just') { var v = val.a; return $elm$json$Json$Decode$succeed(v); } else { return $elm$json$Json$Decode$fail(error); } }); -var $author$project$Main$CollectData = {$: 1}; +var $author$project$Main$CollectData = {$: 'CollectData'}; var $author$project$Main$viewModeFromString = function (str) { switch (str) { case 'Editor': return $elm$core$Maybe$Just( $author$project$Main$Editor( - {aB: $elm$core$Maybe$Nothing})); + {maybeAnimate: $elm$core$Maybe$Nothing})); case 'CollectData': return $elm$core$Maybe$Just($author$project$Main$CollectData); default: @@ -6133,23 +6312,7 @@ var $author$project$Main$decodeViewMode = A2( var $elm$json$Json$Encode$null = _Json_encodeNull; var $author$project$Main$decodeConfig = A2( $elm_community$json_extra$Json$Decode$Extra$andMap, - A2( - $elm$json$Json$Decode$map, - $elm$core$Maybe$withDefault( - _List_fromArray( - [ - $author$project$Main$fromRawCustomElement( - { - p: $elm$core$Dict$fromList( - _List_fromArray( - [ - _Utils_Tuple2('type', 'text') - ])), - N: $author$project$Main$defaultInputTag, - B: 'Single-line free text' - }) - ])), - A2($elm_community$json_extra$Json$Decode$Extra$optionalNullableField, 'shortTextTypeList', $author$project$Main$decodeShortTextTypeList)), + $author$project$Main$decodeConfigInputFieldGroups, A2( $elm_community$json_extra$Json$Decode$Extra$andMap, A2( @@ -6168,7 +6331,7 @@ var $author$project$Main$decodeConfig = A2( $elm$json$Json$Decode$map, $elm$core$Maybe$withDefault( $author$project$Main$Editor( - {aB: $elm$core$Maybe$Nothing})), + {maybeAnimate: $elm$core$Maybe$Nothing})), A2($elm_community$json_extra$Json$Decode$Extra$optionalNullableField, 'viewMode', $author$project$Main$decodeViewMode)), $elm$json$Json$Decode$succeed($author$project$Main$Config))))); var $elm$core$List$singleton = function (value) { @@ -6186,9 +6349,9 @@ var $author$project$Main$decodeListOrSingleton = function (decoder) { var $author$project$Main$encodeAttributeOptional = F2( function (encodeValue, attributeOptional) { switch (attributeOptional.$) { - case 0: + case 'AttributeNotNeeded': return $elm$json$Json$Encode$null; - case 1: + case 'AttributeInvalid': return $elm$json$Json$Encode$null; default: var value = attributeOptional.a; @@ -6197,10 +6360,10 @@ var $author$project$Main$encodeAttributeOptional = F2( }); var $author$project$Main$choiceToString = function (choice) { return _Utils_eq( - $elm$core$String$trim(choice.d), - $elm$core$String$trim(choice.j)) ? choice.d : _Utils_ap( - choice.j, - _Utils_ap($author$project$Main$choiceDelimiter, choice.d)); + $elm$core$String$trim(choice.label), + $elm$core$String$trim(choice.value)) ? choice.label : _Utils_ap( + choice.value, + _Utils_ap($author$project$Main$choiceDelimiter, choice.label)); }; var $elm$json$Json$Encode$string = _Json_wrap; var $author$project$Main$encodeChoice = function (choice) { @@ -6217,11 +6380,11 @@ var $elm$json$Json$Encode$object = function (pairs) { var v = _v0.b; return A3(_Json_addField, k, v, obj); }), - _Json_emptyObject(0), + _Json_emptyObject(_Utils_Tuple0), pairs)); }; var $author$project$Main$encodeChoiceFilter = function (filter) { - if (!filter.$) { + if (filter.$ === 'FilterStartsWithFieldValueOf') { var fieldName = filter.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6256,17 +6419,17 @@ var $elm$core$Tuple$mapSecond = F2( func(y)); }); var $author$project$Main$encodePairsFromRawCustomElements = function (customElement) { - var inputTagAttrs = _Utils_eq(customElement.N, $author$project$Main$defaultInputTag) ? _List_Nil : _List_fromArray( + var inputTagAttrs = _Utils_eq(customElement.inputTag, $author$project$Main$defaultInputTag) ? _List_Nil : _List_fromArray( [ _Utils_Tuple2( 'inputTag', - $elm$json$Json$Encode$string(customElement.N)) + $elm$json$Json$Encode$string(customElement.inputTag)) ]); var encodedAttrs = function () { var _v0 = A2( $elm$core$List$map, $elm$core$Tuple$mapSecond($elm$json$Json$Encode$string), - $elm$core$Dict$toList(customElement.p)); + $elm$core$Dict$toList(customElement.attributes)); if (!_v0.b) { return _List_Nil; } else { @@ -6283,13 +6446,13 @@ var $author$project$Main$encodePairsFromRawCustomElements = function (customElem $elm$core$List$cons, _Utils_Tuple2( 'inputType', - $elm$json$Json$Encode$string(customElement.B)), + $elm$json$Json$Encode$string(customElement.inputType)), _Utils_ap(inputTagAttrs, encodedAttrs)); }; var $author$project$Main$toRawCustomElement = function (ele) { var addMultipleIfGiven = function (dict) { - var _v7 = ele.aM; - if (_v7.$ === 2) { + var _v7 = ele.multiple; + if (_v7.$ === 'AttributeGiven') { if (_v7.a) { return A3($elm$core$Dict$insert, 'multiple', 'true', dict); } else { @@ -6306,8 +6469,8 @@ var $author$project$Main$toRawCustomElement = function (ele) { } }; var addMinIfGiven = function (dict) { - var _v5 = ele.ar; - if (_v5.$ === 2) { + var _v5 = ele.min; + if (_v5.$ === 'AttributeGiven') { var value = _v5.a; return A3($elm$core$Dict$insert, 'min', value, dict); } else { @@ -6321,8 +6484,8 @@ var $author$project$Main$toRawCustomElement = function (ele) { } }; var addMaxLengthIfGiven = function (dict) { - var _v3 = ele.ah; - if (_v3.$ === 2) { + var _v3 = ele.maxlength; + if (_v3.$ === 'AttributeGiven') { var _int = _v3.a; return A3( $elm$core$Dict$insert, @@ -6340,8 +6503,8 @@ var $author$project$Main$toRawCustomElement = function (ele) { } }; var addMaxIfGiven = function (dict) { - var _v1 = ele.aq; - if (_v1.$ === 2) { + var _v1 = ele.max; + if (_v1.$ === 'AttributeGiven') { var value = _v1.a; return A3($elm$core$Dict$insert, 'max', value, dict); } else { @@ -6355,9 +6518,9 @@ var $author$project$Main$toRawCustomElement = function (ele) { } }; var addDatalistIfGiven = function (dict) { - var _v0 = ele.ae; + var _v0 = ele.datalist; switch (_v0.$) { - case 2: + case 'AttributeGiven': var list = _v0.a; return A3( $elm$core$Dict$insert, @@ -6367,37 +6530,26 @@ var $author$project$Main$toRawCustomElement = function (ele) { '\n', A2($elm$core$List$map, $author$project$Main$choiceToString, list)), dict); - case 1: + case 'AttributeInvalid': return dict; default: return dict; } }; return { - p: addMaxIfGiven( + attributes: addMaxIfGiven( addMinIfGiven( addDatalistIfGiven( addMultipleIfGiven( - addMaxLengthIfGiven(ele.p))))), - N: ele.N, - B: ele.B + addMaxLengthIfGiven(ele.attributes))))), + inputTag: ele.inputTag, + inputType: ele.inputType }; }; var $author$project$Main$encodePairsFromCustomElement = function (customElement) { return $author$project$Main$encodePairsFromRawCustomElements( $author$project$Main$toRawCustomElement(customElement)); }; -var $elm$core$List$filter = F2( - function (isGood, list) { - return A3( - $elm$core$List$foldr, - F2( - function (x, xs) { - return isGood(x) ? A2($elm$core$List$cons, x, xs) : xs; - }), - _List_Nil, - list); - }); var $elm$json$Json$Encode$int = _Json_wrap; var $elm$json$Json$Encode$list = F2( function (func, entries) { @@ -6405,12 +6557,12 @@ var $elm$json$Json$Encode$list = F2( A3( $elm$core$List$foldl, _Json_addEntry(func), - _Json_emptyArray(0), + _Json_emptyArray(_Utils_Tuple0), entries)); }); var $author$project$Main$encodeInputField = function (inputField) { switch (inputField.$) { - case 0: + case 'ShortText': var customElement = inputField.a; return $elm$json$Json$Encode$object( A2( @@ -6419,7 +6571,7 @@ var $author$project$Main$encodeInputField = function (inputField) { 'type', $elm$json$Json$Encode$string('ShortText')), $author$project$Main$encodePairsFromCustomElement(customElement))); - case 1: + case 'LongText': var optionalMaxLength = inputField.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6431,9 +6583,9 @@ var $author$project$Main$encodeInputField = function (inputField) { 'maxLength', A2($author$project$Main$encodeAttributeOptional, $elm$json$Json$Encode$int, optionalMaxLength)) ])); - case 2: - var choices = inputField.a.k; - var filter = inputField.a.e; + case 'Dropdown': + var choices = inputField.a.choices; + var filter = inputField.a.filter; return $elm$json$Json$Encode$object( _Utils_ap( _List_fromArray( @@ -6449,13 +6601,13 @@ var $author$project$Main$encodeInputField = function (inputField) { A2( $elm$core$List$filter, function (_v1) { - var value = _v1.j; + var value = _v1.value; return $elm$core$String$trim(value) !== ''; }, choices))) ]), function () { - if (!filter.$) { + if (filter.$ === 'Just') { var f = filter.a; return _List_fromArray( [ @@ -6467,9 +6619,9 @@ var $author$project$Main$encodeInputField = function (inputField) { return _List_Nil; } }())); - case 3: - var choices = inputField.a.k; - var filter = inputField.a.e; + case 'ChooseOne': + var choices = inputField.a.choices; + var filter = inputField.a.filter; return $elm$json$Json$Encode$object( _Utils_ap( _List_fromArray( @@ -6485,13 +6637,13 @@ var $author$project$Main$encodeInputField = function (inputField) { A2( $elm$core$List$filter, function (_v3) { - var value = _v3.j; + var value = _v3.value; return $elm$core$String$trim(value) !== ''; }, choices))) ]), function () { - if (!filter.$) { + if (filter.$ === 'Just') { var f = filter.a; return _List_fromArray( [ @@ -6504,10 +6656,10 @@ var $author$project$Main$encodeInputField = function (inputField) { } }())); default: - var choices = inputField.a.k; - var minRequired = inputField.a.P; - var maxAllowed = inputField.a.T; - var filter = inputField.a.e; + var choices = inputField.a.choices; + var minRequired = inputField.a.minRequired; + var maxAllowed = inputField.a.maxAllowed; + var filter = inputField.a.filter; return $elm$json$Json$Encode$object( _Utils_ap( _List_fromArray( @@ -6523,14 +6675,14 @@ var $author$project$Main$encodeInputField = function (inputField) { A2( $elm$core$List$filter, function (_v5) { - var value = _v5.j; + var value = _v5.value; return $elm$core$String$trim(value) !== ''; }, choices))) ]), _Utils_ap( function () { - if (!minRequired.$) { + if (minRequired.$ === 'Just') { var min = minRequired.a; return _List_fromArray( [ @@ -6544,7 +6696,7 @@ var $author$project$Main$encodeInputField = function (inputField) { }(), _Utils_ap( function () { - if (!maxAllowed.$) { + if (maxAllowed.$ === 'Just') { var max = maxAllowed.a; return _List_fromArray( [ @@ -6557,7 +6709,7 @@ var $author$project$Main$encodeInputField = function (inputField) { } }(), function () { - if (!filter.$) { + if (filter.$ === 'Just') { var f = filter.a; return _List_fromArray( [ @@ -6572,10 +6724,10 @@ var $author$project$Main$encodeInputField = function (inputField) { } }; var $author$project$Main$encodePresence = function (presence) { - switch (presence) { - case 0: + switch (presence.$) { + case 'Required': return $elm$json$Json$Encode$string('Required'); - case 1: + case 'Optional': return $elm$json$Json$Encode$string('Optional'); default: return $elm$json$Json$Encode$string('System'); @@ -6583,7 +6735,7 @@ var $author$project$Main$encodePresence = function (presence) { }; var $author$project$Main$encodeComparison = function (comparison) { switch (comparison.$) { - case 0: + case 'Equals': var value = comparison.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6595,7 +6747,7 @@ var $author$project$Main$encodeComparison = function (comparison) { 'value', $elm$json$Json$Encode$string(value)) ])); - case 1: + case 'StringContains': var value = comparison.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6607,7 +6759,7 @@ var $author$project$Main$encodeComparison = function (comparison) { 'value', $elm$json$Json$Encode$string(value)) ])); - case 2: + case 'EndsWith': var value = comparison.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6619,7 +6771,7 @@ var $author$project$Main$encodeComparison = function (comparison) { 'value', $elm$json$Json$Encode$string(value)) ])); - case 3: + case 'GreaterThan': var value = comparison.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6663,7 +6815,7 @@ var $author$project$Main$encodeCondition = function (condition) { ])); }; var $author$project$Main$encodeVisibilityRule = function (rule) { - if (!rule.$) { + if (rule.$ === 'ShowWhen') { var conditions = rule.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6707,12 +6859,12 @@ var $author$project$Main$encodeFormFields = function (formFields) { [ _Utils_Tuple2( 'label', - $elm$json$Json$Encode$string(formField.d)), + $elm$json$Json$Encode$string(formField.label)), _Utils_Tuple2( 'name', function () { - var _v0 = formField.Q; - if (!_v0.$) { + var _v0 = formField.name; + if (_v0.$ === 'Just') { var name = _v0.a; return $elm$json$Json$Encode$string(name); } else { @@ -6721,22 +6873,22 @@ var $author$project$Main$encodeFormFields = function (formFields) { }()), _Utils_Tuple2( 'presence', - $author$project$Main$encodePresence(formField.q)), + $author$project$Main$encodePresence(formField.presence)), _Utils_Tuple2( 'description', - A2($author$project$Main$encodeAttributeOptional, $elm$json$Json$Encode$string, formField.S)), + A2($author$project$Main$encodeAttributeOptional, $elm$json$Json$Encode$string, formField.description)), _Utils_Tuple2( 'type', - $author$project$Main$encodeInputField(formField.a)), + $author$project$Main$encodeInputField(formField.type_)), _Utils_Tuple2( 'visibilityRule', - A2($elm$json$Json$Encode$list, $author$project$Main$encodeVisibilityRule, formField.m)) + A2($elm$json$Json$Encode$list, $author$project$Main$encodeVisibilityRule, formField.visibilityRule)) ]))); }, $elm$core$Array$toList(formFields))); }; var $author$project$Main$encodePortOutgoingValue = function (value) { - if (!value.$) { + if (value.$ === 'PortOutgoingFormFields') { var formFields = value.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6761,7 +6913,7 @@ var $author$project$Main$encodePortOutgoingValue = function (value) { } }; var $author$project$Main$fieldNameOf = function (formField) { - return A2($elm$core$Maybe$withDefault, formField.d, formField.Q); + return A2($elm$core$Maybe$withDefault, formField.label, formField.name); }; var $elm$core$Array$filter = F2( function (isGood, array) { @@ -6775,46 +6927,16 @@ var $elm$core$Array$filter = F2( _List_Nil, array)); }); -var $elm$core$List$any = F2( - function (isOkay, list) { - any: - while (true) { - if (!list.b) { - return false; - } else { - var x = list.a; - var xs = list.b; - if (isOkay(x)) { - return true; - } else { - var $temp$isOkay = isOkay, - $temp$list = xs; - isOkay = $temp$isOkay; - list = $temp$list; - continue any; - } - } - } - }); -var $elm$core$List$member = F2( - function (x, xs) { - return A2( - $elm$core$List$any, - function (a) { - return _Utils_eq(a, x); - }, - xs); - }); var $author$project$Main$filterValuesByFieldChoices = F2( function (field, values) { - var _v0 = field.a; + var _v0 = field.type_; switch (_v0.$) { - case 2: - var choices = _v0.a.k; + case 'Dropdown': + var choices = _v0.a.choices; var validChoiceValues = A2( $elm$core$List$map, function ($) { - return $.j; + return $.value; }, choices); return A2( @@ -6823,12 +6945,12 @@ var $author$project$Main$filterValuesByFieldChoices = F2( return A2($elm$core$List$member, value, validChoiceValues); }, values); - case 3: - var choices = _v0.a.k; + case 'ChooseOne': + var choices = _v0.a.choices; var validChoiceValues = A2( $elm$core$List$map, function ($) { - return $.j; + return $.value; }, choices); return A2( @@ -6837,12 +6959,12 @@ var $author$project$Main$filterValuesByFieldChoices = F2( return A2($elm$core$List$member, value, validChoiceValues); }, values); - case 4: - var choices = _v0.a.k; + case 'ChooseMultiple': + var choices = _v0.a.choices; var validChoiceValues = A2( $elm$core$List$map, function ($) { - return $.j; + return $.value; }, choices); return A2( @@ -6867,20 +6989,20 @@ var $elm$core$List$isEmpty = function (xs) { } }; var $author$project$Main$isUsingFilter = function (formField) { - var _v0 = formField.a; + var _v0 = formField.type_; switch (_v0.$) { - case 0: + case 'ShortText': return false; - case 1: + case 'LongText': return false; - case 4: - var filter = _v0.a.e; + case 'ChooseMultiple': + var filter = _v0.a.filter; return !_Utils_eq(filter, $elm$core$Maybe$Nothing); - case 3: - var filter = _v0.a.e; + case 'ChooseOne': + var filter = _v0.a.filter; return !_Utils_eq(filter, $elm$core$Maybe$Nothing); default: - var filter = _v0.a.e; + var filter = _v0.a.filter; return !_Utils_eq(filter, $elm$core$Maybe$Nothing); } }; @@ -6890,7 +7012,7 @@ var $elm$core$Array$length = function (_v0) { }; var $elm$core$Maybe$map = F2( function (f, maybe) { - if (!maybe.$) { + if (maybe.$ === 'Just') { var value = maybe.a; return $elm$core$Maybe$Just( f(value)); @@ -6899,7 +7021,7 @@ var $elm$core$Maybe$map = F2( } }); var $elm$core$Result$toMaybe = function (result) { - if (!result.$) { + if (result.$ === 'Ok') { var v = result.a; return $elm$core$Maybe$Just(v); } else { @@ -6918,32 +7040,10 @@ var $author$project$Main$maybeDecode = F3( jsonValue))); }); var $elm$core$Platform$Cmd$none = $elm$core$Platform$Cmd$batch(_List_Nil); -var $elm$core$Basics$not = _Basics_not; var $author$project$Main$outgoing = _Platform_outgoingPort('outgoing', $elm$core$Basics$identity); var $author$project$Main$init = function (flags) { - var defaultShortTextTypeList = _List_fromArray( - [ - $author$project$Main$fromRawCustomElement( - { - p: $elm$core$Dict$fromList( - _List_fromArray( - [ - _Utils_Tuple2('type', 'text') - ])), - N: $author$project$Main$defaultInputTag, - B: 'Single-line free text' - }) - ]); - var defaultShortTextTypeListWithout = function (shortTextTypeList) { - return A2( - $elm$core$List$filter, - function (a) { - return !A2($elm$core$List$member, a, shortTextTypeList); - }, - defaultShortTextTypeList); - }; var _v0 = A2($elm$json$Json$Decode$decodeValue, $author$project$Main$decodeConfig, flags); - if (!_v0.$) { + if (_v0.$ === 'Ok') { var config = _v0.a; var initialTrackedFormValues = $elm$core$Dict$fromList( A2( @@ -6951,8 +7051,8 @@ var $author$project$Main$init = function (flags) { function (field) { var fieldName = $author$project$Main$fieldNameOf(field); var rawValues = function () { - var _v1 = field.a; - if (_v1.$ === 4) { + var _v1 = field.type_; + if (_v1.$ === 'ChooseMultiple') { return A2( $elm$core$Maybe$withDefault, _List_Nil, @@ -6960,7 +7060,7 @@ var $author$project$Main$init = function (flags) { $author$project$Main$maybeDecode, fieldName, $author$project$Main$decodeListOrSingleton($elm$json$Json$Decode$string), - config.a7)); + config.formValues)); } else { return A2( $elm$core$Maybe$withDefault, @@ -6968,94 +7068,94 @@ var $author$project$Main$init = function (flags) { A2( $elm$core$Maybe$map, $elm$core$List$singleton, - A3($author$project$Main$maybeDecode, fieldName, $elm$json$Json$Decode$string, config.a7))); + A3($author$project$Main$maybeDecode, fieldName, $elm$json$Json$Decode$string, config.formValues))); } }(); var filteredValues = A2($author$project$Main$filterValuesByFieldChoices, field, rawValues); return _Utils_Tuple2(fieldName, filteredValues); }, - $elm$core$Array$toList(config.g))); - var effectiveShortTextTypeList = _Utils_ap( - defaultShortTextTypeListWithout(config.al), - config.al); + $elm$core$Array$toList(config.formFields))); + var allCustomElements = $author$project$Main$allCustomElementsFromGroups(config.inputFieldGroups); return _Utils_Tuple2( { - r: $elm$core$Maybe$Nothing, - g: config.g, - aW: $elm$core$Maybe$Nothing, - _: !$elm$core$Array$isEmpty( + activeFieldGroupIndex: 0, + dragged: $elm$core$Maybe$Nothing, + formFields: config.formFields, + initError: $elm$core$Maybe$Nothing, + inputFieldGroups: config.inputFieldGroups, + needsFormLogic: !$elm$core$Array$isEmpty( A2( $elm$core$Array$filter, function (f) { - return $author$project$Main$isUsingFilter(f) || (!$elm$core$List$isEmpty(f.m)); + return $author$project$Main$isUsingFilter(f) || (!$elm$core$List$isEmpty(f.visibilityRule)); }, - config.g)), - aa: $elm$core$Array$length(config.g) + 1, - F: $elm$core$Maybe$Nothing, - ak: $elm$core$Dict$fromList( + config.formFields)), + nextQuestionNumber: $elm$core$Array$length(config.formFields) + 1, + selectedFieldIndex: $elm$core$Maybe$Nothing, + shortTextTypeDict: $elm$core$Dict$fromList( A2( $elm$core$List$map, function (customElement) { - return _Utils_Tuple2(customElement.B, customElement); + return _Utils_Tuple2(customElement.inputType, customElement); }, - effectiveShortTextTypeList)), - al: effectiveShortTextTypeList, - v: initialTrackedFormValues, - ac: config.ac + allCustomElements)), + trackedFormValues: initialTrackedFormValues, + viewMode: config.viewMode }, $elm$core$Platform$Cmd$batch( _List_fromArray( [ $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( - $author$project$Main$PortOutgoingFormFields(config.g))) + $author$project$Main$PortOutgoingFormFields(config.formFields))) ]))); } else { var err = _v0.a; return _Utils_Tuple2( { - r: $elm$core$Maybe$Nothing, - g: $elm$core$Array$empty, - aW: $elm$core$Maybe$Just( + activeFieldGroupIndex: 0, + dragged: $elm$core$Maybe$Nothing, + formFields: $elm$core$Array$empty, + initError: $elm$core$Maybe$Just( $elm$json$Json$Decode$errorToString(err)), - _: false, - aa: 1, - F: $elm$core$Maybe$Nothing, - ak: $elm$core$Dict$empty, - al: _List_Nil, - v: $elm$core$Dict$empty, - ac: $author$project$Main$Editor( - {aB: $elm$core$Maybe$Nothing}) + inputFieldGroups: _List_Nil, + needsFormLogic: false, + nextQuestionNumber: 1, + selectedFieldIndex: $elm$core$Maybe$Nothing, + shortTextTypeDict: $elm$core$Dict$empty, + trackedFormValues: $elm$core$Dict$empty, + viewMode: $author$project$Main$Editor( + {maybeAnimate: $elm$core$Maybe$Nothing}) }, $elm$core$Platform$Cmd$none); } }; var $author$project$Main$OnPortIncoming = function (a) { - return {$: 1, a: a}; + return {$: 'OnPortIncoming', a: a}; }; var $author$project$Main$incoming = _Platform_incomingPort('incoming', $elm$json$Json$Decode$value); var $author$project$Main$subscriptions = function (_v0) { return $author$project$Main$incoming($author$project$Main$OnPortIncoming); }; -var $author$project$Main$AnimateYellowFade = 0; +var $author$project$Main$AnimateYellowFade = {$: 'AnimateYellowFade'}; var $author$project$Main$DoSleepDo = F2( function (a, b) { - return {$: 14, a: a, b: b}; + return {$: 'DoSleepDo', a: a, b: b}; }); var $author$project$Main$DragExisting = function (a) { - return {$: 0, a: a}; + return {$: 'DragExisting', a: a}; }; var $author$project$Main$DragNew = function (a) { - return {$: 1, a: a}; + return {$: 'DragNew', a: a}; }; var $author$project$Main$Drop = function (a) { - return {$: 13, a: a}; + return {$: 'Drop', a: a}; }; var $author$project$Main$PortOutgoingFormValues = function (a) { - return {$: 1, a: a}; + return {$: 'PortOutgoingFormValues', a: a}; }; var $author$project$Main$SetEditorAnimate = function (a) { - return {$: 7, a: a}; + return {$: 'SetEditorAnimate', a: a}; }; var $elm$core$Basics$always = F2( function (a, _v0) { @@ -7081,7 +7181,7 @@ var $elm$json$Json$Encode$dict = F3( toValue(value), obj); }), - _Json_emptyObject(0), + _Json_emptyObject(_Utils_Tuple0), dictionary)); }); var $elm$core$List$head = function (list) { @@ -7106,9 +7206,9 @@ var $elm$core$Array$indexedMap = F2( var tree = _v0.c; var tail = _v0.d; var initialBuilder = { - y: _List_Nil, - t: 0, - x: A3( + nodeList: _List_Nil, + nodeListSize: 0, + tail: A3( $elm$core$Elm$JsArray$indexedMap, func, $elm$core$Array$tailIndex(len), @@ -7116,18 +7216,18 @@ var $elm$core$Array$indexedMap = F2( }; var helper = F2( function (node, builder) { - if (!node.$) { + if (node.$ === 'SubTree') { var subTree = node.a; return A3($elm$core$Elm$JsArray$foldl, helper, builder, subTree); } else { var leaf = node.a; - var offset = builder.t * $elm$core$Array$branchFactor; + var offset = builder.nodeListSize * $elm$core$Array$branchFactor; var mappedLeaf = $elm$core$Array$Leaf( A3($elm$core$Elm$JsArray$indexedMap, func, offset, leaf)); return { - y: A2($elm$core$List$cons, mappedLeaf, builder.y), - t: builder.t + 1, - x: builder.x + nodeList: A2($elm$core$List$cons, mappedLeaf, builder.nodeList), + nodeListSize: builder.nodeListSize + 1, + tail: builder.tail }; } }); @@ -7138,13 +7238,13 @@ var $elm$core$Array$indexedMap = F2( }); var $author$project$Main$mustBeOptional = function (inputField) { switch (inputField.$) { - case 0: + case 'ShortText': return false; - case 1: + case 'LongText': return false; - case 2: + case 'Dropdown': return false; - case 3: + case 'ChooseOne': return false; default: return true; @@ -7160,7 +7260,7 @@ var $elm$core$Array$getHelp = F3( while (true) { var pos = $elm$core$Array$bitMask & (index >>> shift); var _v0 = A2($elm$core$Elm$JsArray$unsafeGet, pos, tree); - if (!_v0.$) { + if (_v0.$ === 'SubTree') { var subTree = _v0.a; var $temp$shift = shift - $elm$core$Array$shiftStep, $temp$index = index, @@ -7346,32 +7446,32 @@ var $elm_community$list_extra$List$Extra$splitAt = F2( }); var $author$project$Main$onDropped = F2( function (targetIndex, model) { - var _v0 = model.r; - if (!_v0.$) { - if (!_v0.a.$) { - var dragIndex = _v0.a.a.a6; - var dropIndex = _v0.a.a.G; - if (targetIndex.$ === 1) { + var _v0 = model.dragged; + if (_v0.$ === 'Just') { + if (_v0.a.$ === 'DragExisting') { + var dragIndex = _v0.a.a.dragIndex; + var dropIndex = _v0.a.a.dropIndex; + if (targetIndex.$ === 'Nothing') { return _Utils_update( model, - {r: $elm$core$Maybe$Nothing}); + {dragged: $elm$core$Maybe$Nothing}); } else { var index = targetIndex.a; - if (!dropIndex.$) { + if (dropIndex.$ === 'Just') { var _v3 = dropIndex.a; var dropTargetIndex = _v3.a; if (_Utils_eq(dragIndex, index) || (!_Utils_eq(index, dropTargetIndex))) { return _Utils_update( model, - {r: $elm$core$Maybe$Nothing}); + {dragged: $elm$core$Maybe$Nothing}); } else { var newFormFields = $elm$core$Array$fromList( function (list) { - var draggedField = A2($elm$core$Array$get, dragIndex, model.g); + var draggedField = A2($elm$core$Array$get, dragIndex, model.formFields); var _v5 = A2($elm_community$list_extra$List$Extra$splitAt, index, list); var before = _v5.a; var after = _v5.b; - if (!draggedField.$) { + if (draggedField.$ === 'Just') { var field = draggedField.a; return $elm$core$List$concat( _List_fromArray( @@ -7397,33 +7497,33 @@ var $author$project$Main$onDropped = F2( A2( $elm$core$List$indexedMap, $elm$core$Tuple$pair, - $elm$core$Array$toList(model.g)))))); + $elm$core$Array$toList(model.formFields)))))); return _Utils_update( model, - {r: $elm$core$Maybe$Nothing, g: newFormFields}); + {dragged: $elm$core$Maybe$Nothing, formFields: newFormFields}); } } else { return _Utils_update( model, - {r: $elm$core$Maybe$Nothing}); + {dragged: $elm$core$Maybe$Nothing}); } } } else { - var field = _v0.a.a.bU; - var dropIndex = _v0.a.a.G; - if (targetIndex.$ === 1) { + var field = _v0.a.a.field; + var dropIndex = _v0.a.a.dropIndex; + if (targetIndex.$ === 'Nothing') { return _Utils_update( model, - {r: $elm$core$Maybe$Nothing}); + {dragged: $elm$core$Maybe$Nothing}); } else { var index = targetIndex.a; - if (!dropIndex.$) { + if (dropIndex.$ === 'Just') { var _v9 = dropIndex.a; var dropTargetIndex = _v9.a; if (!_Utils_eq(index, dropTargetIndex)) { return _Utils_update( model, - {r: $elm$core$Maybe$Nothing}); + {dragged: $elm$core$Maybe$Nothing}); } else { var newFormFields = $elm$core$Array$fromList( function (list) { @@ -7434,22 +7534,22 @@ var $author$project$Main$onDropped = F2( before, A2($elm$core$List$cons, field, after)); }( - $elm$core$Array$toList(model.g))); + $elm$core$Array$toList(model.formFields))); return _Utils_update( model, - {r: $elm$core$Maybe$Nothing, g: newFormFields, aa: model.aa + 1}); + {dragged: $elm$core$Maybe$Nothing, formFields: newFormFields, nextQuestionNumber: model.nextQuestionNumber + 1}); } } else { return _Utils_update( model, - {r: $elm$core$Maybe$Nothing}); + {dragged: $elm$core$Maybe$Nothing}); } } } } else { return _Utils_update( model, - {r: $elm$core$Maybe$Nothing}); + {dragged: $elm$core$Maybe$Nothing}); } }); var $elm$core$Elm$JsArray$push = _JsArray_push; @@ -7473,7 +7573,7 @@ var $elm$core$Array$insertTailInTree = F4( } } else { var value = A2($elm$core$Elm$JsArray$unsafeGet, pos, tree); - if (!value.$) { + if (value.$ === 'SubTree') { var subTree = value.a; var newSub = $elm$core$Array$SubTree( A4($elm$core$Array$insertTailInTree, shift - $elm$core$Array$shiftStep, index, tail, subTree)); @@ -7534,14 +7634,14 @@ var $elm$core$Array$push = F2( var $elm$core$Process$sleep = _Process_sleep; var $author$project$Main$stringFromInputField = function (inputField) { switch (inputField.$) { - case 0: - var inputType = inputField.a.B; + case 'ShortText': + var inputType = inputField.a.inputType; return inputType; - case 1: + case 'LongText': return 'Multi-line description'; - case 2: + case 'Dropdown': return 'Dropdown'; - case 3: + case 'ChooseOne': return 'Radio buttons'; default: return 'Checkboxes'; @@ -7551,7 +7651,7 @@ var $elm$core$Array$setHelp = F4( function (shift, index, value, tree) { var pos = $elm$core$Array$bitMask & (index >>> shift); var _v0 = A2($elm$core$Elm$JsArray$unsafeGet, pos, tree); - if (!_v0.$) { + if (_v0.$ === 'SubTree') { var subTree = _v0.a; var newSub = A4($elm$core$Array$setHelp, shift - $elm$core$Array$shiftStep, index, value, subTree); return A3( @@ -7594,7 +7694,7 @@ var $author$project$Main$swapArrayIndex = F3( var maybeJ = A2($elm$core$Array$get, j, arr); var maybeI = A2($elm$core$Array$get, i, arr); var _v0 = _Utils_Tuple2(maybeI, maybeJ); - if ((!_v0.a.$) && (!_v0.b.$)) { + if ((_v0.a.$ === 'Just') && (_v0.b.$ === 'Just')) { var iVal = _v0.a.a; var jVal = _v0.b.a; return A3( @@ -7627,42 +7727,42 @@ var $elm$core$Array$toIndexedList = function (array) { }; var $author$project$Main$updateDragged = F2( function (maybeDroppable, dragged) { - if (maybeDroppable.$ === 1) { + if (maybeDroppable.$ === 'Nothing') { return dragged; } else { var _v1 = maybeDroppable.a; var targetField = _v1.b; - if (!dragged.$) { + if (dragged.$ === 'DragExisting') { var details = dragged.a; - var _v3 = details.G; - if (!_v3.$) { + var _v3 = details.dropIndex; + if (_v3.$ === 'Just') { var _v4 = _v3.a; var existingField = _v4.b; return _Utils_eq(existingField, targetField) ? dragged : $author$project$Main$DragExisting( _Utils_update( details, - {G: maybeDroppable})); + {dropIndex: maybeDroppable})); } else { return $author$project$Main$DragExisting( _Utils_update( details, - {G: maybeDroppable})); + {dropIndex: maybeDroppable})); } } else { var details = dragged.a; - var _v5 = details.G; - if (!_v5.$) { + var _v5 = details.dropIndex; + if (_v5.$ === 'Just') { var _v6 = _v5.a; var existingField = _v6.b; return _Utils_eq(existingField, targetField) ? dragged : $author$project$Main$DragNew( _Utils_update( details, - {G: maybeDroppable})); + {dropIndex: maybeDroppable})); } else { return $author$project$Main$DragNew( _Utils_update( details, - {G: maybeDroppable})); + {dropIndex: maybeDroppable})); } } } @@ -7697,15 +7797,15 @@ var $elm_community$list_extra$List$Extra$removeAt = F2( var $author$project$Main$toggleAttributeOptional = F2( function (toggle, attributeOptional) { switch (attributeOptional.$) { - case 0: - if (attributeOptional.a.$ === 1) { + case 'AttributeNotNeeded': + if (attributeOptional.a.$ === 'Nothing') { var _v1 = attributeOptional.a; return toggle ? $author$project$Main$AttributeInvalid('') : attributeOptional; } else { var a = attributeOptional.a.a; return toggle ? $author$project$Main$AttributeGiven(a) : attributeOptional; } - case 1: + case 'AttributeInvalid': return toggle ? attributeOptional : $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); default: var a = attributeOptional.a; @@ -7718,16 +7818,16 @@ var $author$project$Main$updateComparison = F2( switch (comparisonType) { case 'Equals': switch (comparison.$) { - case 0: + case 'Equals': var str = comparison.a; return $author$project$Main$Equals(str); - case 1: + case 'StringContains': var str = comparison.a; return $author$project$Main$Equals(str); - case 2: + case 'EndsWith': var str = comparison.a; return $author$project$Main$Equals(str); - case 3: + case 'GreaterThan': var str = comparison.a; return $author$project$Main$Equals(str); default: @@ -7736,16 +7836,16 @@ var $author$project$Main$updateComparison = F2( } case 'StringContains': switch (comparison.$) { - case 0: + case 'Equals': var str = comparison.a; return $author$project$Main$StringContains(str); - case 1: + case 'StringContains': var str = comparison.a; return $author$project$Main$StringContains(str); - case 2: + case 'EndsWith': var str = comparison.a; return $author$project$Main$StringContains(str); - case 3: + case 'GreaterThan': var str = comparison.a; return $author$project$Main$StringContains(str); default: @@ -7754,16 +7854,16 @@ var $author$project$Main$updateComparison = F2( } case 'EndsWith': switch (comparison.$) { - case 0: + case 'Equals': var str = comparison.a; return $author$project$Main$EndsWith(str); - case 1: + case 'StringContains': var str = comparison.a; return $author$project$Main$EndsWith(str); - case 2: + case 'EndsWith': var str = comparison.a; return $author$project$Main$EndsWith(str); - case 3: + case 'GreaterThan': var str = comparison.a; return $author$project$Main$EndsWith(str); default: @@ -7772,16 +7872,16 @@ var $author$project$Main$updateComparison = F2( } case 'GreaterThan': switch (comparison.$) { - case 0: + case 'Equals': var str = comparison.a; return $author$project$Main$GreaterThan(str); - case 1: + case 'StringContains': var str = comparison.a; return $author$project$Main$GreaterThan(str); - case 2: + case 'EndsWith': var str = comparison.a; return $author$project$Main$GreaterThan(str); - case 3: + case 'GreaterThan': var str = comparison.a; return $author$project$Main$GreaterThan(str); default: @@ -7790,16 +7890,16 @@ var $author$project$Main$updateComparison = F2( } case 'EqualsField': switch (comparison.$) { - case 0: + case 'Equals': var str = comparison.a; return $author$project$Main$EqualsField(str); - case 1: + case 'StringContains': var str = comparison.a; return $author$project$Main$EqualsField(str); - case 2: + case 'EndsWith': var str = comparison.a; return $author$project$Main$EqualsField(str); - case 3: + case 'GreaterThan': var str = comparison.a; return $author$project$Main$EqualsField(str); default: @@ -7822,13 +7922,13 @@ var $author$project$Main$updateComparisonInCondition = F2( var $author$project$Main$updateComparisonValue = F2( function (newValue, comparison) { switch (comparison.$) { - case 0: + case 'Equals': return $author$project$Main$Equals(newValue); - case 1: + case 'StringContains': return $author$project$Main$StringContains(newValue); - case 2: + case 'EndsWith': return $author$project$Main$EndsWith(newValue); - case 3: + case 'GreaterThan': return $author$project$Main$GreaterThan(newValue); default: return $author$project$Main$EqualsField(newValue); @@ -7846,7 +7946,7 @@ var $author$project$Main$updateConditions = F3( }); var $author$project$Main$updateConditionsInRule = F2( function (updater, rule) { - if (!rule.$) { + if (rule.$ === 'ShowWhen') { var conditions = rule.a; return $author$project$Main$ShowWhen( updater(conditions)); @@ -7876,7 +7976,7 @@ var $author$project$Main$updateVisibilityRuleAt = F3( rules); }); var $author$project$Main$visibilityRuleCondition = function (rule) { - if (!rule.$) { + if (rule.$ === 'ShowWhen') { var conditions = rule.a; return conditions; } else { @@ -7887,43 +7987,43 @@ var $author$project$Main$visibilityRuleCondition = function (rule) { var $author$project$Main$updateFormField = F5( function (msg, fieldIndex, string, formFields, formField) { switch (msg.$) { - case 0: + case 'OnLabelInput': return _Utils_update( formField, - {d: string}); - case 1: + {label: string}); + case 'OnDescriptionInput': return (string === '') ? _Utils_update( formField, { - S: $author$project$Main$AttributeInvalid('') + description: $author$project$Main$AttributeInvalid('') }) : _Utils_update( formField, { - S: $author$project$Main$AttributeGiven(string) + description: $author$project$Main$AttributeGiven(string) }); - case 2: + case 'OnDescriptionToggle': var bool = msg.a; return _Utils_update( formField, { - S: A2($author$project$Main$toggleAttributeOptional, bool, formField.S) + description: A2($author$project$Main$toggleAttributeOptional, bool, formField.description) }); - case 3: + case 'OnRequiredInput': var bool = msg.a; return bool ? _Utils_update( formField, - {q: 0}) : _Utils_update( + {presence: $author$project$Main$Required}) : _Utils_update( formField, - {q: 1}); - case 16: + {presence: $author$project$Main$Optional}); + case 'OnCheckboxMinRequiredInput': var minStr = msg.a; - var _v1 = formField.a; - if (_v1.$ === 4) { + var _v1 = formField.type_; + if (_v1.$ === 'ChooseMultiple') { var settings = _v1.a; var newMinRequired = $elm$core$String$isEmpty(minStr) ? $elm$core$Maybe$Nothing : $elm$core$String$toInt(minStr); var adjustedMinRequired = function () { - var _v3 = _Utils_Tuple2(newMinRequired, settings.T); - if ((!_v3.a.$) && (!_v3.b.$)) { + var _v3 = _Utils_Tuple2(newMinRequired, settings.maxAllowed); + if ((_v3.a.$ === 'Just') && (_v3.b.$ === 'Just')) { var min = _v3.a.a; var max = _v3.b.a; return (_Utils_cmp(min, max) > 0) ? $elm$core$Maybe$Just(max) : $elm$core$Maybe$Just(min); @@ -7933,12 +8033,12 @@ var $author$project$Main$updateFormField = F5( } }(); var finalMinRequired = function () { - if (!adjustedMinRequired.$) { + if (adjustedMinRequired.$ === 'Just') { var min = adjustedMinRequired.a; return (_Utils_cmp( min, - $elm$core$List$length(settings.k)) > 0) ? $elm$core$Maybe$Just( - $elm$core$List$length(settings.k)) : $elm$core$Maybe$Just(min); + $elm$core$List$length(settings.choices)) > 0) ? $elm$core$Maybe$Just( + $elm$core$List$length(settings.choices)) : $elm$core$Maybe$Just(min); } else { return $elm$core$Maybe$Nothing; } @@ -7946,23 +8046,23 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - a: $author$project$Main$ChooseMultiple( + type_: $author$project$Main$ChooseMultiple( _Utils_update( settings, - {P: finalMinRequired})) + {minRequired: finalMinRequired})) }); } else { return formField; } - case 17: + case 'OnCheckboxMaxAllowedInput': var maxStr = msg.a; - var _v4 = formField.a; - if (_v4.$ === 4) { + var _v4 = formField.type_; + if (_v4.$ === 'ChooseMultiple') { var settings = _v4.a; var newMaxAllowed = $elm$core$String$isEmpty(maxStr) ? $elm$core$Maybe$Nothing : $elm$core$String$toInt(maxStr); var adjustedMaxAllowed = function () { - var _v6 = _Utils_Tuple2(newMaxAllowed, settings.P); - if ((!_v6.a.$) && (!_v6.b.$)) { + var _v6 = _Utils_Tuple2(newMaxAllowed, settings.minRequired); + if ((_v6.a.$ === 'Just') && (_v6.b.$ === 'Just')) { var max = _v6.a.a; var min = _v6.b.a; return (_Utils_cmp(max, min) < 0) ? $elm$core$Maybe$Just(min) : $elm$core$Maybe$Just(max); @@ -7972,12 +8072,12 @@ var $author$project$Main$updateFormField = F5( } }(); var finalMaxAllowed = function () { - if (!adjustedMaxAllowed.$) { + if (adjustedMaxAllowed.$ === 'Just') { var max = adjustedMaxAllowed.a; return (_Utils_cmp( max, - $elm$core$List$length(settings.k)) > 0) ? $elm$core$Maybe$Just( - $elm$core$List$length(settings.k)) : $elm$core$Maybe$Just(max); + $elm$core$List$length(settings.choices)) > 0) ? $elm$core$Maybe$Just( + $elm$core$List$length(settings.choices)) : $elm$core$Maybe$Just(max); } else { return $elm$core$Maybe$Nothing; } @@ -7985,82 +8085,82 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - a: $author$project$Main$ChooseMultiple( + type_: $author$project$Main$ChooseMultiple( _Utils_update( settings, - {T: finalMaxAllowed})) + {maxAllowed: finalMaxAllowed})) }); } else { return formField; } - case 20: + case 'OnDateMinInput': var minStr = msg.a; - var _v7 = formField.a; - if (!_v7.$) { + var _v7 = formField.type_; + if (_v7.$ === 'ShortText') { var customElement = _v7.a; var newCustomElement = _Utils_update( customElement, { - ar: $elm$core$String$isEmpty(minStr) ? $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing) : $author$project$Main$AttributeGiven(minStr) + min: $elm$core$String$isEmpty(minStr) ? $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing) : $author$project$Main$AttributeGiven(minStr) }); return _Utils_update( formField, { - a: $author$project$Main$ShortText(newCustomElement) + type_: $author$project$Main$ShortText(newCustomElement) }); } else { return formField; } - case 21: + case 'OnDateMaxInput': var maxStr = msg.a; - var _v8 = formField.a; - if (!_v8.$) { + var _v8 = formField.type_; + if (_v8.$ === 'ShortText') { var customElement = _v8.a; var newCustomElement = _Utils_update( customElement, { - aq: $elm$core$String$isEmpty(maxStr) ? $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing) : $author$project$Main$AttributeGiven(maxStr) + max: $elm$core$String$isEmpty(maxStr) ? $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing) : $author$project$Main$AttributeGiven(maxStr) }); return _Utils_update( formField, { - a: $author$project$Main$ShortText(newCustomElement) + type_: $author$project$Main$ShortText(newCustomElement) }); } else { return formField; } - case 4: - var _v9 = formField.a; + case 'OnChoicesInput': + var _v9 = formField.type_; switch (_v9.$) { - case 0: + case 'ShortText': return formField; - case 1: + case 'LongText': return formField; - case 2: + case 'Dropdown': var settings = _v9.a; return _Utils_update( formField, { - a: $author$project$Main$Dropdown( + type_: $author$project$Main$Dropdown( _Utils_update( settings, { - k: A2( + choices: A2( $elm$core$List$map, $author$project$Main$choiceFromString, $elm$core$String$lines(string)) })) }); - case 3: + case 'ChooseOne': var settings = _v9.a; return _Utils_update( formField, { - a: $author$project$Main$ChooseOne( + type_: $author$project$Main$ChooseOne( _Utils_update( settings, { - k: A2( + choices: A2( $elm$core$List$map, $author$project$Main$choiceFromString, $elm$core$String$lines(string)) @@ -8074,8 +8174,8 @@ var $author$project$Main$updateFormField = F5( $elm$core$String$lines(string)); var newChoicesCount = $elm$core$List$length(newChoices); var newMaxAllowed = function () { - var _v11 = settings.T; - if (!_v11.$) { + var _v11 = settings.maxAllowed; + if (_v11.$ === 'Just') { var max = _v11.a; return (_Utils_cmp(max, newChoicesCount) > 0) ? ((newChoicesCount > 0) ? $elm$core$Maybe$Just(newChoicesCount) : $elm$core$Maybe$Nothing) : $elm$core$Maybe$Just(max); } else { @@ -8083,8 +8183,8 @@ var $author$project$Main$updateFormField = F5( } }(); var newMinRequired = function () { - var _v10 = settings.P; - if (!_v10.$) { + var _v10 = settings.minRequired; + if (_v10.$ === 'Just') { var min = _v10.a; return (_Utils_cmp(min, newChoicesCount) > 0) ? ((newChoicesCount > 0) ? $elm$core$Maybe$Just(newChoicesCount) : $elm$core$Maybe$Nothing) : $elm$core$Maybe$Just(min); } else { @@ -8094,79 +8194,79 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - a: $author$project$Main$ChooseMultiple( + type_: $author$project$Main$ChooseMultiple( _Utils_update( settings, - {k: newChoices, T: newMaxAllowed, P: newMinRequired})) + {choices: newChoices, maxAllowed: newMaxAllowed, minRequired: newMinRequired})) }); } - case 5: + case 'OnMultipleToggle': var bool = msg.a; - var _v12 = formField.a; + var _v12 = formField.type_; switch (_v12.$) { - case 0: + case 'ShortText': var customElement = _v12.a; var newCustomElement = _Utils_update( customElement, { - aM: $author$project$Main$AttributeGiven(bool) + multiple: $author$project$Main$AttributeGiven(bool) }); return _Utils_update( formField, { - a: $author$project$Main$ShortText(newCustomElement) + type_: $author$project$Main$ShortText(newCustomElement) }); - case 1: + case 'LongText': return formField; - case 2: + case 'Dropdown': return formField; - case 3: + case 'ChooseOne': return formField; default: return formField; } - case 6: + case 'OnMaxLengthToggle': var bool = msg.a; - var _v13 = formField.a; + var _v13 = formField.type_; switch (_v13.$) { - case 0: + case 'ShortText': var customElement = _v13.a; var newCustomElement = _Utils_update( customElement, { - ah: A2($author$project$Main$toggleAttributeOptional, bool, customElement.ah) + maxlength: A2($author$project$Main$toggleAttributeOptional, bool, customElement.maxlength) }); return _Utils_update( formField, { - a: $author$project$Main$ShortText(newCustomElement) + type_: $author$project$Main$ShortText(newCustomElement) }); - case 1: + case 'LongText': var maxlength = _v13.a; return _Utils_update( formField, { - a: $author$project$Main$LongText( + type_: $author$project$Main$LongText( A2($author$project$Main$toggleAttributeOptional, bool, maxlength)) }); - case 2: + case 'Dropdown': return formField; - case 3: + case 'ChooseOne': return formField; default: return formField; } - case 7: - var _v14 = formField.a; + case 'OnMaxLengthInput': + var _v14 = formField.type_; switch (_v14.$) { - case 0: + case 'ShortText': var customElement = _v14.a; var newCustomElement = _Utils_update( customElement, { - ah: function () { + maxlength: function () { var _v15 = $elm$core$String$toInt(string); - if (!_v15.$) { + if (_v15.$ === 'Just') { var i = _v15.a; return $author$project$Main$AttributeGiven(i); } else { @@ -8177,12 +8277,12 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - a: $author$project$Main$ShortText(newCustomElement) + type_: $author$project$Main$ShortText(newCustomElement) }); - case 1: + case 'LongText': var newMaxlength = function () { var _v16 = $elm$core$String$toInt(string); - if (!_v16.$) { + if (_v16.$ === 'Just') { var i = _v16.a; return $author$project$Main$AttributeGiven(i); } else { @@ -8192,85 +8292,85 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - a: $author$project$Main$LongText(newMaxlength) + type_: $author$project$Main$LongText(newMaxlength) }); - case 2: + case 'Dropdown': return formField; - case 3: + case 'ChooseOne': return formField; default: return formField; } - case 18: + case 'OnDateMinToggle': var bool = msg.a; - var _v17 = formField.a; - if (!_v17.$) { + var _v17 = formField.type_; + if (_v17.$ === 'ShortText') { var customElement = _v17.a; var newCustomElement = _Utils_update( customElement, { - ar: A2($author$project$Main$toggleAttributeOptional, bool, customElement.ar) + min: A2($author$project$Main$toggleAttributeOptional, bool, customElement.min) }); return _Utils_update( formField, { - a: $author$project$Main$ShortText(newCustomElement) + type_: $author$project$Main$ShortText(newCustomElement) }); } else { return formField; } - case 19: + case 'OnDateMaxToggle': var bool = msg.a; - var _v18 = formField.a; - if (!_v18.$) { + var _v18 = formField.type_; + if (_v18.$ === 'ShortText') { var customElement = _v18.a; var newCustomElement = _Utils_update( customElement, { - aq: A2($author$project$Main$toggleAttributeOptional, bool, customElement.aq) + max: A2($author$project$Main$toggleAttributeOptional, bool, customElement.max) }); return _Utils_update( formField, { - a: $author$project$Main$ShortText(newCustomElement) + type_: $author$project$Main$ShortText(newCustomElement) }); } else { return formField; } - case 8: + case 'OnDatalistToggle': var bool = msg.a; - var _v19 = formField.a; + var _v19 = formField.type_; switch (_v19.$) { - case 0: + case 'ShortText': var customElement = _v19.a; var newCustomElement = _Utils_update( customElement, { - ae: A2($author$project$Main$toggleAttributeOptional, bool, customElement.ae) + datalist: A2($author$project$Main$toggleAttributeOptional, bool, customElement.datalist) }); return _Utils_update( formField, { - a: $author$project$Main$ShortText(newCustomElement) + type_: $author$project$Main$ShortText(newCustomElement) }); - case 1: + case 'LongText': return formField; - case 2: + case 'Dropdown': return formField; - case 3: + case 'ChooseOne': return formField; default: return formField; } - case 9: - var _v20 = formField.a; + case 'OnDatalistInput': + var _v20 = formField.type_; switch (_v20.$) { - case 0: + case 'ShortText': var customElement = _v20.a; var newCustomElement = _Utils_update( customElement, { - ae: function () { + datalist: function () { var _v21 = A2($elm$core$String$split, '\n', string); if (!_v21.b) { return $author$project$Main$AttributeInvalid(string); @@ -8284,24 +8384,24 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - a: $author$project$Main$ShortText(newCustomElement) + type_: $author$project$Main$ShortText(newCustomElement) }); - case 1: + case 'LongText': return formField; - case 2: + case 'Dropdown': return formField; - case 3: + case 'ChooseOne': return formField; default: return formField; } - case 10: + case 'OnVisibilityRuleTypeInput': if (msg.b === '\n') { var ruleIndex = msg.a; return _Utils_update( formField, { - m: A2($elm_community$list_extra$List$Extra$removeAt, ruleIndex, formField.m) + visibilityRule: A2($elm_community$list_extra$List$Extra$removeAt, ruleIndex, formField.visibilityRule) }); } else { var ruleIndex = msg.a; @@ -8309,7 +8409,7 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - m: A3( + visibilityRule: A3( $author$project$Main$updateVisibilityRuleAt, ruleIndex, function (rule) { @@ -8324,17 +8424,17 @@ var $author$project$Main$updateFormField = F5( return rule; } }, - formField.m) + formField.visibilityRule) }); } - case 11: + case 'OnVisibilityConditionTypeInput': var ruleIndex = msg.a; var conditionIndex = msg.b; var str = msg.c; return _Utils_update( formField, { - m: A3( + visibilityRule: A3( $author$project$Main$updateVisibilityRuleAt, ruleIndex, $author$project$Main$updateConditionsInRule( @@ -8343,21 +8443,21 @@ var $author$project$Main$updateFormField = F5( conditionIndex, $author$project$Main$updateComparisonInCondition( $author$project$Main$updateComparison(str)))), - formField.m) + formField.visibilityRule) }); - case 12: + case 'OnVisibilityConditionFieldInput': if (msg.c === '\n') { var ruleIndex = msg.a; var conditionIndex = msg.b; return _Utils_update( formField, { - m: A3( + visibilityRule: A3( $author$project$Main$updateVisibilityRuleAt, ruleIndex, $author$project$Main$updateConditionsInRule( $elm_community$list_extra$List$Extra$removeAt(conditionIndex)), - formField.m) + formField.visibilityRule) }); } else { var ruleIndex = msg.a; @@ -8366,7 +8466,7 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - m: A3( + visibilityRule: A3( $author$project$Main$updateVisibilityRuleAt, ruleIndex, $author$project$Main$updateConditionsInRule( @@ -8375,17 +8475,17 @@ var $author$project$Main$updateFormField = F5( conditionIndex, $author$project$Main$updateFieldnameInCondition( $elm$core$Basics$always(newFieldName)))), - formField.m) + formField.visibilityRule) }); } - case 13: + case 'OnVisibilityConditionValueInput': var ruleIndex = msg.a; var conditionIndex = msg.b; var newValue = msg.c; return _Utils_update( formField, { - m: A3( + visibilityRule: A3( $author$project$Main$updateVisibilityRuleAt, ruleIndex, $author$project$Main$updateConditionsInRule( @@ -8394,14 +8494,14 @@ var $author$project$Main$updateFormField = F5( conditionIndex, $author$project$Main$updateComparisonInCondition( $author$project$Main$updateComparisonValue(newValue)))), - formField.m) + formField.visibilityRule) }); - case 14: + case 'OnAddVisibilityRule': return _Utils_update( formField, { - m: _Utils_ap( - formField.m, + visibilityRule: _Utils_ap( + formField.visibilityRule, _List_fromArray( [ $author$project$Main$ShowWhen( @@ -8414,7 +8514,7 @@ var $author$project$Main$updateFormField = F5( ])) ])) }); - case 15: + case 'OnVisibilityConditionDuplicate': var ruleIndex = msg.a; var newCondition = function (conditions) { var _v24 = $elm$core$List$reverse(conditions); @@ -8434,11 +8534,11 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - m: A3( + visibilityRule: A3( $author$project$Main$updateVisibilityRuleAt, ruleIndex, function (rule) { - if (!rule.$) { + if (rule.$ === 'ShowWhen') { var conditions = rule.a; return $author$project$Main$ShowWhen( _Utils_ap( @@ -8458,56 +8558,56 @@ var $author$project$Main$updateFormField = F5( ]))); } }, - formField.m) + formField.visibilityRule) }); - case 22: + case 'OnFilterToggle': var checked = msg.a; - var _v25 = formField.a; + var _v25 = formField.type_; switch (_v25.$) { - case 2: + case 'Dropdown': var settings = _v25.a; var newFilter = checked ? $elm$core$Maybe$Just( $author$project$Main$FilterStartsWithFieldValueOf('')) : $elm$core$Maybe$Nothing; return _Utils_update( formField, { - a: $author$project$Main$Dropdown( + type_: $author$project$Main$Dropdown( _Utils_update( settings, - {e: newFilter})) + {filter: newFilter})) }); - case 3: + case 'ChooseOne': var settings = _v25.a; var newFilter = checked ? $elm$core$Maybe$Just( $author$project$Main$FilterStartsWithFieldValueOf('')) : $elm$core$Maybe$Nothing; return _Utils_update( formField, { - a: $author$project$Main$ChooseOne( + type_: $author$project$Main$ChooseOne( _Utils_update( settings, - {e: newFilter})) + {filter: newFilter})) }); - case 4: + case 'ChooseMultiple': var settings = _v25.a; var newFilter = checked ? $elm$core$Maybe$Just( $author$project$Main$FilterStartsWithFieldValueOf('')) : $elm$core$Maybe$Nothing; return _Utils_update( formField, { - a: $author$project$Main$ChooseMultiple( + type_: $author$project$Main$ChooseMultiple( _Utils_update( settings, - {e: newFilter})) + {filter: newFilter})) }); default: return formField; } - case 23: + case 'OnFilterTypeSelect': var filterType = msg.a; var updateFilter = function (existingFilter) { - if (!existingFilter.$) { - if (!existingFilter.a.$) { + if (existingFilter.$ === 'Just') { + if (existingFilter.a.$ === 'FilterStartsWithFieldValueOf') { var fieldName = existingFilter.a.a; return (filterType === 'contains') ? $elm$core$Maybe$Just( $author$project$Main$FilterContainsFieldValueOf(fieldName)) : existingFilter; @@ -8522,42 +8622,42 @@ var $author$project$Main$updateFormField = F5( $author$project$Main$FilterContainsFieldValueOf('')) : $elm$core$Maybe$Nothing); } }; - var _v26 = formField.a; + var _v26 = formField.type_; switch (_v26.$) { - case 2: + case 'Dropdown': var settings = _v26.a; return _Utils_update( formField, { - a: $author$project$Main$Dropdown( + type_: $author$project$Main$Dropdown( _Utils_update( settings, { - e: updateFilter(settings.e) + filter: updateFilter(settings.filter) })) }); - case 3: + case 'ChooseOne': var settings = _v26.a; return _Utils_update( formField, { - a: $author$project$Main$ChooseOne( + type_: $author$project$Main$ChooseOne( _Utils_update( settings, { - e: updateFilter(settings.e) + filter: updateFilter(settings.filter) })) }); - case 4: + case 'ChooseMultiple': var settings = _v26.a; return _Utils_update( formField, { - a: $author$project$Main$ChooseMultiple( + type_: $author$project$Main$ChooseMultiple( _Utils_update( settings, { - e: updateFilter(settings.e) + filter: updateFilter(settings.filter) })) }); default: @@ -8566,8 +8666,8 @@ var $author$project$Main$updateFormField = F5( default: var fieldName = msg.a; var updateSourceField = function (existingFilter) { - if (!existingFilter.$) { - if (!existingFilter.a.$) { + if (existingFilter.$ === 'Just') { + if (existingFilter.a.$ === 'FilterStartsWithFieldValueOf') { return $elm$core$Maybe$Just( $author$project$Main$FilterStartsWithFieldValueOf(fieldName)); } else { @@ -8579,42 +8679,42 @@ var $author$project$Main$updateFormField = F5( $author$project$Main$FilterStartsWithFieldValueOf(fieldName)); } }; - var _v28 = formField.a; + var _v28 = formField.type_; switch (_v28.$) { - case 2: + case 'Dropdown': var settings = _v28.a; return _Utils_update( formField, { - a: $author$project$Main$Dropdown( + type_: $author$project$Main$Dropdown( _Utils_update( settings, { - e: updateSourceField(settings.e) + filter: updateSourceField(settings.filter) })) }); - case 3: + case 'ChooseOne': var settings = _v28.a; return _Utils_update( formField, { - a: $author$project$Main$ChooseOne( + type_: $author$project$Main$ChooseOne( _Utils_update( settings, { - e: updateSourceField(settings.e) + filter: updateSourceField(settings.filter) })) }); - case 4: + case 'ChooseMultiple': var settings = _v28.a; return _Utils_update( formField, { - a: $author$project$Main$ChooseMultiple( + type_: $author$project$Main$ChooseMultiple( _Utils_update( settings, { - e: updateSourceField(settings.e) + filter: updateSourceField(settings.filter) })) }); default: @@ -8624,43 +8724,43 @@ var $author$project$Main$updateFormField = F5( }); var $author$project$Main$when = F2( function (bool, condition) { - return bool ? condition.a1 : condition.aV; + return bool ? condition._true : condition._false; }); var $author$project$Main$update = F2( function (msg, model) { update: while (true) { switch (msg.$) { - case 0: + case 'NoOp': return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none); - case 1: + case 'OnPortIncoming': var value = msg.a; var _v1 = A2($elm$json$Json$Decode$decodeValue, $author$project$Main$decodePortIncomingValue, value); - if (!_v1.$) { + if (_v1.$ === 'Ok') { var _v2 = _v1.a; return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none); } else { return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none); } - case 2: + case 'AddFormField': var fieldType = msg.a; var newFormField = { - S: $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing), - d: $author$project$Main$stringFromInputField(fieldType) + (' question ' + $elm$core$String$fromInt(model.aa)), - Q: $elm$core$Maybe$Nothing, - q: A2( + description: $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing), + label: $author$project$Main$stringFromInputField(fieldType) + (' question ' + $elm$core$String$fromInt(model.nextQuestionNumber)), + name: $elm$core$Maybe$Nothing, + presence: A2( $author$project$Main$when, $author$project$Main$mustBeOptional(fieldType), - {aV: 0, a1: 1}), - a: fieldType, - m: _List_Nil + {_false: $author$project$Main$Required, _true: $author$project$Main$Optional}), + type_: fieldType, + visibilityRule: _List_Nil }; - var newFormFields = A2($elm$core$Array$push, newFormField, model.g); + var newFormFields = A2($elm$core$Array$push, newFormField, model.formFields); var newIndex = $elm$core$Array$length(newFormFields) - 1; return _Utils_Tuple2( _Utils_update( model, - {g: newFormFields, aa: model.aa + 1}), + {formFields: newFormFields, nextQuestionNumber: model.nextQuestionNumber + 1}), $elm$core$Platform$Cmd$batch( _List_fromArray( [ @@ -8678,11 +8778,11 @@ var $author$project$Main$update = F2( [ $author$project$Main$SetEditorAnimate( $elm$core$Maybe$Just( - _Utils_Tuple2(newIndex, 0))), + _Utils_Tuple2(newIndex, $author$project$Main$AnimateYellowFade))), $author$project$Main$SetEditorAnimate($elm$core$Maybe$Nothing) ])))) ]))); - case 3: + case 'DeleteFormField': var fieldIndex = msg.a; var newFormFields = $elm$core$Array$fromList( A2( @@ -8694,41 +8794,41 @@ var $author$project$Main$update = F2( var i = _v3.a; return !_Utils_eq(i, fieldIndex); }, - $elm$core$Array$toIndexedList(model.g)))); + $elm$core$Array$toIndexedList(model.formFields)))); return _Utils_Tuple2( _Utils_update( model, - {g: newFormFields, F: $elm$core$Maybe$Nothing}), + {formFields: newFormFields, selectedFieldIndex: $elm$core$Maybe$Nothing}), $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( $author$project$Main$PortOutgoingFormFields(newFormFields)))); - case 4: + case 'MoveFormFieldUp': var fieldIndex = msg.a; - var newFormFields = A3($author$project$Main$swapArrayIndex, fieldIndex, fieldIndex - 1, model.g); + var newFormFields = A3($author$project$Main$swapArrayIndex, fieldIndex, fieldIndex - 1, model.formFields); return _Utils_Tuple2( _Utils_update( model, { - g: newFormFields, - F: $elm$core$Maybe$Just(fieldIndex - 1) + formFields: newFormFields, + selectedFieldIndex: $elm$core$Maybe$Just(fieldIndex - 1) }), $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( $author$project$Main$PortOutgoingFormFields(newFormFields)))); - case 5: + case 'MoveFormFieldDown': var fieldIndex = msg.a; - var newFormFields = A3($author$project$Main$swapArrayIndex, fieldIndex, fieldIndex + 1, model.g); + var newFormFields = A3($author$project$Main$swapArrayIndex, fieldIndex, fieldIndex + 1, model.formFields); return _Utils_Tuple2( _Utils_update( model, { - g: newFormFields, - F: $elm$core$Maybe$Just(fieldIndex + 1) + formFields: newFormFields, + selectedFieldIndex: $elm$core$Maybe$Just(fieldIndex + 1) }), $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( $author$project$Main$PortOutgoingFormFields(newFormFields)))); - case 6: + case 'OnFormField': var fmsg = msg.a; var fieldIndex = msg.b; var string = msg.c; @@ -8736,41 +8836,41 @@ var $author$project$Main$update = F2( $elm$core$Array$indexedMap, F2( function (i, formField) { - return _Utils_eq(i, fieldIndex) ? A5($author$project$Main$updateFormField, fmsg, fieldIndex, string, model.g, formField) : formField; + return _Utils_eq(i, fieldIndex) ? A5($author$project$Main$updateFormField, fmsg, fieldIndex, string, model.formFields, formField) : formField; }), - model.g); + model.formFields); return _Utils_Tuple2( _Utils_update( model, - {g: newFormFields}), + {formFields: newFormFields}), $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( $author$project$Main$PortOutgoingFormFields(newFormFields)))); - case 7: + case 'SetEditorAnimate': var maybeAnimate = msg.a; return _Utils_Tuple2( _Utils_update( model, { - ac: $author$project$Main$Editor( - {aB: maybeAnimate}) + viewMode: $author$project$Main$Editor( + {maybeAnimate: maybeAnimate}) }), $elm$core$Platform$Cmd$none); - case 8: + case 'SelectField': var fieldIndex = msg.a; - var _v4 = _Utils_Tuple2(model.F, fieldIndex); - if ((!_v4.a.$) && (_v4.b.$ === 1)) { + var _v4 = _Utils_Tuple2(model.selectedFieldIndex, fieldIndex); + if ((_v4.a.$ === 'Just') && (_v4.b.$ === 'Nothing')) { var prevIndex = _v4.a.a; var _v5 = _v4.b; return _Utils_Tuple2( _Utils_update( model, { - F: $elm$core$Maybe$Nothing, - ac: $author$project$Main$Editor( + selectedFieldIndex: $elm$core$Maybe$Nothing, + viewMode: $author$project$Main$Editor( { - aB: $elm$core$Maybe$Just( - _Utils_Tuple2(prevIndex, 0)) + maybeAnimate: $elm$core$Maybe$Just( + _Utils_Tuple2(prevIndex, $author$project$Main$AnimateYellowFade)) }) }), $elm$core$Platform$Cmd$none); @@ -8778,41 +8878,41 @@ var $author$project$Main$update = F2( return _Utils_Tuple2( _Utils_update( model, - {F: fieldIndex}), + {selectedFieldIndex: fieldIndex}), $elm$core$Platform$Cmd$none); } - case 9: + case 'DragStart': var fieldIndex = msg.a; return _Utils_Tuple2( _Utils_update( model, { - r: $elm$core$Maybe$Just( + dragged: $elm$core$Maybe$Just( $author$project$Main$DragExisting( - {a6: fieldIndex, G: $elm$core$Maybe$Nothing})), - F: $elm$core$Maybe$Nothing + {dragIndex: fieldIndex, dropIndex: $elm$core$Maybe$Nothing})), + selectedFieldIndex: $elm$core$Maybe$Nothing }), $elm$core$Platform$Cmd$none); - case 10: + case 'DragStartNew': var fieldIndex = msg.a; return _Utils_Tuple2( _Utils_update( model, { - r: $elm$core$Maybe$Just( + dragged: $elm$core$Maybe$Just( $author$project$Main$DragNew( { - G: $elm$core$Maybe$Just( + dropIndex: $elm$core$Maybe$Just( _Utils_Tuple2(0, $elm$core$Maybe$Nothing)), - bU: fieldIndex + field: fieldIndex })) }), $elm$core$Platform$Cmd$none); - case 11: - var _v6 = model.r; - if (!_v6.$) { - if (!_v6.a.$) { - var dropIndex = _v6.a.a.G; + case 'DragEnd': + var _v6 = model.dragged; + if (_v6.$ === 'Just') { + if (_v6.a.$ === 'DragExisting') { + var dropIndex = _v6.a.a.dropIndex; var $temp$msg = $author$project$Main$Drop( A2($elm$core$Maybe$map, $elm$core$Tuple$first, dropIndex)), $temp$model = model; @@ -8820,7 +8920,7 @@ var $author$project$Main$update = F2( model = $temp$model; continue update; } else { - var dropIndex = _v6.a.a.G; + var dropIndex = _v6.a.a.dropIndex; var $temp$msg = $author$project$Main$Drop( A2($elm$core$Maybe$map, $elm$core$Tuple$first, dropIndex)), $temp$model = model; @@ -8832,30 +8932,30 @@ var $author$project$Main$update = F2( return _Utils_Tuple2( _Utils_update( model, - {r: $elm$core$Maybe$Nothing}), + {dragged: $elm$core$Maybe$Nothing}), $elm$core$Platform$Cmd$none); } - case 12: + case 'DragOver': var maybeDroppable = msg.a; return _Utils_Tuple2( _Utils_update( model, { - r: A2( + dragged: A2( $elm$core$Maybe$map, $author$project$Main$updateDragged(maybeDroppable), - model.r) + model.dragged) }), $elm$core$Platform$Cmd$none); - case 13: + case 'Drop': var targetFieldIndex = msg.a; var newModel = A2($author$project$Main$onDropped, targetFieldIndex, model); return _Utils_Tuple2( newModel, - (!_Utils_eq(newModel.g, model.g)) ? $author$project$Main$outgoing( + (!_Utils_eq(newModel.formFields, model.formFields)) ? $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( - $author$project$Main$PortOutgoingFormFields(newModel.g))) : $elm$core$Platform$Cmd$none); - case 14: + $author$project$Main$PortOutgoingFormFields(newModel.formFields))) : $elm$core$Platform$Cmd$none); + case 'DoSleepDo': if (!msg.b.b) { return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none); } else { @@ -8879,6 +8979,13 @@ var $author$project$Main$update = F2( $elm$core$Process$sleep(duration)) ]))); } + case 'SelectFieldGroup': + var index = msg.a; + return _Utils_Tuple2( + _Utils_update( + model, + {activeFieldGroupIndex: index}), + $elm$core$Platform$Cmd$none); default: var fieldName = msg.a; var value = msg.b; @@ -8890,16 +8997,16 @@ var $author$project$Main$update = F2( $author$project$Main$fieldNameOf(f), fieldName); }, - $elm$core$Array$toList(model.g))); + $elm$core$Array$toList(model.formFields))); var currentValues = A2( $elm$core$Maybe$withDefault, _List_Nil, - A2($elm$core$Dict$get, fieldName, model.v)); + A2($elm$core$Dict$get, fieldName, model.trackedFormValues)); var newValues = function () { - if (!formField.$) { + if (formField.$ === 'Just') { var field = formField.a; - var _v11 = field.a; - if (_v11.$ === 4) { + var _v11 = field.type_; + if (_v11.$ === 'ChooseMultiple') { return A2($elm$core$List$member, value, currentValues) ? A2( $elm$core$List$filter, $elm$core$Basics$neq(value), @@ -8913,7 +9020,7 @@ var $author$project$Main$update = F2( [value]); } }(); - var newTrackedFormValues = A3($elm$core$Dict$insert, fieldName, newValues, model.v); + var newTrackedFormValues = A3($elm$core$Dict$insert, fieldName, newValues, model.trackedFormValues); var formValues = A3( $elm$json$Json$Encode$dict, $elm$core$Basics$identity, @@ -8932,7 +9039,7 @@ var $author$project$Main$update = F2( return _Utils_Tuple2( _Utils_update( model, - {v: newTrackedFormValues}), + {trackedFormValues: newTrackedFormValues}), $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( $author$project$Main$PortOutgoingFormValues(formValues)))); @@ -8955,7 +9062,7 @@ var $elm$html$Html$text = $elm$virtual_dom$VirtualDom$text; var $elm$html$Html$input = _VirtualDom_node('input'); var $elm$html$Html$Attributes$name = $elm$html$Html$Attributes$stringProperty('name'); var $author$project$Main$stringFromViewMode = function (viewMode) { - if (!viewMode.$) { + if (viewMode.$ === 'Editor') { return 'Editor'; } else { return 'CollectData'; @@ -8963,45 +9070,11 @@ var $author$project$Main$stringFromViewMode = function (viewMode) { }; var $elm$html$Html$Attributes$type_ = $elm$html$Html$Attributes$stringProperty('type'); var $elm$html$Html$Attributes$value = $elm$html$Html$Attributes$stringProperty('value'); -var $author$project$Main$DragEnd = {$: 11}; -var $author$project$Main$NoOp = {$: 0}; +var $author$project$Main$DragEnd = {$: 'DragEnd'}; +var $author$project$Main$NoOp = {$: 'NoOp'}; var $author$project$Main$SelectField = function (a) { - return {$: 8, a: a}; + return {$: 'SelectField', a: a}; }; -var $author$project$Main$allInputField = _List_fromArray( - [ - $author$project$Main$Dropdown( - { - k: A2( - $elm$core$List$map, - $author$project$Main$choiceFromString, - _List_fromArray( - ['Red', 'Orange', 'Yellow', 'Green', 'Blue', 'Indigo', 'Violet'])), - e: $elm$core$Maybe$Nothing - }), - $author$project$Main$ChooseOne( - { - k: A2( - $elm$core$List$map, - $author$project$Main$choiceFromString, - _List_fromArray( - ['Yes', 'No'])), - e: $elm$core$Maybe$Nothing - }), - $author$project$Main$ChooseMultiple( - { - k: A2( - $elm$core$List$map, - $author$project$Main$choiceFromString, - _List_fromArray( - ['Apple', 'Banana', 'Cantaloupe', 'Durian'])), - e: $elm$core$Maybe$Nothing, - T: $elm$core$Maybe$Nothing, - P: $elm$core$Maybe$Nothing - }), - $author$project$Main$LongText( - $author$project$Main$AttributeGiven(160)) - ]); var $elm$html$Html$Attributes$classList = function (classes) { return $elm$html$Html$Attributes$class( A2( @@ -9012,33 +9085,15 @@ var $elm$html$Html$Attributes$classList = function (classes) { $elm$core$Tuple$first, A2($elm$core$List$filter, $elm$core$Tuple$second, classes)))); }; -var $elm$core$List$maybeCons = F3( - function (f, mx, xs) { - var _v0 = f(mx); - if (!_v0.$) { - var x = _v0.a; - return A2($elm$core$List$cons, x, xs); - } else { - return xs; - } - }); -var $elm$core$List$filterMap = F2( - function (f, xs) { - return A3( - $elm$core$List$foldr, - $elm$core$List$maybeCons(f), - _List_Nil, - xs); - }); var $author$project$Main$fieldsWithPlaceholder = F2( function (fields, dragged) { - if (dragged.$ === 1) { + if (dragged.$ === 'Nothing') { return A2($elm$core$List$map, $elm$core$Maybe$Just, fields); } else { - if (!dragged.a.$) { - var dragIndex = dragged.a.a.a6; - var dropIndex = dragged.a.a.G; - if (dropIndex.$ === 1) { + if (dragged.a.$ === 'DragExisting') { + var dragIndex = dragged.a.a.dragIndex; + var dropIndex = dragged.a.a.dropIndex; + if (dropIndex.$ === 'Nothing') { return A2($elm$core$List$map, $elm$core$Maybe$Just, fields); } else { var _v2 = dropIndex.a; @@ -9069,8 +9124,8 @@ var $author$project$Main$fieldsWithPlaceholder = F2( ])); } } else { - var dropIndex = dragged.a.a.G; - if (dropIndex.$ === 1) { + var dropIndex = dragged.a.a.dropIndex; + if (dropIndex.$ === 'Nothing') { return A2($elm$core$List$map, $elm$core$Maybe$Just, fields); } else { var _v4 = dropIndex.a; @@ -9090,7 +9145,7 @@ var $author$project$Main$fieldsWithPlaceholder = F2( }); var $elm$html$Html$h2 = _VirtualDom_node('h2'); var $elm$virtual_dom$VirtualDom$Normal = function (a) { - return {$: 0, a: a}; + return {$: 'Normal', a: a}; }; var $elm$virtual_dom$VirtualDom$on = _VirtualDom_on; var $elm$html$Html$Events$on = F2( @@ -9107,7 +9162,7 @@ var $elm$html$Html$Events$onClick = function (msg) { $elm$json$Json$Decode$succeed(msg)); }; var $elm$virtual_dom$VirtualDom$MayPreventDefault = function (a) { - return {$: 2, a: a}; + return {$: 'MayPreventDefault', a: a}; }; var $elm$html$Html$Events$preventDefaultOn = F2( function (event, decoder) { @@ -9117,7 +9172,7 @@ var $elm$html$Html$Events$preventDefaultOn = F2( $elm$virtual_dom$VirtualDom$MayPreventDefault(decoder)); }); var $author$project$Main$DragStart = function (a) { - return {$: 9, a: a}; + return {$: 'DragStart', a: a}; }; var $elm$virtual_dom$VirtualDom$attribute = F2( function (key, value) { @@ -9180,7 +9235,7 @@ var $author$project$Main$dragHandleIcon = A2( _List_Nil) ])); var $author$project$Main$DragOver = function (a) { - return {$: 12, a: a}; + return {$: 'DragOver', a: a}; }; var $author$project$Main$dragOverDecoder = F2( function (index, maybeFormField) { @@ -9196,7 +9251,7 @@ var $author$project$Main$isConditionReferencingField = F2( var conditionFieldName = condition.a; var comparison = condition.b; return _Utils_eq(conditionFieldName, fieldName) || function () { - if (comparison.$ === 4) { + if (comparison.$ === 'EqualsField') { var targetFieldName = comparison.a; return _Utils_eq(targetFieldName, fieldName); } else { @@ -9206,8 +9261,8 @@ var $author$project$Main$isConditionReferencingField = F2( }); var $author$project$Main$isFieldUsedInChoiceFilter = F2( function (fieldName, maybeFilter) { - if (!maybeFilter.$) { - if (!maybeFilter.a.$) { + if (maybeFilter.$ === 'Just') { + if (maybeFilter.a.$ === 'FilterStartsWithFieldValueOf') { var sourceField = maybeFilter.a.a; return _Utils_eq(sourceField, fieldName); } else { @@ -9221,14 +9276,14 @@ var $author$project$Main$isFieldUsedInChoiceFilter = F2( var $author$project$Main$isFieldUsedInFilter = F2( function (fieldName, inputField) { switch (inputField.$) { - case 2: - var filter = inputField.a.e; + case 'Dropdown': + var filter = inputField.a.filter; return A2($author$project$Main$isFieldUsedInChoiceFilter, fieldName, filter); - case 3: - var filter = inputField.a.e; + case 'ChooseOne': + var filter = inputField.a.filter; return A2($author$project$Main$isFieldUsedInChoiceFilter, fieldName, filter); - case 4: - var filter = inputField.a.e; + case 'ChooseMultiple': + var filter = inputField.a.filter; return A2($author$project$Main$isFieldUsedInChoiceFilter, fieldName, filter); default: return false; @@ -9240,7 +9295,7 @@ var $author$project$Main$isFieldReferencedBy = F2( var isUsedInChoiceFilters = A2( $elm$core$List$any, function (field) { - return A2($author$project$Main$isFieldUsedInFilter, fieldName, field.a); + return A2($author$project$Main$isFieldUsedInFilter, fieldName, field.type_); }, fieldList); var isUsedInVisibilityRules = A2( @@ -9249,7 +9304,7 @@ var $author$project$Main$isFieldReferencedBy = F2( return A2( $elm$core$List$any, function (rule) { - if (!rule.$) { + if (rule.$ === 'ShowWhen') { var conditions = rule.a; return A2( $elm$core$List$any, @@ -9263,13 +9318,13 @@ var $author$project$Main$isFieldReferencedBy = F2( conditions); } }, - field.m); + field.visibilityRule); }, fieldList); - return {a3: isUsedInChoiceFilters, a4: isUsedInVisibilityRules}; + return {usedInChoiceFilters: isUsedInChoiceFilters, usedInVisibilityRules: isUsedInVisibilityRules}; }); var $elm$virtual_dom$VirtualDom$MayStopPropagation = function (a) { - return {$: 1, a: a}; + return {$: 'MayStopPropagation', a: a}; }; var $elm$html$Html$Events$stopPropagationOn = F2( function (event, decoder) { @@ -9282,43 +9337,43 @@ var $elm$html$Html$Attributes$title = $elm$html$Html$Attributes$stringProperty(' var $elm$html$Html$Attributes$for = $elm$html$Html$Attributes$stringProperty('htmlFor'); var $elm$html$Html$label = _VirtualDom_node('label'); var $author$project$Main$maybeMaxLengthOf = function (formField) { - var _v0 = formField.a; + var _v0 = formField.type_; switch (_v0.$) { - case 0: - var maxlength = _v0.a.ah; + case 'ShortText': + var maxlength = _v0.a.maxlength; switch (maxlength.$) { - case 2: + case 'AttributeGiven': var i = maxlength.a; return $elm$core$Maybe$Just(i); - case 1: + case 'AttributeInvalid': return $elm$core$Maybe$Nothing; default: return $elm$core$Maybe$Nothing; } - case 1: + case 'LongText': var maxlength = _v0.a; switch (maxlength.$) { - case 2: + case 'AttributeGiven': var i = maxlength.a; return $elm$core$Maybe$Just(i); - case 1: + case 'AttributeInvalid': return $elm$core$Maybe$Nothing; default: return $elm$core$Maybe$Nothing; } - case 2: + case 'Dropdown': return $elm$core$Maybe$Nothing; - case 3: + case 'ChooseOne': return $elm$core$Maybe$Nothing; default: return $elm$core$Maybe$Nothing; } }; var $author$project$Main$requiredData = function (presence) { - switch (presence) { - case 0: + switch (presence.$) { + case 'Required': return true; - case 1: + case 'Optional': return false; default: return true; @@ -9357,14 +9412,14 @@ var $author$project$Main$attributesFromTuple = function (_v0) { A2($elm$html$Html$Attributes$attribute, k, v)); }; var $author$project$Main$isOptionalTemporalInput = function (formField) { - var _v0 = _Utils_Tuple2(formField.q, formField.a); - if ((_v0.a === 1) && (!_v0.b.$)) { + var _v0 = _Utils_Tuple2(formField.presence, formField.type_); + if ((_v0.a.$ === 'Optional') && (_v0.b.$ === 'ShortText')) { var _v1 = _v0.a; var customElement = _v0.b.a; var inputType = A2( $elm$core$Maybe$withDefault, '', - A2($elm$core$Dict$get, 'type', customElement.p)); + A2($elm$core$Dict$get, 'type', customElement.attributes)); return A2( $elm$core$List$member, inputType, @@ -9402,14 +9457,14 @@ var $author$project$Main$defaultValue = function (str) { var $elm$core$String$toLower = _String_toLower; var $author$project$Main$filterChoices = F3( function (maybeFilter, formValues, choices) { - if (!maybeFilter.$) { - if (!maybeFilter.a.$) { + if (maybeFilter.$ === 'Just') { + if (maybeFilter.a.$ === 'FilterStartsWithFieldValueOf') { var fieldName = maybeFilter.a.a; var _v1 = A2( $elm$core$Maybe$andThen, $elm$core$List$head, A2($elm$core$Dict$get, fieldName, formValues)); - if (!_v1.$) { + if (_v1.$ === 'Just') { var filterValue = _v1.a; return $elm$core$String$isEmpty(filterValue) ? _List_Nil : A2( $elm$core$List$filter, @@ -9417,10 +9472,10 @@ var $author$project$Main$filterChoices = F3( return A2( $elm$core$String$startsWith, $elm$core$String$toLower(filterValue), - $elm$core$String$toLower(choice.j)) || A2( + $elm$core$String$toLower(choice.value)) || A2( $elm$core$String$startsWith, $elm$core$String$toLower(filterValue), - $elm$core$String$toLower(choice.d)); + $elm$core$String$toLower(choice.label)); }, choices); } else { @@ -9432,7 +9487,7 @@ var $author$project$Main$filterChoices = F3( $elm$core$Maybe$andThen, $elm$core$List$head, A2($elm$core$Dict$get, fieldName, formValues)); - if (!_v2.$) { + if (_v2.$ === 'Just') { var filterValue = _v2.a; return $elm$core$String$isEmpty(filterValue) ? _List_Nil : A2( $elm$core$List$filter, @@ -9440,10 +9495,10 @@ var $author$project$Main$filterChoices = F3( return A2( $elm$core$String$contains, $elm$core$String$toLower(filterValue), - $elm$core$String$toLower(choice.j)) || A2( + $elm$core$String$toLower(choice.value)) || A2( $elm$core$String$contains, $elm$core$String$toLower(filterValue), - $elm$core$String$toLower(choice.d)); + $elm$core$String$toLower(choice.label)); }, choices); } else { @@ -9522,21 +9577,21 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( var disabledMode = A2( $elm$core$List$member, A2($elm$html$Html$Attributes$attribute, 'disabled', 'disabled'), - config.Y); + config.customAttrs); var chosenForYou = function (choices) { - var _v13 = formField.q; - switch (_v13) { - case 1: + var _v13 = formField.presence; + switch (_v13.$) { + case 'Optional': return false; - case 0: + case 'Required': return $elm$core$List$length(choices) === 1; default: return $elm$core$List$length(choices) === 1; } }; - var _v0 = formField.a; + var _v0 = formField.type_; switch (_v0.$) { - case 0: + case 'ShortText': var customElement = _v0.a; var extraAttrs = A2( $elm$core$List$filterMap, @@ -9551,12 +9606,12 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( A2( $elm$core$Maybe$andThen, $elm$core$List$head, - A2($elm$core$Dict$get, fieldName, config.v))), + A2($elm$core$Dict$get, fieldName, config.trackedFormValues))), A2( $elm$core$List$map, $author$project$Main$attributesFromTuple, - $elm$core$Dict$toList(customElement.p)))); - var extraAttrKeys = $elm$core$Dict$keys(customElement.p); + $elm$core$Dict$toList(customElement.attributes)))); + var extraAttrKeys = $elm$core$Dict$keys(customElement.attributes); var shortTextAttrs = A2( $elm$core$List$filterMap, $author$project$Main$attributesFromTuple, @@ -9573,13 +9628,13 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( A2( $elm$core$Maybe$map, function ($) { - return $.p; + return $.attributes; }, - A2($elm$core$Dict$get, customElement.B, config.ak)))))); + A2($elm$core$Dict$get, customElement.inputType, config.shortTextTypeDict)))))); var _v1 = function () { - var _v2 = customElement.ae; + var _v2 = customElement.datalist; switch (_v2.$) { - case 2: + case 'AttributeGiven': var list = _v2.a; return _Utils_Tuple2( _List_fromArray( @@ -9599,15 +9654,15 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$html$Html$option, _List_fromArray( [ - $elm$html$Html$Attributes$value(choice.j) + $elm$html$Html$Attributes$value(choice.value) ]), _List_fromArray( [ - $elm$html$Html$text(choice.d) + $elm$html$Html$text(choice.label) ])); }, list))); - case 0: + case 'AttributeNotNeeded': return _Utils_Tuple2( _List_Nil, $elm$html$Html$text('')); @@ -9626,18 +9681,18 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( [ A3( $elm$html$Html$node, - customElement.N, + customElement.inputTag, _Utils_ap( _List_fromArray( [ A2( $elm$html$Html$Attributes$attribute, 'class', - A3($author$project$Main$buildInputClassString, formField, fieldName, config.v)), + A3($author$project$Main$buildInputClassString, formField, fieldName, config.trackedFormValues)), $elm$html$Html$Attributes$name(fieldName), $elm$html$Html$Attributes$id(fieldID), $elm$html$Html$Attributes$required( - $author$project$Main$requiredData(formField.q)) + $author$project$Main$requiredData(formField.presence)) ]), _Utils_ap( dataListAttrs, @@ -9646,12 +9701,12 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( _Utils_ap( extraAttrs, _Utils_ap( - config.Y, - config.aO(fieldName)))))), + config.customAttrs, + config.onInput(fieldName)))))), _List_Nil), dataListElement ])); - case 1: + case 'LongText': var extraAttrs = A2( $elm$core$List$filterMap, $elm$core$Basics$identity, @@ -9671,7 +9726,7 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( A2( $elm$core$Maybe$andThen, $elm$core$List$head, - A2($elm$core$Dict$get, fieldName, config.v))) + A2($elm$core$Dict$get, fieldName, config.trackedFormValues))) ])); return A2( $author$project$Main$textarea, @@ -9682,28 +9737,28 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$html$Html$Attributes$name(fieldName), $elm$html$Html$Attributes$id(fieldID), $elm$html$Html$Attributes$required( - $author$project$Main$requiredData(formField.q)), + $author$project$Main$requiredData(formField.presence)), $elm$html$Html$Attributes$placeholder(' ') ]), _Utils_ap( extraAttrs, _Utils_ap( - config.Y, - config.aO(fieldName)))), + config.customAttrs, + config.onInput(fieldName)))), _List_Nil); - case 2: - var choices = _v0.a.k; - var filter = _v0.a.e; + case 'Dropdown': + var choices = _v0.a.choices; + var filter = _v0.a.filter; var valueString = A2( $elm$core$Maybe$withDefault, '', A2( $elm$core$Maybe$andThen, $elm$core$List$head, - A2($elm$core$Dict$get, fieldName, config.v))); - var filteredChoices = disabledMode ? choices : A3($author$project$Main$filterChoices, filter, config.v, choices); + A2($elm$core$Dict$get, fieldName, config.trackedFormValues))); + var filteredChoices = disabledMode ? choices : A3($author$project$Main$filterChoices, filter, config.trackedFormValues, choices); var noChoicesAfterFiltering = (!$elm$core$List$isEmpty(choices)) && $elm$core$List$isEmpty(filteredChoices); - return (noChoicesAfterFiltering && config._) ? A2($elm$html$Html$div, _List_Nil, _List_Nil) : A2( + return (noChoicesAfterFiltering && config.needsFormLogic) ? A2($elm$html$Html$div, _List_Nil, _List_Nil) : A2( $elm$html$Html$div, _List_fromArray( [ @@ -9720,9 +9775,9 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$html$Html$Attributes$name(fieldName), $elm$html$Html$Attributes$id(fieldID), disabledMode ? $elm$html$Html$Attributes$class('tff-select-disabled') : $elm$html$Html$Attributes$required( - $author$project$Main$requiredData(formField.q)) + $author$project$Main$requiredData(formField.presence)) ]), - config.bf(fieldName)), + config.onChange(fieldName)), A2( $elm$core$List$cons, A2( @@ -9735,7 +9790,7 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( (valueString === '') && (!chosenForYou(filteredChoices))), A2($elm$html$Html$Attributes$attribute, 'value', '') ]), - config.Y), + config.customAttrs), _List_fromArray( [ $elm$html$Html$text('-- Select an option --') @@ -9747,32 +9802,32 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$html$Html$option, A2( $elm$core$List$cons, - $elm$html$Html$Attributes$value(choice.j), + $elm$html$Html$Attributes$value(choice.value), A2( $elm$core$List$cons, $author$project$Main$defaultSelected( - _Utils_eq(valueString, choice.j) || chosenForYou(filteredChoices)), - config.Y)), + _Utils_eq(valueString, choice.value) || chosenForYou(filteredChoices)), + config.customAttrs)), _List_fromArray( [ - $elm$html$Html$text(choice.d) + $elm$html$Html$text(choice.label) ])); }, filteredChoices))) ])); - case 3: - var choices = _v0.a.k; - var filter = _v0.a.e; + case 'ChooseOne': + var choices = _v0.a.choices; + var filter = _v0.a.filter; var valueString = A2( $elm$core$Maybe$withDefault, '', A2( $elm$core$Maybe$andThen, $elm$core$List$head, - A2($elm$core$Dict$get, fieldName, config.v))); - var filteredChoices = disabledMode ? choices : A3($author$project$Main$filterChoices, filter, config.v, choices); + A2($elm$core$Dict$get, fieldName, config.trackedFormValues))); + var filteredChoices = disabledMode ? choices : A3($author$project$Main$filterChoices, filter, config.trackedFormValues, choices); var noChoicesAfterFiltering = (!$elm$core$List$isEmpty(choices)) && $elm$core$List$isEmpty(filteredChoices); - return (noChoicesAfterFiltering && config._) ? A2($elm$html$Html$div, _List_Nil, _List_Nil) : A2( + return (noChoicesAfterFiltering && config.needsFormLogic) ? A2($elm$html$Html$div, _List_Nil, _List_Nil) : A2( $elm$html$Html$div, _List_fromArray( [ @@ -9813,37 +9868,37 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$html$Html$Attributes$type_('radio'), $elm$html$Html$Attributes$tabindex(0), $elm$html$Html$Attributes$name(fieldName), - $elm$html$Html$Attributes$value(choice.j), + $elm$html$Html$Attributes$value(choice.value), $elm$html$Html$Attributes$checked( - _Utils_eq(valueString, choice.j) || chosenForYou(filteredChoices)), + _Utils_eq(valueString, choice.value) || chosenForYou(filteredChoices)), $elm$html$Html$Attributes$required( - $author$project$Main$requiredData(formField.q)) + $author$project$Main$requiredData(formField.presence)) ]), _Utils_ap( - config.Y, - config.aO(fieldName))), + config.customAttrs, + config.onInput(fieldName))), _List_Nil), $elm$html$Html$text(' '), - $elm$html$Html$text(choice.d) + $elm$html$Html$text(choice.label) ])) ])); }, filteredChoices)) ])); default: - var choices = _v0.a.k; - var minRequired = _v0.a.P; - var maxAllowed = _v0.a.T; - var filter = _v0.a.e; + var choices = _v0.a.choices; + var minRequired = _v0.a.minRequired; + var maxAllowed = _v0.a.maxAllowed; + var filter = _v0.a.filter; var values = A2( $elm$core$Maybe$withDefault, _List_Nil, - A2($elm$core$Dict$get, fieldName, config.v)); + A2($elm$core$Dict$get, fieldName, config.trackedFormValues)); var selectedCount = $elm$core$List$length(values); var validationElement = function () { var effectiveMin = function () { - var _v10 = _Utils_Tuple2(formField.q, minRequired); - if ((_v10.a === 2) && (_v10.b.$ === 1)) { + var _v10 = _Utils_Tuple2(formField.presence, minRequired); + if ((_v10.a.$ === 'System') && (_v10.b.$ === 'Nothing')) { var _v11 = _v10.a; var _v12 = _v10.b; return $elm$core$Maybe$Just(1); @@ -9885,8 +9940,8 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( }(); var isValid = function () { var _v5 = _Utils_Tuple2(minRequired, maxAllowed); - if (!_v5.a.$) { - if (!_v5.b.$) { + if (_v5.a.$ === 'Just') { + if (_v5.b.$ === 'Just') { var min = _v5.a.a; var max = _v5.b.a; return (_Utils_cmp(selectedCount, min) > -1) && (_Utils_cmp(selectedCount, max) < 1); @@ -9896,7 +9951,7 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( return _Utils_cmp(selectedCount, min) > -1; } } else { - if (!_v5.b.$) { + if (_v5.b.$ === 'Just') { var _v7 = _v5.a; var max = _v5.b.a; return _Utils_cmp(selectedCount, max) < 1; @@ -9907,9 +9962,9 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( } } }(); - var filteredChoices = disabledMode ? choices : A3($author$project$Main$filterChoices, filter, config.v, choices); + var filteredChoices = disabledMode ? choices : A3($author$project$Main$filterChoices, filter, config.trackedFormValues, choices); var noChoicesAfterFiltering = (!$elm$core$List$isEmpty(choices)) && $elm$core$List$isEmpty(filteredChoices); - return (noChoicesAfterFiltering && config._) ? A2($elm$html$Html$div, _List_Nil, _List_Nil) : A2( + return (noChoicesAfterFiltering && config.needsFormLogic) ? A2($elm$html$Html$div, _List_Nil, _List_Nil) : A2( $elm$html$Html$div, _List_fromArray( [ @@ -9930,14 +9985,14 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$core$List$map, function (choice) { var alreadyFull = function () { - if (!maxAllowed.$) { + if (maxAllowed.$ === 'Just') { var m = maxAllowed.a; return _Utils_cmp(selectedCount, m) > -1; } else { return false; } }(); - var shouldDisable = alreadyFull && (!A2($elm$core$List$member, choice.j, values)); + var shouldDisable = alreadyFull && (!A2($elm$core$List$member, choice.value, values)); return A2( $elm$html$Html$div, _List_fromArray( @@ -9962,9 +10017,9 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$html$Html$Attributes$type_('checkbox'), $elm$html$Html$Attributes$tabindex(0), $elm$html$Html$Attributes$name(fieldName), - $elm$html$Html$Attributes$value(choice.j), + $elm$html$Html$Attributes$value(choice.value), $elm$html$Html$Attributes$checked( - A2($elm$core$List$member, choice.j, values) || chosenForYou(filteredChoices)) + A2($elm$core$List$member, choice.value, values) || chosenForYou(filteredChoices)) ]), _Utils_ap( shouldDisable ? _List_fromArray( @@ -9972,11 +10027,11 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( A2($elm$html$Html$Attributes$attribute, 'disabled', 'disabled') ]) : _List_Nil, _Utils_ap( - config.Y, - A2(config.bg, fieldName, choice)))), + config.customAttrs, + A2(config.onChooseMany, fieldName, choice)))), _List_Nil), $elm$html$Html$text(' '), - $elm$html$Html$text(choice.d) + $elm$html$Html$text(choice.label) ])) ])); }, @@ -9999,8 +10054,8 @@ var $author$project$Main$viewFormFieldPreview = F3( $elm$html$Html$Attributes$class( 'tff-field-group' + A2( $author$project$Main$when, - $author$project$Main$requiredData(formField.q), - {aV: '', a1: ' tff-required'})) + $author$project$Main$requiredData(formField.presence), + {_false: '', _true: ' tff-required'})) ]), _List_fromArray( [ @@ -10013,16 +10068,16 @@ var $author$project$Main$viewFormFieldPreview = F3( ]), _List_fromArray( [ - $elm$html$Html$text(formField.d), + $elm$html$Html$text(formField.label), function () { - var _v0 = formField.q; - switch (_v0) { - case 0: + var _v0 = formField.presence; + switch (_v0.$) { + case 'Required': return $elm$html$Html$text(''); - case 1: - var _v1 = formField.a; - if (_v1.$ === 4) { - var minRequired = _v1.a.P; + case 'Optional': + var _v1 = formField.type_; + if (_v1.$ === 'ChooseMultiple') { + var minRequired = _v1.a.minRequired; return (!_Utils_eq(minRequired, $elm$core$Maybe$Nothing)) ? $elm$html$Html$text('') : $elm$html$Html$text(' (optional)'); } else { return $elm$html$Html$text(' (optional)'); @@ -10043,11 +10098,11 @@ var $author$project$Main$viewFormFieldPreview = F3( [ $elm$html$Html$text( function () { - var _v2 = formField.S; + var _v2 = formField.description; switch (_v2.$) { - case 0: + case 'AttributeNotNeeded': return ''; - case 1: + case 'AttributeInvalid': var s = _v2.a; return s; default: @@ -10057,7 +10112,7 @@ var $author$project$Main$viewFormFieldPreview = F3( }()), function () { var _v3 = $author$project$Main$maybeMaxLengthOf(formField); - if (!_v3.$) { + if (_v3.$ === 'Just') { var maxLength = _v3.a; return $elm$html$Html$text( ' (max ' + ($elm$core$String$fromInt(maxLength) + ' characters)')); @@ -10071,7 +10126,7 @@ var $author$project$Main$viewFormFieldPreview = F3( }); var $author$project$Main$renderFormBuilderField = F4( function (maybeAnimate, model, index, maybeFormField) { - if (maybeFormField.$ === 1) { + if (maybeFormField.$ === 'Nothing') { return A2( $elm$html$Html$div, _List_fromArray( @@ -10106,7 +10161,7 @@ var $author$project$Main$renderFormBuilderField = F4( A2( $elm$html$Html$Attributes$attribute, 'data-input-field', - $author$project$Main$stringFromInputField(formField.a)), + $author$project$Main$stringFromInputField(formField.type_)), A2( $elm$html$Html$Events$preventDefaultOn, 'dragover', @@ -10136,7 +10191,7 @@ var $author$project$Main$renderFormBuilderField = F4( _Utils_Tuple2( 'tff-animate-fadeOut', function () { - if ((!maybeAnimate.$) && (maybeAnimate.a.b === 1)) { + if ((maybeAnimate.$ === 'Just') && (maybeAnimate.a.b.$ === 'AnimateFadeOut')) { var _v2 = maybeAnimate.a; var i = _v2.a; var _v3 = _v2.b; @@ -10148,7 +10203,7 @@ var $author$project$Main$renderFormBuilderField = F4( _Utils_Tuple2( 'tff-animate-yellowFade', function () { - if ((!maybeAnimate.$) && (!maybeAnimate.a.b)) { + if ((maybeAnimate.$ === 'Just') && (maybeAnimate.a.b.$ === 'AnimateYellowFade')) { var _v5 = maybeAnimate.a; var i = _v5.a; var _v6 = _v5.b; @@ -10170,7 +10225,7 @@ var $author$project$Main$renderFormBuilderField = F4( $elm$html$Html$Attributes$attribute, 'data-selected', _Utils_eq( - model.F, + model.selectedFieldIndex, $elm$core$Maybe$Just(index)) ? 'true' : 'false'), A2($elm$html$Html$Attributes$attribute, 'draggable', 'true'), A2( @@ -10194,25 +10249,25 @@ var $author$project$Main$renderFormBuilderField = F4( _List_fromArray( [$author$project$Main$dragHandleIcon])), function () { - var hasVisibilityRules = !$elm$core$List$isEmpty(formField.m); + var hasVisibilityRules = !$elm$core$List$isEmpty(formField.visibilityRule); var hasFilterChoices = function () { - var _v7 = formField.a; + var _v7 = formField.type_; switch (_v7.$) { - case 2: - var filter = _v7.a.e; + case 'Dropdown': + var filter = _v7.a.filter; return !_Utils_eq(filter, $elm$core$Maybe$Nothing); - case 3: - var filter = _v7.a.e; + case 'ChooseOne': + var filter = _v7.a.filter; return !_Utils_eq(filter, $elm$core$Maybe$Nothing); - case 4: - var filter = _v7.a.e; + case 'ChooseMultiple': + var filter = _v7.a.filter; return !_Utils_eq(filter, $elm$core$Maybe$Nothing); default: return false; } }(); var fieldName = $author$project$Main$fieldNameOf(formField); - var referencedInfo = A2($author$project$Main$isFieldReferencedBy, fieldName, model.g); + var referencedInfo = A2($author$project$Main$isFieldReferencedBy, fieldName, model.formFields); return A2( $elm$html$Html$div, _List_fromArray( @@ -10221,57 +10276,57 @@ var $author$project$Main$renderFormBuilderField = F4( ]), _List_fromArray( [ - (hasVisibilityRules || referencedInfo.a4) ? A2( + (hasVisibilityRules || referencedInfo.usedInVisibilityRules) ? A2( $elm$html$Html$div, _List_fromArray( [ $elm$html$Html$Attributes$class( hasVisibilityRules ? 'tff-logic-indicator tff-logic-indicator-blue' : 'tff-logic-indicator tff-logic-indicator-gray'), $elm$html$Html$Attributes$title( - (hasVisibilityRules && referencedInfo.a4) ? 'This field has visibility logic and other fields\' visibility depends on it' : (hasVisibilityRules ? 'This field has visibility logic' : 'Other fields\' visibility depends on this field\'s value')) + (hasVisibilityRules && referencedInfo.usedInVisibilityRules) ? 'This field has visibility logic and other fields\' visibility depends on it' : (hasVisibilityRules ? 'This field has visibility logic' : 'Other fields\' visibility depends on this field\'s value')) ]), _List_fromArray( [ $elm$html$Html$text( - (hasVisibilityRules && referencedInfo.a4) ? 'Contains & affects logic' : (hasVisibilityRules ? 'Contains logic' : 'Affects logic')) + (hasVisibilityRules && referencedInfo.usedInVisibilityRules) ? 'Contains & affects logic' : (hasVisibilityRules ? 'Contains logic' : 'Affects logic')) ])) : $elm$html$Html$text(''), - (hasFilterChoices || referencedInfo.a3) ? A2( + (hasFilterChoices || referencedInfo.usedInChoiceFilters) ? A2( $elm$html$Html$div, _List_fromArray( [ $elm$html$Html$Attributes$class( hasFilterChoices ? 'tff-logic-indicator tff-logic-indicator-orange' : 'tff-logic-indicator tff-logic-indicator-gray'), $elm$html$Html$Attributes$title( - (hasFilterChoices && referencedInfo.a3) ? 'This field filters choices and other fields\' choices depend on it' : (hasFilterChoices ? 'This field filters choices based on another field' : 'Other fields\' choices depend on this field\'s value')) + (hasFilterChoices && referencedInfo.usedInChoiceFilters) ? 'This field filters choices and other fields\' choices depend on it' : (hasFilterChoices ? 'This field filters choices based on another field' : 'Other fields\' choices depend on this field\'s value')) ]), _List_fromArray( [ $elm$html$Html$text( - (hasFilterChoices && referencedInfo.a3) ? 'Filters & affects choices' : (hasFilterChoices ? 'Filters choices' : 'Affects choices')) + (hasFilterChoices && referencedInfo.usedInChoiceFilters) ? 'Filters & affects choices' : (hasFilterChoices ? 'Filters choices' : 'Affects choices')) ])) : $elm$html$Html$text('') ])); }(), A3( $author$project$Main$viewFormFieldPreview, { - Y: _List_fromArray( + customAttrs: _List_fromArray( [ A2($elm$html$Html$Attributes$attribute, 'disabled', 'disabled') ]), - g: model.g, - _: false, - bf: function (_v8) { + formFields: model.formFields, + needsFormLogic: false, + onChange: function (_v8) { return _List_Nil; }, - bg: F2( + onChooseMany: F2( function (_v9, _v10) { return _List_Nil; }), - aO: function (_v11) { + onInput: function (_v11) { return _List_Nil; }, - ak: model.ak, - v: model.v + shortTextTypeDict: model.shortTextTypeDict, + trackedFormValues: model.trackedFormValues }, index, formField) @@ -10281,10 +10336,10 @@ var $author$project$Main$renderFormBuilderField = F4( } }); var $author$project$Main$AddFormField = function (a) { - return {$: 2, a: a}; + return {$: 'AddFormField', a: a}; }; var $author$project$Main$DragStartNew = function (a) { - return {$: 10, a: a}; + return {$: 'DragStartNew', a: a}; }; var $author$project$Main$viewAddQuestionsList = F2( function (nextQuestionNumber, inputFields) { @@ -10312,15 +10367,15 @@ var $author$project$Main$viewAddQuestionsList = F2( $elm$json$Json$Decode$succeed( $author$project$Main$DragStartNew( { - S: $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing), - d: $author$project$Main$stringFromInputField(inputField) + (' question ' + $elm$core$String$fromInt(nextQuestionNumber)), - Q: $elm$core$Maybe$Nothing, - q: A2( + description: $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing), + label: $author$project$Main$stringFromInputField(inputField) + (' question ' + $elm$core$String$fromInt(nextQuestionNumber)), + name: $elm$core$Maybe$Nothing, + presence: A2( $author$project$Main$when, $author$project$Main$mustBeOptional(inputField), - {aV: 0, a1: 1}), - a: inputField, - m: _List_Nil + {_false: $author$project$Main$Required, _true: $author$project$Main$Optional}), + type_: inputField, + visibilityRule: _List_Nil }))), A2( $elm$html$Html$Events$on, @@ -10335,36 +10390,74 @@ var $author$project$Main$viewAddQuestionsList = F2( }, inputFields)); }); +var $author$project$Main$SelectFieldGroup = function (a) { + return {$: 'SelectFieldGroup', a: a}; +}; var $elm$html$Html$button = _VirtualDom_node('button'); -var $author$project$Main$AnimateFadeOut = 1; +var $author$project$Main$viewFieldGroupTabs = F2( + function (activeIndex, groups) { + return A2( + $elm$html$Html$div, + _List_fromArray( + [ + $elm$html$Html$Attributes$class('tff-field-group-tabs') + ]), + A2( + $elm$core$List$indexedMap, + F2( + function (index, group) { + return A2( + $elm$html$Html$button, + _List_fromArray( + [ + $elm$html$Html$Attributes$class('tff-field-group-tab'), + $elm$html$Html$Attributes$classList( + _List_fromArray( + [ + _Utils_Tuple2( + 'tff-field-group-tab-active', + _Utils_eq(index, activeIndex)) + ])), + $elm$html$Html$Attributes$type_('button'), + $elm$html$Html$Events$onClick( + $author$project$Main$SelectFieldGroup(index)) + ]), + _List_fromArray( + [ + $elm$html$Html$text(group.heading) + ])); + }), + groups)); + }); +var $author$project$Main$AnimateFadeOut = {$: 'AnimateFadeOut'}; var $author$project$Main$DeleteFormField = function (a) { - return {$: 3, a: a}; + return {$: 'DeleteFormField', a: a}; }; var $author$project$Main$MoveFormFieldDown = function (a) { - return {$: 5, a: a}; + return {$: 'MoveFormFieldDown', a: a}; }; var $author$project$Main$MoveFormFieldUp = function (a) { - return {$: 4, a: a}; + return {$: 'MoveFormFieldUp', a: a}; }; -var $author$project$Main$OnDescriptionInput = {$: 1}; +var $author$project$Main$OnDescriptionInput = {$: 'OnDescriptionInput'}; var $author$project$Main$OnDescriptionToggle = function (a) { - return {$: 2, a: a}; + return {$: 'OnDescriptionToggle', a: a}; }; var $author$project$Main$OnFormField = F3( function (a, b, c) { - return {$: 6, a: a, b: b, c: c}; + return {$: 'OnFormField', a: a, b: b, c: c}; }); -var $author$project$Main$OnLabelInput = {$: 0}; +var $author$project$Main$OnLabelInput = {$: 'OnLabelInput'}; var $author$project$Main$OnMultipleToggle = function (a) { - return {$: 5, a: a}; + return {$: 'OnMultipleToggle', a: a}; }; var $author$project$Main$OnRequiredInput = function (a) { - return {$: 3, a: a}; + return {$: 'OnRequiredInput', a: a}; }; var $author$project$Main$allowsTogglingMultiple = function (inputField) { switch (inputField.$) { - case 0: - var attributes = inputField.a.p; + case 'ShortText': + var attributes = inputField.a.attributes; return A2( $elm$core$List$member, A2($elm$core$Dict$get, 'multiple', attributes), @@ -10373,11 +10466,11 @@ var $author$project$Main$allowsTogglingMultiple = function (inputField) { $elm$core$Maybe$Just('true'), $elm$core$Maybe$Just('false') ])); - case 1: + case 'LongText': return false; - case 2: + case 'Dropdown': return false; - case 3: + case 'ChooseOne': return false; default: return false; @@ -10389,7 +10482,7 @@ var $author$project$Main$hasDuplicateLabel = F3( $elm$core$List$any, function (_v1) { var f = _v1.b; - return _Utils_eq(f.d, newLabel); + return _Utils_eq(f.label, newLabel); }, A2( $elm$core$List$filter, @@ -10419,7 +10512,7 @@ var $elm$html$Html$Events$onCheck = function (tagger) { var $author$project$Main$inputAttributeOptional = F2( function (options, attributeOptional) { switch (attributeOptional.$) { - case 0: + case 'AttributeNotNeeded': return A2( $elm$html$Html$div, _List_fromArray( @@ -10443,14 +10536,14 @@ var $author$project$Main$inputAttributeOptional = F2( $elm$html$Html$Attributes$type_('checkbox'), $elm$html$Html$Attributes$tabindex(0), $elm$html$Html$Attributes$checked(false), - $elm$html$Html$Events$onCheck(options.ab) + $elm$html$Html$Events$onCheck(options.onCheck) ]), _List_Nil), $elm$html$Html$text(' '), - $elm$html$Html$text(options.d) + $elm$html$Html$text(options.label) ])) ])); - case 1: + case 'AttributeInvalid': var str = attributeOptional.a; return A2( $elm$html$Html$div, @@ -10475,13 +10568,13 @@ var $author$project$Main$inputAttributeOptional = F2( $elm$html$Html$Attributes$type_('checkbox'), $elm$html$Html$Attributes$tabindex(0), $elm$html$Html$Attributes$checked(true), - $elm$html$Html$Events$onCheck(options.ab) + $elm$html$Html$Events$onCheck(options.onCheck) ]), _List_Nil), $elm$html$Html$text(' '), - $elm$html$Html$text(options.d) + $elm$html$Html$text(options.label) ])), - options.af( + options.htmlNode( $elm$core$Result$Err(str)) ])); default: @@ -10509,36 +10602,36 @@ var $author$project$Main$inputAttributeOptional = F2( $elm$html$Html$Attributes$type_('checkbox'), $elm$html$Html$Attributes$tabindex(0), $elm$html$Html$Attributes$checked(true), - $elm$html$Html$Events$onCheck(options.ab) + $elm$html$Html$Events$onCheck(options.onCheck) ]), _List_Nil), $elm$html$Html$text(' '), - $elm$html$Html$text(options.d) + $elm$html$Html$text(options.label) ])), - options.af( + options.htmlNode( $elm$core$Result$Ok(a)) ])); } }); var $author$project$Main$maybeMultipleOf = function (formField) { - var _v0 = formField.a; + var _v0 = formField.type_; switch (_v0.$) { - case 0: - var multiple = _v0.a.aM; + case 'ShortText': + var multiple = _v0.a.multiple; switch (multiple.$) { - case 2: + case 'AttributeGiven': var i = multiple.a; return $elm$core$Maybe$Just(i); - case 1: + case 'AttributeInvalid': return $elm$core$Maybe$Nothing; default: return $elm$core$Maybe$Nothing; } - case 1: + case 'LongText': return $elm$core$Maybe$Nothing; - case 2: + case 'Dropdown': return $elm$core$Maybe$Nothing; - case 3: + case 'ChooseOne': return $elm$core$Maybe$Nothing; default: return $elm$core$Maybe$Nothing; @@ -10563,40 +10656,40 @@ var $elm$html$Html$Events$onInput = function (tagger) { }; var $elm$html$Html$Attributes$pattern = $elm$html$Html$Attributes$stringProperty('pattern'); var $author$project$Main$OnCheckboxMaxAllowedInput = function (a) { - return {$: 17, a: a}; + return {$: 'OnCheckboxMaxAllowedInput', a: a}; }; var $author$project$Main$OnCheckboxMinRequiredInput = function (a) { - return {$: 16, a: a}; + return {$: 'OnCheckboxMinRequiredInput', a: a}; }; -var $author$project$Main$OnChoicesInput = {$: 4}; -var $author$project$Main$OnDatalistInput = {$: 9}; +var $author$project$Main$OnChoicesInput = {$: 'OnChoicesInput'}; +var $author$project$Main$OnDatalistInput = {$: 'OnDatalistInput'}; var $author$project$Main$OnDatalistToggle = function (a) { - return {$: 8, a: a}; + return {$: 'OnDatalistToggle', a: a}; }; var $author$project$Main$OnDateMaxInput = function (a) { - return {$: 21, a: a}; + return {$: 'OnDateMaxInput', a: a}; }; var $author$project$Main$OnDateMaxToggle = function (a) { - return {$: 19, a: a}; + return {$: 'OnDateMaxToggle', a: a}; }; var $author$project$Main$OnDateMinInput = function (a) { - return {$: 20, a: a}; + return {$: 'OnDateMinInput', a: a}; }; var $author$project$Main$OnDateMinToggle = function (a) { - return {$: 18, a: a}; + return {$: 'OnDateMinToggle', a: a}; }; var $author$project$Main$OnFilterSourceFieldSelect = function (a) { - return {$: 24, a: a}; + return {$: 'OnFilterSourceFieldSelect', a: a}; }; var $author$project$Main$OnFilterToggle = function (a) { - return {$: 22, a: a}; + return {$: 'OnFilterToggle', a: a}; }; var $author$project$Main$OnFilterTypeSelect = function (a) { - return {$: 23, a: a}; + return {$: 'OnFilterTypeSelect', a: a}; }; -var $author$project$Main$OnMaxLengthInput = {$: 7}; +var $author$project$Main$OnMaxLengthInput = {$: 'OnMaxLengthInput'}; var $author$project$Main$OnMaxLengthToggle = function (a) { - return {$: 6, a: a}; + return {$: 'OnMaxLengthToggle', a: a}; }; var $elm$html$Html$Attributes$max = $elm$html$Html$Attributes$stringProperty('max'); var $elm$html$Html$Attributes$min = $elm$html$Html$Attributes$stringProperty('min'); @@ -10618,7 +10711,7 @@ var $author$project$Main$otherQuestionTitles = F2( $elm$core$List$map, function (_v1) { var f = _v1.b; - return {d: f.d, Q: f.Q}; + return {label: f.label, name: f.name}; }, A2( $elm$core$List$filter, @@ -10641,8 +10734,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( var filterSettings = function (filter) { if (!_Utils_eq(filter, $elm$core$Maybe$Nothing)) { var sourceFieldName = function () { - if (!filter.$) { - if (!filter.a.$) { + if (filter.$ === 'Just') { + if (filter.a.$ === 'FilterStartsWithFieldValueOf') { var name = filter.a.a; return name; } else { @@ -10655,8 +10748,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( }(); var otherFields = A2($author$project$Main$otherQuestionTitles, formFields, index); var filterType = function () { - if (!filter.$) { - if (!filter.a.$) { + if (filter.$ === 'Just') { + if (filter.a.$ === 'FilterStartsWithFieldValueOf') { return 'startswith'; } else { return 'contains'; @@ -10781,7 +10874,7 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( A2( $elm$core$List$map, function (field) { - var fieldValue = A2($elm$core$Maybe$withDefault, field.d, field.Q); + var fieldValue = A2($elm$core$Maybe$withDefault, field.label, field.name); var isSelected = _Utils_eq(fieldValue, sourceFieldName); return A2( $elm$html$Html$option, @@ -10796,7 +10889,7 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( 'value of ' + A2( $elm$json$Json$Encode$encode, 0, - $elm$json$Json$Encode$string(field.d))) + $elm$json$Json$Encode$string(field.label))) ])); }, otherFields))) @@ -10883,11 +10976,11 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( $elm$html$Html$Attributes$required(true), $elm$html$Html$Attributes$readonly( function () { - var _v8 = formField.q; - switch (_v8) { - case 0: + var _v8 = formField.presence; + switch (_v8.$) { + case 'Required': return false; - case 1: + case 'Optional': return false; default: return true; @@ -10902,9 +10995,9 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( _List_Nil) ])); }; - var _v0 = formField.a; + var _v0 = formField.type_; switch (_v0.$) { - case 0: + case 'ShortText': var customElement = _v0.a; var maybeShortTextTypeMaxLength = A2( $elm$core$Maybe$andThen, @@ -10915,27 +11008,27 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( A2( $elm$core$Maybe$map, function ($) { - return $.p; + return $.attributes; }, $elm$core$List$head( A2( $elm$core$List$filter, function (_v6) { - var inputType = _v6.B; - return _Utils_eq(inputType, customElement.B); + var inputType = _v6.inputType; + return _Utils_eq(inputType, customElement.inputType); }, shortTextTypeList))))); return _Utils_ap( _List_fromArray( [ function () { - if (maybeShortTextTypeMaxLength.$ === 1) { + if (maybeShortTextTypeMaxLength.$ === 'Nothing') { return A2( $author$project$Main$inputAttributeOptional, { - af: function (result) { + htmlNode: function (result) { var valueString = function () { - if (!result.$) { + if (result.$ === 'Ok') { var i = result.a; return $elm$core$String$fromInt(i); } else { @@ -10957,8 +11050,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ]), _List_Nil); }, - d: 'Limit number of characters', - ab: function (b) { + label: 'Limit number of characters', + onCheck: function (b) { return A3( $author$project$Main$OnFormField, $author$project$Main$OnMaxLengthToggle(b), @@ -10966,7 +11059,7 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ''); } }, - customElement.ah); + customElement.maxlength); } else { var i = maybeShortTextTypeMaxLength.a; return A2( @@ -10984,8 +11077,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( A2( $author$project$Main$inputAttributeOptional, { - af: function (result) { - if (!result.$) { + htmlNode: function (result) { + if (result.$ === 'Ok') { var a = result.a; return A2( $author$project$Main$textarea, @@ -11021,8 +11114,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( _List_Nil); } }, - d: 'Suggested values', - ab: function (b) { + label: 'Suggested values', + onCheck: function (b) { return A3( $author$project$Main$OnFormField, $author$project$Main$OnDatalistToggle(b), @@ -11030,18 +11123,18 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ''); } }, - customElement.ae) + customElement.datalist) ]), - ((customElement.B === 'date') || (A2( + ((customElement.inputType === 'date') || (A2( $elm$core$Maybe$withDefault, '', - A2($elm$core$Dict$get, 'type', customElement.p)) === 'date')) ? _List_fromArray( + A2($elm$core$Dict$get, 'type', customElement.attributes)) === 'date')) ? _List_fromArray( [ A2( $author$project$Main$inputAttributeOptional, { - af: function (result) { - if (!result.$) { + htmlNode: function (result) { + if (result.$ === 'Ok') { var dateStr = result.a; return A2( $elm$html$Html$input, @@ -11083,8 +11176,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( _List_Nil); } }, - d: 'Minimum date', - ab: function (b) { + label: 'Minimum date', + onCheck: function (b) { return A3( $author$project$Main$OnFormField, $author$project$Main$OnDateMinToggle(b), @@ -11092,12 +11185,12 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ''); } }, - customElement.ar), + customElement.min), A2( $author$project$Main$inputAttributeOptional, { - af: function (result) { - if (!result.$) { + htmlNode: function (result) { + if (result.$ === 'Ok') { var dateStr = result.a; return A2( $elm$html$Html$input, @@ -11139,8 +11232,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( _List_Nil); } }, - d: 'Maximum date', - ab: function (b) { + label: 'Maximum date', + onCheck: function (b) { return A3( $author$project$Main$OnFormField, $author$project$Main$OnDateMaxToggle(b), @@ -11148,17 +11241,17 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ''); } }, - customElement.aq) + customElement.max) ]) : _List_Nil); - case 1: + case 'LongText': var optionalMaxLength = _v0.a; return _List_fromArray( [ A2( $author$project$Main$inputAttributeOptional, { - af: function (result) { - if (!result.$) { + htmlNode: function (result) { + if (result.$ === 'Ok') { var i = result.a; return A2( $elm$html$Html$input, @@ -11191,8 +11284,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( _List_Nil); } }, - d: 'Limit number of characters', - ab: function (b) { + label: 'Limit number of characters', + onCheck: function (b) { return A3( $author$project$Main$OnFormField, $author$project$Main$OnMaxLengthToggle(b), @@ -11202,9 +11295,9 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( }, optionalMaxLength) ]); - case 2: - var choices = _v0.a.k; - var filter = _v0.a.e; + case 'Dropdown': + var choices = _v0.a.choices; + var filter = _v0.a.filter; return _Utils_ap( _List_fromArray( [ @@ -11212,9 +11305,9 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( filterCheckbox(filter) ]), filterSettings(filter)); - case 3: - var choices = _v0.a.k; - var filter = _v0.a.e; + case 'ChooseOne': + var choices = _v0.a.choices; + var filter = _v0.a.filter; return _Utils_ap( _List_fromArray( [ @@ -11223,10 +11316,10 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ]), filterSettings(filter)); default: - var choices = _v0.a.k; - var minRequired = _v0.a.P; - var maxAllowed = _v0.a.T; - var filter = _v0.a.e; + var choices = _v0.a.choices; + var minRequired = _v0.a.minRequired; + var maxAllowed = _v0.a.maxAllowed; + var filter = _v0.a.filter; return _Utils_ap( _List_fromArray( [ @@ -11268,7 +11361,7 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( '', A2($elm$core$Maybe$map, $elm$core$String$fromInt, minRequired))), $elm$html$Html$Attributes$min( - (formField.q === 2) ? '1' : '0'), + _Utils_eq(formField.presence, $author$project$Main$System) ? '1' : '0'), A2( $elm$core$Maybe$withDefault, $elm$html$Html$Attributes$max( @@ -11290,7 +11383,7 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ''); }) ]), - (formField.q === 2) ? _List_fromArray( + _Utils_eq(formField.presence, $author$project$Main$System) ? _List_fromArray( [ $elm$html$Html$Attributes$required(true) ]) : _List_Nil), @@ -11352,7 +11445,7 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ]))); } }); -var $author$project$Main$OnAddVisibilityRule = {$: 14}; +var $author$project$Main$OnAddVisibilityRule = {$: 'OnAddVisibilityRule'}; var $elm$core$List$intersperse = F2( function (sep, xs) { if (!xs.b) { @@ -11372,23 +11465,23 @@ var $elm$core$List$intersperse = F2( } }); var $author$project$Main$OnVisibilityConditionDuplicate = function (a) { - return {$: 15, a: a}; + return {$: 'OnVisibilityConditionDuplicate', a: a}; }; var $author$project$Main$OnVisibilityConditionFieldInput = F3( function (a, b, c) { - return {$: 12, a: a, b: b, c: c}; + return {$: 'OnVisibilityConditionFieldInput', a: a, b: b, c: c}; }); var $author$project$Main$OnVisibilityConditionTypeInput = F3( function (a, b, c) { - return {$: 11, a: a, b: b, c: c}; + return {$: 'OnVisibilityConditionTypeInput', a: a, b: b, c: c}; }); var $author$project$Main$OnVisibilityConditionValueInput = F3( function (a, b, c) { - return {$: 13, a: a, b: b, c: c}; + return {$: 'OnVisibilityConditionValueInput', a: a, b: b, c: c}; }); var $author$project$Main$OnVisibilityRuleTypeInput = F2( function (a, b) { - return {$: 10, a: a, b: b}; + return {$: 'OnVisibilityRuleTypeInput', a: a, b: b}; }); var $author$project$Main$comparisonOf = function (condition) { var comparison = condition.b; @@ -11397,32 +11490,32 @@ var $author$project$Main$comparisonOf = function (condition) { var $author$project$Main$isComparingWith = F2( function (expected, given) { switch (expected.$) { - case 0: - if (!given.$) { + case 'Equals': + if (given.$ === 'Equals') { return true; } else { return false; } - case 1: - if (given.$ === 1) { + case 'StringContains': + if (given.$ === 'StringContains') { return true; } else { return false; } - case 2: - if (given.$ === 2) { + case 'EndsWith': + if (given.$ === 'EndsWith') { return true; } else { return false; } - case 3: - if (given.$ === 3) { + case 'GreaterThan': + if (given.$ === 'GreaterThan') { return true; } else { return false; } default: - if (given.$ === 4) { + if (given.$ === 'EqualsField') { return true; } else { return false; @@ -11430,14 +11523,14 @@ var $author$project$Main$isComparingWith = F2( } }); var $author$project$Main$isHideWhen = function (rule) { - if (!rule.$) { + if (rule.$ === 'ShowWhen') { return false; } else { return true; } }; var $author$project$Main$isShowWhen = function (rule) { - if (!rule.$) { + if (rule.$ === 'ShowWhen') { return true; } else { return false; @@ -11449,9 +11542,9 @@ var $elm$core$Basics$composeR = F3( f(x)); }); var $author$project$Main$selectInputGroup = function (_v0) { - var selectAttrs = _v0.cN; - var options = _v0.cs; - var inputNode = _v0.b5; + var selectAttrs = _v0.selectAttrs; + var options = _v0.options; + var inputNode = _v0.inputNode; var optionToNode = function (opt) { return A2( $elm$html$Html$option, @@ -11461,15 +11554,15 @@ var $author$project$Main$selectInputGroup = function (_v0) { _List_fromArray( [ $elm$core$Maybe$Just( - $elm$html$Html$Attributes$value(opt.j)), - opt.bi ? $elm$core$Maybe$Just( + $elm$html$Html$Attributes$value(opt.value)), + opt.selected ? $elm$core$Maybe$Just( $elm$html$Html$Attributes$selected(true)) : $elm$core$Maybe$Nothing, - opt.bL ? $elm$core$Maybe$Just( + opt.disabled ? $elm$core$Maybe$Just( A2($elm$html$Html$Attributes$attribute, 'disabled', 'disabled')) : $elm$core$Maybe$Nothing ])), _List_fromArray( [ - $elm$html$Html$text(opt.d) + $elm$html$Html$text(opt.label) ])); }; var calculatedAttrs = A2( @@ -11483,13 +11576,13 @@ var $author$project$Main$selectInputGroup = function (_v0) { A2( $elm$core$Basics$composeR, function ($) { - return $.j; + return $.value; }, $elm$html$Html$Attributes$value), A2( $elm$core$List$filter, function ($) { - return $.bi; + return $.selected; }, options))); return A2( @@ -11547,12 +11640,12 @@ var $author$project$Main$visibilityRuleSection = F4( $elm$core$Array$toList(formFields))); var datalistId = 'datalist-' + ($elm$core$String$fromInt(fieldIndex) + ('-' + ($elm$core$String$fromInt(ruleIndex) + ('-' + $elm$core$String$fromInt(conditionIndex))))); var datalistElement = function () { - if (!selectedField.$) { + if (selectedField.$ === 'Just') { var field = selectedField.a; - var _v8 = field.a; + var _v8 = field.type_; switch (_v8.$) { - case 2: - var choices = _v8.a.k; + case 'Dropdown': + var choices = _v8.a.choices; return $elm$core$Maybe$Just( A2( $elm$html$Html$datalist, @@ -11567,13 +11660,13 @@ var $author$project$Main$visibilityRuleSection = F4( $elm$html$Html$option, _List_fromArray( [ - $elm$html$Html$Attributes$value(c.j) + $elm$html$Html$Attributes$value(c.value) ]), _List_Nil); }, choices))); - case 3: - var choices = _v8.a.k; + case 'ChooseOne': + var choices = _v8.a.choices; return $elm$core$Maybe$Just( A2( $elm$html$Html$datalist, @@ -11588,13 +11681,13 @@ var $author$project$Main$visibilityRuleSection = F4( $elm$html$Html$option, _List_fromArray( [ - $elm$html$Html$Attributes$value(c.j) + $elm$html$Html$Attributes$value(c.value) ]), _List_Nil); }, choices))); - case 4: - var choices = _v8.a.k; + case 'ChooseMultiple': + var choices = _v8.a.choices; return $elm$core$Maybe$Just( A2( $elm$html$Html$datalist, @@ -11609,7 +11702,7 @@ var $author$project$Main$visibilityRuleSection = F4( $elm$html$Html$option, _List_fromArray( [ - $elm$html$Html$Attributes$value(c.j) + $elm$html$Html$Attributes$value(c.value) ]), _List_Nil); }, @@ -11622,7 +11715,7 @@ var $author$project$Main$visibilityRuleSection = F4( } }(); var datalistAttr = function () { - if (!datalistElement.$) { + if (datalistElement.$ === 'Just') { return _List_fromArray( [ A2($elm$html$Html$Attributes$attribute, 'list', datalistId) @@ -11704,7 +11797,7 @@ var $author$project$Main$visibilityRuleSection = F4( 'value of ' + A2( $elm$json$Json$Encode$encode, 0, - $elm$json$Json$Encode$string(field.d))) + $elm$json$Json$Encode$string(field.label))) ])); }, A2($author$project$Main$otherQuestionTitles, formFields, fieldIndex)))) @@ -11712,20 +11805,20 @@ var $author$project$Main$visibilityRuleSection = F4( function () { var optionRecord = F4( function (value, label, selected, disabled) { - return {bL: disabled, d: label, bi: selected, j: value}; + return {disabled: disabled, label: label, selected: selected, value: value}; }); var comparisonValueString = function () { switch (rule.b.$) { - case 0: + case 'Equals': var v = rule.b.a; return v; - case 1: + case 'StringContains': var v = rule.b.a; return v; - case 2: + case 'EndsWith': var v = rule.b.a; return v; - case 3: + case 'GreaterThan': var v = rule.b.a; return v; default: @@ -11759,7 +11852,7 @@ var $author$project$Main$visibilityRuleSection = F4( datalistAttr), _List_Nil), function () { - if (!datalistElement.$) { + if (datalistElement.$ === 'Just') { var element = datalistElement.a; return _List_fromArray( [element]); @@ -11771,7 +11864,7 @@ var $author$project$Main$visibilityRuleSection = F4( var candidateFieldsExceptSelf = A2( $elm$core$List$filter, function (f) { - var fn = A2($elm$core$Maybe$withDefault, f.d, f.Q); + var fn = A2($elm$core$Maybe$withDefault, f.label, f.name); return !_Utils_eq(fn, selectedFieldName); }, candidateFields); @@ -11827,7 +11920,7 @@ var $author$project$Main$visibilityRuleSection = F4( var otherFields = A2( $elm$core$List$filter, function (f) { - var fn = A2($elm$core$Maybe$withDefault, f.d, f.Q); + var fn = A2($elm$core$Maybe$withDefault, f.label, f.name); return !_Utils_eq(fn, selectedFieldName); }, candidateFields); @@ -11873,7 +11966,7 @@ var $author$project$Main$visibilityRuleSection = F4( A2( $elm$core$List$map, function (f) { - var fn = A2($elm$core$Maybe$withDefault, f.d, f.Q); + var fn = A2($elm$core$Maybe$withDefault, f.label, f.name); return A2( $elm$html$Html$option, _List_fromArray( @@ -11888,7 +11981,7 @@ var $author$project$Main$visibilityRuleSection = F4( 'value of ' + A2( $elm$json$Json$Encode$encode, 0, - $elm$json$Json$Encode$string(f.d))) + $elm$json$Json$Encode$string(f.label))) ])); }, otherFields))), @@ -11896,7 +11989,7 @@ var $author$project$Main$visibilityRuleSection = F4( ])); var inputNode = function () { var _v3 = $author$project$Main$comparisonOf(rule); - if (_v3.$ === 4) { + if (_v3.$ === 'EqualsField') { return equalsFieldDisabled ? A2( $elm$html$Html$input, _List_fromArray( @@ -11913,9 +12006,9 @@ var $author$project$Main$visibilityRuleSection = F4( }(); return $author$project$Main$selectInputGroup( { - b5: inputNode, - cs: optionsList, - cN: _List_fromArray( + inputNode: inputNode, + options: optionsList, + selectAttrs: _List_fromArray( [ $author$project$Main$onChange( function (str) { @@ -11976,7 +12069,7 @@ var $author$project$Main$visibilityRuleSection = F4( $elm$html$Html$Attributes$required(true), $elm$html$Html$Attributes$value( function () { - if (!visibilityRule.$) { + if (visibilityRule.$ === 'ShowWhen') { return 'ShowWhen'; } else { return 'HideWhen'; @@ -12102,7 +12195,7 @@ var $author$project$Main$visibilityRulesSection = F3( A2( $elm$core$List$indexedMap, A2($author$project$Main$visibilityRuleSection, index, formFields), - formField.m))), + formField.visibilityRule))), A2( $elm$html$Html$div, _List_fromArray( @@ -12129,7 +12222,7 @@ var $author$project$Main$visibilityRulesSection = F3( }); var $author$project$Main$viewFormFieldBuilder = F5( function (shortTextTypeList, index, totalLength, formFields, formField) { - var isDuplicateLabel = A3($author$project$Main$hasDuplicateLabel, index, formField.d, formFields); + var isDuplicateLabel = A3($author$project$Main$hasDuplicateLabel, index, formField.label, formFields); var patternAttr = isDuplicateLabel ? _List_fromArray( [ $elm$html$Html$Attributes$pattern('^$') @@ -12154,7 +12247,7 @@ var $author$project$Main$viewFormFieldBuilder = F5( [ $author$project$Main$SetEditorAnimate( $elm$core$Maybe$Just( - _Utils_Tuple2(index, 1))), + _Utils_Tuple2(index, $author$project$Main$AnimateFadeOut))), $author$project$Main$DeleteFormField(index) ]))) ]), @@ -12187,7 +12280,7 @@ var $author$project$Main$viewFormFieldBuilder = F5( $elm$html$Html$Attributes$type_('checkbox'), $elm$html$Html$Attributes$tabindex(0), $elm$html$Html$Attributes$checked( - $author$project$Main$requiredData(formField.q)), + $author$project$Main$requiredData(formField.presence)), $elm$html$Html$Events$onCheck( function (b) { return A3( @@ -12243,7 +12336,7 @@ var $author$project$Main$viewFormFieldBuilder = F5( $elm$html$Html$text(' '), $elm$html$Html$text( 'Accept multiple ' + $elm$core$String$toLower( - $author$project$Main$stringFromInputField(formField.a))) + $author$project$Main$stringFromInputField(formField.type_))) ])) ])); var buildFieldClass = 'tff-build-field'; @@ -12274,7 +12367,7 @@ var $author$project$Main$viewFormFieldBuilder = F5( _List_fromArray( [ $elm$html$Html$text( - $author$project$Main$stringFromInputField(formField.a) + ' question title') + $author$project$Main$stringFromInputField(formField.type_) + ' question title') ])), A2( $elm$html$Html$input, @@ -12283,7 +12376,7 @@ var $author$project$Main$viewFormFieldBuilder = F5( [ $elm$html$Html$Attributes$type_('text'), $elm$html$Html$Attributes$id('label-' + idSuffix), - $elm$html$Html$Attributes$value(formField.d), + $elm$html$Html$Attributes$value(formField.label), $elm$html$Html$Attributes$required(true), $elm$html$Html$Events$onInput( A2($author$project$Main$OnFormField, $author$project$Main$OnLabelInput, index)), @@ -12303,27 +12396,27 @@ var $author$project$Main$viewFormFieldBuilder = F5( ])) : $elm$html$Html$text('') ])), function () { - if ($author$project$Main$mustBeOptional(formField.a)) { + if ($author$project$Main$mustBeOptional(formField.type_)) { return $elm$html$Html$text(''); } else { - var _v0 = formField.q; - switch (_v0) { - case 0: + var _v0 = formField.presence; + switch (_v0.$) { + case 'Required': return configureRequiredCheckbox; - case 1: + case 'Optional': return configureRequiredCheckbox; default: return $elm$html$Html$text(''); } } }(), - $author$project$Main$allowsTogglingMultiple(formField.a) ? configureMultipleCheckbox : $elm$html$Html$text(''), + $author$project$Main$allowsTogglingMultiple(formField.type_) ? configureMultipleCheckbox : $elm$html$Html$text(''), A2( $author$project$Main$inputAttributeOptional, { - af: function (result) { + htmlNode: function (result) { var valueString = function () { - if (!result.$) { + if (result.$ === 'Ok') { var a = result.a; return a; } else { @@ -12343,8 +12436,8 @@ var $author$project$Main$viewFormFieldBuilder = F5( ]), _List_Nil); }, - d: 'Question description', - ab: function (b) { + label: 'Question description', + onCheck: function (b) { return A3( $author$project$Main$OnFormField, $author$project$Main$OnDescriptionToggle(b), @@ -12352,7 +12445,7 @@ var $author$project$Main$viewFormFieldBuilder = F5( ''); } }, - formField.S) + formField.description) ]), _Utils_ap( A4($author$project$Main$viewFormFieldOptionsBuilder, shortTextTypeList, index, formFields, formField), @@ -12405,11 +12498,11 @@ var $author$project$Main$viewFormFieldBuilder = F5( ])) ])), function () { - var _v2 = formField.q; - switch (_v2) { - case 0: + var _v2 = formField.presence; + switch (_v2.$) { + case 'Required': return deleteFieldButton; - case 1: + case 'Optional': return deleteFieldButton; default: return $elm$html$Html$text(''); @@ -12425,7 +12518,7 @@ var $author$project$Main$viewRightPanel = function (modelData) { A2( $elm$core$List$cons, 'tff-right-panel', - (!_Utils_eq(modelData.F, $elm$core$Maybe$Nothing)) ? _List_fromArray( + (!_Utils_eq(modelData.selectedFieldIndex, $elm$core$Maybe$Nothing)) ? _List_fromArray( ['tff-panel-visible']) : _List_Nil)); return A2( $elm$html$Html$div, @@ -12473,18 +12566,18 @@ var $author$project$Main$viewRightPanel = function (modelData) { _List_fromArray( [ function () { - var _v0 = modelData.F; - if (!_v0.$) { + var _v0 = modelData.selectedFieldIndex; + if (_v0.$ === 'Just') { var index = _v0.a; - var _v1 = A2($elm$core$Array$get, index, modelData.g); - if (!_v1.$) { + var _v1 = A2($elm$core$Array$get, index, modelData.formFields); + if (_v1.$ === 'Just') { var formField = _v1.a; return A5( $author$project$Main$viewFormFieldBuilder, - modelData.al, + $author$project$Main$allCustomElementsFromGroups(modelData.inputFieldGroups), index, - $elm$core$Array$length(modelData.g), - modelData.g, + $elm$core$Array$length(modelData.formFields), + modelData.formFields, formField); } else { return $elm$html$Html$text('Select a field to edit its settings'); @@ -12500,14 +12593,18 @@ var $author$project$Main$viewFormBuilder = F2( function (maybeAnimate, model) { var maybeFieldsList = A2( $author$project$Main$fieldsWithPlaceholder, - $elm$core$Array$toList(model.g), - model.r); - var extraOptions = A2( - $elm$core$List$map, - function (customElement) { - return $author$project$Main$ShortText(customElement); - }, - model.al); + $elm$core$Array$toList(model.formFields), + model.dragged); + var activeFields = A2( + $elm$core$Maybe$withDefault, + _List_Nil, + A2( + $elm$core$Maybe$map, + function ($) { + return $.fields; + }, + $elm$core$List$head( + A2($elm$core$List$drop, model.activeFieldGroupIndex, model.inputFieldGroups)))); return _List_fromArray( [ A2( @@ -12533,26 +12630,32 @@ var $author$project$Main$viewFormBuilder = F2( [ _Utils_Tuple2( 'tff-panel-hidden', - !_Utils_eq(model.F, $elm$core$Maybe$Nothing)) + !_Utils_eq(model.selectedFieldIndex, $elm$core$Maybe$Nothing)) ])) ]), - _List_fromArray( - [ - A2( - $elm$html$Html$h2, - _List_fromArray( + _Utils_ap( + _List_fromArray( + [ + A2( + $elm$html$Html$h2, + _List_fromArray( + [ + $elm$html$Html$Attributes$class('tff-panel-header') + ]), + _List_fromArray( + [ + $elm$html$Html$text('Add Form Field') + ])) + ]), + _Utils_ap( + ($elm$core$List$length(model.inputFieldGroups) > 1) ? _List_fromArray( [ - $elm$html$Html$Attributes$class('tff-panel-header') - ]), + A2($author$project$Main$viewFieldGroupTabs, model.activeFieldGroupIndex, model.inputFieldGroups) + ]) : _List_Nil, _List_fromArray( [ - $elm$html$Html$text('Add Form Field') - ])), - A2( - $author$project$Main$viewAddQuestionsList, - model.aa, - _Utils_ap($author$project$Main$allInputField, extraOptions)) - ])), + A2($author$project$Main$viewAddQuestionsList, model.nextQuestionNumber, activeFields) + ])))), A2( $elm$html$Html$div, _List_fromArray( @@ -12563,7 +12666,7 @@ var $author$project$Main$viewFormBuilder = F2( [ _Utils_Tuple2( 'tff-panel-hidden', - !_Utils_eq(model.F, $elm$core$Maybe$Nothing)) + !_Utils_eq(model.selectedFieldIndex, $elm$core$Maybe$Nothing)) ])), $elm$html$Html$Events$onClick( $author$project$Main$SelectField($elm$core$Maybe$Nothing)) @@ -12591,7 +12694,7 @@ var $author$project$Main$viewFormBuilder = F2( }); var $author$project$Main$OnFormValuesUpdated = F2( function (a, b) { - return {$: 15, a: a, b: b}; + return {$: 'OnFormValuesUpdated', a: a, b: b}; }); var $author$project$Main$fieldHasEmptyFilter = F2( function (formField, trackedFormValues) { @@ -12608,8 +12711,8 @@ var $author$project$Main$fieldHasEmptyFilter = F2( A2($elm$core$Dict$get, fieldName, trackedFormValues)))); }; var getFilterField = function (filter) { - if (!filter.$) { - if (!filter.a.$) { + if (filter.$ === 'Just') { + if (filter.a.$ === 'FilterStartsWithFieldValueOf') { var fieldName = filter.a.a; return $elm$core$Maybe$Just(fieldName); } else { @@ -12620,10 +12723,10 @@ var $author$project$Main$fieldHasEmptyFilter = F2( return $elm$core$Maybe$Nothing; } }; - var _v0 = formField.a; + var _v0 = formField.type_; switch (_v0.$) { - case 2: - var filter = _v0.a.e; + case 'Dropdown': + var filter = _v0.a.filter; return A2( $elm$core$Maybe$withDefault, false, @@ -12631,8 +12734,8 @@ var $author$project$Main$fieldHasEmptyFilter = F2( $elm$core$Maybe$map, isFilterFieldEmpty, getFilterField(filter))); - case 3: - var filter = _v0.a.e; + case 'ChooseOne': + var filter = _v0.a.filter; return A2( $elm$core$Maybe$withDefault, false, @@ -12640,8 +12743,8 @@ var $author$project$Main$fieldHasEmptyFilter = F2( $elm$core$Maybe$map, isFilterFieldEmpty, getFilterField(filter))); - case 4: - var filter = _v0.a.e; + case 'ChooseMultiple': + var filter = _v0.a.filter; return A2( $elm$core$Maybe$withDefault, false, @@ -12654,17 +12757,17 @@ var $author$project$Main$fieldHasEmptyFilter = F2( } }); var $author$project$Main$isChooseManyUsingMinMax = function (formField) { - var _v0 = formField.a; + var _v0 = formField.type_; switch (_v0.$) { - case 0: + case 'ShortText': return false; - case 1: + case 'LongText': return false; - case 4: - var minRequired = _v0.a.P; - var maxAllowed = _v0.a.T; - return (!_Utils_eq(minRequired, $elm$core$Maybe$Nothing)) || ((!_Utils_eq(maxAllowed, $elm$core$Maybe$Nothing)) || (formField.q === 2)); - case 3: + case 'ChooseMultiple': + var minRequired = _v0.a.minRequired; + var maxAllowed = _v0.a.maxAllowed; + return (!_Utils_eq(minRequired, $elm$core$Maybe$Nothing)) || ((!_Utils_eq(maxAllowed, $elm$core$Maybe$Nothing)) || _Utils_eq(formField.presence, $author$project$Main$System)); + case 'ChooseOne': return false; default: return false; @@ -12689,7 +12792,7 @@ var $author$project$Main$evaluateCondition = F2( var fieldName = condition.a; var comparison = condition.b; switch (comparison.$) { - case 0: + case 'Equals': var givenValue = comparison.a; return A2( $elm$core$List$member, @@ -12698,7 +12801,7 @@ var $author$project$Main$evaluateCondition = F2( $elm$core$Maybe$withDefault, _List_Nil, A2($elm$core$Dict$get, fieldName, trackedFormValues))); - case 1: + case 'StringContains': var givenValue = comparison.a; return A2( $elm$core$List$any, @@ -12707,7 +12810,7 @@ var $author$project$Main$evaluateCondition = F2( $elm$core$Maybe$withDefault, _List_Nil, A2($elm$core$Dict$get, fieldName, trackedFormValues))); - case 2: + case 'EndsWith': var givenValue = comparison.a; return A2( $elm$core$List$any, @@ -12716,13 +12819,13 @@ var $author$project$Main$evaluateCondition = F2( $elm$core$Maybe$withDefault, _List_Nil, A2($elm$core$Dict$get, fieldName, trackedFormValues))); - case 3: + case 'GreaterThan': var givenValue = comparison.a; return A2( $elm$core$List$any, function (formValue) { var _v2 = $elm$core$String$toFloat(givenValue); - if (!_v2.$) { + if (_v2.$ === 'Just') { var givenFloat = _v2.a; return A2( $elm$core$Maybe$withDefault, @@ -12763,7 +12866,7 @@ var $author$project$Main$isVisibilityRuleSatisfied = F2( return $elm$core$List$isEmpty(rules) || A2( $elm$core$List$any, function (rule) { - if (!rule.$) { + if (rule.$ === 'ShowWhen') { var conditions = rule.a; return A2( $elm$core$List$all, @@ -12785,7 +12888,7 @@ var $elm$core$Array$foldl = F3( var tail = _v0.d; var helper = F2( function (node, acc) { - if (!node.$) { + if (node.$ === 'SubTree') { var subTree = node.a; return A3($elm$core$Elm$JsArray$foldl, helper, acc, subTree); } else { @@ -12811,9 +12914,9 @@ var $author$project$Main$sanitizeFormValuesHelper = F3( F2( function (field, acc) { var fieldName = $author$project$Main$fieldNameOf(field); - if (A2($author$project$Main$isVisibilityRuleSatisfied, field.m, currentValues)) { + if (A2($author$project$Main$isVisibilityRuleSatisfied, field.visibilityRule, currentValues)) { var _v0 = A2($elm$core$Dict$get, fieldName, currentValues); - if (!_v0.$) { + if (_v0.$ === 'Just') { var fieldValues = _v0.a; return A3($elm$core$Dict$insert, fieldName, fieldValues, acc); } else { @@ -12849,10 +12952,10 @@ var $author$project$Main$sanitizeFormValues = F2( }); var $author$project$Main$viewFormPreview = F2( function (customAttrs, _v0) { - var formFields = _v0.g; - var needsFormLogic = _v0._; - var trackedFormValues = _v0.v; - var shortTextTypeDict = _v0.ak; + var formFields = _v0.formFields; + var needsFormLogic = _v0.needsFormLogic; + var trackedFormValues = _v0.trackedFormValues; + var shortTextTypeDict = _v0.shortTextTypeDict; var onInputAttrs = function (fieldName) { return _List_fromArray( [ @@ -12871,7 +12974,7 @@ var $author$project$Main$viewFormPreview = F2( [ $elm$html$Html$Events$onCheck( function (_v5) { - return A2($author$project$Main$OnFormValuesUpdated, fieldName, choice.j); + return A2($author$project$Main$OnFormValuesUpdated, fieldName, choice.value); }) ]); }); @@ -12892,21 +12995,21 @@ var $author$project$Main$viewFormPreview = F2( $elm$core$Array$toList(formFields)); var needsEventHandlers = needsFormLogic || (isAnyChooseManyUsingMinMax || hasOptionalTemporalInputs); var config = { - Y: customAttrs, - g: formFields, - _: needsFormLogic, - bf: needsEventHandlers ? onChangeAttrs : function (_v1) { + customAttrs: customAttrs, + formFields: formFields, + needsFormLogic: needsFormLogic, + onChange: needsEventHandlers ? onChangeAttrs : function (_v1) { return _List_Nil; }, - bg: needsEventHandlers ? onChooseManyAttrs : F2( + onChooseMany: needsEventHandlers ? onChooseManyAttrs : F2( function (_v2, _v3) { return _List_Nil; }), - aO: needsEventHandlers ? onInputAttrs : function (_v4) { + onInput: needsEventHandlers ? onInputAttrs : function (_v4) { return _List_Nil; }, - ak: shortTextTypeDict, - v: trackedFormValues + shortTextTypeDict: shortTextTypeDict, + trackedFormValues: trackedFormValues }; return $elm$core$Array$toList( A2( @@ -12917,7 +13020,7 @@ var $author$project$Main$viewFormPreview = F2( function (formField) { return A2( $author$project$Main$isVisibilityRuleSatisfied, - formField.m, + formField.visibilityRule, A2($author$project$Main$sanitizeFormValues, formFields, trackedFormValues)) && (!A2($author$project$Main$fieldHasEmptyFilter, formField, trackedFormValues)); }, formFields))); @@ -12928,11 +13031,11 @@ var $author$project$Main$viewMain = function (model) { _List_fromArray( [ $elm$html$Html$Attributes$class( - 'tff tff-container tff-mode-' + $author$project$Main$stringFromViewMode(model.ac)) + 'tff tff-container tff-mode-' + $author$project$Main$stringFromViewMode(model.viewMode)) ]), function () { - var _v0 = model.ac; - if (!_v0.$) { + var _v0 = model.viewMode; + if (_v0.$ === 'Editor') { var editorAttr = _v0.a; return A2( $elm$core$List$cons, @@ -12946,18 +13049,18 @@ var $author$project$Main$viewMain = function (model) { A2( $elm$json$Json$Encode$encode, 0, - $author$project$Main$encodeFormFields(model.g))) + $author$project$Main$encodeFormFields(model.formFields))) ]), _List_Nil), - A2($author$project$Main$viewFormBuilder, editorAttr.aB, model)); + A2($author$project$Main$viewFormBuilder, editorAttr.maybeAnimate, model)); } else { return A2($author$project$Main$viewFormPreview, _List_Nil, model); } }()); }; var $author$project$Main$view = function (model) { - var _v0 = model.aW; - if (!_v0.$) { + var _v0 = model.initError; + if (_v0.$ === 'Just') { var errString = _v0.a; return A2( $elm$html$Html$div, @@ -12987,5 +13090,5 @@ var $author$project$Main$view = function (model) { } }; var $author$project$Main$main = $elm$browser$Browser$element( - {ds: $author$project$Main$init, dS: $author$project$Main$subscriptions, dV: $author$project$Main$update, dW: $author$project$Main$view}); + {init: $author$project$Main$init, subscriptions: $author$project$Main$subscriptions, update: $author$project$Main$update, view: $author$project$Main$view}); _Platform_export({'Main':{'init':$author$project$Main$main($elm$json$Json$Decode$value)(0)}});}(this)); \ No newline at end of file diff --git a/dist/tiny-form-fields.min.css b/dist/tiny-form-fields.min.css index 9faa98c..a78f2c4 100644 --- a/dist/tiny-form-fields.min.css +++ b/dist/tiny-form-fields.min.css @@ -1,4 +1,4 @@ -*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.16 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.float-right{float:right}.float-left{float:left}.clear-both{clear:both}.my-8{margin-top:2rem;margin-bottom:2rem}.mb-4{margin-bottom:1rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mr-auto{margin-right:auto}.inline-block{display:inline-block}.hidden{display:none}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.cursor-not-allowed{cursor:not-allowed}.rounded{border-radius:.25rem}.border{border-width:1px}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.p-1{padding:.25rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.text-right{text-align:right}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.leading-4{line-height:1rem}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.opacity-50{opacity:.5}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.tff-error h3{font-weight:700;font-size:1.125rem;line-height:1.75rem}.tff-error pre{white-space:pre-wrap}.tff-error pre,.tff-error-text{font-size:.875rem;line-height:1.25rem}.tff-error-text{margin-top:.25rem;--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.tff-center-panel .tff-field-group,.tff-center-panel .tff-toggle-group,.tff-settings-content .tff-field-group,.tff-settings-content .tff-toggle-group{margin-bottom:1rem}.tff-center-panel .tff-field-group:last-child,.tff-center-panel .tff-toggle-group:last-child,.tff-settings-content .tff-field-group:last-child,.tff-settings-content .tff-toggle-group:last-child{margin-bottom:0}.tff-field-group{position:relative;margin-bottom:3rem}.tff-field-rule{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));padding:.5rem;border-radius:.25rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1));margin-bottom:1rem}.tff-field-rule-conditions{padding-left:1rem;margin-bottom:.5rem}.tff-toggle-group{margin-bottom:3rem}.tff-field-group input:not(:-moz-placeholder-shown):invalid,.tff-toggle-group input:not(:-moz-placeholder-shown):invalid{border-color:red}.tff-field-group input:not(:placeholder-shown):invalid,.tff-field-group.tff-required select:invalid,.tff-field-group.tff-required textarea:invalid,.tff-invalid-checkbox .tff-checkbox-group input[type=checkbox],.tff-toggle-group input:not(:placeholder-shown):invalid,.tff-toggle-group textarea:invalid{border-color:red}.tff-invalid-checkbox .tff-checkbox-group input[type=checkbox]{-moz-appearance:none;appearance:none;-webkit-appearance:none;width:1em;height:1em;border:1px solid red;border-radius:.2em;outline:none;cursor:pointer;position:relative}.tff-invalid-checkbox .tff-checkbox-group input[type=checkbox]:checked:after{content:"✓";position:absolute;color:red;font-size:1em;line-height:1;top:50%;left:50%;transform:translate(-50%,-50%)}.tff-radiobuttons-group .tff-field-label input[type=radio]:invalid{-webkit-appearance:none;height:.94em;width:.94em;box-shadow:none;border:1px solid red;border-radius:50%;outline:none}.tff-visually-hidden{position:absolute;left:-9999px;height:1px;width:1px;overflow:hidden}.tff-radiobuttons-group .tff-field-label input[type=radio]:invalid:before{content:"";display:block;width:100%;height:100%;border-radius:50%}.tff-field-label{font-size:.875rem;line-height:1.25rem;vertical-align:middle}.tff-field-description,.tff-field-label{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.tff-field-description{margin-top:.25rem;font-size:.75rem;line-height:1rem}.tff-text-field{display:block;border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1));padding:.5rem;width:100%;border-radius:.25rem}.tff-text-field[type=color]{max-width:2.5rem;height:2.5rem;padding:.25rem}.tff-text-field[type=date],.tff-text-field[type=datetime-local],.tff-text-field[type=time]{-webkit-appearance:none;-moz-appearance:none;background-color:inherit}.tff-text-field::-webkit-date-and-time-value,.tff-text-field::-webkit-date-value,.tff-text-field::-webkit-time-value{min-height:1.5rem;text-align:inherit}.tff-field-group input[type=date]:not(:valid)::-webkit-datetime-edit-day-field,.tff-field-group input[type=date]:not(:valid)::-webkit-datetime-edit-month-field,.tff-field-group input[type=date]:not(:valid)::-webkit-datetime-edit-text,.tff-field-group input[type=date]:not(:valid)::-webkit-datetime-edit-year-field,.tff-field-group input[type=datetime-local]:not(:valid)::-webkit-datetime-edit-day-field,.tff-field-group input[type=datetime-local]:not(:valid)::-webkit-datetime-edit-hour-field,.tff-field-group input[type=datetime-local]:not(:valid)::-webkit-datetime-edit-minute-field,.tff-field-group input[type=datetime-local]:not(:valid)::-webkit-datetime-edit-month-field,.tff-field-group input[type=datetime-local]:not(:valid)::-webkit-datetime-edit-text,.tff-field-group input[type=datetime-local]:not(:valid)::-webkit-datetime-edit-year-field,.tff-field-group input[type=time]:not(:valid)::-webkit-datetime-edit-ampm-field,.tff-field-group input[type=time]:not(:valid)::-webkit-datetime-edit-hour-field,.tff-field-group input[type=time]:not(:valid)::-webkit-datetime-edit-minute-field,.tff-field-group input[type=time]:not(:valid)::-webkit-datetime-edit-second-field,.tff-field-group input[type=time]:not(:valid)::-webkit-datetime-edit-text{color:#f87171;opacity:.7}.tff-field-group +*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.float-right{float:right}.float-left{float:left}.clear-both{clear:both}.my-8{margin-top:2rem;margin-bottom:2rem}.mb-4{margin-bottom:1rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mr-auto{margin-right:auto}.inline-block{display:inline-block}.hidden{display:none}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.cursor-not-allowed{cursor:not-allowed}.rounded{border-radius:.25rem}.border{border-width:1px}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.p-1{padding:.25rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.text-right{text-align:right}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.leading-4{line-height:1rem}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.opacity-50{opacity:.5}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.tff-error h3{font-weight:700;font-size:1.125rem;line-height:1.75rem}.tff-error pre{white-space:pre-wrap}.tff-error pre,.tff-error-text{font-size:.875rem;line-height:1.25rem}.tff-error-text{margin-top:.25rem;--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.tff-center-panel .tff-field-group,.tff-center-panel .tff-toggle-group,.tff-settings-content .tff-field-group,.tff-settings-content .tff-toggle-group{margin-bottom:1rem}.tff-center-panel .tff-field-group:last-child,.tff-center-panel .tff-toggle-group:last-child,.tff-settings-content .tff-field-group:last-child,.tff-settings-content .tff-toggle-group:last-child{margin-bottom:0}.tff-field-group{position:relative;margin-bottom:3rem}.tff-field-rule{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));padding:.5rem;border-radius:.25rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1));margin-bottom:1rem}.tff-field-rule-conditions{padding-left:1rem;margin-bottom:.5rem}.tff-toggle-group{margin-bottom:3rem}.tff-field-group input:not(:-moz-placeholder-shown):invalid,.tff-toggle-group input:not(:-moz-placeholder-shown):invalid{border-color:red}.tff-field-group input:not(:placeholder-shown):invalid,.tff-field-group.tff-required select:invalid,.tff-field-group.tff-required textarea:invalid,.tff-invalid-checkbox .tff-checkbox-group input[type=checkbox],.tff-toggle-group input:not(:placeholder-shown):invalid,.tff-toggle-group textarea:invalid{border-color:red}.tff-invalid-checkbox .tff-checkbox-group input[type=checkbox]{-moz-appearance:none;appearance:none;-webkit-appearance:none;width:1em;height:1em;border:1px solid red;border-radius:.2em;outline:none;cursor:pointer;position:relative}.tff-invalid-checkbox .tff-checkbox-group input[type=checkbox]:checked:after{content:"✓";position:absolute;color:red;font-size:1em;line-height:1;top:50%;left:50%;transform:translate(-50%,-50%)}.tff-radiobuttons-group .tff-field-label input[type=radio]:invalid{-webkit-appearance:none;height:.94em;width:.94em;box-shadow:none;border:1px solid red;border-radius:50%;outline:none}.tff-visually-hidden{position:absolute;left:-9999px;height:1px;width:1px;overflow:hidden}.tff-radiobuttons-group .tff-field-label input[type=radio]:invalid:before{content:"";display:block;width:100%;height:100%;border-radius:50%}.tff-field-label{font-size:.875rem;line-height:1.25rem;vertical-align:middle}.tff-field-description,.tff-field-label{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.tff-field-description{margin-top:.25rem;font-size:.75rem;line-height:1rem}.tff-text-field{display:block;border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1));padding:.5rem;width:100%;border-radius:.25rem}.tff-text-field[type=color]{max-width:2.5rem;height:2.5rem;padding:.25rem}.tff-text-field[type=date],.tff-text-field[type=datetime-local],.tff-text-field[type=time]{-webkit-appearance:none;-moz-appearance:none;background-color:inherit}.tff-text-field::-webkit-date-and-time-value,.tff-text-field::-webkit-date-value,.tff-text-field::-webkit-time-value{min-height:1.5rem;text-align:inherit}.tff-field-group input[type=date]:not(:valid)::-webkit-datetime-edit-day-field,.tff-field-group input[type=date]:not(:valid)::-webkit-datetime-edit-month-field,.tff-field-group input[type=date]:not(:valid)::-webkit-datetime-edit-text,.tff-field-group input[type=date]:not(:valid)::-webkit-datetime-edit-year-field,.tff-field-group input[type=datetime-local]:not(:valid)::-webkit-datetime-edit-day-field,.tff-field-group input[type=datetime-local]:not(:valid)::-webkit-datetime-edit-hour-field,.tff-field-group input[type=datetime-local]:not(:valid)::-webkit-datetime-edit-minute-field,.tff-field-group input[type=datetime-local]:not(:valid)::-webkit-datetime-edit-month-field,.tff-field-group input[type=datetime-local]:not(:valid)::-webkit-datetime-edit-text,.tff-field-group input[type=datetime-local]:not(:valid)::-webkit-datetime-edit-year-field,.tff-field-group input[type=time]:not(:valid)::-webkit-datetime-edit-ampm-field,.tff-field-group input[type=time]:not(:valid)::-webkit-datetime-edit-hour-field,.tff-field-group input[type=time]:not(:valid)::-webkit-datetime-edit-minute-field,.tff-field-group input[type=time]:not(:valid)::-webkit-datetime-edit-second-field,.tff-field-group input[type=time]:not(:valid)::-webkit-datetime-edit-text{color:#f87171;opacity:.7}.tff-field-group input[type=datetime-local].tff-empty-optional::-webkit-datetime-edit-minute-field,.tff-field-group input[type=date].tff-empty-optional::-webkit-datetime-edit-day-field,.tff-field-group input[type=date].tff-empty-optional::-webkit-datetime-edit-month-field,.tff-field-group input[type=date].tff-empty-optional::-webkit-datetime-edit-text,.tff-field-group input[type=date].tff-empty-optional::-webkit-datetime-edit-year-field,.tff-field-group input[type=datetime-local].tff-empty-optional::-webkit-datetime-edit-day-field,.tff-field-group input[type=datetime-local].tff-empty-optional::-webkit-datetime-edit-hour-field,.tff-field-group input[type=datetime-local].tff-empty-optional::-webkit-datetime-edit-month-field,.tff-field-group input[type=datetime-local].tff-empty-optional::-webkit-datetime-edit-text,.tff-field-group input[type=datetime-local].tff-empty-optional::-webkit-datetime-edit-year-field,.tff-field-group input[type=time].tff-empty-optional::-webkit-datetime-edit-ampm-field,.tff-field-group input[type=time].tff-empty-optional::-webkit-datetime-edit-hour-field,.tff-field-group input[type=time].tff-empty-optional::-webkit-datetime-edit-minute-field,.tff-field-group input[type=time].tff-empty-optional::-webkit-datetime-edit-second-field,.tff-field-group input[type=time].tff-empty-optional::-webkit-datetime-edit-text{color:#f87171;opacity:.7}.tff-field-group input[type=date]:not(:valid),.tff-field-group input[type=datetime-local]:not(:valid),.tff-field-group input[type=time]:not(:valid){color:#f87171!important;opacity:.7!important}.tff-field-group input[type=date].tff-empty-optional,.tff-field-group input[type=datetime-local].tff-empty-optional,.tff-field-group input[type=time].tff-empty-optional{color:#f87171!important;opacity:.7!important}.tff-editor-layout .tff-center-panel input[type=date].tff-empty-optional::-webkit-datetime-edit-day-field,.tff-editor-layout @@ -55,4 +55,4 @@ .tff-center-panel input[type=time]:not(:valid)::-webkit-datetime-edit-minute-field,.tff-editor-layout .tff-center-panel - input[type=time]:not(:valid)::-webkit-datetime-edit-second-field,.tff-editor-layout .tff-center-panel input[type=date]:not(:valid)::-webkit-datetime-edit-text,.tff-editor-layout .tff-center-panel input[type=time]:not(:valid)::-webkit-datetime-edit-text{color:transparent!important;opacity:0!important}.tff-editor-layout .tff-center-panel input[type=date].tff-empty-optional,.tff-editor-layout .tff-center-panel input[type=date]:not(:valid),.tff-editor-layout .tff-center-panel input[type=datetime-local].tff-empty-optional,.tff-editor-layout .tff-center-panel input[type=datetime-local]:not(:valid),.tff-editor-layout .tff-center-panel input[type=time].tff-empty-optional,.tff-editor-layout .tff-center-panel input[type=time]:not(:valid){color:inherit!important;opacity:1!important}.tff-dropdown-group{display:grid}.tff-dropdown-group select{-webkit-appearance:none;-moz-appearance:none;appearance:none}@media (forced-colors:active){.tff-dropdown-group select{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}.tff-dropdown-group select{border-width:1px;grid-row-start:1;grid-column-start:1;--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.tff-dropdown-group select:hover{--tw-border-opacity:1;border-color:rgb(6 182 212/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.tff-dropdown-group select{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1));--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1));padding:.5rem;border-radius:.25rem}.tff-dropdown-group select.tff-select-disabled{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.tff-dropdown-group svg{pointer-events:none;z-index:10;right:.25rem;position:relative;grid-column-start:1;grid-row-start:1;height:1rem;width:1rem;margin-right:.5rem;align-self:center;justify-self:end}@media (forced-colors:active){.tff-dropdown-group svg{display:none}}.tff-choosemany-group,.tff-chooseone-group{display:grid}.tff-choosemany-group .tff-choosemany-checkboxes,.tff-chooseone-group .tff-chooseone-radiobuttons{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));gap:.5rem}.tff-checkbox-group,.tff-radiobuttons-group{display:flex}.tff-checkbox-group .tff-field-label input,.tff-field-group .tff-field-label input,.tff-radiobuttons-group .tff-field-label input,.tff-toggle-group .tff-field-label input{border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1));vertical-align:middle;margin-bottom:.125rem}.tff-build-field{display:grid;grid-template-rows:auto auto 1fr auto;gap:0}.tff-build-field-buttons{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:4rem}.tff-build-field-buttons .tff-move{display:flex}.tff-build-field-buttons .tff-move>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem*var(--tw-space-x-reverse));margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))}.tff-settings-content button{font-size:.75rem;line-height:1rem;--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.tff-settings-content button:hover{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.tff-settings-content button{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1));padding:.5rem 1rem;border-radius:.25rem}.tff-build-field-buttons button.tff-delete{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.tff-dropdown-button{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1));--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.tff-dropdown-button:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.tff-dropdown-button:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);outline:2px solid transparent;outline-offset:2px;--tw-ring-opacity:1;--tw-ring-color:rgb(147 197 253/var(--tw-ring-opacity,1))}.tff-dropdown-button{font-weight:500;border-radius:.5rem;font-size:.875rem;line-height:1.25rem;padding:.625rem 1.25rem;text-align:center;display:inline-flex;align-items:center}.tff-dropdown-open{display:block;position:absolute}.tff-dropdown-closed{display:none}.tff-selectinput-wrapper{margin-top:.5rem}.tff-selectinput-group{display:flex;align-items:center;border-radius:.375rem;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));outline-style:solid;outline-width:1px;outline-offset:-1px;outline-color:#d1d5db}.tff-selectinput-group:has(input:focus-within){outline-style:solid;outline-width:2px;outline-offset:-2px;outline-color:#4f46e5}.tff-selectinput-input{display:block;min-width:0;flex-grow:1;padding:.375rem .75rem .375rem .25rem;font-size:1rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.tff-selectinput-input::-moz-placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.tff-selectinput-input::placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.tff-selectinput-input:focus{outline-style:solid;outline-width:0}@media (min-width:640px){.tff-selectinput-input{font-size:.875rem;line-height:1.5rem}}.tff-selectinput-select-wrapper{display:grid;flex-shrink:0;grid-template-columns:repeat(1,minmax(0,1fr))}.tff-selectinput-select-wrapper:focus-within{position:relative}.tff-selectinput-select{grid-column-start:1;grid-row-start:1;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.375rem;padding:.375rem 1.75rem .375rem .75rem;font-size:1rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.tff-selectinput-select::-moz-placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.tff-selectinput-select::placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.tff-selectinput-select:focus{outline-style:solid;outline-width:2px;outline-offset:-2px;outline-color:#4f46e5}@media (min-width:640px){.tff-selectinput-select{font-size:.875rem;line-height:1.5rem}}.tff-selectarrow-icon{pointer-events:none;grid-column-start:1;grid-row-start:1;margin-right:.5rem;width:1.25rem;height:1.25rem;align-self:center;justify-self:end;--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}@media (min-width:640px){.tff-selectarrow-icon{width:1rem;height:1rem}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes yellowFade{0%{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}to{background-color:transparent}}.tff-animate-fadeOut{animation:fadeOut .5s ease-in-out}.tff-animate-yellowFade{animation:yellowFade .5s ease-in-out}.tff-field-preview{position:relative;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));border-radius:.5rem;padding:1rem;margin-bottom:.5rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;border-width:1px;--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity,1));cursor:pointer}.tff-field-preview:hover{border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.tff-field-preview:hover,.tff-field-preview[data-selected=true]{--tw-border-opacity:1;--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.tff-field-preview[data-selected=true]{border-color:rgb(59 130 246/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.tff-field-preview[data-selected=true] .tff-drag-handle{opacity:1}.tff-field-preview[data-selected=true]:hover{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.tff-field-preview[data-dragging=true]{opacity:.5;--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.tff-drag-handle{position:absolute;top:0;left:50%;--tw-translate-x:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:move;display:flex;align-items:center;justify-content:center;width:1.5rem;margin-top:.25rem;opacity:0;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.tff-drag-handle-icon{height:1rem;width:1rem;--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.tff-logic-indicators-container{position:absolute;top:.25rem;right:.25rem;display:flex;flex-direction:row;gap:.25rem}.tff-logic-indicator{border-radius:.75rem;height:1.25rem;padding-left:.5rem;padding-right:.5rem;display:flex;align-items:center;justify-content:center;font-size:.75rem;line-height:1rem;cursor:help;white-space:nowrap}.tff-logic-indicator-blue{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1));--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.tff-logic-indicator-gray{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1));color:#999fa8}.tff-logic-indicator-orange{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1));--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.tff-field-preview:hover .tff-drag-handle,.tff-field-preview[data-selected=true] .tff-drag-handle{opacity:1}.tff-settings-content{overflow-y:auto;flex-grow:1}.tff-field-placeholder{height:8rem;border-width:2px;border-style:dashed;--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1));border-radius:.5rem;--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.tff-field-wrapper{display:flex;flex-direction:column;gap:0;cursor:move}.tff-field-container{position:relative;min-height:40px}.tff-field-preview>div:last-child{flex-grow:1}.tff-editor-layout{display:flex;flex-direction:column;min-height:100vh;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));position:relative}.tff-center-panel{flex-grow:1;padding:1rem;width:100%;min-height:50vh;order:1}.tff-left-panel{--tw-bg-opacity:1;border-top-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1));order:2}.tff-left-panel,.tff-right-panel{width:100%;background-color:rgb(249 250 251/var(--tw-bg-opacity,1));padding:1rem}.tff-right-panel{--tw-bg-opacity:1;position:fixed;inset:0;z-index:50;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s;--tw-translate-x:100%}.tff-right-panel,.tff-right-panel.tff-panel-visible{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.tff-right-panel.tff-panel-visible{--tw-translate-x:0px}.tff-container{container-type:inline-size}.tff-container :disabled{cursor:not-allowed}@container (min-width: 640px) and (max-width: 1024px){.tff-editor-layout{flex-direction:row;height:100vh;overflow:hidden;position:relative}.tff-left-panel{width:20rem;border-top-width:0;border-right-width:1px;flex-shrink:0;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s;--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.tff-center-panel,.tff-left-panel{order:0;overflow-y:auto;position:relative}.tff-center-panel{flex:1 1 0%;min-width:0}.tff-right-panel{width:20rem;position:absolute;top:0;left:0;height:100%;transform:none;order:0;overflow-y:auto;border-right-width:1px;flex-shrink:0;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s;--tw-translate-x:-100%;z-index:50;--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.tff-right-panel,.tff-right-panel.tff-panel-visible{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.tff-right-panel.tff-panel-visible{--tw-translate-x:0px}.tff-right-panel.tff-panel-visible~.tff-left-panel{opacity:0;pointer-events:none}}@container (min-width: 1024px){.tff-editor-layout{flex-direction:row;height:100vh;overflow:hidden}.tff-left-panel{width:16rem;border-top-width:0;border-right-width:1px;flex-shrink:0}.tff-center-panel,.tff-left-panel{order:0;overflow-y:auto;position:relative}.tff-center-panel{flex:1 1 0%;min-width:0}.tff-right-panel{width:20rem;position:static;transform:none;--tw-translate-x:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));order:0;overflow-y:auto;border-left-width:1px;flex-shrink:0;transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.tff-right-panel:not(.tff-panel-visible){width:0;border-left-width:0;padding:0;overflow:hidden}.tff-panel-hidden{display:block}}.tff-panel-header{margin-bottom:1rem}.tff-close-button{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.tff-close-button:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.tff-close-button{font-size:1.5rem;line-height:2rem;font-weight:700;padding:.5rem;margin-right:-.5rem}.tff-panel-header{font-weight:700;font-size:1.125rem;line-height:1.75rem;padding:.75rem 1rem;border-bottom-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));display:flex;align-items:center;justify-content:space-between}.tff-panel-header .tff-close-button{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.tff-panel-header .tff-close-button:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.tff-panel-header .tff-close-button{font-size:1.25rem;line-height:1.75rem;font-weight:500;margin-left:.5rem}.tff-field-list,.tff-right-panel>div:last-child{overflow-y:auto}.tff-center-panel{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));padding:1rem 1rem 6rem;overflow-y:auto}.tff-field-list>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.tff-field-list-item{padding:.5rem;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));border-radius:.25rem;--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.tff-field-list-item,.tff-field-list-item:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.tff-field-list-item:hover{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.tff-field-list-item{cursor:pointer;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.tff-fields-container{min-height:200px}.tff-button{display:inline-flex;align-items:center;justify-content:center;border-radius:.375rem;padding:.5rem .75rem;font-size:.875rem;line-height:1.25rem;font-weight:600;--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.tff-button:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px}.tff-button-secondary{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1));--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-inset:inset;--tw-ring-opacity:1;--tw-ring-color:rgb(209 213 219/var(--tw-ring-opacity,1))}.tff-button-secondary:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.tff-comparison-value:focus,.tff-comparison-value:focus-visible{outline:none!important;box-shadow:none!important}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.hover\:bg-green-700:hover{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity,1))}.hover\:bg-red-700:hover{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity,1))}@media (min-width:768px){.md\:w-11\/12{width:91.666667%}.md\:p-3{padding:.75rem}} \ No newline at end of file + input[type=time]:not(:valid)::-webkit-datetime-edit-second-field,.tff-editor-layout .tff-center-panel input[type=date]:not(:valid)::-webkit-datetime-edit-text,.tff-editor-layout .tff-center-panel input[type=time]:not(:valid)::-webkit-datetime-edit-text{color:transparent!important;opacity:0!important}.tff-editor-layout .tff-center-panel input[type=date].tff-empty-optional,.tff-editor-layout .tff-center-panel input[type=date]:not(:valid),.tff-editor-layout .tff-center-panel input[type=datetime-local].tff-empty-optional,.tff-editor-layout .tff-center-panel input[type=datetime-local]:not(:valid),.tff-editor-layout .tff-center-panel input[type=time].tff-empty-optional,.tff-editor-layout .tff-center-panel input[type=time]:not(:valid){color:inherit!important;opacity:1!important}.tff-dropdown-group{display:grid}.tff-dropdown-group select{-webkit-appearance:none;-moz-appearance:none;appearance:none}@media (forced-colors:active){.tff-dropdown-group select{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}.tff-dropdown-group select{border-width:1px;grid-row-start:1;grid-column-start:1;--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.tff-dropdown-group select:hover{--tw-border-opacity:1;border-color:rgb(6 182 212/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.tff-dropdown-group select{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1));--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1));padding:.5rem;border-radius:.25rem}.tff-dropdown-group select.tff-select-disabled{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.tff-dropdown-group svg{pointer-events:none;z-index:10;right:.25rem;position:relative;grid-column-start:1;grid-row-start:1;height:1rem;width:1rem;margin-right:.5rem;align-self:center;justify-self:end}@media (forced-colors:active){.tff-dropdown-group svg{display:none}}.tff-choosemany-group,.tff-chooseone-group{display:grid}.tff-choosemany-group .tff-choosemany-checkboxes,.tff-chooseone-group .tff-chooseone-radiobuttons{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));gap:.5rem}.tff-checkbox-group,.tff-radiobuttons-group{display:flex}.tff-checkbox-group .tff-field-label input,.tff-field-group .tff-field-label input,.tff-radiobuttons-group .tff-field-label input,.tff-toggle-group .tff-field-label input{border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1));vertical-align:middle;margin-bottom:.125rem}.tff-build-field{display:grid;grid-template-rows:auto auto 1fr auto;gap:0}.tff-build-field-buttons{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:4rem}.tff-build-field-buttons .tff-move{display:flex}.tff-build-field-buttons .tff-move>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem*var(--tw-space-x-reverse));margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))}.tff-settings-content button{font-size:.75rem;line-height:1rem;--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.tff-settings-content button:hover{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.tff-settings-content button{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1));padding:.5rem 1rem;border-radius:.25rem}.tff-build-field-buttons button.tff-delete{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.tff-dropdown-button{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1));--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.tff-dropdown-button:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.tff-dropdown-button:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);outline:2px solid transparent;outline-offset:2px;--tw-ring-opacity:1;--tw-ring-color:rgb(147 197 253/var(--tw-ring-opacity,1))}.tff-dropdown-button{font-weight:500;border-radius:.5rem;font-size:.875rem;line-height:1.25rem;padding:.625rem 1.25rem;text-align:center;display:inline-flex;align-items:center}.tff-dropdown-open{display:block;position:absolute}.tff-dropdown-closed{display:none}.tff-selectinput-wrapper{margin-top:.5rem}.tff-selectinput-group{display:flex;align-items:center;border-radius:.375rem;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));outline-style:solid;outline-width:1px;outline-offset:-1px;outline-color:#d1d5db}.tff-selectinput-group:has(input:focus-within){outline-style:solid;outline-width:2px;outline-offset:-2px;outline-color:#4f46e5}.tff-selectinput-input{display:block;min-width:0;flex-grow:1;padding:.375rem .75rem .375rem .25rem;font-size:1rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.tff-selectinput-input::-moz-placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.tff-selectinput-input::placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.tff-selectinput-input:focus{outline-style:solid;outline-width:0}@media (min-width:640px){.tff-selectinput-input{font-size:.875rem;line-height:1.5rem}}.tff-selectinput-select-wrapper{display:grid;flex-shrink:0;grid-template-columns:repeat(1,minmax(0,1fr))}.tff-selectinput-select-wrapper:focus-within{position:relative}.tff-selectinput-select{grid-column-start:1;grid-row-start:1;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.375rem;padding:.375rem 1.75rem .375rem .75rem;font-size:1rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.tff-selectinput-select::-moz-placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.tff-selectinput-select::placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.tff-selectinput-select:focus{outline-style:solid;outline-width:2px;outline-offset:-2px;outline-color:#4f46e5}@media (min-width:640px){.tff-selectinput-select{font-size:.875rem;line-height:1.5rem}}.tff-selectarrow-icon{pointer-events:none;grid-column-start:1;grid-row-start:1;margin-right:.5rem;width:1.25rem;height:1.25rem;align-self:center;justify-self:end;--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}@media (min-width:640px){.tff-selectarrow-icon{width:1rem;height:1rem}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes yellowFade{0%{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}to{background-color:transparent}}.tff-animate-fadeOut{animation:fadeOut .5s ease-in-out}.tff-animate-yellowFade{animation:yellowFade .5s ease-in-out}.tff-field-preview{position:relative;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));border-radius:.5rem;padding:1rem;margin-bottom:.5rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;border-width:1px;--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity,1));cursor:pointer}.tff-field-preview:hover{border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.tff-field-preview:hover,.tff-field-preview[data-selected=true]{--tw-border-opacity:1;--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.tff-field-preview[data-selected=true]{border-color:rgb(59 130 246/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.tff-field-preview[data-selected=true] .tff-drag-handle{opacity:1}.tff-field-preview[data-selected=true]:hover{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.tff-field-preview[data-dragging=true]{opacity:.5;--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.tff-drag-handle{position:absolute;top:0;left:50%;--tw-translate-x:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:move;display:flex;align-items:center;justify-content:center;width:1.5rem;margin-top:.25rem;opacity:0;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.tff-drag-handle-icon{height:1rem;width:1rem;--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.tff-logic-indicators-container{position:absolute;top:.25rem;right:.25rem;display:flex;flex-direction:row;gap:.25rem}.tff-logic-indicator{border-radius:.75rem;height:1.25rem;padding-left:.5rem;padding-right:.5rem;display:flex;align-items:center;justify-content:center;font-size:.75rem;line-height:1rem;cursor:help;white-space:nowrap}.tff-logic-indicator-blue{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1));--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.tff-logic-indicator-gray{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1));color:#999fa8}.tff-logic-indicator-orange{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1));--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.tff-field-preview:hover .tff-drag-handle,.tff-field-preview[data-selected=true] .tff-drag-handle{opacity:1}.tff-settings-content{overflow-y:auto;flex-grow:1}.tff-field-placeholder{height:8rem;border-width:2px;border-style:dashed;--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1));border-radius:.5rem;--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.tff-field-wrapper{display:flex;flex-direction:column;gap:0;cursor:move}.tff-field-container{position:relative;min-height:40px}.tff-field-preview>div:last-child{flex-grow:1}.tff-editor-layout{display:flex;flex-direction:column;min-height:100vh;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));position:relative}.tff-center-panel{flex-grow:1;padding:1rem;width:100%;min-height:50vh;order:1}.tff-left-panel{--tw-bg-opacity:1;border-top-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1));order:2}.tff-left-panel,.tff-right-panel{width:100%;background-color:rgb(249 250 251/var(--tw-bg-opacity,1));padding:1rem}.tff-right-panel{--tw-bg-opacity:1;position:fixed;inset:0;z-index:50;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s;--tw-translate-x:100%}.tff-right-panel,.tff-right-panel.tff-panel-visible{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.tff-right-panel.tff-panel-visible{--tw-translate-x:0px}.tff-container{container-type:inline-size}.tff-container :disabled{cursor:not-allowed}@container (min-width: 640px) and (max-width: 1024px){.tff-editor-layout{flex-direction:row;height:100vh;overflow:hidden;position:relative}.tff-left-panel{width:20rem;border-top-width:0;border-right-width:1px;flex-shrink:0;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s;--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.tff-center-panel,.tff-left-panel{order:0;overflow-y:auto;position:relative}.tff-center-panel{flex:1 1 0%;min-width:0}.tff-right-panel{width:20rem;position:absolute;top:0;left:0;height:100%;transform:none;order:0;overflow-y:auto;border-right-width:1px;flex-shrink:0;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s;--tw-translate-x:-100%;z-index:50;--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.tff-right-panel,.tff-right-panel.tff-panel-visible{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.tff-right-panel.tff-panel-visible{--tw-translate-x:0px}.tff-right-panel.tff-panel-visible~.tff-left-panel{opacity:0;pointer-events:none}}@container (min-width: 1024px){.tff-editor-layout{flex-direction:row;height:100vh;overflow:hidden}.tff-left-panel{width:16rem;border-top-width:0;border-right-width:1px;flex-shrink:0}.tff-center-panel,.tff-left-panel{order:0;overflow-y:auto;position:relative}.tff-center-panel{flex:1 1 0%;min-width:0}.tff-right-panel{width:20rem;position:static;transform:none;--tw-translate-x:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));order:0;overflow-y:auto;border-left-width:1px;flex-shrink:0;transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.tff-right-panel:not(.tff-panel-visible){width:0;border-left-width:0;padding:0;overflow:hidden}.tff-panel-hidden{display:block}}.tff-panel-header{margin-bottom:1rem}.tff-close-button{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.tff-close-button:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.tff-close-button{font-size:1.5rem;line-height:2rem;font-weight:700;padding:.5rem;margin-right:-.5rem}.tff-panel-header{font-weight:700;font-size:1.125rem;line-height:1.75rem;padding:.75rem 1rem;border-bottom-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));display:flex;align-items:center;justify-content:space-between}.tff-panel-header .tff-close-button{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.tff-panel-header .tff-close-button:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.tff-panel-header .tff-close-button{font-size:1.25rem;line-height:1.75rem;font-weight:500;margin-left:.5rem}.tff-field-group-tabs{display:flex;flex-direction:row;border-bottom-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1));overflow-x:auto;margin-bottom:.5rem}.tff-field-group-tab{padding:.5rem .75rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1));border-bottom-width:2px;border-color:transparent;cursor:pointer;white-space:nowrap}.tff-field-group-tab:hover{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1));--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.tff-field-group-tab-active{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1));--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1));font-weight:600}.tff-field-list,.tff-right-panel>div:last-child{overflow-y:auto}.tff-center-panel{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));padding:1rem 1rem 6rem;overflow-y:auto}.tff-field-list>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.tff-field-list-item{padding:.5rem;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));border-radius:.25rem;--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.tff-field-list-item,.tff-field-list-item:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.tff-field-list-item:hover{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.tff-field-list-item{cursor:pointer;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.tff-fields-container{min-height:200px}.tff-button{display:inline-flex;align-items:center;justify-content:center;border-radius:.375rem;padding:.5rem .75rem;font-size:.875rem;line-height:1.25rem;font-weight:600;--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.tff-button:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px}.tff-button-secondary{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1));--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-inset:inset;--tw-ring-opacity:1;--tw-ring-color:rgb(209 213 219/var(--tw-ring-opacity,1))}.tff-button-secondary:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.tff-comparison-value:focus,.tff-comparison-value:focus-visible{outline:none!important;box-shadow:none!important}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.hover\:bg-green-700:hover{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity,1))}.hover\:bg-red-700:hover{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity,1))}@media (min-width:768px){.md\:w-11\/12{width:91.666667%}.md\:p-3{padding:.75rem}} \ No newline at end of file diff --git a/index.html b/index.html index 501b62c..7efdb33 100644 --- a/index.html +++ b/index.html @@ -223,56 +223,30 @@ ChooseOne: 'No', ChooseMany: ['Durian', 'Banana'], }, // pre-fill form fields - shortTextTypeList: [ + inputFieldGroups: [ { - // optional: you can add custom fields using webcomponents - 'Custom Element': { - inputTag: 'validated-input', - attributes: { - type: 'url', - }, - }, + heading: 'Basic', + fields: [ + { type: 'Dropdown', choices: ['Red', 'Orange', 'Yellow', 'Green', 'Blue', 'Indigo', 'Violet'] }, + { type: 'ChooseOne', choices: ['Yes', 'No'] }, + { type: 'ChooseMultiple', choices: ['Apple', 'Banana', 'Cantaloupe', 'Durian'] }, + { type: 'LongText', maxLength: 160 }, + { type: 'ShortText', inputType: 'Single-line free text', attributes: { type: 'text' } }, + ], }, { - Email: { - type: 'email', - }, - }, - { - Emails: { - type: 'email', - multiple: 'true', - }, - }, - { - Telephone: { - type: 'tel', - }, - }, - { - URL: { - type: 'url', - }, - }, - { - Color: { - type: 'color', - }, - }, - { - Date: { - type: 'date', - }, - }, - { - Time: { - type: 'time', - }, - }, - { - 'Date & Time': { - type: 'datetime-local', - }, + heading: 'Advanced', + fields: [ + { type: 'ShortText', inputType: 'Custom Element', inputTag: 'validated-input', attributes: { type: 'url' } }, + { type: 'ShortText', inputType: 'Email', attributes: { type: 'email' } }, + { type: 'ShortText', inputType: 'Emails', attributes: { type: 'email', multiple: 'true' } }, + { type: 'ShortText', inputType: 'Telephone', attributes: { type: 'tel' } }, + { type: 'ShortText', inputType: 'URL', attributes: { type: 'url' } }, + { type: 'ShortText', inputType: 'Color', attributes: { type: 'color' } }, + { type: 'ShortText', inputType: 'Date', attributes: { type: 'date' } }, + { type: 'ShortText', inputType: 'Time', attributes: { type: 'time' } }, + { type: 'ShortText', inputType: 'Date & Time', attributes: { type: 'datetime-local' } }, + ], }, ], }; diff --git a/input.css b/input.css index f6f3e4a..945fad5 100644 --- a/input.css +++ b/input.css @@ -834,6 +834,35 @@ @apply ml-2; } +/* Field group tab bar styles */ +.tff-field-group-tabs { + @apply flex; + @apply flex-row; + @apply border-b; + @apply border-gray-200; + @apply overflow-x-auto; + @apply mb-2; +} + +.tff-field-group-tab { + @apply px-3; + @apply py-2; + @apply text-sm; + @apply text-gray-600; + @apply border-b-2; + @apply border-transparent; + @apply cursor-pointer; + @apply whitespace-nowrap; + @apply hover:text-gray-800; + @apply hover:border-gray-300; +} + +.tff-field-group-tab-active { + @apply text-blue-600; + @apply border-blue-500; + @apply font-semibold; +} + .tff-field-list { @apply overflow-y-auto; } diff --git a/src/ConfigSchema.elm b/src/ConfigSchema.elm index 0a8b920..94d7472 100644 --- a/src/ConfigSchema.elm +++ b/src/ConfigSchema.elm @@ -21,8 +21,9 @@ configSchemaBuilder = , ( "formFields", formFieldsSchemaBuilder ) , ( "formValues", formValuesSchemaBuilder ) , ( "shortTextTypeList", shortTextTypeListSchemaBuilder ) + , ( "inputFieldGroups", inputFieldGroupsSchemaBuilder ) ] - |> withRequired [ "viewMode", "formFields", "formValues", "shortTextTypeList" ] + |> withRequired [ "viewMode", "formFields", "formValues" ] viewModeSchemaBuilder : SchemaBuilder @@ -343,6 +344,24 @@ shortTextTypeListSchemaBuilder = |> withItem customElementSchemaBuilder +inputFieldGroupSchemaBuilder : SchemaBuilder +inputFieldGroupSchemaBuilder = + buildSchema + |> withType "object" + |> withProperties + [ ( "heading", buildSchema |> withType "string" ) + , ( "fields", buildSchema |> withType "array" |> withItem inputFieldSchemaBuilder ) + ] + |> withRequired [ "heading", "fields" ] + + +inputFieldGroupsSchemaBuilder : SchemaBuilder +inputFieldGroupsSchemaBuilder = + buildSchema + |> withType "array" + |> withItem inputFieldGroupSchemaBuilder + + configSchemaJson : Encode.Value configSchemaJson = case configSchema of diff --git a/src/Main.elm b/src/Main.elm index 5195709..a7c8971 100644 --- a/src/Main.elm +++ b/src/Main.elm @@ -13,16 +13,22 @@ port module Main exposing , RawCustomElement , ViewMode(..) , VisibilityRule(..) + , InputFieldGroup + , allCustomElementsFromGroups , allInputField , decodeChoice + , decodeConfigInputFieldGroups , decodeCustomElement , decodeFormField , decodeFormFields + , decodeInputFieldGroup + , decodeInputFieldGroups , decodeShortTextTypeList , dragOverDecoder , encodeChoice , encodeFormFields , encodeInputField + , encodeInputFieldGroup , encodePairsFromCustomElement , evaluateCondition , fieldsWithPlaceholder @@ -82,9 +88,7 @@ type alias Config = { viewMode : ViewMode , formFields : Array FormField , formValues : Json.Encode.Value - - -- List because order matters - , shortTextTypeList : List CustomElement + , inputFieldGroups : List InputFieldGroup } @@ -94,12 +98,11 @@ type alias Model = , formFields : Array FormField , needsFormLogic : Bool , trackedFormValues : Dict String (List String) - - -- List because order matters - , shortTextTypeList : List CustomElement + , inputFieldGroups : List InputFieldGroup -- Dict to lookup by `inputType` , shortTextTypeDict : Dict String CustomElement + , activeFieldGroupIndex : Int , selectedFieldIndex : Maybe Int , dragged : Maybe Dragged , nextQuestionNumber : Int @@ -346,6 +349,27 @@ allInputField = ] +type alias InputFieldGroup = + { heading : String + , fields : List InputField + } + + +allCustomElementsFromGroups : List InputFieldGroup -> List CustomElement +allCustomElementsFromGroups groups = + groups + |> List.concatMap .fields + |> List.filterMap + (\inputField -> + case inputField of + ShortText customElement -> + Just customElement + + _ -> + Nothing + ) + + stringFromInputField : InputField -> String stringFromInputField inputField = case inputField of @@ -420,6 +444,7 @@ type Msg | Drop (Maybe Int) | DoSleepDo Float (List Msg) | OnFormValuesUpdated String String + | SelectFieldGroup Int type alias Droppable = @@ -563,27 +588,11 @@ isFieldUsedInChoiceFilter fieldName maybeFilter = init : Flags -> ( Model, Cmd Msg ) init flags = - let - defaultShortTextTypeList : List CustomElement - defaultShortTextTypeList = - [ fromRawCustomElement - { inputType = "Single-line free text" - , inputTag = defaultInputTag - , attributes = Dict.fromList [ ( "type", "text" ) ] - } - ] - - defaultShortTextTypeListWithout : List CustomElement -> List CustomElement - defaultShortTextTypeListWithout shortTextTypeList = - List.filter (\a -> not (List.member a shortTextTypeList)) - defaultShortTextTypeList - in case Json.Decode.decodeValue decodeConfig flags of Ok config -> let - effectiveShortTextTypeList = - defaultShortTextTypeListWithout config.shortTextTypeList - ++ config.shortTextTypeList + allCustomElements = + allCustomElementsFromGroups config.inputFieldGroups initialTrackedFormValues = Array.toList config.formFields @@ -620,11 +629,12 @@ init flags = |> Array.isEmpty |> not , trackedFormValues = initialTrackedFormValues - , shortTextTypeList = effectiveShortTextTypeList + , inputFieldGroups = config.inputFieldGroups , shortTextTypeDict = - effectiveShortTextTypeList + allCustomElements |> List.map (\customElement -> ( customElement.inputType, customElement )) |> Dict.fromList + , activeFieldGroupIndex = 0 , selectedFieldIndex = Nothing , dragged = Nothing , nextQuestionNumber = Array.length config.formFields + 1 @@ -640,8 +650,9 @@ init flags = , formFields = Array.empty , needsFormLogic = False , trackedFormValues = Dict.empty - , shortTextTypeList = [] + , inputFieldGroups = [] , shortTextTypeDict = Dict.empty + , activeFieldGroupIndex = 0 , selectedFieldIndex = Nothing , dragged = Nothing , nextQuestionNumber = 1 @@ -848,6 +859,9 @@ update msg model = ] ) + SelectFieldGroup index -> + ( { model | activeFieldGroupIndex = index }, Cmd.none ) + OnFormValuesUpdated fieldName value -> let formField = @@ -2611,10 +2625,12 @@ fieldsWithPlaceholder fields dragged = viewFormBuilder : Maybe ( Int, Animate ) -> Model -> List (Html Msg) viewFormBuilder maybeAnimate model = let - extraOptions = - List.map - (\customElement -> ShortText customElement) - model.shortTextTypeList + activeFields = + model.inputFieldGroups + |> List.drop model.activeFieldGroupIndex + |> List.head + |> Maybe.map .fields + |> Maybe.withDefault [] maybeFieldsList = fieldsWithPlaceholder @@ -2629,9 +2645,15 @@ viewFormBuilder maybeAnimate model = [ class "tff-left-panel" , classList [ ( "tff-panel-hidden", model.selectedFieldIndex /= Nothing ) ] ] - [ h2 [ class "tff-panel-header" ] [ text "Add Form Field" ] - , viewAddQuestionsList model.nextQuestionNumber (allInputField ++ extraOptions) - ] + ([ h2 [ class "tff-panel-header" ] [ text "Add Form Field" ] ] + ++ (if List.length model.inputFieldGroups > 1 then + [ viewFieldGroupTabs model.activeFieldGroupIndex model.inputFieldGroups ] + + else + [] + ) + ++ [ viewAddQuestionsList model.nextQuestionNumber activeFields ] + ) , div [ class "tff-center-panel" , classList [ ( "tff-panel-hidden", model.selectedFieldIndex /= Nothing ) ] @@ -2650,6 +2672,23 @@ viewFormBuilder maybeAnimate model = ] +viewFieldGroupTabs : Int -> List InputFieldGroup -> Html Msg +viewFieldGroupTabs activeIndex groups = + div [ class "tff-field-group-tabs" ] + (List.indexedMap + (\index group -> + button + [ class "tff-field-group-tab" + , classList [ ( "tff-field-group-tab-active", index == activeIndex ) ] + , type_ "button" + , onClick (SelectFieldGroup index) + ] + [ text group.heading ] + ) + groups + ) + + selectArrowDown : Html msg selectArrowDown = svg @@ -3146,7 +3185,7 @@ viewRightPanel modelData = Just index -> case Array.get index modelData.formFields of Just formField -> - viewFormFieldBuilder modelData.shortTextTypeList index (Array.length modelData.formFields) modelData.formFields formField + viewFormFieldBuilder (allCustomElementsFromGroups modelData.inputFieldGroups) index (Array.length modelData.formFields) modelData.formFields formField Nothing -> text "Select a field to edit its settings" @@ -3734,18 +3773,38 @@ decodeConfig = |> andMap (Json.Decode.Extra.optionalNullableField "viewMode" decodeViewMode |> Json.Decode.map (Maybe.withDefault (Editor { maybeAnimate = Nothing }))) |> andMap (Json.Decode.Extra.optionalNullableField "formFields" decodeFormFields |> Json.Decode.map (Maybe.withDefault Array.empty)) |> andMap (Json.Decode.Extra.optionalNullableField "formValues" Json.Decode.value |> Json.Decode.map (Maybe.withDefault Json.Encode.null)) - |> andMap - (Json.Decode.Extra.optionalNullableField "shortTextTypeList" decodeShortTextTypeList - |> Json.Decode.map - (Maybe.withDefault - [ fromRawCustomElement - { inputType = "Single-line free text" - , inputTag = defaultInputTag - , attributes = Dict.fromList [ ( "type", "text" ) ] - } - ] - ) - ) + |> andMap decodeConfigInputFieldGroups + + +decodeConfigInputFieldGroups : Json.Decode.Decoder (List InputFieldGroup) +decodeConfigInputFieldGroups = + let + defaultShortTextTypeList = + [ fromRawCustomElement + { inputType = "Single-line free text" + , inputTag = defaultInputTag + , attributes = Dict.fromList [ ( "type", "text" ) ] + } + ] + + fromShortTextTypeList : List CustomElement -> List InputFieldGroup + fromShortTextTypeList shortTextTypes = + let + effectiveList = + List.filter (\a -> not (List.member a shortTextTypes)) defaultShortTextTypeList + ++ shortTextTypes + in + [ { heading = "" + , fields = allInputField ++ List.map ShortText effectiveList + } + ] + in + Json.Decode.oneOf + [ Json.Decode.field "inputFieldGroups" decodeInputFieldGroups + , Json.Decode.Extra.optionalNullableField "shortTextTypeList" decodeShortTextTypeList + |> Json.Decode.map (Maybe.withDefault defaultShortTextTypeList) + |> Json.Decode.map fromShortTextTypeList + ] maybeDecode : String -> Json.Decode.Decoder b -> Json.Encode.Value -> Maybe b @@ -4252,6 +4311,26 @@ decodeShortTextTypeList = |> Json.Decode.map (List.concatMap customElementsFrom) +decodeInputFieldGroup : Json.Decode.Decoder InputFieldGroup +decodeInputFieldGroup = + Json.Decode.succeed InputFieldGroup + |> andMap (Json.Decode.field "heading" Json.Decode.string) + |> andMap (Json.Decode.field "fields" (Json.Decode.list decodeInputField)) + + +decodeInputFieldGroups : Json.Decode.Decoder (List InputFieldGroup) +decodeInputFieldGroups = + Json.Decode.list decodeInputFieldGroup + + +encodeInputFieldGroup : InputFieldGroup -> Json.Encode.Value +encodeInputFieldGroup group = + Json.Encode.object + [ ( "heading", Json.Encode.string group.heading ) + , ( "fields", Json.Encode.list encodeInputField group.fields ) + ] + + type alias RawCustomElement = { inputType : String , inputTag : String diff --git a/tests/InputFieldGroupJsonTest.elm b/tests/InputFieldGroupJsonTest.elm new file mode 100644 index 0000000..0be13d7 --- /dev/null +++ b/tests/InputFieldGroupJsonTest.elm @@ -0,0 +1,238 @@ +module InputFieldGroupJsonTest exposing (..) + +import Dict +import Expect +import Json.Decode +import Json.Encode +import Main +import Test exposing (..) + + +suite : Test +suite = + describe "InputFieldGroup JSON" + [ describe "backward compatibility" + [ test "legacy config with shortTextTypeList decodes to single group with allInputField + short text types" <| + \_ -> + let + legacyJson = + """ + { + "viewMode": "Editor", + "formFields": [], + "formValues": {}, + "shortTextTypeList": [ + { "Email": { "type": "email" } } + ] + } + """ + + result = + Json.Decode.decodeString Main.decodeConfigInputFieldGroups legacyJson + in + result + |> Result.map + (\groups -> + { groupCount = List.length groups + , firstHeading = List.head groups |> Maybe.map .heading + , fieldCount = List.head groups |> Maybe.map (.fields >> List.length) + } + ) + |> Expect.equal + (Ok + { groupCount = 1 + , firstHeading = Just "" + , fieldCount = Just (List.length Main.allInputField + 2) + } + ) + , test "legacy config with no shortTextTypeList gets default single-line free text" <| + \_ -> + let + legacyJson = + """ + { + "viewMode": "Editor", + "formFields": [], + "formValues": {} + } + """ + + result = + Json.Decode.decodeString Main.decodeConfigInputFieldGroups legacyJson + in + result + |> Result.map + (\groups -> + { groupCount = List.length groups + , firstHeading = List.head groups |> Maybe.map .heading + , fieldCount = List.head groups |> Maybe.map (.fields >> List.length) + } + ) + |> Expect.equal + (Ok + { groupCount = 1 + , firstHeading = Just "" + , fieldCount = Just (List.length Main.allInputField + 1) + } + ) + ] + , describe "new format" + [ test "inputFieldGroups with multiple groups decodes correctly" <| + \_ -> + let + newFormatJson = + """ + { + "viewMode": "Editor", + "formFields": [], + "formValues": {}, + "inputFieldGroups": [ + { + "heading": "Basic", + "fields": [ + { "type": "Dropdown", "choices": ["A", "B"] }, + { "type": "LongText", "maxLength": null } + ] + }, + { + "heading": "Advanced", + "fields": [ + { "type": "ShortText", "inputType": "Email", "attributes": { "type": "email" } } + ] + } + ] + } + """ + + result = + Json.Decode.decodeString Main.decodeConfigInputFieldGroups newFormatJson + in + result + |> Result.map + (\groups -> + { groupCount = List.length groups + , headings = List.map .heading groups + , fieldCounts = List.map (.fields >> List.length) groups + } + ) + |> Expect.equal + (Ok + { groupCount = 2 + , headings = [ "Basic", "Advanced" ] + , fieldCounts = [ 2, 1 ] + } + ) + , test "inputFieldGroups takes precedence over shortTextTypeList" <| + \_ -> + let + bothJson = + """ + { + "viewMode": "Editor", + "formFields": [], + "formValues": {}, + "shortTextTypeList": [ + { "Email": { "type": "email" } } + ], + "inputFieldGroups": [ + { + "heading": "Custom", + "fields": [ + { "type": "Dropdown", "choices": ["X"] } + ] + } + ] + } + """ + + result = + Json.Decode.decodeString Main.decodeConfigInputFieldGroups bothJson + in + result + |> Result.map + (\groups -> + { groupCount = List.length groups + , firstHeading = List.head groups |> Maybe.map .heading + , fieldCount = List.head groups |> Maybe.map (.fields >> List.length) + } + ) + |> Expect.equal + (Ok + { groupCount = 1 + , firstHeading = Just "Custom" + , fieldCount = Just 1 + } + ) + ] + , describe "round-trip" + [ test "encode then decode InputFieldGroup" <| + \_ -> + let + group = + { heading = "Test Group" + , fields = + [ Main.Dropdown + { choices = [ { label = "A", value = "A" } ] + , filter = Nothing + } + , Main.LongText (Main.AttributeGiven 100) + ] + } + + encoded = + Main.encodeInputFieldGroup group + + decoded = + Json.Decode.decodeValue Main.decodeInputFieldGroup encoded + in + decoded + |> Result.map + (\g -> + { heading = g.heading + , fieldCount = List.length g.fields + } + ) + |> Expect.equal + (Ok + { heading = "Test Group" + , fieldCount = 2 + } + ) + ] + , describe "allCustomElementsFromGroups" + [ test "extracts custom elements from all groups" <| + \_ -> + let + groups = + [ { heading = "Basic" + , fields = + [ Main.Dropdown { choices = [], filter = Nothing } + , Main.ShortText + (Main.fromRawCustomElement + { inputType = "Email" + , inputTag = "input" + , attributes = Dict.fromList [ ( "type", "email" ) ] + } + ) + ] + } + , { heading = "Advanced" + , fields = + [ Main.ShortText + (Main.fromRawCustomElement + { inputType = "URL" + , inputTag = "input" + , attributes = Dict.fromList [ ( "type", "url" ) ] + } + ) + ] + } + ] + + result = + Main.allCustomElementsFromGroups groups + in + List.map .inputType result + |> Expect.equal [ "Email", "URL" ] + ] + ] From 06fb9db8fddd7d8cb80fdb080935937f018d4b6d Mon Sep 17 00:00:00 2001 From: choonkeat Date: Tue, 3 Mar 2026 22:00:43 +0800 Subject: [PATCH 2/2] make build --- dist/tiny-form-fields.esm.js | 2306 ++++++++++++++++----------------- dist/tiny-form-fields.js | 2306 ++++++++++++++++----------------- dist/tiny-form-fields.min.css | 2 +- 3 files changed, 2301 insertions(+), 2313 deletions(-) diff --git a/dist/tiny-form-fields.esm.js b/dist/tiny-form-fields.esm.js index e8b588f..a2fa1fd 100644 --- a/dist/tiny-form-fields.esm.js +++ b/dist/tiny-form-fields.esm.js @@ -77,7 +77,7 @@ function A9(fun, a, b, c, d, e, f, g, h, i) { return fun.a === 9 ? fun.f(a, b, c, d, e, f, g, h, i) : fun(a)(b)(c)(d)(e)(f)(g)(h)(i); } -console.warn('Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets.'); + // EQUALITY @@ -113,7 +113,7 @@ function _Utils_eqHelp(x, y, depth, stack) return true; } - /**/ + /**_UNUSED/ if (x.$ === 'Set_elm_builtin') { x = $elm$core$Set$toList(x); @@ -126,7 +126,7 @@ function _Utils_eqHelp(x, y, depth, stack) } //*/ - /**_UNUSED/ + /**/ if (x.$ < 0) { x = $elm$core$Dict$toList(x); @@ -161,7 +161,7 @@ function _Utils_cmp(x, y, ord) return x === y ? /*EQ*/ 0 : x < y ? /*LT*/ -1 : /*GT*/ 1; } - /**/ + /**_UNUSED/ if (x instanceof String) { var a = x.valueOf(); @@ -170,10 +170,10 @@ function _Utils_cmp(x, y, ord) } //*/ - /**_UNUSED/ + /**/ if (typeof x.$ === 'undefined') //*/ - /**/ + /**_UNUSED/ if (x.$[0] === '#') //*/ { @@ -203,17 +203,17 @@ var _Utils_compare = F2(function(x, y) // COMMON VALUES -var _Utils_Tuple0_UNUSED = 0; -var _Utils_Tuple0 = { $: '#0' }; +var _Utils_Tuple0 = 0; +var _Utils_Tuple0_UNUSED = { $: '#0' }; -function _Utils_Tuple2_UNUSED(a, b) { return { a: a, b: b }; } -function _Utils_Tuple2(a, b) { return { $: '#2', a: a, b: b }; } +function _Utils_Tuple2(a, b) { return { a: a, b: b }; } +function _Utils_Tuple2_UNUSED(a, b) { return { $: '#2', a: a, b: b }; } -function _Utils_Tuple3_UNUSED(a, b, c) { return { a: a, b: b, c: c }; } -function _Utils_Tuple3(a, b, c) { return { $: '#3', a: a, b: b, c: c }; } +function _Utils_Tuple3(a, b, c) { return { a: a, b: b, c: c }; } +function _Utils_Tuple3_UNUSED(a, b, c) { return { $: '#3', a: a, b: b, c: c }; } -function _Utils_chr_UNUSED(c) { return c; } -function _Utils_chr(c) { return new String(c); } +function _Utils_chr(c) { return c; } +function _Utils_chr_UNUSED(c) { return new String(c); } // RECORDS @@ -264,11 +264,11 @@ function _Utils_ap(xs, ys) -var _List_Nil_UNUSED = { $: 0 }; -var _List_Nil = { $: '[]' }; +var _List_Nil = { $: 0 }; +var _List_Nil_UNUSED = { $: '[]' }; -function _List_Cons_UNUSED(hd, tl) { return { $: 1, a: hd, b: tl }; } -function _List_Cons(hd, tl) { return { $: '::', a: hd, b: tl }; } +function _List_Cons(hd, tl) { return { $: 1, a: hd, b: tl }; } +function _List_Cons_UNUSED(hd, tl) { return { $: '::', a: hd, b: tl }; } var _List_cons = F2(_List_Cons); @@ -499,12 +499,12 @@ var _JsArray_appendN = F3(function(n, dest, source) // LOG -var _Debug_log_UNUSED = F2(function(tag, value) +var _Debug_log = F2(function(tag, value) { return value; }); -var _Debug_log = F2(function(tag, value) +var _Debug_log_UNUSED = F2(function(tag, value) { console.log(tag + ': ' + _Debug_toString(value)); return value; @@ -530,12 +530,12 @@ function _Debug_todoCase(moduleName, region, value) // TO STRING -function _Debug_toString_UNUSED(value) +function _Debug_toString(value) { return ''; } -function _Debug_toString(value) +function _Debug_toString_UNUSED(value) { return _Debug_toAnsiString(false, value); } @@ -720,13 +720,13 @@ function _Debug_toHexDigit(n) // CRASH -function _Debug_crash_UNUSED(identifier) +function _Debug_crash(identifier) { throw new Error('https://github.com/elm/core/blob/1.0.0/hints/' + identifier + '.md'); } -function _Debug_crash(identifier, fact1, fact2, fact3, fact4) +function _Debug_crash_UNUSED(identifier, fact1, fact2, fact3, fact4) { switch(identifier) { @@ -784,11 +784,11 @@ function _Debug_crash(identifier, fact1, fact2, fact3, fact4) function _Debug_regionToString(region) { - if (region.start.line === region.end.line) + if (region.bo.aN === region.bQ.aN) { - return 'on line ' + region.start.line; + return 'on line ' + region.bo.aN; } - return 'on lines ' + region.start.line + ' through ' + region.end.line; + return 'on lines ' + region.bo.aN + ' through ' + region.bQ.aN; } @@ -1212,7 +1212,7 @@ function _Char_toLocaleLower(char) -/**/ +/**_UNUSED/ function _Json_errorToString(error) { return $elm$json$Json$Decode$errorToString(error); @@ -1616,11 +1616,11 @@ var _Json_encode = F2(function(indentLevel, value) return JSON.stringify(_Json_unwrap(value), null, indentLevel) + ''; }); -function _Json_wrap(value) { return { $: 0, a: value }; } -function _Json_unwrap(value) { return value.a; } +function _Json_wrap_UNUSED(value) { return { $: 0, a: value }; } +function _Json_unwrap_UNUSED(value) { return value.a; } -function _Json_wrap_UNUSED(value) { return value; } -function _Json_unwrap_UNUSED(value) { return value; } +function _Json_wrap(value) { return value; } +function _Json_unwrap(value) { return value; } function _Json_emptyArray() { return []; } function _Json_emptyObject() { return {}; } @@ -1857,9 +1857,9 @@ var _Platform_worker = F4(function(impl, flagDecoder, debugMetadata, args) return _Platform_initialize( flagDecoder, args, - impl.init, - impl.update, - impl.subscriptions, + impl.dv, + impl.dY, + impl.dV, function() { return function() {} } ); }); @@ -1872,7 +1872,7 @@ var _Platform_worker = F4(function(impl, flagDecoder, debugMetadata, args) function _Platform_initialize(flagDecoder, args, init, update, subscriptions, stepperBuilder) { var result = A2(_Json_run, flagDecoder, _Json_wrap(args ? args['flags'] : undefined)); - $elm$core$Result$isOk(result) || _Debug_crash(2 /**/, _Json_errorToString(result.a) /**/); + $elm$core$Result$isOk(result) || _Debug_crash(2 /**_UNUSED/, _Json_errorToString(result.a) /**/); var managers = {}; var initPair = init(result.a); var model = initPair.a; @@ -2317,7 +2317,7 @@ function _Platform_setupIncomingPort(name, sendToApp) /* -function _Platform_export_UNUSED(exports) +function _Platform_export(exports) { scope['Elm'] ? _Platform_mergeExportsProd(scope['Elm'], exports) @@ -2342,7 +2342,7 @@ function _Platform_mergeExportsProd(obj, exports) /* -function _Platform_export(exports) +function _Platform_export_UNUSED(exports) { scope['Elm'] ? _Platform_mergeExportsDebug('Elm', scope['Elm'], exports) @@ -2385,10 +2385,10 @@ var _VirtualDom_init = F4(function(virtualNode, flagDecoder, debugMetadata, args { // NOTE: this function needs _Platform_export available to work - /**_UNUSED/ + /**/ var node = args['node']; //*/ - /**/ + /**_UNUSED/ var node = args && args['node'] ? args['node'] : _Debug_crash(0); //*/ @@ -2663,14 +2663,14 @@ function _VirtualDom_noInnerHtmlOrFormAction(key) function _VirtualDom_noJavaScriptUri(value) { return _VirtualDom_RE_js.test(value) - ? /**_UNUSED/''//*//**/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ + ? /**/''//*//**_UNUSED/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ : value; } function _VirtualDom_noJavaScriptOrHtmlUri(value) { return _VirtualDom_RE_js_html.test(value) - ? /**_UNUSED/''//*//**/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ + ? /**/''//*//**_UNUSED/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ : value; } @@ -2678,7 +2678,7 @@ function _VirtualDom_noJavaScriptOrHtmlJson(value) { return (typeof _Json_unwrap(value) === 'string' && _VirtualDom_RE_js_html.test(_Json_unwrap(value))) ? _Json_wrap( - /**_UNUSED/''//*//**/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ + /**/''//*//**_UNUSED/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ ) : value; } @@ -2727,9 +2727,9 @@ var _VirtualDom_mapEventTuple = F2(function(func, tuple) var _VirtualDom_mapEventRecord = F2(function(func, record) { return { - message: func(record.message), - stopPropagation: record.stopPropagation, - preventDefault: record.preventDefault + aj: func(record.aj), + bp: record.bp, + bk: record.bk } }); @@ -2997,11 +2997,11 @@ function _VirtualDom_makeCallback(eventNode, initialHandler) // 3 = Custom var value = result.a; - var message = !tag ? value : tag < 3 ? value.a : value.message; - var stopPropagation = tag == 1 ? value.b : tag == 3 && value.stopPropagation; + var message = !tag ? value : tag < 3 ? value.a : value.aj; + var stopPropagation = tag == 1 ? value.b : tag == 3 && value.bp; var currentEventNode = ( stopPropagation && event.stopPropagation(), - (tag == 2 ? value.b : tag == 3 && value.preventDefault) && event.preventDefault(), + (tag == 2 ? value.b : tag == 3 && value.bk) && event.preventDefault(), eventNode ); var tagger; @@ -3951,15 +3951,15 @@ var _Browser_element = _Debugger_element || F4(function(impl, flagDecoder, debug return _Platform_initialize( flagDecoder, args, - impl.init, - impl.update, - impl.subscriptions, + impl.dv, + impl.dY, + impl.dV, function(sendToApp, initialModel) { - var view = impl.view; - /**_UNUSED/ + var view = impl.dZ; + /**/ var domNode = args['node']; //*/ - /**/ + /**_UNUSED/ var domNode = args && args['node'] ? args['node'] : _Debug_crash(0); //*/ var currNode = _VirtualDom_virtualize(domNode); @@ -3987,12 +3987,12 @@ var _Browser_document = _Debugger_document || F4(function(impl, flagDecoder, deb return _Platform_initialize( flagDecoder, args, - impl.init, - impl.update, - impl.subscriptions, + impl.dv, + impl.dY, + impl.dV, function(sendToApp, initialModel) { - var divertHrefToApp = impl.setup && impl.setup(sendToApp) - var view = impl.view; + var divertHrefToApp = impl.bm && impl.bm(sendToApp) + var view = impl.dZ; var title = _VirtualDom_doc.title; var bodyNode = _VirtualDom_doc.body; var currNode = _VirtualDom_virtualize(bodyNode); @@ -4000,12 +4000,12 @@ var _Browser_document = _Debugger_document || F4(function(impl, flagDecoder, deb { _VirtualDom_divertHrefToApp = divertHrefToApp; var doc = view(model); - var nextNode = _VirtualDom_node('body')(_List_Nil)(doc.body); + var nextNode = _VirtualDom_node('body')(_List_Nil)(doc.da); var patches = _VirtualDom_diff(currNode, nextNode); bodyNode = _VirtualDom_applyPatches(bodyNode, currNode, patches, sendToApp); currNode = nextNode; _VirtualDom_divertHrefToApp = 0; - (title !== doc.title) && (_VirtualDom_doc.title = title = doc.title); + (title !== doc.cY) && (_VirtualDom_doc.title = title = doc.cY); }); } ); @@ -4061,12 +4061,12 @@ function _Browser_makeAnimator(model, draw) function _Browser_application(impl) { - var onUrlChange = impl.onUrlChange; - var onUrlRequest = impl.onUrlRequest; + var onUrlChange = impl.dM; + var onUrlRequest = impl.dN; var key = function() { key.a(onUrlChange(_Browser_getUrl())); }; return _Browser_document({ - setup: function(sendToApp) + bm: function(sendToApp) { key.a = sendToApp; _Browser_window.addEventListener('popstate', key); @@ -4082,9 +4082,9 @@ function _Browser_application(impl) var next = $elm$url$Url$fromString(href).a; sendToApp(onUrlRequest( (next - && curr.protocol === next.protocol - && curr.host === next.host - && curr.port_.a === next.port_.a + && curr.cF === next.cF + && curr.b4 === next.b4 + && curr.cz.a === next.cz.a ) ? $elm$browser$Browser$Internal(next) : $elm$browser$Browser$External(href) @@ -4092,13 +4092,13 @@ function _Browser_application(impl) } }); }, - init: function(flags) + dv: function(flags) { - return A3(impl.init, flags, _Browser_getUrl(), key); + return A3(impl.dv, flags, _Browser_getUrl(), key); }, - view: impl.view, - update: impl.update, - subscriptions: impl.subscriptions + dZ: impl.dZ, + dY: impl.dY, + dV: impl.dV }); } @@ -4164,17 +4164,17 @@ var _Browser_decodeEvent = F2(function(decoder, event) function _Browser_visibilityInfo() { return (typeof _VirtualDom_doc.hidden !== 'undefined') - ? { hidden: 'hidden', change: 'visibilitychange' } + ? { ds: 'hidden', de: 'visibilitychange' } : (typeof _VirtualDom_doc.mozHidden !== 'undefined') - ? { hidden: 'mozHidden', change: 'mozvisibilitychange' } + ? { ds: 'mozHidden', de: 'mozvisibilitychange' } : (typeof _VirtualDom_doc.msHidden !== 'undefined') - ? { hidden: 'msHidden', change: 'msvisibilitychange' } + ? { ds: 'msHidden', de: 'msvisibilitychange' } : (typeof _VirtualDom_doc.webkitHidden !== 'undefined') - ? { hidden: 'webkitHidden', change: 'webkitvisibilitychange' } - : { hidden: 'hidden', change: 'visibilitychange' }; + ? { ds: 'webkitHidden', de: 'webkitvisibilitychange' } + : { ds: 'hidden', de: 'visibilitychange' }; } @@ -4255,12 +4255,12 @@ var _Browser_call = F2(function(functionName, id) function _Browser_getViewport() { return { - scene: _Browser_getScene(), - viewport: { - x: _Browser_window.pageXOffset, - y: _Browser_window.pageYOffset, - width: _Browser_doc.documentElement.clientWidth, - height: _Browser_doc.documentElement.clientHeight + cO: _Browser_getScene(), + c0: { + c3: _Browser_window.pageXOffset, + c4: _Browser_window.pageYOffset, + c2: _Browser_doc.documentElement.clientWidth, + b2: _Browser_doc.documentElement.clientHeight } }; } @@ -4270,8 +4270,8 @@ function _Browser_getScene() var body = _Browser_doc.body; var elem = _Browser_doc.documentElement; return { - width: Math.max(body.scrollWidth, body.offsetWidth, elem.scrollWidth, elem.offsetWidth, elem.clientWidth), - height: Math.max(body.scrollHeight, body.offsetHeight, elem.scrollHeight, elem.offsetHeight, elem.clientHeight) + c2: Math.max(body.scrollWidth, body.offsetWidth, elem.scrollWidth, elem.offsetWidth, elem.clientWidth), + b2: Math.max(body.scrollHeight, body.offsetHeight, elem.scrollHeight, elem.offsetHeight, elem.clientHeight) }; } @@ -4294,15 +4294,15 @@ function _Browser_getViewportOf(id) return _Browser_withNode(id, function(node) { return { - scene: { - width: node.scrollWidth, - height: node.scrollHeight + cO: { + c2: node.scrollWidth, + b2: node.scrollHeight }, - viewport: { - x: node.scrollLeft, - y: node.scrollTop, - width: node.clientWidth, - height: node.clientHeight + c0: { + c3: node.scrollLeft, + c4: node.scrollTop, + c2: node.clientWidth, + b2: node.clientHeight } }; }); @@ -4332,18 +4332,18 @@ function _Browser_getElement(id) var x = _Browser_window.pageXOffset; var y = _Browser_window.pageYOffset; return { - scene: _Browser_getScene(), - viewport: { - x: x, - y: y, - width: _Browser_doc.documentElement.clientWidth, - height: _Browser_doc.documentElement.clientHeight + cO: _Browser_getScene(), + c0: { + c3: x, + c4: y, + c2: _Browser_doc.documentElement.clientWidth, + b2: _Browser_doc.documentElement.clientHeight }, - element: { - x: x + rect.left, - y: y + rect.top, - width: rect.width, - height: rect.height + dl: { + c3: x + rect.left, + c4: y + rect.top, + c2: rect.width, + b2: rect.height } }; }); @@ -4415,15 +4415,15 @@ var _Bitwise_shiftRightZfBy = F2(function(offset, a) { return a >>> offset; }); -var $elm$core$Basics$EQ = {$: 'EQ'}; -var $elm$core$Basics$GT = {$: 'GT'}; -var $elm$core$Basics$LT = {$: 'LT'}; +var $elm$core$Basics$EQ = 1; +var $elm$core$Basics$GT = 2; +var $elm$core$Basics$LT = 0; var $elm$core$List$cons = _List_cons; var $elm$core$Dict$foldr = F3( function (func, acc, t) { foldr: while (true) { - if (t.$ === 'RBEmpty_elm_builtin') { + if (t.$ === -2) { return acc; } else { var key = t.b; @@ -4468,7 +4468,7 @@ var $elm$core$Dict$keys = function (dict) { dict); }; var $elm$core$Set$toList = function (_v0) { - var dict = _v0.a; + var dict = _v0; return $elm$core$Dict$keys(dict); }; var $elm$core$Elm$JsArray$foldr = _JsArray_foldr; @@ -4478,7 +4478,7 @@ var $elm$core$Array$foldr = F3( var tail = _v0.d; var helper = F2( function (node, acc) { - if (node.$ === 'SubTree') { + if (!node.$) { var subTree = node.a; return A3($elm$core$Elm$JsArray$foldr, helper, acc, subTree); } else { @@ -4496,32 +4496,32 @@ var $elm$core$Array$toList = function (array) { return A3($elm$core$Array$foldr, $elm$core$List$cons, _List_Nil, array); }; var $elm$core$Result$Err = function (a) { - return {$: 'Err', a: a}; + return {$: 1, a: a}; }; var $elm$json$Json$Decode$Failure = F2( function (a, b) { - return {$: 'Failure', a: a, b: b}; + return {$: 3, a: a, b: b}; }); var $elm$json$Json$Decode$Field = F2( function (a, b) { - return {$: 'Field', a: a, b: b}; + return {$: 0, a: a, b: b}; }); var $elm$json$Json$Decode$Index = F2( function (a, b) { - return {$: 'Index', a: a, b: b}; + return {$: 1, a: a, b: b}; }); var $elm$core$Result$Ok = function (a) { - return {$: 'Ok', a: a}; + return {$: 0, a: a}; }; var $elm$json$Json$Decode$OneOf = function (a) { - return {$: 'OneOf', a: a}; + return {$: 2, a: a}; }; -var $elm$core$Basics$False = {$: 'False'}; +var $elm$core$Basics$False = 1; var $elm$core$Basics$add = _Basics_add; var $elm$core$Maybe$Just = function (a) { - return {$: 'Just', a: a}; + return {$: 0, a: a}; }; -var $elm$core$Maybe$Nothing = {$: 'Nothing'}; +var $elm$core$Maybe$Nothing = {$: 1}; var $elm$core$String$all = _String_all; var $elm$core$Basics$and = _Basics_and; var $elm$core$Basics$append = _Utils_append; @@ -4646,12 +4646,12 @@ var $elm$json$Json$Decode$errorToStringHelp = F2( errorToStringHelp: while (true) { switch (error.$) { - case 'Field': + case 0: var f = error.a; var err = error.b; var isSimple = function () { var _v1 = $elm$core$String$uncons(f); - if (_v1.$ === 'Nothing') { + if (_v1.$ === 1) { return false; } else { var _v2 = _v1.a; @@ -4666,7 +4666,7 @@ var $elm$json$Json$Decode$errorToStringHelp = F2( error = $temp$error; context = $temp$context; continue errorToStringHelp; - case 'Index': + case 1: var i = error.a; var err = error.b; var indexName = '[' + ($elm$core$String$fromInt(i) + ']'); @@ -4675,7 +4675,7 @@ var $elm$json$Json$Decode$errorToStringHelp = F2( error = $temp$error; context = $temp$context; continue errorToStringHelp; - case 'OneOf': + case 2: var errors = error.a; if (!errors.b) { return 'Ran into a Json.Decode.oneOf with no possibilities' + function () { @@ -4739,7 +4739,7 @@ var $elm$json$Json$Decode$errorToStringHelp = F2( var $elm$core$Array$branchFactor = 32; var $elm$core$Array$Array_elm_builtin = F4( function (a, b, c, d) { - return {$: 'Array_elm_builtin', a: a, b: b, c: c, d: d}; + return {$: 0, a: a, b: b, c: c, d: d}; }); var $elm$core$Elm$JsArray$empty = _JsArray_empty; var $elm$core$Basics$ceiling = _Basics_ceiling; @@ -4754,7 +4754,7 @@ var $elm$core$Array$shiftStep = $elm$core$Basics$ceiling( var $elm$core$Array$empty = A4($elm$core$Array$Array_elm_builtin, 0, $elm$core$Array$shiftStep, $elm$core$Elm$JsArray$empty, $elm$core$Elm$JsArray$empty); var $elm$core$Elm$JsArray$initialize = _JsArray_initialize; var $elm$core$Array$Leaf = function (a) { - return {$: 'Leaf', a: a}; + return {$: 1, a: a}; }; var $elm$core$Basics$apL = F2( function (f, x) { @@ -4774,7 +4774,7 @@ var $elm$core$Basics$max = F2( }); var $elm$core$Basics$mul = _Basics_mul; var $elm$core$Array$SubTree = function (a) { - return {$: 'SubTree', a: a}; + return {$: 0, a: a}; }; var $elm$core$Elm$JsArray$initializeFromList = _JsArray_initializeFromList; var $elm$core$Array$compressNodes = F2( @@ -4821,25 +4821,25 @@ var $elm$core$Array$treeFromBuilder = F2( }); var $elm$core$Array$builderToArray = F2( function (reverseNodeList, builder) { - if (!builder.nodeListSize) { + if (!builder.t) { return A4( $elm$core$Array$Array_elm_builtin, - $elm$core$Elm$JsArray$length(builder.tail), + $elm$core$Elm$JsArray$length(builder.x), $elm$core$Array$shiftStep, $elm$core$Elm$JsArray$empty, - builder.tail); + builder.x); } else { - var treeLen = builder.nodeListSize * $elm$core$Array$branchFactor; + var treeLen = builder.t * $elm$core$Array$branchFactor; var depth = $elm$core$Basics$floor( A2($elm$core$Basics$logBase, $elm$core$Array$branchFactor, treeLen - 1)); - var correctNodeList = reverseNodeList ? $elm$core$List$reverse(builder.nodeList) : builder.nodeList; - var tree = A2($elm$core$Array$treeFromBuilder, correctNodeList, builder.nodeListSize); + var correctNodeList = reverseNodeList ? $elm$core$List$reverse(builder.y) : builder.y; + var tree = A2($elm$core$Array$treeFromBuilder, correctNodeList, builder.t); return A4( $elm$core$Array$Array_elm_builtin, - $elm$core$Elm$JsArray$length(builder.tail) + treeLen, + $elm$core$Elm$JsArray$length(builder.x) + treeLen, A2($elm$core$Basics$max, 5, depth * $elm$core$Array$shiftStep), tree, - builder.tail); + builder.x); } }); var $elm$core$Basics$idiv = _Basics_idiv; @@ -4852,7 +4852,7 @@ var $elm$core$Array$initializeHelp = F5( return A2( $elm$core$Array$builderToArray, false, - {nodeList: nodeList, nodeListSize: (len / $elm$core$Array$branchFactor) | 0, tail: tail}); + {y: nodeList, t: (len / $elm$core$Array$branchFactor) | 0, x: tail}); } else { var leaf = $elm$core$Array$Leaf( A3($elm$core$Elm$JsArray$initialize, $elm$core$Array$branchFactor, fromIndex, fn)); @@ -4882,9 +4882,9 @@ var $elm$core$Array$initialize = F2( return A5($elm$core$Array$initializeHelp, fn, initialFromIndex, len, _List_Nil, tail); } }); -var $elm$core$Basics$True = {$: 'True'}; +var $elm$core$Basics$True = 0; var $elm$core$Result$isOk = function (result) { - if (result.$ === 'Ok') { + if (!result.$) { return true; } else { return false; @@ -4895,33 +4895,31 @@ var $elm$json$Json$Decode$map2 = _Json_map2; var $elm$json$Json$Decode$succeed = _Json_succeed; var $elm$virtual_dom$VirtualDom$toHandlerInt = function (handler) { switch (handler.$) { - case 'Normal': + case 0: return 0; - case 'MayStopPropagation': + case 1: return 1; - case 'MayPreventDefault': + case 2: return 2; default: return 3; } }; var $elm$browser$Browser$External = function (a) { - return {$: 'External', a: a}; + return {$: 1, a: a}; }; var $elm$browser$Browser$Internal = function (a) { - return {$: 'Internal', a: a}; + return {$: 0, a: a}; }; var $elm$core$Basics$identity = function (x) { return x; }; -var $elm$browser$Browser$Dom$NotFound = function (a) { - return {$: 'NotFound', a: a}; -}; -var $elm$url$Url$Http = {$: 'Http'}; -var $elm$url$Url$Https = {$: 'Https'}; +var $elm$browser$Browser$Dom$NotFound = $elm$core$Basics$identity; +var $elm$url$Url$Http = 0; +var $elm$url$Url$Https = 1; var $elm$url$Url$Url = F6( function (protocol, host, port_, path, query, fragment) { - return {fragment: fragment, host: host, path: path, port_: port_, protocol: protocol, query: query}; + return {b_: fragment, b4: host, z: path, cz: port_, cF: protocol, cG: query}; }); var $elm$core$String$contains = _String_contains; var $elm$core$String$length = _String_length; @@ -4957,7 +4955,7 @@ var $elm$url$Url$chompBeforePath = F5( var i = _v0.a; var _v1 = $elm$core$String$toInt( A2($elm$core$String$dropLeft, i + 1, str)); - if (_v1.$ === 'Nothing') { + if (_v1.$ === 1) { return $elm$core$Maybe$Nothing; } else { var port_ = _v1; @@ -5040,26 +5038,24 @@ var $elm$core$String$startsWith = _String_startsWith; var $elm$url$Url$fromString = function (str) { return A2($elm$core$String$startsWith, 'http://', str) ? A2( $elm$url$Url$chompAfterProtocol, - $elm$url$Url$Http, + 0, A2($elm$core$String$dropLeft, 7, str)) : (A2($elm$core$String$startsWith, 'https://', str) ? A2( $elm$url$Url$chompAfterProtocol, - $elm$url$Url$Https, + 1, A2($elm$core$String$dropLeft, 8, str)) : $elm$core$Maybe$Nothing); }; var $elm$core$Basics$never = function (_v0) { never: while (true) { - var nvr = _v0.a; + var nvr = _v0; var $temp$_v0 = nvr; _v0 = $temp$_v0; continue never; } }; -var $elm$core$Task$Perform = function (a) { - return {$: 'Perform', a: a}; -}; +var $elm$core$Task$Perform = $elm$core$Basics$identity; var $elm$core$Task$succeed = _Scheduler_succeed; -var $elm$core$Task$init = $elm$core$Task$succeed(_Utils_Tuple0); +var $elm$core$Task$init = $elm$core$Task$succeed(0); var $elm$core$List$foldrHelper = F4( function (fn, acc, ctr, ls) { if (!ls.b) { @@ -5165,7 +5161,7 @@ var $elm$core$Task$sequence = function (tasks) { var $elm$core$Platform$sendToApp = _Platform_sendToApp; var $elm$core$Task$spawnCmd = F2( function (router, _v0) { - var task = _v0.a; + var task = _v0; return _Scheduler_spawn( A2( $elm$core$Task$andThen, @@ -5177,7 +5173,7 @@ var $elm$core$Task$onEffects = F3( return A2( $elm$core$Task$map, function (_v0) { - return _Utils_Tuple0; + return 0; }, $elm$core$Task$sequence( A2( @@ -5187,28 +5183,26 @@ var $elm$core$Task$onEffects = F3( }); var $elm$core$Task$onSelfMsg = F3( function (_v0, _v1, _v2) { - return $elm$core$Task$succeed(_Utils_Tuple0); + return $elm$core$Task$succeed(0); }); var $elm$core$Task$cmdMap = F2( function (tagger, _v0) { - var task = _v0.a; - return $elm$core$Task$Perform( - A2($elm$core$Task$map, tagger, task)); + var task = _v0; + return A2($elm$core$Task$map, tagger, task); }); _Platform_effectManagers['Task'] = _Platform_createManager($elm$core$Task$init, $elm$core$Task$onEffects, $elm$core$Task$onSelfMsg, $elm$core$Task$cmdMap); var $elm$core$Task$command = _Platform_leaf('Task'); var $elm$core$Task$perform = F2( function (toMessage, task) { return $elm$core$Task$command( - $elm$core$Task$Perform( - A2($elm$core$Task$map, toMessage, task))); + A2($elm$core$Task$map, toMessage, task)); }); var $elm$browser$Browser$element = _Browser_element; var $author$project$Main$Editor = function (a) { - return {$: 'Editor', a: a}; + return {$: 0, a: a}; }; var $author$project$Main$PortOutgoingFormFields = function (a) { - return {$: 'PortOutgoingFormFields', a: a}; + return {$: 0, a: a}; }; var $elm$core$List$append = F2( function (xs, ys) { @@ -5229,7 +5223,7 @@ var $elm$core$List$concatMap = F2( var $elm$core$List$maybeCons = F3( function (f, mx, xs) { var _v0 = f(mx); - if (_v0.$ === 'Just') { + if (!_v0.$) { var x = _v0.a; return A2($elm$core$List$cons, x, xs); } else { @@ -5248,7 +5242,7 @@ var $author$project$Main$allCustomElementsFromGroups = function (groups) { return A2( $elm$core$List$filterMap, function (inputField) { - if (inputField.$ === 'ShortText') { + if (!inputField.$) { var customElement = inputField.a; return $elm$core$Maybe$Just(customElement); } else { @@ -5258,33 +5252,33 @@ var $author$project$Main$allCustomElementsFromGroups = function (groups) { A2( $elm$core$List$concatMap, function ($) { - return $.fields; + return $.aM; }, groups)); }; var $elm$core$Platform$Cmd$batch = _Platform_batch; var $author$project$Main$Config = F4( function (viewMode, formFields, formValues, inputFieldGroups) { - return {formFields: formFields, formValues: formValues, inputFieldGroups: inputFieldGroups, viewMode: viewMode}; + return {g: formFields, ba: formValues, T: inputFieldGroups, ad: viewMode}; }); var $elm_community$json_extra$Json$Decode$Extra$andMap = $elm$json$Json$Decode$map2($elm$core$Basics$apR); var $author$project$Main$ShortText = function (a) { - return {$: 'ShortText', a: a}; + return {$: 0, a: a}; }; var $author$project$Main$AttributeGiven = function (a) { - return {$: 'AttributeGiven', a: a}; + return {$: 2, a: a}; }; var $author$project$Main$ChooseMultiple = function (a) { - return {$: 'ChooseMultiple', a: a}; + return {$: 4, a: a}; }; var $author$project$Main$ChooseOne = function (a) { - return {$: 'ChooseOne', a: a}; + return {$: 3, a: a}; }; var $author$project$Main$Dropdown = function (a) { - return {$: 'Dropdown', a: a}; + return {$: 2, a: a}; }; var $author$project$Main$LongText = function (a) { - return {$: 'LongText', a: a}; + return {$: 1, a: a}; }; var $author$project$Main$choiceDelimiter = ' | '; var $elm$core$String$trim = _String_trim; @@ -5294,8 +5288,8 @@ var $author$project$Main$choiceFromString = function (s) { if (!_v0.b.b) { var value = _v0.a; return { - label: value, - value: $elm$core$String$trim(value) + d: value, + j: $elm$core$String$trim(value) }; } else { if (!_v0.b.b.b) { @@ -5303,22 +5297,22 @@ var $author$project$Main$choiceFromString = function (s) { var _v1 = _v0.b; var label = _v1.a; return { - label: label, - value: $elm$core$String$trim(value) + d: label, + j: $elm$core$String$trim(value) }; } else { var value = _v0.a; var labels = _v0.b; return { - label: A2($elm$core$String$join, $author$project$Main$choiceDelimiter, labels), - value: $elm$core$String$trim(value) + d: A2($elm$core$String$join, $author$project$Main$choiceDelimiter, labels), + j: $elm$core$String$trim(value) }; } } } else { return { - label: s, - value: $elm$core$String$trim(s) + d: s, + j: $elm$core$String$trim(s) }; } }; @@ -5326,43 +5320,43 @@ var $author$project$Main$allInputField = _List_fromArray( [ $author$project$Main$Dropdown( { - choices: A2( + k: A2( $elm$core$List$map, $author$project$Main$choiceFromString, _List_fromArray( ['Red', 'Orange', 'Yellow', 'Green', 'Blue', 'Indigo', 'Violet'])), - filter: $elm$core$Maybe$Nothing + e: $elm$core$Maybe$Nothing }), $author$project$Main$ChooseOne( { - choices: A2( + k: A2( $elm$core$List$map, $author$project$Main$choiceFromString, _List_fromArray( ['Yes', 'No'])), - filter: $elm$core$Maybe$Nothing + e: $elm$core$Maybe$Nothing }), $author$project$Main$ChooseMultiple( { - choices: A2( + k: A2( $elm$core$List$map, $author$project$Main$choiceFromString, _List_fromArray( ['Apple', 'Banana', 'Cantaloupe', 'Durian'])), - filter: $elm$core$Maybe$Nothing, - maxAllowed: $elm$core$Maybe$Nothing, - minRequired: $elm$core$Maybe$Nothing + e: $elm$core$Maybe$Nothing, + U: $elm$core$Maybe$Nothing, + P: $elm$core$Maybe$Nothing }), $author$project$Main$LongText( $author$project$Main$AttributeGiven(160)) ]); var $author$project$Main$InputFieldGroup = F2( function (heading, fields) { - return {fields: fields, heading: heading}; + return {aM: fields, aY: heading}; }); var $elm$json$Json$Decode$andThen = _Json_andThen; var $author$project$Main$AttributeNotNeeded = function (a) { - return {$: 'AttributeNotNeeded', a: a}; + return {$: 0, a: a}; }; var $elm$json$Json$Decode$null = _Json_decodeNull; var $elm$json$Json$Decode$oneOf = _Json_oneOf; @@ -5386,10 +5380,10 @@ var $author$project$Main$decodeAttributeOptional = F2( var $elm$json$Json$Decode$string = _Json_decodeString; var $author$project$Main$decodeChoice = A2($elm$json$Json$Decode$map, $author$project$Main$choiceFromString, $elm$json$Json$Decode$string); var $author$project$Main$FilterContainsFieldValueOf = function (a) { - return {$: 'FilterContainsFieldValueOf', a: a}; + return {$: 1, a: a}; }; var $author$project$Main$FilterStartsWithFieldValueOf = function (a) { - return {$: 'FilterStartsWithFieldValueOf', a: a}; + return {$: 0, a: a}; }; var $elm$json$Json$Decode$fail = _Json_fail; var $elm$json$Json$Decode$field = _Json_decodeField; @@ -5414,26 +5408,26 @@ var $author$project$Main$decodeChoiceFilter = A2( A2($elm$json$Json$Decode$field, 'type', $elm$json$Json$Decode$string)); var $author$project$Main$RawCustomElement = F3( function (inputType, inputTag, attributes) { - return {attributes: attributes, inputTag: inputTag, inputType: inputType}; + return {q: attributes, O: inputTag, C: inputType}; }); var $author$project$Main$defaultInputTag = 'input'; -var $elm$core$Dict$RBEmpty_elm_builtin = {$: 'RBEmpty_elm_builtin'}; +var $elm$core$Dict$RBEmpty_elm_builtin = {$: -2}; var $elm$core$Dict$empty = $elm$core$Dict$RBEmpty_elm_builtin; -var $elm$core$Dict$Black = {$: 'Black'}; +var $elm$core$Dict$Black = 1; var $elm$core$Dict$RBNode_elm_builtin = F5( function (a, b, c, d, e) { - return {$: 'RBNode_elm_builtin', a: a, b: b, c: c, d: d, e: e}; + return {$: -1, a: a, b: b, c: c, d: d, e: e}; }); -var $elm$core$Dict$Red = {$: 'Red'}; +var $elm$core$Dict$Red = 0; var $elm$core$Dict$balance = F5( function (color, key, value, left, right) { - if ((right.$ === 'RBNode_elm_builtin') && (right.a.$ === 'Red')) { + if ((right.$ === -1) && (!right.a)) { var _v1 = right.a; var rK = right.b; var rV = right.c; var rLeft = right.d; var rRight = right.e; - if ((left.$ === 'RBNode_elm_builtin') && (left.a.$ === 'Red')) { + if ((left.$ === -1) && (!left.a)) { var _v3 = left.a; var lK = left.b; var lV = left.c; @@ -5441,22 +5435,22 @@ var $elm$core$Dict$balance = F5( var lRight = left.e; return A5( $elm$core$Dict$RBNode_elm_builtin, - $elm$core$Dict$Red, + 0, key, value, - A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Black, lK, lV, lLeft, lRight), - A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Black, rK, rV, rLeft, rRight)); + A5($elm$core$Dict$RBNode_elm_builtin, 1, lK, lV, lLeft, lRight), + A5($elm$core$Dict$RBNode_elm_builtin, 1, rK, rV, rLeft, rRight)); } else { return A5( $elm$core$Dict$RBNode_elm_builtin, color, rK, rV, - A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Red, key, value, left, rLeft), + A5($elm$core$Dict$RBNode_elm_builtin, 0, key, value, left, rLeft), rRight); } } else { - if ((((left.$ === 'RBNode_elm_builtin') && (left.a.$ === 'Red')) && (left.d.$ === 'RBNode_elm_builtin')) && (left.d.a.$ === 'Red')) { + if ((((left.$ === -1) && (!left.a)) && (left.d.$ === -1)) && (!left.d.a)) { var _v5 = left.a; var lK = left.b; var lV = left.c; @@ -5469,11 +5463,11 @@ var $elm$core$Dict$balance = F5( var lRight = left.e; return A5( $elm$core$Dict$RBNode_elm_builtin, - $elm$core$Dict$Red, + 0, lK, lV, - A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Black, llK, llV, llLeft, llRight), - A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Black, key, value, lRight, right)); + A5($elm$core$Dict$RBNode_elm_builtin, 1, llK, llV, llLeft, llRight), + A5($elm$core$Dict$RBNode_elm_builtin, 1, key, value, lRight, right)); } else { return A5($elm$core$Dict$RBNode_elm_builtin, color, key, value, left, right); } @@ -5482,8 +5476,8 @@ var $elm$core$Dict$balance = F5( var $elm$core$Basics$compare = _Utils_compare; var $elm$core$Dict$insertHelp = F3( function (key, value, dict) { - if (dict.$ === 'RBEmpty_elm_builtin') { - return A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Red, key, value, $elm$core$Dict$RBEmpty_elm_builtin, $elm$core$Dict$RBEmpty_elm_builtin); + if (dict.$ === -2) { + return A5($elm$core$Dict$RBNode_elm_builtin, 0, key, value, $elm$core$Dict$RBEmpty_elm_builtin, $elm$core$Dict$RBEmpty_elm_builtin); } else { var nColor = dict.a; var nKey = dict.b; @@ -5491,8 +5485,8 @@ var $elm$core$Dict$insertHelp = F3( var nLeft = dict.d; var nRight = dict.e; var _v1 = A2($elm$core$Basics$compare, key, nKey); - switch (_v1.$) { - case 'LT': + switch (_v1) { + case 0: return A5( $elm$core$Dict$balance, nColor, @@ -5500,7 +5494,7 @@ var $elm$core$Dict$insertHelp = F3( nValue, A3($elm$core$Dict$insertHelp, key, value, nLeft), nRight); - case 'EQ': + case 1: return A5($elm$core$Dict$RBNode_elm_builtin, nColor, nKey, value, nLeft, nRight); default: return A5( @@ -5516,13 +5510,13 @@ var $elm$core$Dict$insertHelp = F3( var $elm$core$Dict$insert = F3( function (key, value, dict) { var _v0 = A3($elm$core$Dict$insertHelp, key, value, dict); - if ((_v0.$ === 'RBNode_elm_builtin') && (_v0.a.$ === 'Red')) { + if ((_v0.$ === -1) && (!_v0.a)) { var _v1 = _v0.a; var k = _v0.b; var v = _v0.c; var l = _v0.d; var r = _v0.e; - return A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Black, k, v, l, r); + return A5($elm$core$Dict$RBNode_elm_builtin, 1, k, v, l, r); } else { var x = _v0; return x; @@ -5541,13 +5535,13 @@ var $elm$core$Dict$fromList = function (assocs) { assocs); }; var $author$project$Main$AttributeInvalid = function (a) { - return {$: 'AttributeInvalid', a: a}; + return {$: 1, a: a}; }; var $elm$core$Dict$foldl = F3( function (func, acc, dict) { foldl: while (true) { - if (dict.$ === 'RBEmpty_elm_builtin') { + if (dict.$ === -2) { return acc; } else { var key = dict.b; @@ -5583,7 +5577,7 @@ var $elm$core$Dict$get = F2( function (targetKey, dict) { get: while (true) { - if (dict.$ === 'RBEmpty_elm_builtin') { + if (dict.$ === -2) { return $elm$core$Maybe$Nothing; } else { var key = dict.b; @@ -5591,14 +5585,14 @@ var $elm$core$Dict$get = F2( var left = dict.d; var right = dict.e; var _v1 = A2($elm$core$Basics$compare, targetKey, key); - switch (_v1.$) { - case 'LT': + switch (_v1) { + case 0: var $temp$targetKey = targetKey, $temp$dict = left; targetKey = $temp$targetKey; dict = $temp$dict; continue get; - case 'EQ': + case 1: return $elm$core$Maybe$Just(value); default: var $temp$targetKey = targetKey, @@ -5613,16 +5607,16 @@ var $elm$core$Dict$get = F2( var $elm$core$Basics$neq = _Utils_notEqual; var $author$project$Main$fromRawCustomElement = function (ele) { return { - attributes: A2( + q: A2( $elm$core$Dict$filter, F2( function (k, _v0) { return k !== 'list'; }), - ele.attributes), - datalist: function () { - var _v1 = A2($elm$core$Dict$get, 'list', ele.attributes); - if (_v1.$ === 'Just') { + ele.q), + af: function () { + var _v1 = A2($elm$core$Dict$get, 'list', ele.q); + if (!_v1.$) { var s = _v1.a; var _v2 = A2( $elm$core$String$split, @@ -5639,11 +5633,11 @@ var $author$project$Main$fromRawCustomElement = function (ele) { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } }(), - inputTag: ele.inputTag, - inputType: ele.inputType, - max: function () { - var _v3 = A2($elm$core$Dict$get, 'max', ele.attributes); - if (_v3.$ === 'Just') { + O: ele.O, + C: ele.C, + aq: function () { + var _v3 = A2($elm$core$Dict$get, 'max', ele.q); + if (!_v3.$) { if (_v3.a === '') { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } else { @@ -5654,15 +5648,15 @@ var $author$project$Main$fromRawCustomElement = function (ele) { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } }(), - maxlength: function () { - var _v4 = A2($elm$core$Dict$get, 'maxlength', ele.attributes); - if (_v4.$ === 'Just') { + ai: function () { + var _v4 = A2($elm$core$Dict$get, 'maxlength', ele.q); + if (!_v4.$) { if (_v4.a === '') { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } else { var value = _v4.a; var _v5 = $elm$core$String$toInt(value); - if (_v5.$ === 'Just') { + if (!_v5.$) { var _int = _v5.a; return $author$project$Main$AttributeGiven(_int); } else { @@ -5673,9 +5667,9 @@ var $author$project$Main$fromRawCustomElement = function (ele) { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } }(), - min: function () { - var _v6 = A2($elm$core$Dict$get, 'min', ele.attributes); - if (_v6.$ === 'Just') { + ar: function () { + var _v6 = A2($elm$core$Dict$get, 'min', ele.q); + if (!_v6.$) { if (_v6.a === '') { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } else { @@ -5686,9 +5680,9 @@ var $author$project$Main$fromRawCustomElement = function (ele) { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } }(), - multiple: function () { - var _v7 = A2($elm$core$Dict$get, 'multiple', ele.attributes); - if (_v7.$ === 'Just') { + aO: function () { + var _v7 = A2($elm$core$Dict$get, 'multiple', ele.q); + if (!_v7.$) { switch (_v7.a) { case '': return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); @@ -5716,7 +5710,7 @@ var $elm_community$json_extra$Json$Decode$Extra$optionalField = F2( $elm$json$Json$Decode$decodeValue, A2($elm$json$Json$Decode$field, fieldName, $elm$json$Json$Decode$value), json); - if (_v0.$ === 'Ok') { + if (!_v0.$) { var val = _v0.a; return A2( $elm$json$Json$Decode$map, @@ -5730,7 +5724,7 @@ var $elm_community$json_extra$Json$Decode$Extra$optionalField = F2( }); var $elm$core$Maybe$withDefault = F2( function (_default, maybe) { - if (maybe.$ === 'Just') { + if (!maybe.$) { var value = maybe.a; return value; } else { @@ -5801,7 +5795,7 @@ var $author$project$Main$decodeInputField = A2( F2( function (choices, filter) { return $author$project$Main$Dropdown( - {choices: choices, filter: filter}); + {k: choices, e: filter}); })))); case 'ChooseOne': return A2( @@ -5818,7 +5812,7 @@ var $author$project$Main$decodeInputField = A2( F2( function (choices, filter) { return $author$project$Main$ChooseOne( - {choices: choices, filter: filter}); + {k: choices, e: filter}); })))); case 'ChooseMultiple': return A2( @@ -5843,7 +5837,7 @@ var $author$project$Main$decodeInputField = A2( F4( function (choices, minRequired, maxAllowed, filter) { return $author$project$Main$ChooseMultiple( - {choices: choices, filter: filter, maxAllowed: maxAllowed, minRequired: minRequired}); + {k: choices, e: filter, U: maxAllowed, P: minRequired}); })))))); default: return $elm$json$Json$Decode$fail('Unknown input field type: ' + type_); @@ -5903,7 +5897,7 @@ var $author$project$Main$decodeShortTextTypeList = function () { var inputTag = _v1.a; var attributes = _v1.b; return $author$project$Main$fromRawCustomElement( - {attributes: attributes, inputTag: inputTag, inputType: inputType}); + {q: attributes, O: inputTag, C: inputType}); }, $elm$core$Dict$toList(dict)); }; @@ -5960,7 +5954,7 @@ var $elm$core$List$member = F2( var $elm$core$Basics$not = _Basics_not; var $elm$core$Maybe$andThen = F2( function (callback, maybeValue) { - if (maybeValue.$ === 'Just') { + if (!maybeValue.$) { var value = maybeValue.a; return callback(value); } else { @@ -5990,13 +5984,13 @@ var $author$project$Main$decodeConfigInputFieldGroups = function () { [ $author$project$Main$fromRawCustomElement( { - attributes: $elm$core$Dict$fromList( + q: $elm$core$Dict$fromList( _List_fromArray( [ _Utils_Tuple2('type', 'text') ])), - inputTag: $author$project$Main$defaultInputTag, - inputType: 'Single-line free text' + O: $author$project$Main$defaultInputTag, + C: 'Single-line free text' }) ]); var fromShortTextTypeList = function (shortTextTypes) { @@ -6011,10 +6005,10 @@ var $author$project$Main$decodeConfigInputFieldGroups = function () { return _List_fromArray( [ { - fields: _Utils_ap( + aM: _Utils_ap( $author$project$Main$allInputField, A2($elm$core$List$map, $author$project$Main$ShortText, effectiveList)), - heading: '' + aY: '' } ]); }; @@ -6033,7 +6027,7 @@ var $author$project$Main$decodeConfigInputFieldGroups = function () { }(); var $author$project$Main$FormField = F6( function (label, name, presence, description, type_, visibilityRule) { - return {description: description, label: label, name: name, presence: presence, type_: type_, visibilityRule: visibilityRule}; + return {S: description, d: label, Q: name, p: presence, a: type_, m: visibilityRule}; }); var $elm$json$Json$Decode$at = F2( function (fields, decoder) { @@ -6077,19 +6071,19 @@ var $author$project$Main$decodeFormFieldMaybeName = $elm$json$Json$Decode$oneOf( A2($elm$json$Json$Decode$field, 'name', $elm$json$Json$Decode$string)), $elm$json$Json$Decode$succeed($elm$core$Maybe$Nothing) ])); -var $author$project$Main$Optional = {$: 'Optional'}; -var $author$project$Main$System = {$: 'System'}; -var $author$project$Main$Required = {$: 'Required'}; +var $author$project$Main$Optional = 1; +var $author$project$Main$System = 2; +var $author$project$Main$Required = 0; var $author$project$Main$decodePresenceString = A2( $elm$json$Json$Decode$andThen, function (str) { switch (str) { case 'Required': - return $elm$json$Json$Decode$succeed($author$project$Main$Required); + return $elm$json$Json$Decode$succeed(0); case 'Optional': - return $elm$json$Json$Decode$succeed($author$project$Main$Optional); + return $elm$json$Json$Decode$succeed(1); case 'System': - return $elm$json$Json$Decode$succeed($author$project$Main$System); + return $elm$json$Json$Decode$succeed(2); default: return $elm$json$Json$Decode$fail('Unknown presence: ' + str); } @@ -6104,11 +6098,11 @@ var $author$project$Main$decodePresence = $elm$json$Json$Decode$oneOf( function (type_) { switch (type_) { case 'System': - return $elm$json$Json$Decode$succeed($author$project$Main$System); + return $elm$json$Json$Decode$succeed(2); case 'SystemRequired': - return $elm$json$Json$Decode$succeed($author$project$Main$System); + return $elm$json$Json$Decode$succeed(2); case 'SystemOptional': - return $elm$json$Json$Decode$succeed($author$project$Main$Optional); + return $elm$json$Json$Decode$succeed(1); default: return $elm$json$Json$Decode$fail('Unknown presence type: ' + type_); } @@ -6119,33 +6113,33 @@ var $elm$json$Json$Decode$bool = _Json_decodeBool; var $author$project$Main$decodeRequired = A2( $elm$json$Json$Decode$map, function (b) { - return b ? $author$project$Main$Required : $author$project$Main$Optional; + return b ? 0 : 1; }, A2($elm$json$Json$Decode$field, 'required', $elm$json$Json$Decode$bool)); var $author$project$Main$HideWhen = function (a) { - return {$: 'HideWhen', a: a}; + return {$: 1, a: a}; }; var $author$project$Main$ShowWhen = function (a) { - return {$: 'ShowWhen', a: a}; + return {$: 0, a: a}; }; var $author$project$Main$Field = F2( function (a, b) { - return {$: 'Field', a: a, b: b}; + return {$: 0, a: a, b: b}; }); var $author$project$Main$EndsWith = function (a) { - return {$: 'EndsWith', a: a}; + return {$: 2, a: a}; }; var $author$project$Main$Equals = function (a) { - return {$: 'Equals', a: a}; + return {$: 0, a: a}; }; var $author$project$Main$EqualsField = function (a) { - return {$: 'EqualsField', a: a}; + return {$: 4, a: a}; }; var $author$project$Main$GreaterThan = function (a) { - return {$: 'GreaterThan', a: a}; + return {$: 3, a: a}; }; var $author$project$Main$StringContains = function (a) { - return {$: 'StringContains', a: a}; + return {$: 1, a: a}; }; var $author$project$Main$decodeComparison = A2( $elm$json$Json$Decode$andThen, @@ -6265,7 +6259,7 @@ var $elm$core$Array$fromListHelp = F3( return A2( $elm$core$Array$builderToArray, true, - {nodeList: nodeList, nodeListSize: nodeListSize, tail: jsArray}); + {y: nodeList, t: nodeListSize, x: jsArray}); } else { var $temp$list = remainingItems, $temp$nodeList = A2( @@ -6293,20 +6287,20 @@ var $author$project$Main$decodeFormFields = A2( $elm$json$Json$Decode$list($author$project$Main$decodeFormField)); var $elm_community$json_extra$Json$Decode$Extra$fromMaybe = F2( function (error, val) { - if (val.$ === 'Just') { + if (!val.$) { var v = val.a; return $elm$json$Json$Decode$succeed(v); } else { return $elm$json$Json$Decode$fail(error); } }); -var $author$project$Main$CollectData = {$: 'CollectData'}; +var $author$project$Main$CollectData = {$: 1}; var $author$project$Main$viewModeFromString = function (str) { switch (str) { case 'Editor': return $elm$core$Maybe$Just( $author$project$Main$Editor( - {maybeAnimate: $elm$core$Maybe$Nothing})); + {aC: $elm$core$Maybe$Nothing})); case 'CollectData': return $elm$core$Maybe$Just($author$project$Main$CollectData); default: @@ -6339,7 +6333,7 @@ var $author$project$Main$decodeConfig = A2( $elm$json$Json$Decode$map, $elm$core$Maybe$withDefault( $author$project$Main$Editor( - {maybeAnimate: $elm$core$Maybe$Nothing})), + {aC: $elm$core$Maybe$Nothing})), A2($elm_community$json_extra$Json$Decode$Extra$optionalNullableField, 'viewMode', $author$project$Main$decodeViewMode)), $elm$json$Json$Decode$succeed($author$project$Main$Config))))); var $elm$core$List$singleton = function (value) { @@ -6357,9 +6351,9 @@ var $author$project$Main$decodeListOrSingleton = function (decoder) { var $author$project$Main$encodeAttributeOptional = F2( function (encodeValue, attributeOptional) { switch (attributeOptional.$) { - case 'AttributeNotNeeded': + case 0: return $elm$json$Json$Encode$null; - case 'AttributeInvalid': + case 1: return $elm$json$Json$Encode$null; default: var value = attributeOptional.a; @@ -6368,10 +6362,10 @@ var $author$project$Main$encodeAttributeOptional = F2( }); var $author$project$Main$choiceToString = function (choice) { return _Utils_eq( - $elm$core$String$trim(choice.label), - $elm$core$String$trim(choice.value)) ? choice.label : _Utils_ap( - choice.value, - _Utils_ap($author$project$Main$choiceDelimiter, choice.label)); + $elm$core$String$trim(choice.d), + $elm$core$String$trim(choice.j)) ? choice.d : _Utils_ap( + choice.j, + _Utils_ap($author$project$Main$choiceDelimiter, choice.d)); }; var $elm$json$Json$Encode$string = _Json_wrap; var $author$project$Main$encodeChoice = function (choice) { @@ -6388,11 +6382,11 @@ var $elm$json$Json$Encode$object = function (pairs) { var v = _v0.b; return A3(_Json_addField, k, v, obj); }), - _Json_emptyObject(_Utils_Tuple0), + _Json_emptyObject(0), pairs)); }; var $author$project$Main$encodeChoiceFilter = function (filter) { - if (filter.$ === 'FilterStartsWithFieldValueOf') { + if (!filter.$) { var fieldName = filter.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6427,17 +6421,17 @@ var $elm$core$Tuple$mapSecond = F2( func(y)); }); var $author$project$Main$encodePairsFromRawCustomElements = function (customElement) { - var inputTagAttrs = _Utils_eq(customElement.inputTag, $author$project$Main$defaultInputTag) ? _List_Nil : _List_fromArray( + var inputTagAttrs = _Utils_eq(customElement.O, $author$project$Main$defaultInputTag) ? _List_Nil : _List_fromArray( [ _Utils_Tuple2( 'inputTag', - $elm$json$Json$Encode$string(customElement.inputTag)) + $elm$json$Json$Encode$string(customElement.O)) ]); var encodedAttrs = function () { var _v0 = A2( $elm$core$List$map, $elm$core$Tuple$mapSecond($elm$json$Json$Encode$string), - $elm$core$Dict$toList(customElement.attributes)); + $elm$core$Dict$toList(customElement.q)); if (!_v0.b) { return _List_Nil; } else { @@ -6454,13 +6448,13 @@ var $author$project$Main$encodePairsFromRawCustomElements = function (customElem $elm$core$List$cons, _Utils_Tuple2( 'inputType', - $elm$json$Json$Encode$string(customElement.inputType)), + $elm$json$Json$Encode$string(customElement.C)), _Utils_ap(inputTagAttrs, encodedAttrs)); }; var $author$project$Main$toRawCustomElement = function (ele) { var addMultipleIfGiven = function (dict) { - var _v7 = ele.multiple; - if (_v7.$ === 'AttributeGiven') { + var _v7 = ele.aO; + if (_v7.$ === 2) { if (_v7.a) { return A3($elm$core$Dict$insert, 'multiple', 'true', dict); } else { @@ -6477,8 +6471,8 @@ var $author$project$Main$toRawCustomElement = function (ele) { } }; var addMinIfGiven = function (dict) { - var _v5 = ele.min; - if (_v5.$ === 'AttributeGiven') { + var _v5 = ele.ar; + if (_v5.$ === 2) { var value = _v5.a; return A3($elm$core$Dict$insert, 'min', value, dict); } else { @@ -6492,8 +6486,8 @@ var $author$project$Main$toRawCustomElement = function (ele) { } }; var addMaxLengthIfGiven = function (dict) { - var _v3 = ele.maxlength; - if (_v3.$ === 'AttributeGiven') { + var _v3 = ele.ai; + if (_v3.$ === 2) { var _int = _v3.a; return A3( $elm$core$Dict$insert, @@ -6511,8 +6505,8 @@ var $author$project$Main$toRawCustomElement = function (ele) { } }; var addMaxIfGiven = function (dict) { - var _v1 = ele.max; - if (_v1.$ === 'AttributeGiven') { + var _v1 = ele.aq; + if (_v1.$ === 2) { var value = _v1.a; return A3($elm$core$Dict$insert, 'max', value, dict); } else { @@ -6526,9 +6520,9 @@ var $author$project$Main$toRawCustomElement = function (ele) { } }; var addDatalistIfGiven = function (dict) { - var _v0 = ele.datalist; + var _v0 = ele.af; switch (_v0.$) { - case 'AttributeGiven': + case 2: var list = _v0.a; return A3( $elm$core$Dict$insert, @@ -6538,20 +6532,20 @@ var $author$project$Main$toRawCustomElement = function (ele) { '\n', A2($elm$core$List$map, $author$project$Main$choiceToString, list)), dict); - case 'AttributeInvalid': + case 1: return dict; default: return dict; } }; return { - attributes: addMaxIfGiven( + q: addMaxIfGiven( addMinIfGiven( addDatalistIfGiven( addMultipleIfGiven( - addMaxLengthIfGiven(ele.attributes))))), - inputTag: ele.inputTag, - inputType: ele.inputType + addMaxLengthIfGiven(ele.q))))), + O: ele.O, + C: ele.C }; }; var $author$project$Main$encodePairsFromCustomElement = function (customElement) { @@ -6565,12 +6559,12 @@ var $elm$json$Json$Encode$list = F2( A3( $elm$core$List$foldl, _Json_addEntry(func), - _Json_emptyArray(_Utils_Tuple0), + _Json_emptyArray(0), entries)); }); var $author$project$Main$encodeInputField = function (inputField) { switch (inputField.$) { - case 'ShortText': + case 0: var customElement = inputField.a; return $elm$json$Json$Encode$object( A2( @@ -6579,7 +6573,7 @@ var $author$project$Main$encodeInputField = function (inputField) { 'type', $elm$json$Json$Encode$string('ShortText')), $author$project$Main$encodePairsFromCustomElement(customElement))); - case 'LongText': + case 1: var optionalMaxLength = inputField.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6591,9 +6585,9 @@ var $author$project$Main$encodeInputField = function (inputField) { 'maxLength', A2($author$project$Main$encodeAttributeOptional, $elm$json$Json$Encode$int, optionalMaxLength)) ])); - case 'Dropdown': - var choices = inputField.a.choices; - var filter = inputField.a.filter; + case 2: + var choices = inputField.a.k; + var filter = inputField.a.e; return $elm$json$Json$Encode$object( _Utils_ap( _List_fromArray( @@ -6609,13 +6603,13 @@ var $author$project$Main$encodeInputField = function (inputField) { A2( $elm$core$List$filter, function (_v1) { - var value = _v1.value; + var value = _v1.j; return $elm$core$String$trim(value) !== ''; }, choices))) ]), function () { - if (filter.$ === 'Just') { + if (!filter.$) { var f = filter.a; return _List_fromArray( [ @@ -6627,9 +6621,9 @@ var $author$project$Main$encodeInputField = function (inputField) { return _List_Nil; } }())); - case 'ChooseOne': - var choices = inputField.a.choices; - var filter = inputField.a.filter; + case 3: + var choices = inputField.a.k; + var filter = inputField.a.e; return $elm$json$Json$Encode$object( _Utils_ap( _List_fromArray( @@ -6645,13 +6639,13 @@ var $author$project$Main$encodeInputField = function (inputField) { A2( $elm$core$List$filter, function (_v3) { - var value = _v3.value; + var value = _v3.j; return $elm$core$String$trim(value) !== ''; }, choices))) ]), function () { - if (filter.$ === 'Just') { + if (!filter.$) { var f = filter.a; return _List_fromArray( [ @@ -6664,10 +6658,10 @@ var $author$project$Main$encodeInputField = function (inputField) { } }())); default: - var choices = inputField.a.choices; - var minRequired = inputField.a.minRequired; - var maxAllowed = inputField.a.maxAllowed; - var filter = inputField.a.filter; + var choices = inputField.a.k; + var minRequired = inputField.a.P; + var maxAllowed = inputField.a.U; + var filter = inputField.a.e; return $elm$json$Json$Encode$object( _Utils_ap( _List_fromArray( @@ -6683,14 +6677,14 @@ var $author$project$Main$encodeInputField = function (inputField) { A2( $elm$core$List$filter, function (_v5) { - var value = _v5.value; + var value = _v5.j; return $elm$core$String$trim(value) !== ''; }, choices))) ]), _Utils_ap( function () { - if (minRequired.$ === 'Just') { + if (!minRequired.$) { var min = minRequired.a; return _List_fromArray( [ @@ -6704,7 +6698,7 @@ var $author$project$Main$encodeInputField = function (inputField) { }(), _Utils_ap( function () { - if (maxAllowed.$ === 'Just') { + if (!maxAllowed.$) { var max = maxAllowed.a; return _List_fromArray( [ @@ -6717,7 +6711,7 @@ var $author$project$Main$encodeInputField = function (inputField) { } }(), function () { - if (filter.$ === 'Just') { + if (!filter.$) { var f = filter.a; return _List_fromArray( [ @@ -6732,10 +6726,10 @@ var $author$project$Main$encodeInputField = function (inputField) { } }; var $author$project$Main$encodePresence = function (presence) { - switch (presence.$) { - case 'Required': + switch (presence) { + case 0: return $elm$json$Json$Encode$string('Required'); - case 'Optional': + case 1: return $elm$json$Json$Encode$string('Optional'); default: return $elm$json$Json$Encode$string('System'); @@ -6743,7 +6737,7 @@ var $author$project$Main$encodePresence = function (presence) { }; var $author$project$Main$encodeComparison = function (comparison) { switch (comparison.$) { - case 'Equals': + case 0: var value = comparison.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6755,7 +6749,7 @@ var $author$project$Main$encodeComparison = function (comparison) { 'value', $elm$json$Json$Encode$string(value)) ])); - case 'StringContains': + case 1: var value = comparison.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6767,7 +6761,7 @@ var $author$project$Main$encodeComparison = function (comparison) { 'value', $elm$json$Json$Encode$string(value)) ])); - case 'EndsWith': + case 2: var value = comparison.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6779,7 +6773,7 @@ var $author$project$Main$encodeComparison = function (comparison) { 'value', $elm$json$Json$Encode$string(value)) ])); - case 'GreaterThan': + case 3: var value = comparison.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6823,7 +6817,7 @@ var $author$project$Main$encodeCondition = function (condition) { ])); }; var $author$project$Main$encodeVisibilityRule = function (rule) { - if (rule.$ === 'ShowWhen') { + if (!rule.$) { var conditions = rule.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6867,12 +6861,12 @@ var $author$project$Main$encodeFormFields = function (formFields) { [ _Utils_Tuple2( 'label', - $elm$json$Json$Encode$string(formField.label)), + $elm$json$Json$Encode$string(formField.d)), _Utils_Tuple2( 'name', function () { - var _v0 = formField.name; - if (_v0.$ === 'Just') { + var _v0 = formField.Q; + if (!_v0.$) { var name = _v0.a; return $elm$json$Json$Encode$string(name); } else { @@ -6881,22 +6875,22 @@ var $author$project$Main$encodeFormFields = function (formFields) { }()), _Utils_Tuple2( 'presence', - $author$project$Main$encodePresence(formField.presence)), + $author$project$Main$encodePresence(formField.p)), _Utils_Tuple2( 'description', - A2($author$project$Main$encodeAttributeOptional, $elm$json$Json$Encode$string, formField.description)), + A2($author$project$Main$encodeAttributeOptional, $elm$json$Json$Encode$string, formField.S)), _Utils_Tuple2( 'type', - $author$project$Main$encodeInputField(formField.type_)), + $author$project$Main$encodeInputField(formField.a)), _Utils_Tuple2( 'visibilityRule', - A2($elm$json$Json$Encode$list, $author$project$Main$encodeVisibilityRule, formField.visibilityRule)) + A2($elm$json$Json$Encode$list, $author$project$Main$encodeVisibilityRule, formField.m)) ]))); }, $elm$core$Array$toList(formFields))); }; var $author$project$Main$encodePortOutgoingValue = function (value) { - if (value.$ === 'PortOutgoingFormFields') { + if (!value.$) { var formFields = value.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6921,7 +6915,7 @@ var $author$project$Main$encodePortOutgoingValue = function (value) { } }; var $author$project$Main$fieldNameOf = function (formField) { - return A2($elm$core$Maybe$withDefault, formField.label, formField.name); + return A2($elm$core$Maybe$withDefault, formField.d, formField.Q); }; var $elm$core$Array$filter = F2( function (isGood, array) { @@ -6937,14 +6931,14 @@ var $elm$core$Array$filter = F2( }); var $author$project$Main$filterValuesByFieldChoices = F2( function (field, values) { - var _v0 = field.type_; + var _v0 = field.a; switch (_v0.$) { - case 'Dropdown': - var choices = _v0.a.choices; + case 2: + var choices = _v0.a.k; var validChoiceValues = A2( $elm$core$List$map, function ($) { - return $.value; + return $.j; }, choices); return A2( @@ -6953,12 +6947,12 @@ var $author$project$Main$filterValuesByFieldChoices = F2( return A2($elm$core$List$member, value, validChoiceValues); }, values); - case 'ChooseOne': - var choices = _v0.a.choices; + case 3: + var choices = _v0.a.k; var validChoiceValues = A2( $elm$core$List$map, function ($) { - return $.value; + return $.j; }, choices); return A2( @@ -6967,12 +6961,12 @@ var $author$project$Main$filterValuesByFieldChoices = F2( return A2($elm$core$List$member, value, validChoiceValues); }, values); - case 'ChooseMultiple': - var choices = _v0.a.choices; + case 4: + var choices = _v0.a.k; var validChoiceValues = A2( $elm$core$List$map, function ($) { - return $.value; + return $.j; }, choices); return A2( @@ -6997,20 +6991,20 @@ var $elm$core$List$isEmpty = function (xs) { } }; var $author$project$Main$isUsingFilter = function (formField) { - var _v0 = formField.type_; + var _v0 = formField.a; switch (_v0.$) { - case 'ShortText': + case 0: return false; - case 'LongText': + case 1: return false; - case 'ChooseMultiple': - var filter = _v0.a.filter; + case 4: + var filter = _v0.a.e; return !_Utils_eq(filter, $elm$core$Maybe$Nothing); - case 'ChooseOne': - var filter = _v0.a.filter; + case 3: + var filter = _v0.a.e; return !_Utils_eq(filter, $elm$core$Maybe$Nothing); default: - var filter = _v0.a.filter; + var filter = _v0.a.e; return !_Utils_eq(filter, $elm$core$Maybe$Nothing); } }; @@ -7020,7 +7014,7 @@ var $elm$core$Array$length = function (_v0) { }; var $elm$core$Maybe$map = F2( function (f, maybe) { - if (maybe.$ === 'Just') { + if (!maybe.$) { var value = maybe.a; return $elm$core$Maybe$Just( f(value)); @@ -7029,7 +7023,7 @@ var $elm$core$Maybe$map = F2( } }); var $elm$core$Result$toMaybe = function (result) { - if (result.$ === 'Ok') { + if (!result.$) { var v = result.a; return $elm$core$Maybe$Just(v); } else { @@ -7051,7 +7045,7 @@ var $elm$core$Platform$Cmd$none = $elm$core$Platform$Cmd$batch(_List_Nil); var $author$project$Main$outgoing = _Platform_outgoingPort('outgoing', $elm$core$Basics$identity); var $author$project$Main$init = function (flags) { var _v0 = A2($elm$json$Json$Decode$decodeValue, $author$project$Main$decodeConfig, flags); - if (_v0.$ === 'Ok') { + if (!_v0.$) { var config = _v0.a; var initialTrackedFormValues = $elm$core$Dict$fromList( A2( @@ -7059,8 +7053,8 @@ var $author$project$Main$init = function (flags) { function (field) { var fieldName = $author$project$Main$fieldNameOf(field); var rawValues = function () { - var _v1 = field.type_; - if (_v1.$ === 'ChooseMultiple') { + var _v1 = field.a; + if (_v1.$ === 4) { return A2( $elm$core$Maybe$withDefault, _List_Nil, @@ -7068,7 +7062,7 @@ var $author$project$Main$init = function (flags) { $author$project$Main$maybeDecode, fieldName, $author$project$Main$decodeListOrSingleton($elm$json$Json$Decode$string), - config.formValues)); + config.ba)); } else { return A2( $elm$core$Maybe$withDefault, @@ -7076,94 +7070,94 @@ var $author$project$Main$init = function (flags) { A2( $elm$core$Maybe$map, $elm$core$List$singleton, - A3($author$project$Main$maybeDecode, fieldName, $elm$json$Json$Decode$string, config.formValues))); + A3($author$project$Main$maybeDecode, fieldName, $elm$json$Json$Decode$string, config.ba))); } }(); var filteredValues = A2($author$project$Main$filterValuesByFieldChoices, field, rawValues); return _Utils_Tuple2(fieldName, filteredValues); }, - $elm$core$Array$toList(config.formFields))); - var allCustomElements = $author$project$Main$allCustomElementsFromGroups(config.inputFieldGroups); + $elm$core$Array$toList(config.g))); + var allCustomElements = $author$project$Main$allCustomElementsFromGroups(config.T); return _Utils_Tuple2( { - activeFieldGroupIndex: 0, - dragged: $elm$core$Maybe$Nothing, - formFields: config.formFields, - initError: $elm$core$Maybe$Nothing, - inputFieldGroups: config.inputFieldGroups, - needsFormLogic: !$elm$core$Array$isEmpty( + ay: 0, + r: $elm$core$Maybe$Nothing, + g: config.g, + aZ: $elm$core$Maybe$Nothing, + T: config.T, + aa: !$elm$core$Array$isEmpty( A2( $elm$core$Array$filter, function (f) { - return $author$project$Main$isUsingFilter(f) || (!$elm$core$List$isEmpty(f.visibilityRule)); + return $author$project$Main$isUsingFilter(f) || (!$elm$core$List$isEmpty(f.m)); }, - config.formFields)), - nextQuestionNumber: $elm$core$Array$length(config.formFields) + 1, - selectedFieldIndex: $elm$core$Maybe$Nothing, - shortTextTypeDict: $elm$core$Dict$fromList( + config.g)), + ab: $elm$core$Array$length(config.g) + 1, + F: $elm$core$Maybe$Nothing, + al: $elm$core$Dict$fromList( A2( $elm$core$List$map, function (customElement) { - return _Utils_Tuple2(customElement.inputType, customElement); + return _Utils_Tuple2(customElement.C, customElement); }, allCustomElements)), - trackedFormValues: initialTrackedFormValues, - viewMode: config.viewMode + v: initialTrackedFormValues, + ad: config.ad }, $elm$core$Platform$Cmd$batch( _List_fromArray( [ $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( - $author$project$Main$PortOutgoingFormFields(config.formFields))) + $author$project$Main$PortOutgoingFormFields(config.g))) ]))); } else { var err = _v0.a; return _Utils_Tuple2( { - activeFieldGroupIndex: 0, - dragged: $elm$core$Maybe$Nothing, - formFields: $elm$core$Array$empty, - initError: $elm$core$Maybe$Just( + ay: 0, + r: $elm$core$Maybe$Nothing, + g: $elm$core$Array$empty, + aZ: $elm$core$Maybe$Just( $elm$json$Json$Decode$errorToString(err)), - inputFieldGroups: _List_Nil, - needsFormLogic: false, - nextQuestionNumber: 1, - selectedFieldIndex: $elm$core$Maybe$Nothing, - shortTextTypeDict: $elm$core$Dict$empty, - trackedFormValues: $elm$core$Dict$empty, - viewMode: $author$project$Main$Editor( - {maybeAnimate: $elm$core$Maybe$Nothing}) + T: _List_Nil, + aa: false, + ab: 1, + F: $elm$core$Maybe$Nothing, + al: $elm$core$Dict$empty, + v: $elm$core$Dict$empty, + ad: $author$project$Main$Editor( + {aC: $elm$core$Maybe$Nothing}) }, $elm$core$Platform$Cmd$none); } }; var $author$project$Main$OnPortIncoming = function (a) { - return {$: 'OnPortIncoming', a: a}; + return {$: 1, a: a}; }; var $author$project$Main$incoming = _Platform_incomingPort('incoming', $elm$json$Json$Decode$value); var $author$project$Main$subscriptions = function (_v0) { return $author$project$Main$incoming($author$project$Main$OnPortIncoming); }; -var $author$project$Main$AnimateYellowFade = {$: 'AnimateYellowFade'}; +var $author$project$Main$AnimateYellowFade = 0; var $author$project$Main$DoSleepDo = F2( function (a, b) { - return {$: 'DoSleepDo', a: a, b: b}; + return {$: 14, a: a, b: b}; }); var $author$project$Main$DragExisting = function (a) { - return {$: 'DragExisting', a: a}; + return {$: 0, a: a}; }; var $author$project$Main$DragNew = function (a) { - return {$: 'DragNew', a: a}; + return {$: 1, a: a}; }; var $author$project$Main$Drop = function (a) { - return {$: 'Drop', a: a}; + return {$: 13, a: a}; }; var $author$project$Main$PortOutgoingFormValues = function (a) { - return {$: 'PortOutgoingFormValues', a: a}; + return {$: 1, a: a}; }; var $author$project$Main$SetEditorAnimate = function (a) { - return {$: 'SetEditorAnimate', a: a}; + return {$: 7, a: a}; }; var $elm$core$Basics$always = F2( function (a, _v0) { @@ -7189,7 +7183,7 @@ var $elm$json$Json$Encode$dict = F3( toValue(value), obj); }), - _Json_emptyObject(_Utils_Tuple0), + _Json_emptyObject(0), dictionary)); }); var $elm$core$List$head = function (list) { @@ -7214,9 +7208,9 @@ var $elm$core$Array$indexedMap = F2( var tree = _v0.c; var tail = _v0.d; var initialBuilder = { - nodeList: _List_Nil, - nodeListSize: 0, - tail: A3( + y: _List_Nil, + t: 0, + x: A3( $elm$core$Elm$JsArray$indexedMap, func, $elm$core$Array$tailIndex(len), @@ -7224,18 +7218,18 @@ var $elm$core$Array$indexedMap = F2( }; var helper = F2( function (node, builder) { - if (node.$ === 'SubTree') { + if (!node.$) { var subTree = node.a; return A3($elm$core$Elm$JsArray$foldl, helper, builder, subTree); } else { var leaf = node.a; - var offset = builder.nodeListSize * $elm$core$Array$branchFactor; + var offset = builder.t * $elm$core$Array$branchFactor; var mappedLeaf = $elm$core$Array$Leaf( A3($elm$core$Elm$JsArray$indexedMap, func, offset, leaf)); return { - nodeList: A2($elm$core$List$cons, mappedLeaf, builder.nodeList), - nodeListSize: builder.nodeListSize + 1, - tail: builder.tail + y: A2($elm$core$List$cons, mappedLeaf, builder.y), + t: builder.t + 1, + x: builder.x }; } }); @@ -7246,13 +7240,13 @@ var $elm$core$Array$indexedMap = F2( }); var $author$project$Main$mustBeOptional = function (inputField) { switch (inputField.$) { - case 'ShortText': + case 0: return false; - case 'LongText': + case 1: return false; - case 'Dropdown': + case 2: return false; - case 'ChooseOne': + case 3: return false; default: return true; @@ -7268,7 +7262,7 @@ var $elm$core$Array$getHelp = F3( while (true) { var pos = $elm$core$Array$bitMask & (index >>> shift); var _v0 = A2($elm$core$Elm$JsArray$unsafeGet, pos, tree); - if (_v0.$ === 'SubTree') { + if (!_v0.$) { var subTree = _v0.a; var $temp$shift = shift - $elm$core$Array$shiftStep, $temp$index = index, @@ -7454,32 +7448,32 @@ var $elm_community$list_extra$List$Extra$splitAt = F2( }); var $author$project$Main$onDropped = F2( function (targetIndex, model) { - var _v0 = model.dragged; - if (_v0.$ === 'Just') { - if (_v0.a.$ === 'DragExisting') { - var dragIndex = _v0.a.a.dragIndex; - var dropIndex = _v0.a.a.dropIndex; - if (targetIndex.$ === 'Nothing') { + var _v0 = model.r; + if (!_v0.$) { + if (!_v0.a.$) { + var dragIndex = _v0.a.a.a9; + var dropIndex = _v0.a.a.G; + if (targetIndex.$ === 1) { return _Utils_update( model, - {dragged: $elm$core$Maybe$Nothing}); + {r: $elm$core$Maybe$Nothing}); } else { var index = targetIndex.a; - if (dropIndex.$ === 'Just') { + if (!dropIndex.$) { var _v3 = dropIndex.a; var dropTargetIndex = _v3.a; if (_Utils_eq(dragIndex, index) || (!_Utils_eq(index, dropTargetIndex))) { return _Utils_update( model, - {dragged: $elm$core$Maybe$Nothing}); + {r: $elm$core$Maybe$Nothing}); } else { var newFormFields = $elm$core$Array$fromList( function (list) { - var draggedField = A2($elm$core$Array$get, dragIndex, model.formFields); + var draggedField = A2($elm$core$Array$get, dragIndex, model.g); var _v5 = A2($elm_community$list_extra$List$Extra$splitAt, index, list); var before = _v5.a; var after = _v5.b; - if (draggedField.$ === 'Just') { + if (!draggedField.$) { var field = draggedField.a; return $elm$core$List$concat( _List_fromArray( @@ -7505,33 +7499,33 @@ var $author$project$Main$onDropped = F2( A2( $elm$core$List$indexedMap, $elm$core$Tuple$pair, - $elm$core$Array$toList(model.formFields)))))); + $elm$core$Array$toList(model.g)))))); return _Utils_update( model, - {dragged: $elm$core$Maybe$Nothing, formFields: newFormFields}); + {r: $elm$core$Maybe$Nothing, g: newFormFields}); } } else { return _Utils_update( model, - {dragged: $elm$core$Maybe$Nothing}); + {r: $elm$core$Maybe$Nothing}); } } } else { - var field = _v0.a.a.field; - var dropIndex = _v0.a.a.dropIndex; - if (targetIndex.$ === 'Nothing') { + var field = _v0.a.a.bX; + var dropIndex = _v0.a.a.G; + if (targetIndex.$ === 1) { return _Utils_update( model, - {dragged: $elm$core$Maybe$Nothing}); + {r: $elm$core$Maybe$Nothing}); } else { var index = targetIndex.a; - if (dropIndex.$ === 'Just') { + if (!dropIndex.$) { var _v9 = dropIndex.a; var dropTargetIndex = _v9.a; if (!_Utils_eq(index, dropTargetIndex)) { return _Utils_update( model, - {dragged: $elm$core$Maybe$Nothing}); + {r: $elm$core$Maybe$Nothing}); } else { var newFormFields = $elm$core$Array$fromList( function (list) { @@ -7542,22 +7536,22 @@ var $author$project$Main$onDropped = F2( before, A2($elm$core$List$cons, field, after)); }( - $elm$core$Array$toList(model.formFields))); + $elm$core$Array$toList(model.g))); return _Utils_update( model, - {dragged: $elm$core$Maybe$Nothing, formFields: newFormFields, nextQuestionNumber: model.nextQuestionNumber + 1}); + {r: $elm$core$Maybe$Nothing, g: newFormFields, ab: model.ab + 1}); } } else { return _Utils_update( model, - {dragged: $elm$core$Maybe$Nothing}); + {r: $elm$core$Maybe$Nothing}); } } } } else { return _Utils_update( model, - {dragged: $elm$core$Maybe$Nothing}); + {r: $elm$core$Maybe$Nothing}); } }); var $elm$core$Elm$JsArray$push = _JsArray_push; @@ -7581,7 +7575,7 @@ var $elm$core$Array$insertTailInTree = F4( } } else { var value = A2($elm$core$Elm$JsArray$unsafeGet, pos, tree); - if (value.$ === 'SubTree') { + if (!value.$) { var subTree = value.a; var newSub = $elm$core$Array$SubTree( A4($elm$core$Array$insertTailInTree, shift - $elm$core$Array$shiftStep, index, tail, subTree)); @@ -7642,14 +7636,14 @@ var $elm$core$Array$push = F2( var $elm$core$Process$sleep = _Process_sleep; var $author$project$Main$stringFromInputField = function (inputField) { switch (inputField.$) { - case 'ShortText': - var inputType = inputField.a.inputType; + case 0: + var inputType = inputField.a.C; return inputType; - case 'LongText': + case 1: return 'Multi-line description'; - case 'Dropdown': + case 2: return 'Dropdown'; - case 'ChooseOne': + case 3: return 'Radio buttons'; default: return 'Checkboxes'; @@ -7659,7 +7653,7 @@ var $elm$core$Array$setHelp = F4( function (shift, index, value, tree) { var pos = $elm$core$Array$bitMask & (index >>> shift); var _v0 = A2($elm$core$Elm$JsArray$unsafeGet, pos, tree); - if (_v0.$ === 'SubTree') { + if (!_v0.$) { var subTree = _v0.a; var newSub = A4($elm$core$Array$setHelp, shift - $elm$core$Array$shiftStep, index, value, subTree); return A3( @@ -7702,7 +7696,7 @@ var $author$project$Main$swapArrayIndex = F3( var maybeJ = A2($elm$core$Array$get, j, arr); var maybeI = A2($elm$core$Array$get, i, arr); var _v0 = _Utils_Tuple2(maybeI, maybeJ); - if ((_v0.a.$ === 'Just') && (_v0.b.$ === 'Just')) { + if ((!_v0.a.$) && (!_v0.b.$)) { var iVal = _v0.a.a; var jVal = _v0.b.a; return A3( @@ -7735,42 +7729,42 @@ var $elm$core$Array$toIndexedList = function (array) { }; var $author$project$Main$updateDragged = F2( function (maybeDroppable, dragged) { - if (maybeDroppable.$ === 'Nothing') { + if (maybeDroppable.$ === 1) { return dragged; } else { var _v1 = maybeDroppable.a; var targetField = _v1.b; - if (dragged.$ === 'DragExisting') { + if (!dragged.$) { var details = dragged.a; - var _v3 = details.dropIndex; - if (_v3.$ === 'Just') { + var _v3 = details.G; + if (!_v3.$) { var _v4 = _v3.a; var existingField = _v4.b; return _Utils_eq(existingField, targetField) ? dragged : $author$project$Main$DragExisting( _Utils_update( details, - {dropIndex: maybeDroppable})); + {G: maybeDroppable})); } else { return $author$project$Main$DragExisting( _Utils_update( details, - {dropIndex: maybeDroppable})); + {G: maybeDroppable})); } } else { var details = dragged.a; - var _v5 = details.dropIndex; - if (_v5.$ === 'Just') { + var _v5 = details.G; + if (!_v5.$) { var _v6 = _v5.a; var existingField = _v6.b; return _Utils_eq(existingField, targetField) ? dragged : $author$project$Main$DragNew( _Utils_update( details, - {dropIndex: maybeDroppable})); + {G: maybeDroppable})); } else { return $author$project$Main$DragNew( _Utils_update( details, - {dropIndex: maybeDroppable})); + {G: maybeDroppable})); } } } @@ -7805,15 +7799,15 @@ var $elm_community$list_extra$List$Extra$removeAt = F2( var $author$project$Main$toggleAttributeOptional = F2( function (toggle, attributeOptional) { switch (attributeOptional.$) { - case 'AttributeNotNeeded': - if (attributeOptional.a.$ === 'Nothing') { + case 0: + if (attributeOptional.a.$ === 1) { var _v1 = attributeOptional.a; return toggle ? $author$project$Main$AttributeInvalid('') : attributeOptional; } else { var a = attributeOptional.a.a; return toggle ? $author$project$Main$AttributeGiven(a) : attributeOptional; } - case 'AttributeInvalid': + case 1: return toggle ? attributeOptional : $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); default: var a = attributeOptional.a; @@ -7826,16 +7820,16 @@ var $author$project$Main$updateComparison = F2( switch (comparisonType) { case 'Equals': switch (comparison.$) { - case 'Equals': + case 0: var str = comparison.a; return $author$project$Main$Equals(str); - case 'StringContains': + case 1: var str = comparison.a; return $author$project$Main$Equals(str); - case 'EndsWith': + case 2: var str = comparison.a; return $author$project$Main$Equals(str); - case 'GreaterThan': + case 3: var str = comparison.a; return $author$project$Main$Equals(str); default: @@ -7844,16 +7838,16 @@ var $author$project$Main$updateComparison = F2( } case 'StringContains': switch (comparison.$) { - case 'Equals': + case 0: var str = comparison.a; return $author$project$Main$StringContains(str); - case 'StringContains': + case 1: var str = comparison.a; return $author$project$Main$StringContains(str); - case 'EndsWith': + case 2: var str = comparison.a; return $author$project$Main$StringContains(str); - case 'GreaterThan': + case 3: var str = comparison.a; return $author$project$Main$StringContains(str); default: @@ -7862,16 +7856,16 @@ var $author$project$Main$updateComparison = F2( } case 'EndsWith': switch (comparison.$) { - case 'Equals': + case 0: var str = comparison.a; return $author$project$Main$EndsWith(str); - case 'StringContains': + case 1: var str = comparison.a; return $author$project$Main$EndsWith(str); - case 'EndsWith': + case 2: var str = comparison.a; return $author$project$Main$EndsWith(str); - case 'GreaterThan': + case 3: var str = comparison.a; return $author$project$Main$EndsWith(str); default: @@ -7880,16 +7874,16 @@ var $author$project$Main$updateComparison = F2( } case 'GreaterThan': switch (comparison.$) { - case 'Equals': + case 0: var str = comparison.a; return $author$project$Main$GreaterThan(str); - case 'StringContains': + case 1: var str = comparison.a; return $author$project$Main$GreaterThan(str); - case 'EndsWith': + case 2: var str = comparison.a; return $author$project$Main$GreaterThan(str); - case 'GreaterThan': + case 3: var str = comparison.a; return $author$project$Main$GreaterThan(str); default: @@ -7898,16 +7892,16 @@ var $author$project$Main$updateComparison = F2( } case 'EqualsField': switch (comparison.$) { - case 'Equals': + case 0: var str = comparison.a; return $author$project$Main$EqualsField(str); - case 'StringContains': + case 1: var str = comparison.a; return $author$project$Main$EqualsField(str); - case 'EndsWith': + case 2: var str = comparison.a; return $author$project$Main$EqualsField(str); - case 'GreaterThan': + case 3: var str = comparison.a; return $author$project$Main$EqualsField(str); default: @@ -7930,13 +7924,13 @@ var $author$project$Main$updateComparisonInCondition = F2( var $author$project$Main$updateComparisonValue = F2( function (newValue, comparison) { switch (comparison.$) { - case 'Equals': + case 0: return $author$project$Main$Equals(newValue); - case 'StringContains': + case 1: return $author$project$Main$StringContains(newValue); - case 'EndsWith': + case 2: return $author$project$Main$EndsWith(newValue); - case 'GreaterThan': + case 3: return $author$project$Main$GreaterThan(newValue); default: return $author$project$Main$EqualsField(newValue); @@ -7954,7 +7948,7 @@ var $author$project$Main$updateConditions = F3( }); var $author$project$Main$updateConditionsInRule = F2( function (updater, rule) { - if (rule.$ === 'ShowWhen') { + if (!rule.$) { var conditions = rule.a; return $author$project$Main$ShowWhen( updater(conditions)); @@ -7984,7 +7978,7 @@ var $author$project$Main$updateVisibilityRuleAt = F3( rules); }); var $author$project$Main$visibilityRuleCondition = function (rule) { - if (rule.$ === 'ShowWhen') { + if (!rule.$) { var conditions = rule.a; return conditions; } else { @@ -7995,43 +7989,43 @@ var $author$project$Main$visibilityRuleCondition = function (rule) { var $author$project$Main$updateFormField = F5( function (msg, fieldIndex, string, formFields, formField) { switch (msg.$) { - case 'OnLabelInput': + case 0: return _Utils_update( formField, - {label: string}); - case 'OnDescriptionInput': + {d: string}); + case 1: return (string === '') ? _Utils_update( formField, { - description: $author$project$Main$AttributeInvalid('') + S: $author$project$Main$AttributeInvalid('') }) : _Utils_update( formField, { - description: $author$project$Main$AttributeGiven(string) + S: $author$project$Main$AttributeGiven(string) }); - case 'OnDescriptionToggle': + case 2: var bool = msg.a; return _Utils_update( formField, { - description: A2($author$project$Main$toggleAttributeOptional, bool, formField.description) + S: A2($author$project$Main$toggleAttributeOptional, bool, formField.S) }); - case 'OnRequiredInput': + case 3: var bool = msg.a; return bool ? _Utils_update( formField, - {presence: $author$project$Main$Required}) : _Utils_update( + {p: 0}) : _Utils_update( formField, - {presence: $author$project$Main$Optional}); - case 'OnCheckboxMinRequiredInput': + {p: 1}); + case 16: var minStr = msg.a; - var _v1 = formField.type_; - if (_v1.$ === 'ChooseMultiple') { + var _v1 = formField.a; + if (_v1.$ === 4) { var settings = _v1.a; var newMinRequired = $elm$core$String$isEmpty(minStr) ? $elm$core$Maybe$Nothing : $elm$core$String$toInt(minStr); var adjustedMinRequired = function () { - var _v3 = _Utils_Tuple2(newMinRequired, settings.maxAllowed); - if ((_v3.a.$ === 'Just') && (_v3.b.$ === 'Just')) { + var _v3 = _Utils_Tuple2(newMinRequired, settings.U); + if ((!_v3.a.$) && (!_v3.b.$)) { var min = _v3.a.a; var max = _v3.b.a; return (_Utils_cmp(min, max) > 0) ? $elm$core$Maybe$Just(max) : $elm$core$Maybe$Just(min); @@ -8041,12 +8035,12 @@ var $author$project$Main$updateFormField = F5( } }(); var finalMinRequired = function () { - if (adjustedMinRequired.$ === 'Just') { + if (!adjustedMinRequired.$) { var min = adjustedMinRequired.a; return (_Utils_cmp( min, - $elm$core$List$length(settings.choices)) > 0) ? $elm$core$Maybe$Just( - $elm$core$List$length(settings.choices)) : $elm$core$Maybe$Just(min); + $elm$core$List$length(settings.k)) > 0) ? $elm$core$Maybe$Just( + $elm$core$List$length(settings.k)) : $elm$core$Maybe$Just(min); } else { return $elm$core$Maybe$Nothing; } @@ -8054,23 +8048,23 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - type_: $author$project$Main$ChooseMultiple( + a: $author$project$Main$ChooseMultiple( _Utils_update( settings, - {minRequired: finalMinRequired})) + {P: finalMinRequired})) }); } else { return formField; } - case 'OnCheckboxMaxAllowedInput': + case 17: var maxStr = msg.a; - var _v4 = formField.type_; - if (_v4.$ === 'ChooseMultiple') { + var _v4 = formField.a; + if (_v4.$ === 4) { var settings = _v4.a; var newMaxAllowed = $elm$core$String$isEmpty(maxStr) ? $elm$core$Maybe$Nothing : $elm$core$String$toInt(maxStr); var adjustedMaxAllowed = function () { - var _v6 = _Utils_Tuple2(newMaxAllowed, settings.minRequired); - if ((_v6.a.$ === 'Just') && (_v6.b.$ === 'Just')) { + var _v6 = _Utils_Tuple2(newMaxAllowed, settings.P); + if ((!_v6.a.$) && (!_v6.b.$)) { var max = _v6.a.a; var min = _v6.b.a; return (_Utils_cmp(max, min) < 0) ? $elm$core$Maybe$Just(min) : $elm$core$Maybe$Just(max); @@ -8080,12 +8074,12 @@ var $author$project$Main$updateFormField = F5( } }(); var finalMaxAllowed = function () { - if (adjustedMaxAllowed.$ === 'Just') { + if (!adjustedMaxAllowed.$) { var max = adjustedMaxAllowed.a; return (_Utils_cmp( max, - $elm$core$List$length(settings.choices)) > 0) ? $elm$core$Maybe$Just( - $elm$core$List$length(settings.choices)) : $elm$core$Maybe$Just(max); + $elm$core$List$length(settings.k)) > 0) ? $elm$core$Maybe$Just( + $elm$core$List$length(settings.k)) : $elm$core$Maybe$Just(max); } else { return $elm$core$Maybe$Nothing; } @@ -8093,82 +8087,82 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - type_: $author$project$Main$ChooseMultiple( + a: $author$project$Main$ChooseMultiple( _Utils_update( settings, - {maxAllowed: finalMaxAllowed})) + {U: finalMaxAllowed})) }); } else { return formField; } - case 'OnDateMinInput': + case 20: var minStr = msg.a; - var _v7 = formField.type_; - if (_v7.$ === 'ShortText') { + var _v7 = formField.a; + if (!_v7.$) { var customElement = _v7.a; var newCustomElement = _Utils_update( customElement, { - min: $elm$core$String$isEmpty(minStr) ? $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing) : $author$project$Main$AttributeGiven(minStr) + ar: $elm$core$String$isEmpty(minStr) ? $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing) : $author$project$Main$AttributeGiven(minStr) }); return _Utils_update( formField, { - type_: $author$project$Main$ShortText(newCustomElement) + a: $author$project$Main$ShortText(newCustomElement) }); } else { return formField; } - case 'OnDateMaxInput': + case 21: var maxStr = msg.a; - var _v8 = formField.type_; - if (_v8.$ === 'ShortText') { + var _v8 = formField.a; + if (!_v8.$) { var customElement = _v8.a; var newCustomElement = _Utils_update( customElement, { - max: $elm$core$String$isEmpty(maxStr) ? $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing) : $author$project$Main$AttributeGiven(maxStr) + aq: $elm$core$String$isEmpty(maxStr) ? $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing) : $author$project$Main$AttributeGiven(maxStr) }); return _Utils_update( formField, { - type_: $author$project$Main$ShortText(newCustomElement) + a: $author$project$Main$ShortText(newCustomElement) }); } else { return formField; } - case 'OnChoicesInput': - var _v9 = formField.type_; + case 4: + var _v9 = formField.a; switch (_v9.$) { - case 'ShortText': + case 0: return formField; - case 'LongText': + case 1: return formField; - case 'Dropdown': + case 2: var settings = _v9.a; return _Utils_update( formField, { - type_: $author$project$Main$Dropdown( + a: $author$project$Main$Dropdown( _Utils_update( settings, { - choices: A2( + k: A2( $elm$core$List$map, $author$project$Main$choiceFromString, $elm$core$String$lines(string)) })) }); - case 'ChooseOne': + case 3: var settings = _v9.a; return _Utils_update( formField, { - type_: $author$project$Main$ChooseOne( + a: $author$project$Main$ChooseOne( _Utils_update( settings, { - choices: A2( + k: A2( $elm$core$List$map, $author$project$Main$choiceFromString, $elm$core$String$lines(string)) @@ -8182,8 +8176,8 @@ var $author$project$Main$updateFormField = F5( $elm$core$String$lines(string)); var newChoicesCount = $elm$core$List$length(newChoices); var newMaxAllowed = function () { - var _v11 = settings.maxAllowed; - if (_v11.$ === 'Just') { + var _v11 = settings.U; + if (!_v11.$) { var max = _v11.a; return (_Utils_cmp(max, newChoicesCount) > 0) ? ((newChoicesCount > 0) ? $elm$core$Maybe$Just(newChoicesCount) : $elm$core$Maybe$Nothing) : $elm$core$Maybe$Just(max); } else { @@ -8191,8 +8185,8 @@ var $author$project$Main$updateFormField = F5( } }(); var newMinRequired = function () { - var _v10 = settings.minRequired; - if (_v10.$ === 'Just') { + var _v10 = settings.P; + if (!_v10.$) { var min = _v10.a; return (_Utils_cmp(min, newChoicesCount) > 0) ? ((newChoicesCount > 0) ? $elm$core$Maybe$Just(newChoicesCount) : $elm$core$Maybe$Nothing) : $elm$core$Maybe$Just(min); } else { @@ -8202,79 +8196,79 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - type_: $author$project$Main$ChooseMultiple( + a: $author$project$Main$ChooseMultiple( _Utils_update( settings, - {choices: newChoices, maxAllowed: newMaxAllowed, minRequired: newMinRequired})) + {k: newChoices, U: newMaxAllowed, P: newMinRequired})) }); } - case 'OnMultipleToggle': + case 5: var bool = msg.a; - var _v12 = formField.type_; + var _v12 = formField.a; switch (_v12.$) { - case 'ShortText': + case 0: var customElement = _v12.a; var newCustomElement = _Utils_update( customElement, { - multiple: $author$project$Main$AttributeGiven(bool) + aO: $author$project$Main$AttributeGiven(bool) }); return _Utils_update( formField, { - type_: $author$project$Main$ShortText(newCustomElement) + a: $author$project$Main$ShortText(newCustomElement) }); - case 'LongText': + case 1: return formField; - case 'Dropdown': + case 2: return formField; - case 'ChooseOne': + case 3: return formField; default: return formField; } - case 'OnMaxLengthToggle': + case 6: var bool = msg.a; - var _v13 = formField.type_; + var _v13 = formField.a; switch (_v13.$) { - case 'ShortText': + case 0: var customElement = _v13.a; var newCustomElement = _Utils_update( customElement, { - maxlength: A2($author$project$Main$toggleAttributeOptional, bool, customElement.maxlength) + ai: A2($author$project$Main$toggleAttributeOptional, bool, customElement.ai) }); return _Utils_update( formField, { - type_: $author$project$Main$ShortText(newCustomElement) + a: $author$project$Main$ShortText(newCustomElement) }); - case 'LongText': + case 1: var maxlength = _v13.a; return _Utils_update( formField, { - type_: $author$project$Main$LongText( + a: $author$project$Main$LongText( A2($author$project$Main$toggleAttributeOptional, bool, maxlength)) }); - case 'Dropdown': + case 2: return formField; - case 'ChooseOne': + case 3: return formField; default: return formField; } - case 'OnMaxLengthInput': - var _v14 = formField.type_; + case 7: + var _v14 = formField.a; switch (_v14.$) { - case 'ShortText': + case 0: var customElement = _v14.a; var newCustomElement = _Utils_update( customElement, { - maxlength: function () { + ai: function () { var _v15 = $elm$core$String$toInt(string); - if (_v15.$ === 'Just') { + if (!_v15.$) { var i = _v15.a; return $author$project$Main$AttributeGiven(i); } else { @@ -8285,12 +8279,12 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - type_: $author$project$Main$ShortText(newCustomElement) + a: $author$project$Main$ShortText(newCustomElement) }); - case 'LongText': + case 1: var newMaxlength = function () { var _v16 = $elm$core$String$toInt(string); - if (_v16.$ === 'Just') { + if (!_v16.$) { var i = _v16.a; return $author$project$Main$AttributeGiven(i); } else { @@ -8300,85 +8294,85 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - type_: $author$project$Main$LongText(newMaxlength) + a: $author$project$Main$LongText(newMaxlength) }); - case 'Dropdown': + case 2: return formField; - case 'ChooseOne': + case 3: return formField; default: return formField; } - case 'OnDateMinToggle': + case 18: var bool = msg.a; - var _v17 = formField.type_; - if (_v17.$ === 'ShortText') { + var _v17 = formField.a; + if (!_v17.$) { var customElement = _v17.a; var newCustomElement = _Utils_update( customElement, { - min: A2($author$project$Main$toggleAttributeOptional, bool, customElement.min) + ar: A2($author$project$Main$toggleAttributeOptional, bool, customElement.ar) }); return _Utils_update( formField, { - type_: $author$project$Main$ShortText(newCustomElement) + a: $author$project$Main$ShortText(newCustomElement) }); } else { return formField; } - case 'OnDateMaxToggle': + case 19: var bool = msg.a; - var _v18 = formField.type_; - if (_v18.$ === 'ShortText') { + var _v18 = formField.a; + if (!_v18.$) { var customElement = _v18.a; var newCustomElement = _Utils_update( customElement, { - max: A2($author$project$Main$toggleAttributeOptional, bool, customElement.max) + aq: A2($author$project$Main$toggleAttributeOptional, bool, customElement.aq) }); return _Utils_update( formField, { - type_: $author$project$Main$ShortText(newCustomElement) + a: $author$project$Main$ShortText(newCustomElement) }); } else { return formField; } - case 'OnDatalistToggle': + case 8: var bool = msg.a; - var _v19 = formField.type_; + var _v19 = formField.a; switch (_v19.$) { - case 'ShortText': + case 0: var customElement = _v19.a; var newCustomElement = _Utils_update( customElement, { - datalist: A2($author$project$Main$toggleAttributeOptional, bool, customElement.datalist) + af: A2($author$project$Main$toggleAttributeOptional, bool, customElement.af) }); return _Utils_update( formField, { - type_: $author$project$Main$ShortText(newCustomElement) + a: $author$project$Main$ShortText(newCustomElement) }); - case 'LongText': + case 1: return formField; - case 'Dropdown': + case 2: return formField; - case 'ChooseOne': + case 3: return formField; default: return formField; } - case 'OnDatalistInput': - var _v20 = formField.type_; + case 9: + var _v20 = formField.a; switch (_v20.$) { - case 'ShortText': + case 0: var customElement = _v20.a; var newCustomElement = _Utils_update( customElement, { - datalist: function () { + af: function () { var _v21 = A2($elm$core$String$split, '\n', string); if (!_v21.b) { return $author$project$Main$AttributeInvalid(string); @@ -8392,24 +8386,24 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - type_: $author$project$Main$ShortText(newCustomElement) + a: $author$project$Main$ShortText(newCustomElement) }); - case 'LongText': + case 1: return formField; - case 'Dropdown': + case 2: return formField; - case 'ChooseOne': + case 3: return formField; default: return formField; } - case 'OnVisibilityRuleTypeInput': + case 10: if (msg.b === '\n') { var ruleIndex = msg.a; return _Utils_update( formField, { - visibilityRule: A2($elm_community$list_extra$List$Extra$removeAt, ruleIndex, formField.visibilityRule) + m: A2($elm_community$list_extra$List$Extra$removeAt, ruleIndex, formField.m) }); } else { var ruleIndex = msg.a; @@ -8417,7 +8411,7 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - visibilityRule: A3( + m: A3( $author$project$Main$updateVisibilityRuleAt, ruleIndex, function (rule) { @@ -8432,17 +8426,17 @@ var $author$project$Main$updateFormField = F5( return rule; } }, - formField.visibilityRule) + formField.m) }); } - case 'OnVisibilityConditionTypeInput': + case 11: var ruleIndex = msg.a; var conditionIndex = msg.b; var str = msg.c; return _Utils_update( formField, { - visibilityRule: A3( + m: A3( $author$project$Main$updateVisibilityRuleAt, ruleIndex, $author$project$Main$updateConditionsInRule( @@ -8451,21 +8445,21 @@ var $author$project$Main$updateFormField = F5( conditionIndex, $author$project$Main$updateComparisonInCondition( $author$project$Main$updateComparison(str)))), - formField.visibilityRule) + formField.m) }); - case 'OnVisibilityConditionFieldInput': + case 12: if (msg.c === '\n') { var ruleIndex = msg.a; var conditionIndex = msg.b; return _Utils_update( formField, { - visibilityRule: A3( + m: A3( $author$project$Main$updateVisibilityRuleAt, ruleIndex, $author$project$Main$updateConditionsInRule( $elm_community$list_extra$List$Extra$removeAt(conditionIndex)), - formField.visibilityRule) + formField.m) }); } else { var ruleIndex = msg.a; @@ -8474,7 +8468,7 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - visibilityRule: A3( + m: A3( $author$project$Main$updateVisibilityRuleAt, ruleIndex, $author$project$Main$updateConditionsInRule( @@ -8483,17 +8477,17 @@ var $author$project$Main$updateFormField = F5( conditionIndex, $author$project$Main$updateFieldnameInCondition( $elm$core$Basics$always(newFieldName)))), - formField.visibilityRule) + formField.m) }); } - case 'OnVisibilityConditionValueInput': + case 13: var ruleIndex = msg.a; var conditionIndex = msg.b; var newValue = msg.c; return _Utils_update( formField, { - visibilityRule: A3( + m: A3( $author$project$Main$updateVisibilityRuleAt, ruleIndex, $author$project$Main$updateConditionsInRule( @@ -8502,14 +8496,14 @@ var $author$project$Main$updateFormField = F5( conditionIndex, $author$project$Main$updateComparisonInCondition( $author$project$Main$updateComparisonValue(newValue)))), - formField.visibilityRule) + formField.m) }); - case 'OnAddVisibilityRule': + case 14: return _Utils_update( formField, { - visibilityRule: _Utils_ap( - formField.visibilityRule, + m: _Utils_ap( + formField.m, _List_fromArray( [ $author$project$Main$ShowWhen( @@ -8522,7 +8516,7 @@ var $author$project$Main$updateFormField = F5( ])) ])) }); - case 'OnVisibilityConditionDuplicate': + case 15: var ruleIndex = msg.a; var newCondition = function (conditions) { var _v24 = $elm$core$List$reverse(conditions); @@ -8542,11 +8536,11 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - visibilityRule: A3( + m: A3( $author$project$Main$updateVisibilityRuleAt, ruleIndex, function (rule) { - if (rule.$ === 'ShowWhen') { + if (!rule.$) { var conditions = rule.a; return $author$project$Main$ShowWhen( _Utils_ap( @@ -8566,56 +8560,56 @@ var $author$project$Main$updateFormField = F5( ]))); } }, - formField.visibilityRule) + formField.m) }); - case 'OnFilterToggle': + case 22: var checked = msg.a; - var _v25 = formField.type_; + var _v25 = formField.a; switch (_v25.$) { - case 'Dropdown': + case 2: var settings = _v25.a; var newFilter = checked ? $elm$core$Maybe$Just( $author$project$Main$FilterStartsWithFieldValueOf('')) : $elm$core$Maybe$Nothing; return _Utils_update( formField, { - type_: $author$project$Main$Dropdown( + a: $author$project$Main$Dropdown( _Utils_update( settings, - {filter: newFilter})) + {e: newFilter})) }); - case 'ChooseOne': + case 3: var settings = _v25.a; var newFilter = checked ? $elm$core$Maybe$Just( $author$project$Main$FilterStartsWithFieldValueOf('')) : $elm$core$Maybe$Nothing; return _Utils_update( formField, { - type_: $author$project$Main$ChooseOne( + a: $author$project$Main$ChooseOne( _Utils_update( settings, - {filter: newFilter})) + {e: newFilter})) }); - case 'ChooseMultiple': + case 4: var settings = _v25.a; var newFilter = checked ? $elm$core$Maybe$Just( $author$project$Main$FilterStartsWithFieldValueOf('')) : $elm$core$Maybe$Nothing; return _Utils_update( formField, { - type_: $author$project$Main$ChooseMultiple( + a: $author$project$Main$ChooseMultiple( _Utils_update( settings, - {filter: newFilter})) + {e: newFilter})) }); default: return formField; } - case 'OnFilterTypeSelect': + case 23: var filterType = msg.a; var updateFilter = function (existingFilter) { - if (existingFilter.$ === 'Just') { - if (existingFilter.a.$ === 'FilterStartsWithFieldValueOf') { + if (!existingFilter.$) { + if (!existingFilter.a.$) { var fieldName = existingFilter.a.a; return (filterType === 'contains') ? $elm$core$Maybe$Just( $author$project$Main$FilterContainsFieldValueOf(fieldName)) : existingFilter; @@ -8630,42 +8624,42 @@ var $author$project$Main$updateFormField = F5( $author$project$Main$FilterContainsFieldValueOf('')) : $elm$core$Maybe$Nothing); } }; - var _v26 = formField.type_; + var _v26 = formField.a; switch (_v26.$) { - case 'Dropdown': + case 2: var settings = _v26.a; return _Utils_update( formField, { - type_: $author$project$Main$Dropdown( + a: $author$project$Main$Dropdown( _Utils_update( settings, { - filter: updateFilter(settings.filter) + e: updateFilter(settings.e) })) }); - case 'ChooseOne': + case 3: var settings = _v26.a; return _Utils_update( formField, { - type_: $author$project$Main$ChooseOne( + a: $author$project$Main$ChooseOne( _Utils_update( settings, { - filter: updateFilter(settings.filter) + e: updateFilter(settings.e) })) }); - case 'ChooseMultiple': + case 4: var settings = _v26.a; return _Utils_update( formField, { - type_: $author$project$Main$ChooseMultiple( + a: $author$project$Main$ChooseMultiple( _Utils_update( settings, { - filter: updateFilter(settings.filter) + e: updateFilter(settings.e) })) }); default: @@ -8674,8 +8668,8 @@ var $author$project$Main$updateFormField = F5( default: var fieldName = msg.a; var updateSourceField = function (existingFilter) { - if (existingFilter.$ === 'Just') { - if (existingFilter.a.$ === 'FilterStartsWithFieldValueOf') { + if (!existingFilter.$) { + if (!existingFilter.a.$) { return $elm$core$Maybe$Just( $author$project$Main$FilterStartsWithFieldValueOf(fieldName)); } else { @@ -8687,42 +8681,42 @@ var $author$project$Main$updateFormField = F5( $author$project$Main$FilterStartsWithFieldValueOf(fieldName)); } }; - var _v28 = formField.type_; + var _v28 = formField.a; switch (_v28.$) { - case 'Dropdown': + case 2: var settings = _v28.a; return _Utils_update( formField, { - type_: $author$project$Main$Dropdown( + a: $author$project$Main$Dropdown( _Utils_update( settings, { - filter: updateSourceField(settings.filter) + e: updateSourceField(settings.e) })) }); - case 'ChooseOne': + case 3: var settings = _v28.a; return _Utils_update( formField, { - type_: $author$project$Main$ChooseOne( + a: $author$project$Main$ChooseOne( _Utils_update( settings, { - filter: updateSourceField(settings.filter) + e: updateSourceField(settings.e) })) }); - case 'ChooseMultiple': + case 4: var settings = _v28.a; return _Utils_update( formField, { - type_: $author$project$Main$ChooseMultiple( + a: $author$project$Main$ChooseMultiple( _Utils_update( settings, { - filter: updateSourceField(settings.filter) + e: updateSourceField(settings.e) })) }); default: @@ -8732,43 +8726,43 @@ var $author$project$Main$updateFormField = F5( }); var $author$project$Main$when = F2( function (bool, condition) { - return bool ? condition._true : condition._false; + return bool ? condition.a4 : condition.aX; }); var $author$project$Main$update = F2( function (msg, model) { update: while (true) { switch (msg.$) { - case 'NoOp': + case 0: return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none); - case 'OnPortIncoming': + case 1: var value = msg.a; var _v1 = A2($elm$json$Json$Decode$decodeValue, $author$project$Main$decodePortIncomingValue, value); - if (_v1.$ === 'Ok') { + if (!_v1.$) { var _v2 = _v1.a; return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none); } else { return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none); } - case 'AddFormField': + case 2: var fieldType = msg.a; var newFormField = { - description: $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing), - label: $author$project$Main$stringFromInputField(fieldType) + (' question ' + $elm$core$String$fromInt(model.nextQuestionNumber)), - name: $elm$core$Maybe$Nothing, - presence: A2( + S: $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing), + d: $author$project$Main$stringFromInputField(fieldType) + (' question ' + $elm$core$String$fromInt(model.ab)), + Q: $elm$core$Maybe$Nothing, + p: A2( $author$project$Main$when, $author$project$Main$mustBeOptional(fieldType), - {_false: $author$project$Main$Required, _true: $author$project$Main$Optional}), - type_: fieldType, - visibilityRule: _List_Nil + {aX: 0, a4: 1}), + a: fieldType, + m: _List_Nil }; - var newFormFields = A2($elm$core$Array$push, newFormField, model.formFields); + var newFormFields = A2($elm$core$Array$push, newFormField, model.g); var newIndex = $elm$core$Array$length(newFormFields) - 1; return _Utils_Tuple2( _Utils_update( model, - {formFields: newFormFields, nextQuestionNumber: model.nextQuestionNumber + 1}), + {g: newFormFields, ab: model.ab + 1}), $elm$core$Platform$Cmd$batch( _List_fromArray( [ @@ -8786,11 +8780,11 @@ var $author$project$Main$update = F2( [ $author$project$Main$SetEditorAnimate( $elm$core$Maybe$Just( - _Utils_Tuple2(newIndex, $author$project$Main$AnimateYellowFade))), + _Utils_Tuple2(newIndex, 0))), $author$project$Main$SetEditorAnimate($elm$core$Maybe$Nothing) ])))) ]))); - case 'DeleteFormField': + case 3: var fieldIndex = msg.a; var newFormFields = $elm$core$Array$fromList( A2( @@ -8802,41 +8796,41 @@ var $author$project$Main$update = F2( var i = _v3.a; return !_Utils_eq(i, fieldIndex); }, - $elm$core$Array$toIndexedList(model.formFields)))); + $elm$core$Array$toIndexedList(model.g)))); return _Utils_Tuple2( _Utils_update( model, - {formFields: newFormFields, selectedFieldIndex: $elm$core$Maybe$Nothing}), + {g: newFormFields, F: $elm$core$Maybe$Nothing}), $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( $author$project$Main$PortOutgoingFormFields(newFormFields)))); - case 'MoveFormFieldUp': + case 4: var fieldIndex = msg.a; - var newFormFields = A3($author$project$Main$swapArrayIndex, fieldIndex, fieldIndex - 1, model.formFields); + var newFormFields = A3($author$project$Main$swapArrayIndex, fieldIndex, fieldIndex - 1, model.g); return _Utils_Tuple2( _Utils_update( model, { - formFields: newFormFields, - selectedFieldIndex: $elm$core$Maybe$Just(fieldIndex - 1) + g: newFormFields, + F: $elm$core$Maybe$Just(fieldIndex - 1) }), $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( $author$project$Main$PortOutgoingFormFields(newFormFields)))); - case 'MoveFormFieldDown': + case 5: var fieldIndex = msg.a; - var newFormFields = A3($author$project$Main$swapArrayIndex, fieldIndex, fieldIndex + 1, model.formFields); + var newFormFields = A3($author$project$Main$swapArrayIndex, fieldIndex, fieldIndex + 1, model.g); return _Utils_Tuple2( _Utils_update( model, { - formFields: newFormFields, - selectedFieldIndex: $elm$core$Maybe$Just(fieldIndex + 1) + g: newFormFields, + F: $elm$core$Maybe$Just(fieldIndex + 1) }), $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( $author$project$Main$PortOutgoingFormFields(newFormFields)))); - case 'OnFormField': + case 6: var fmsg = msg.a; var fieldIndex = msg.b; var string = msg.c; @@ -8844,41 +8838,41 @@ var $author$project$Main$update = F2( $elm$core$Array$indexedMap, F2( function (i, formField) { - return _Utils_eq(i, fieldIndex) ? A5($author$project$Main$updateFormField, fmsg, fieldIndex, string, model.formFields, formField) : formField; + return _Utils_eq(i, fieldIndex) ? A5($author$project$Main$updateFormField, fmsg, fieldIndex, string, model.g, formField) : formField; }), - model.formFields); + model.g); return _Utils_Tuple2( _Utils_update( model, - {formFields: newFormFields}), + {g: newFormFields}), $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( $author$project$Main$PortOutgoingFormFields(newFormFields)))); - case 'SetEditorAnimate': + case 7: var maybeAnimate = msg.a; return _Utils_Tuple2( _Utils_update( model, { - viewMode: $author$project$Main$Editor( - {maybeAnimate: maybeAnimate}) + ad: $author$project$Main$Editor( + {aC: maybeAnimate}) }), $elm$core$Platform$Cmd$none); - case 'SelectField': + case 8: var fieldIndex = msg.a; - var _v4 = _Utils_Tuple2(model.selectedFieldIndex, fieldIndex); - if ((_v4.a.$ === 'Just') && (_v4.b.$ === 'Nothing')) { + var _v4 = _Utils_Tuple2(model.F, fieldIndex); + if ((!_v4.a.$) && (_v4.b.$ === 1)) { var prevIndex = _v4.a.a; var _v5 = _v4.b; return _Utils_Tuple2( _Utils_update( model, { - selectedFieldIndex: $elm$core$Maybe$Nothing, - viewMode: $author$project$Main$Editor( + F: $elm$core$Maybe$Nothing, + ad: $author$project$Main$Editor( { - maybeAnimate: $elm$core$Maybe$Just( - _Utils_Tuple2(prevIndex, $author$project$Main$AnimateYellowFade)) + aC: $elm$core$Maybe$Just( + _Utils_Tuple2(prevIndex, 0)) }) }), $elm$core$Platform$Cmd$none); @@ -8886,41 +8880,41 @@ var $author$project$Main$update = F2( return _Utils_Tuple2( _Utils_update( model, - {selectedFieldIndex: fieldIndex}), + {F: fieldIndex}), $elm$core$Platform$Cmd$none); } - case 'DragStart': + case 9: var fieldIndex = msg.a; return _Utils_Tuple2( _Utils_update( model, { - dragged: $elm$core$Maybe$Just( + r: $elm$core$Maybe$Just( $author$project$Main$DragExisting( - {dragIndex: fieldIndex, dropIndex: $elm$core$Maybe$Nothing})), - selectedFieldIndex: $elm$core$Maybe$Nothing + {a9: fieldIndex, G: $elm$core$Maybe$Nothing})), + F: $elm$core$Maybe$Nothing }), $elm$core$Platform$Cmd$none); - case 'DragStartNew': + case 10: var fieldIndex = msg.a; return _Utils_Tuple2( _Utils_update( model, { - dragged: $elm$core$Maybe$Just( + r: $elm$core$Maybe$Just( $author$project$Main$DragNew( { - dropIndex: $elm$core$Maybe$Just( + G: $elm$core$Maybe$Just( _Utils_Tuple2(0, $elm$core$Maybe$Nothing)), - field: fieldIndex + bX: fieldIndex })) }), $elm$core$Platform$Cmd$none); - case 'DragEnd': - var _v6 = model.dragged; - if (_v6.$ === 'Just') { - if (_v6.a.$ === 'DragExisting') { - var dropIndex = _v6.a.a.dropIndex; + case 11: + var _v6 = model.r; + if (!_v6.$) { + if (!_v6.a.$) { + var dropIndex = _v6.a.a.G; var $temp$msg = $author$project$Main$Drop( A2($elm$core$Maybe$map, $elm$core$Tuple$first, dropIndex)), $temp$model = model; @@ -8928,7 +8922,7 @@ var $author$project$Main$update = F2( model = $temp$model; continue update; } else { - var dropIndex = _v6.a.a.dropIndex; + var dropIndex = _v6.a.a.G; var $temp$msg = $author$project$Main$Drop( A2($elm$core$Maybe$map, $elm$core$Tuple$first, dropIndex)), $temp$model = model; @@ -8940,30 +8934,30 @@ var $author$project$Main$update = F2( return _Utils_Tuple2( _Utils_update( model, - {dragged: $elm$core$Maybe$Nothing}), + {r: $elm$core$Maybe$Nothing}), $elm$core$Platform$Cmd$none); } - case 'DragOver': + case 12: var maybeDroppable = msg.a; return _Utils_Tuple2( _Utils_update( model, { - dragged: A2( + r: A2( $elm$core$Maybe$map, $author$project$Main$updateDragged(maybeDroppable), - model.dragged) + model.r) }), $elm$core$Platform$Cmd$none); - case 'Drop': + case 13: var targetFieldIndex = msg.a; var newModel = A2($author$project$Main$onDropped, targetFieldIndex, model); return _Utils_Tuple2( newModel, - (!_Utils_eq(newModel.formFields, model.formFields)) ? $author$project$Main$outgoing( + (!_Utils_eq(newModel.g, model.g)) ? $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( - $author$project$Main$PortOutgoingFormFields(newModel.formFields))) : $elm$core$Platform$Cmd$none); - case 'DoSleepDo': + $author$project$Main$PortOutgoingFormFields(newModel.g))) : $elm$core$Platform$Cmd$none); + case 14: if (!msg.b.b) { return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none); } else { @@ -8987,12 +8981,12 @@ var $author$project$Main$update = F2( $elm$core$Process$sleep(duration)) ]))); } - case 'SelectFieldGroup': + case 16: var index = msg.a; return _Utils_Tuple2( _Utils_update( model, - {activeFieldGroupIndex: index}), + {ay: index}), $elm$core$Platform$Cmd$none); default: var fieldName = msg.a; @@ -9005,16 +8999,16 @@ var $author$project$Main$update = F2( $author$project$Main$fieldNameOf(f), fieldName); }, - $elm$core$Array$toList(model.formFields))); + $elm$core$Array$toList(model.g))); var currentValues = A2( $elm$core$Maybe$withDefault, _List_Nil, - A2($elm$core$Dict$get, fieldName, model.trackedFormValues)); + A2($elm$core$Dict$get, fieldName, model.v)); var newValues = function () { - if (formField.$ === 'Just') { + if (!formField.$) { var field = formField.a; - var _v11 = field.type_; - if (_v11.$ === 'ChooseMultiple') { + var _v11 = field.a; + if (_v11.$ === 4) { return A2($elm$core$List$member, value, currentValues) ? A2( $elm$core$List$filter, $elm$core$Basics$neq(value), @@ -9028,7 +9022,7 @@ var $author$project$Main$update = F2( [value]); } }(); - var newTrackedFormValues = A3($elm$core$Dict$insert, fieldName, newValues, model.trackedFormValues); + var newTrackedFormValues = A3($elm$core$Dict$insert, fieldName, newValues, model.v); var formValues = A3( $elm$json$Json$Encode$dict, $elm$core$Basics$identity, @@ -9047,7 +9041,7 @@ var $author$project$Main$update = F2( return _Utils_Tuple2( _Utils_update( model, - {trackedFormValues: newTrackedFormValues}), + {v: newTrackedFormValues}), $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( $author$project$Main$PortOutgoingFormValues(formValues)))); @@ -9070,7 +9064,7 @@ var $elm$html$Html$text = $elm$virtual_dom$VirtualDom$text; var $elm$html$Html$input = _VirtualDom_node('input'); var $elm$html$Html$Attributes$name = $elm$html$Html$Attributes$stringProperty('name'); var $author$project$Main$stringFromViewMode = function (viewMode) { - if (viewMode.$ === 'Editor') { + if (!viewMode.$) { return 'Editor'; } else { return 'CollectData'; @@ -9078,10 +9072,10 @@ var $author$project$Main$stringFromViewMode = function (viewMode) { }; var $elm$html$Html$Attributes$type_ = $elm$html$Html$Attributes$stringProperty('type'); var $elm$html$Html$Attributes$value = $elm$html$Html$Attributes$stringProperty('value'); -var $author$project$Main$DragEnd = {$: 'DragEnd'}; -var $author$project$Main$NoOp = {$: 'NoOp'}; +var $author$project$Main$DragEnd = {$: 11}; +var $author$project$Main$NoOp = {$: 0}; var $author$project$Main$SelectField = function (a) { - return {$: 'SelectField', a: a}; + return {$: 8, a: a}; }; var $elm$html$Html$Attributes$classList = function (classes) { return $elm$html$Html$Attributes$class( @@ -9095,13 +9089,13 @@ var $elm$html$Html$Attributes$classList = function (classes) { }; var $author$project$Main$fieldsWithPlaceholder = F2( function (fields, dragged) { - if (dragged.$ === 'Nothing') { + if (dragged.$ === 1) { return A2($elm$core$List$map, $elm$core$Maybe$Just, fields); } else { - if (dragged.a.$ === 'DragExisting') { - var dragIndex = dragged.a.a.dragIndex; - var dropIndex = dragged.a.a.dropIndex; - if (dropIndex.$ === 'Nothing') { + if (!dragged.a.$) { + var dragIndex = dragged.a.a.a9; + var dropIndex = dragged.a.a.G; + if (dropIndex.$ === 1) { return A2($elm$core$List$map, $elm$core$Maybe$Just, fields); } else { var _v2 = dropIndex.a; @@ -9132,8 +9126,8 @@ var $author$project$Main$fieldsWithPlaceholder = F2( ])); } } else { - var dropIndex = dragged.a.a.dropIndex; - if (dropIndex.$ === 'Nothing') { + var dropIndex = dragged.a.a.G; + if (dropIndex.$ === 1) { return A2($elm$core$List$map, $elm$core$Maybe$Just, fields); } else { var _v4 = dropIndex.a; @@ -9153,7 +9147,7 @@ var $author$project$Main$fieldsWithPlaceholder = F2( }); var $elm$html$Html$h2 = _VirtualDom_node('h2'); var $elm$virtual_dom$VirtualDom$Normal = function (a) { - return {$: 'Normal', a: a}; + return {$: 0, a: a}; }; var $elm$virtual_dom$VirtualDom$on = _VirtualDom_on; var $elm$html$Html$Events$on = F2( @@ -9170,7 +9164,7 @@ var $elm$html$Html$Events$onClick = function (msg) { $elm$json$Json$Decode$succeed(msg)); }; var $elm$virtual_dom$VirtualDom$MayPreventDefault = function (a) { - return {$: 'MayPreventDefault', a: a}; + return {$: 2, a: a}; }; var $elm$html$Html$Events$preventDefaultOn = F2( function (event, decoder) { @@ -9180,7 +9174,7 @@ var $elm$html$Html$Events$preventDefaultOn = F2( $elm$virtual_dom$VirtualDom$MayPreventDefault(decoder)); }); var $author$project$Main$DragStart = function (a) { - return {$: 'DragStart', a: a}; + return {$: 9, a: a}; }; var $elm$virtual_dom$VirtualDom$attribute = F2( function (key, value) { @@ -9243,7 +9237,7 @@ var $author$project$Main$dragHandleIcon = A2( _List_Nil) ])); var $author$project$Main$DragOver = function (a) { - return {$: 'DragOver', a: a}; + return {$: 12, a: a}; }; var $author$project$Main$dragOverDecoder = F2( function (index, maybeFormField) { @@ -9259,7 +9253,7 @@ var $author$project$Main$isConditionReferencingField = F2( var conditionFieldName = condition.a; var comparison = condition.b; return _Utils_eq(conditionFieldName, fieldName) || function () { - if (comparison.$ === 'EqualsField') { + if (comparison.$ === 4) { var targetFieldName = comparison.a; return _Utils_eq(targetFieldName, fieldName); } else { @@ -9269,8 +9263,8 @@ var $author$project$Main$isConditionReferencingField = F2( }); var $author$project$Main$isFieldUsedInChoiceFilter = F2( function (fieldName, maybeFilter) { - if (maybeFilter.$ === 'Just') { - if (maybeFilter.a.$ === 'FilterStartsWithFieldValueOf') { + if (!maybeFilter.$) { + if (!maybeFilter.a.$) { var sourceField = maybeFilter.a.a; return _Utils_eq(sourceField, fieldName); } else { @@ -9284,14 +9278,14 @@ var $author$project$Main$isFieldUsedInChoiceFilter = F2( var $author$project$Main$isFieldUsedInFilter = F2( function (fieldName, inputField) { switch (inputField.$) { - case 'Dropdown': - var filter = inputField.a.filter; + case 2: + var filter = inputField.a.e; return A2($author$project$Main$isFieldUsedInChoiceFilter, fieldName, filter); - case 'ChooseOne': - var filter = inputField.a.filter; + case 3: + var filter = inputField.a.e; return A2($author$project$Main$isFieldUsedInChoiceFilter, fieldName, filter); - case 'ChooseMultiple': - var filter = inputField.a.filter; + case 4: + var filter = inputField.a.e; return A2($author$project$Main$isFieldUsedInChoiceFilter, fieldName, filter); default: return false; @@ -9303,7 +9297,7 @@ var $author$project$Main$isFieldReferencedBy = F2( var isUsedInChoiceFilters = A2( $elm$core$List$any, function (field) { - return A2($author$project$Main$isFieldUsedInFilter, fieldName, field.type_); + return A2($author$project$Main$isFieldUsedInFilter, fieldName, field.a); }, fieldList); var isUsedInVisibilityRules = A2( @@ -9312,7 +9306,7 @@ var $author$project$Main$isFieldReferencedBy = F2( return A2( $elm$core$List$any, function (rule) { - if (rule.$ === 'ShowWhen') { + if (!rule.$) { var conditions = rule.a; return A2( $elm$core$List$any, @@ -9326,13 +9320,13 @@ var $author$project$Main$isFieldReferencedBy = F2( conditions); } }, - field.visibilityRule); + field.m); }, fieldList); - return {usedInChoiceFilters: isUsedInChoiceFilters, usedInVisibilityRules: isUsedInVisibilityRules}; + return {a6: isUsedInChoiceFilters, a7: isUsedInVisibilityRules}; }); var $elm$virtual_dom$VirtualDom$MayStopPropagation = function (a) { - return {$: 'MayStopPropagation', a: a}; + return {$: 1, a: a}; }; var $elm$html$Html$Events$stopPropagationOn = F2( function (event, decoder) { @@ -9345,43 +9339,43 @@ var $elm$html$Html$Attributes$title = $elm$html$Html$Attributes$stringProperty(' var $elm$html$Html$Attributes$for = $elm$html$Html$Attributes$stringProperty('htmlFor'); var $elm$html$Html$label = _VirtualDom_node('label'); var $author$project$Main$maybeMaxLengthOf = function (formField) { - var _v0 = formField.type_; + var _v0 = formField.a; switch (_v0.$) { - case 'ShortText': - var maxlength = _v0.a.maxlength; + case 0: + var maxlength = _v0.a.ai; switch (maxlength.$) { - case 'AttributeGiven': + case 2: var i = maxlength.a; return $elm$core$Maybe$Just(i); - case 'AttributeInvalid': + case 1: return $elm$core$Maybe$Nothing; default: return $elm$core$Maybe$Nothing; } - case 'LongText': + case 1: var maxlength = _v0.a; switch (maxlength.$) { - case 'AttributeGiven': + case 2: var i = maxlength.a; return $elm$core$Maybe$Just(i); - case 'AttributeInvalid': + case 1: return $elm$core$Maybe$Nothing; default: return $elm$core$Maybe$Nothing; } - case 'Dropdown': + case 2: return $elm$core$Maybe$Nothing; - case 'ChooseOne': + case 3: return $elm$core$Maybe$Nothing; default: return $elm$core$Maybe$Nothing; } }; var $author$project$Main$requiredData = function (presence) { - switch (presence.$) { - case 'Required': + switch (presence) { + case 0: return true; - case 'Optional': + case 1: return false; default: return true; @@ -9420,14 +9414,14 @@ var $author$project$Main$attributesFromTuple = function (_v0) { A2($elm$html$Html$Attributes$attribute, k, v)); }; var $author$project$Main$isOptionalTemporalInput = function (formField) { - var _v0 = _Utils_Tuple2(formField.presence, formField.type_); - if ((_v0.a.$ === 'Optional') && (_v0.b.$ === 'ShortText')) { + var _v0 = _Utils_Tuple2(formField.p, formField.a); + if ((_v0.a === 1) && (!_v0.b.$)) { var _v1 = _v0.a; var customElement = _v0.b.a; var inputType = A2( $elm$core$Maybe$withDefault, '', - A2($elm$core$Dict$get, 'type', customElement.attributes)); + A2($elm$core$Dict$get, 'type', customElement.q)); return A2( $elm$core$List$member, inputType, @@ -9465,14 +9459,14 @@ var $author$project$Main$defaultValue = function (str) { var $elm$core$String$toLower = _String_toLower; var $author$project$Main$filterChoices = F3( function (maybeFilter, formValues, choices) { - if (maybeFilter.$ === 'Just') { - if (maybeFilter.a.$ === 'FilterStartsWithFieldValueOf') { + if (!maybeFilter.$) { + if (!maybeFilter.a.$) { var fieldName = maybeFilter.a.a; var _v1 = A2( $elm$core$Maybe$andThen, $elm$core$List$head, A2($elm$core$Dict$get, fieldName, formValues)); - if (_v1.$ === 'Just') { + if (!_v1.$) { var filterValue = _v1.a; return $elm$core$String$isEmpty(filterValue) ? _List_Nil : A2( $elm$core$List$filter, @@ -9480,10 +9474,10 @@ var $author$project$Main$filterChoices = F3( return A2( $elm$core$String$startsWith, $elm$core$String$toLower(filterValue), - $elm$core$String$toLower(choice.value)) || A2( + $elm$core$String$toLower(choice.j)) || A2( $elm$core$String$startsWith, $elm$core$String$toLower(filterValue), - $elm$core$String$toLower(choice.label)); + $elm$core$String$toLower(choice.d)); }, choices); } else { @@ -9495,7 +9489,7 @@ var $author$project$Main$filterChoices = F3( $elm$core$Maybe$andThen, $elm$core$List$head, A2($elm$core$Dict$get, fieldName, formValues)); - if (_v2.$ === 'Just') { + if (!_v2.$) { var filterValue = _v2.a; return $elm$core$String$isEmpty(filterValue) ? _List_Nil : A2( $elm$core$List$filter, @@ -9503,10 +9497,10 @@ var $author$project$Main$filterChoices = F3( return A2( $elm$core$String$contains, $elm$core$String$toLower(filterValue), - $elm$core$String$toLower(choice.value)) || A2( + $elm$core$String$toLower(choice.j)) || A2( $elm$core$String$contains, $elm$core$String$toLower(filterValue), - $elm$core$String$toLower(choice.label)); + $elm$core$String$toLower(choice.d)); }, choices); } else { @@ -9585,21 +9579,21 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( var disabledMode = A2( $elm$core$List$member, A2($elm$html$Html$Attributes$attribute, 'disabled', 'disabled'), - config.customAttrs); + config.Z); var chosenForYou = function (choices) { - var _v13 = formField.presence; - switch (_v13.$) { - case 'Optional': + var _v13 = formField.p; + switch (_v13) { + case 1: return false; - case 'Required': + case 0: return $elm$core$List$length(choices) === 1; default: return $elm$core$List$length(choices) === 1; } }; - var _v0 = formField.type_; + var _v0 = formField.a; switch (_v0.$) { - case 'ShortText': + case 0: var customElement = _v0.a; var extraAttrs = A2( $elm$core$List$filterMap, @@ -9614,12 +9608,12 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( A2( $elm$core$Maybe$andThen, $elm$core$List$head, - A2($elm$core$Dict$get, fieldName, config.trackedFormValues))), + A2($elm$core$Dict$get, fieldName, config.v))), A2( $elm$core$List$map, $author$project$Main$attributesFromTuple, - $elm$core$Dict$toList(customElement.attributes)))); - var extraAttrKeys = $elm$core$Dict$keys(customElement.attributes); + $elm$core$Dict$toList(customElement.q)))); + var extraAttrKeys = $elm$core$Dict$keys(customElement.q); var shortTextAttrs = A2( $elm$core$List$filterMap, $author$project$Main$attributesFromTuple, @@ -9636,13 +9630,13 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( A2( $elm$core$Maybe$map, function ($) { - return $.attributes; + return $.q; }, - A2($elm$core$Dict$get, customElement.inputType, config.shortTextTypeDict)))))); + A2($elm$core$Dict$get, customElement.C, config.al)))))); var _v1 = function () { - var _v2 = customElement.datalist; + var _v2 = customElement.af; switch (_v2.$) { - case 'AttributeGiven': + case 2: var list = _v2.a; return _Utils_Tuple2( _List_fromArray( @@ -9662,15 +9656,15 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$html$Html$option, _List_fromArray( [ - $elm$html$Html$Attributes$value(choice.value) + $elm$html$Html$Attributes$value(choice.j) ]), _List_fromArray( [ - $elm$html$Html$text(choice.label) + $elm$html$Html$text(choice.d) ])); }, list))); - case 'AttributeNotNeeded': + case 0: return _Utils_Tuple2( _List_Nil, $elm$html$Html$text('')); @@ -9689,18 +9683,18 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( [ A3( $elm$html$Html$node, - customElement.inputTag, + customElement.O, _Utils_ap( _List_fromArray( [ A2( $elm$html$Html$Attributes$attribute, 'class', - A3($author$project$Main$buildInputClassString, formField, fieldName, config.trackedFormValues)), + A3($author$project$Main$buildInputClassString, formField, fieldName, config.v)), $elm$html$Html$Attributes$name(fieldName), $elm$html$Html$Attributes$id(fieldID), $elm$html$Html$Attributes$required( - $author$project$Main$requiredData(formField.presence)) + $author$project$Main$requiredData(formField.p)) ]), _Utils_ap( dataListAttrs, @@ -9709,12 +9703,12 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( _Utils_ap( extraAttrs, _Utils_ap( - config.customAttrs, - config.onInput(fieldName)))))), + config.Z, + config.aQ(fieldName)))))), _List_Nil), dataListElement ])); - case 'LongText': + case 1: var extraAttrs = A2( $elm$core$List$filterMap, $elm$core$Basics$identity, @@ -9734,7 +9728,7 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( A2( $elm$core$Maybe$andThen, $elm$core$List$head, - A2($elm$core$Dict$get, fieldName, config.trackedFormValues))) + A2($elm$core$Dict$get, fieldName, config.v))) ])); return A2( $author$project$Main$textarea, @@ -9745,28 +9739,28 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$html$Html$Attributes$name(fieldName), $elm$html$Html$Attributes$id(fieldID), $elm$html$Html$Attributes$required( - $author$project$Main$requiredData(formField.presence)), + $author$project$Main$requiredData(formField.p)), $elm$html$Html$Attributes$placeholder(' ') ]), _Utils_ap( extraAttrs, _Utils_ap( - config.customAttrs, - config.onInput(fieldName)))), + config.Z, + config.aQ(fieldName)))), _List_Nil); - case 'Dropdown': - var choices = _v0.a.choices; - var filter = _v0.a.filter; + case 2: + var choices = _v0.a.k; + var filter = _v0.a.e; var valueString = A2( $elm$core$Maybe$withDefault, '', A2( $elm$core$Maybe$andThen, $elm$core$List$head, - A2($elm$core$Dict$get, fieldName, config.trackedFormValues))); - var filteredChoices = disabledMode ? choices : A3($author$project$Main$filterChoices, filter, config.trackedFormValues, choices); + A2($elm$core$Dict$get, fieldName, config.v))); + var filteredChoices = disabledMode ? choices : A3($author$project$Main$filterChoices, filter, config.v, choices); var noChoicesAfterFiltering = (!$elm$core$List$isEmpty(choices)) && $elm$core$List$isEmpty(filteredChoices); - return (noChoicesAfterFiltering && config.needsFormLogic) ? A2($elm$html$Html$div, _List_Nil, _List_Nil) : A2( + return (noChoicesAfterFiltering && config.aa) ? A2($elm$html$Html$div, _List_Nil, _List_Nil) : A2( $elm$html$Html$div, _List_fromArray( [ @@ -9783,9 +9777,9 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$html$Html$Attributes$name(fieldName), $elm$html$Html$Attributes$id(fieldID), disabledMode ? $elm$html$Html$Attributes$class('tff-select-disabled') : $elm$html$Html$Attributes$required( - $author$project$Main$requiredData(formField.presence)) + $author$project$Main$requiredData(formField.p)) ]), - config.onChange(fieldName)), + config.bi(fieldName)), A2( $elm$core$List$cons, A2( @@ -9798,7 +9792,7 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( (valueString === '') && (!chosenForYou(filteredChoices))), A2($elm$html$Html$Attributes$attribute, 'value', '') ]), - config.customAttrs), + config.Z), _List_fromArray( [ $elm$html$Html$text('-- Select an option --') @@ -9810,32 +9804,32 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$html$Html$option, A2( $elm$core$List$cons, - $elm$html$Html$Attributes$value(choice.value), + $elm$html$Html$Attributes$value(choice.j), A2( $elm$core$List$cons, $author$project$Main$defaultSelected( - _Utils_eq(valueString, choice.value) || chosenForYou(filteredChoices)), - config.customAttrs)), + _Utils_eq(valueString, choice.j) || chosenForYou(filteredChoices)), + config.Z)), _List_fromArray( [ - $elm$html$Html$text(choice.label) + $elm$html$Html$text(choice.d) ])); }, filteredChoices))) ])); - case 'ChooseOne': - var choices = _v0.a.choices; - var filter = _v0.a.filter; + case 3: + var choices = _v0.a.k; + var filter = _v0.a.e; var valueString = A2( $elm$core$Maybe$withDefault, '', A2( $elm$core$Maybe$andThen, $elm$core$List$head, - A2($elm$core$Dict$get, fieldName, config.trackedFormValues))); - var filteredChoices = disabledMode ? choices : A3($author$project$Main$filterChoices, filter, config.trackedFormValues, choices); + A2($elm$core$Dict$get, fieldName, config.v))); + var filteredChoices = disabledMode ? choices : A3($author$project$Main$filterChoices, filter, config.v, choices); var noChoicesAfterFiltering = (!$elm$core$List$isEmpty(choices)) && $elm$core$List$isEmpty(filteredChoices); - return (noChoicesAfterFiltering && config.needsFormLogic) ? A2($elm$html$Html$div, _List_Nil, _List_Nil) : A2( + return (noChoicesAfterFiltering && config.aa) ? A2($elm$html$Html$div, _List_Nil, _List_Nil) : A2( $elm$html$Html$div, _List_fromArray( [ @@ -9876,37 +9870,37 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$html$Html$Attributes$type_('radio'), $elm$html$Html$Attributes$tabindex(0), $elm$html$Html$Attributes$name(fieldName), - $elm$html$Html$Attributes$value(choice.value), + $elm$html$Html$Attributes$value(choice.j), $elm$html$Html$Attributes$checked( - _Utils_eq(valueString, choice.value) || chosenForYou(filteredChoices)), + _Utils_eq(valueString, choice.j) || chosenForYou(filteredChoices)), $elm$html$Html$Attributes$required( - $author$project$Main$requiredData(formField.presence)) + $author$project$Main$requiredData(formField.p)) ]), _Utils_ap( - config.customAttrs, - config.onInput(fieldName))), + config.Z, + config.aQ(fieldName))), _List_Nil), $elm$html$Html$text(' '), - $elm$html$Html$text(choice.label) + $elm$html$Html$text(choice.d) ])) ])); }, filteredChoices)) ])); default: - var choices = _v0.a.choices; - var minRequired = _v0.a.minRequired; - var maxAllowed = _v0.a.maxAllowed; - var filter = _v0.a.filter; + var choices = _v0.a.k; + var minRequired = _v0.a.P; + var maxAllowed = _v0.a.U; + var filter = _v0.a.e; var values = A2( $elm$core$Maybe$withDefault, _List_Nil, - A2($elm$core$Dict$get, fieldName, config.trackedFormValues)); + A2($elm$core$Dict$get, fieldName, config.v)); var selectedCount = $elm$core$List$length(values); var validationElement = function () { var effectiveMin = function () { - var _v10 = _Utils_Tuple2(formField.presence, minRequired); - if ((_v10.a.$ === 'System') && (_v10.b.$ === 'Nothing')) { + var _v10 = _Utils_Tuple2(formField.p, minRequired); + if ((_v10.a === 2) && (_v10.b.$ === 1)) { var _v11 = _v10.a; var _v12 = _v10.b; return $elm$core$Maybe$Just(1); @@ -9948,8 +9942,8 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( }(); var isValid = function () { var _v5 = _Utils_Tuple2(minRequired, maxAllowed); - if (_v5.a.$ === 'Just') { - if (_v5.b.$ === 'Just') { + if (!_v5.a.$) { + if (!_v5.b.$) { var min = _v5.a.a; var max = _v5.b.a; return (_Utils_cmp(selectedCount, min) > -1) && (_Utils_cmp(selectedCount, max) < 1); @@ -9959,7 +9953,7 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( return _Utils_cmp(selectedCount, min) > -1; } } else { - if (_v5.b.$ === 'Just') { + if (!_v5.b.$) { var _v7 = _v5.a; var max = _v5.b.a; return _Utils_cmp(selectedCount, max) < 1; @@ -9970,9 +9964,9 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( } } }(); - var filteredChoices = disabledMode ? choices : A3($author$project$Main$filterChoices, filter, config.trackedFormValues, choices); + var filteredChoices = disabledMode ? choices : A3($author$project$Main$filterChoices, filter, config.v, choices); var noChoicesAfterFiltering = (!$elm$core$List$isEmpty(choices)) && $elm$core$List$isEmpty(filteredChoices); - return (noChoicesAfterFiltering && config.needsFormLogic) ? A2($elm$html$Html$div, _List_Nil, _List_Nil) : A2( + return (noChoicesAfterFiltering && config.aa) ? A2($elm$html$Html$div, _List_Nil, _List_Nil) : A2( $elm$html$Html$div, _List_fromArray( [ @@ -9993,14 +9987,14 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$core$List$map, function (choice) { var alreadyFull = function () { - if (maxAllowed.$ === 'Just') { + if (!maxAllowed.$) { var m = maxAllowed.a; return _Utils_cmp(selectedCount, m) > -1; } else { return false; } }(); - var shouldDisable = alreadyFull && (!A2($elm$core$List$member, choice.value, values)); + var shouldDisable = alreadyFull && (!A2($elm$core$List$member, choice.j, values)); return A2( $elm$html$Html$div, _List_fromArray( @@ -10025,9 +10019,9 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$html$Html$Attributes$type_('checkbox'), $elm$html$Html$Attributes$tabindex(0), $elm$html$Html$Attributes$name(fieldName), - $elm$html$Html$Attributes$value(choice.value), + $elm$html$Html$Attributes$value(choice.j), $elm$html$Html$Attributes$checked( - A2($elm$core$List$member, choice.value, values) || chosenForYou(filteredChoices)) + A2($elm$core$List$member, choice.j, values) || chosenForYou(filteredChoices)) ]), _Utils_ap( shouldDisable ? _List_fromArray( @@ -10035,11 +10029,11 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( A2($elm$html$Html$Attributes$attribute, 'disabled', 'disabled') ]) : _List_Nil, _Utils_ap( - config.customAttrs, - A2(config.onChooseMany, fieldName, choice)))), + config.Z, + A2(config.bj, fieldName, choice)))), _List_Nil), $elm$html$Html$text(' '), - $elm$html$Html$text(choice.label) + $elm$html$Html$text(choice.d) ])) ])); }, @@ -10062,8 +10056,8 @@ var $author$project$Main$viewFormFieldPreview = F3( $elm$html$Html$Attributes$class( 'tff-field-group' + A2( $author$project$Main$when, - $author$project$Main$requiredData(formField.presence), - {_false: '', _true: ' tff-required'})) + $author$project$Main$requiredData(formField.p), + {aX: '', a4: ' tff-required'})) ]), _List_fromArray( [ @@ -10076,16 +10070,16 @@ var $author$project$Main$viewFormFieldPreview = F3( ]), _List_fromArray( [ - $elm$html$Html$text(formField.label), + $elm$html$Html$text(formField.d), function () { - var _v0 = formField.presence; - switch (_v0.$) { - case 'Required': + var _v0 = formField.p; + switch (_v0) { + case 0: return $elm$html$Html$text(''); - case 'Optional': - var _v1 = formField.type_; - if (_v1.$ === 'ChooseMultiple') { - var minRequired = _v1.a.minRequired; + case 1: + var _v1 = formField.a; + if (_v1.$ === 4) { + var minRequired = _v1.a.P; return (!_Utils_eq(minRequired, $elm$core$Maybe$Nothing)) ? $elm$html$Html$text('') : $elm$html$Html$text(' (optional)'); } else { return $elm$html$Html$text(' (optional)'); @@ -10106,11 +10100,11 @@ var $author$project$Main$viewFormFieldPreview = F3( [ $elm$html$Html$text( function () { - var _v2 = formField.description; + var _v2 = formField.S; switch (_v2.$) { - case 'AttributeNotNeeded': + case 0: return ''; - case 'AttributeInvalid': + case 1: var s = _v2.a; return s; default: @@ -10120,7 +10114,7 @@ var $author$project$Main$viewFormFieldPreview = F3( }()), function () { var _v3 = $author$project$Main$maybeMaxLengthOf(formField); - if (_v3.$ === 'Just') { + if (!_v3.$) { var maxLength = _v3.a; return $elm$html$Html$text( ' (max ' + ($elm$core$String$fromInt(maxLength) + ' characters)')); @@ -10134,7 +10128,7 @@ var $author$project$Main$viewFormFieldPreview = F3( }); var $author$project$Main$renderFormBuilderField = F4( function (maybeAnimate, model, index, maybeFormField) { - if (maybeFormField.$ === 'Nothing') { + if (maybeFormField.$ === 1) { return A2( $elm$html$Html$div, _List_fromArray( @@ -10169,7 +10163,7 @@ var $author$project$Main$renderFormBuilderField = F4( A2( $elm$html$Html$Attributes$attribute, 'data-input-field', - $author$project$Main$stringFromInputField(formField.type_)), + $author$project$Main$stringFromInputField(formField.a)), A2( $elm$html$Html$Events$preventDefaultOn, 'dragover', @@ -10199,7 +10193,7 @@ var $author$project$Main$renderFormBuilderField = F4( _Utils_Tuple2( 'tff-animate-fadeOut', function () { - if ((maybeAnimate.$ === 'Just') && (maybeAnimate.a.b.$ === 'AnimateFadeOut')) { + if ((!maybeAnimate.$) && (maybeAnimate.a.b === 1)) { var _v2 = maybeAnimate.a; var i = _v2.a; var _v3 = _v2.b; @@ -10211,7 +10205,7 @@ var $author$project$Main$renderFormBuilderField = F4( _Utils_Tuple2( 'tff-animate-yellowFade', function () { - if ((maybeAnimate.$ === 'Just') && (maybeAnimate.a.b.$ === 'AnimateYellowFade')) { + if ((!maybeAnimate.$) && (!maybeAnimate.a.b)) { var _v5 = maybeAnimate.a; var i = _v5.a; var _v6 = _v5.b; @@ -10233,7 +10227,7 @@ var $author$project$Main$renderFormBuilderField = F4( $elm$html$Html$Attributes$attribute, 'data-selected', _Utils_eq( - model.selectedFieldIndex, + model.F, $elm$core$Maybe$Just(index)) ? 'true' : 'false'), A2($elm$html$Html$Attributes$attribute, 'draggable', 'true'), A2( @@ -10257,25 +10251,25 @@ var $author$project$Main$renderFormBuilderField = F4( _List_fromArray( [$author$project$Main$dragHandleIcon])), function () { - var hasVisibilityRules = !$elm$core$List$isEmpty(formField.visibilityRule); + var hasVisibilityRules = !$elm$core$List$isEmpty(formField.m); var hasFilterChoices = function () { - var _v7 = formField.type_; + var _v7 = formField.a; switch (_v7.$) { - case 'Dropdown': - var filter = _v7.a.filter; + case 2: + var filter = _v7.a.e; return !_Utils_eq(filter, $elm$core$Maybe$Nothing); - case 'ChooseOne': - var filter = _v7.a.filter; + case 3: + var filter = _v7.a.e; return !_Utils_eq(filter, $elm$core$Maybe$Nothing); - case 'ChooseMultiple': - var filter = _v7.a.filter; + case 4: + var filter = _v7.a.e; return !_Utils_eq(filter, $elm$core$Maybe$Nothing); default: return false; } }(); var fieldName = $author$project$Main$fieldNameOf(formField); - var referencedInfo = A2($author$project$Main$isFieldReferencedBy, fieldName, model.formFields); + var referencedInfo = A2($author$project$Main$isFieldReferencedBy, fieldName, model.g); return A2( $elm$html$Html$div, _List_fromArray( @@ -10284,57 +10278,57 @@ var $author$project$Main$renderFormBuilderField = F4( ]), _List_fromArray( [ - (hasVisibilityRules || referencedInfo.usedInVisibilityRules) ? A2( + (hasVisibilityRules || referencedInfo.a7) ? A2( $elm$html$Html$div, _List_fromArray( [ $elm$html$Html$Attributes$class( hasVisibilityRules ? 'tff-logic-indicator tff-logic-indicator-blue' : 'tff-logic-indicator tff-logic-indicator-gray'), $elm$html$Html$Attributes$title( - (hasVisibilityRules && referencedInfo.usedInVisibilityRules) ? 'This field has visibility logic and other fields\' visibility depends on it' : (hasVisibilityRules ? 'This field has visibility logic' : 'Other fields\' visibility depends on this field\'s value')) + (hasVisibilityRules && referencedInfo.a7) ? 'This field has visibility logic and other fields\' visibility depends on it' : (hasVisibilityRules ? 'This field has visibility logic' : 'Other fields\' visibility depends on this field\'s value')) ]), _List_fromArray( [ $elm$html$Html$text( - (hasVisibilityRules && referencedInfo.usedInVisibilityRules) ? 'Contains & affects logic' : (hasVisibilityRules ? 'Contains logic' : 'Affects logic')) + (hasVisibilityRules && referencedInfo.a7) ? 'Contains & affects logic' : (hasVisibilityRules ? 'Contains logic' : 'Affects logic')) ])) : $elm$html$Html$text(''), - (hasFilterChoices || referencedInfo.usedInChoiceFilters) ? A2( + (hasFilterChoices || referencedInfo.a6) ? A2( $elm$html$Html$div, _List_fromArray( [ $elm$html$Html$Attributes$class( hasFilterChoices ? 'tff-logic-indicator tff-logic-indicator-orange' : 'tff-logic-indicator tff-logic-indicator-gray'), $elm$html$Html$Attributes$title( - (hasFilterChoices && referencedInfo.usedInChoiceFilters) ? 'This field filters choices and other fields\' choices depend on it' : (hasFilterChoices ? 'This field filters choices based on another field' : 'Other fields\' choices depend on this field\'s value')) + (hasFilterChoices && referencedInfo.a6) ? 'This field filters choices and other fields\' choices depend on it' : (hasFilterChoices ? 'This field filters choices based on another field' : 'Other fields\' choices depend on this field\'s value')) ]), _List_fromArray( [ $elm$html$Html$text( - (hasFilterChoices && referencedInfo.usedInChoiceFilters) ? 'Filters & affects choices' : (hasFilterChoices ? 'Filters choices' : 'Affects choices')) + (hasFilterChoices && referencedInfo.a6) ? 'Filters & affects choices' : (hasFilterChoices ? 'Filters choices' : 'Affects choices')) ])) : $elm$html$Html$text('') ])); }(), A3( $author$project$Main$viewFormFieldPreview, { - customAttrs: _List_fromArray( + Z: _List_fromArray( [ A2($elm$html$Html$Attributes$attribute, 'disabled', 'disabled') ]), - formFields: model.formFields, - needsFormLogic: false, - onChange: function (_v8) { + g: model.g, + aa: false, + bi: function (_v8) { return _List_Nil; }, - onChooseMany: F2( + bj: F2( function (_v9, _v10) { return _List_Nil; }), - onInput: function (_v11) { + aQ: function (_v11) { return _List_Nil; }, - shortTextTypeDict: model.shortTextTypeDict, - trackedFormValues: model.trackedFormValues + al: model.al, + v: model.v }, index, formField) @@ -10344,10 +10338,10 @@ var $author$project$Main$renderFormBuilderField = F4( } }); var $author$project$Main$AddFormField = function (a) { - return {$: 'AddFormField', a: a}; + return {$: 2, a: a}; }; var $author$project$Main$DragStartNew = function (a) { - return {$: 'DragStartNew', a: a}; + return {$: 10, a: a}; }; var $author$project$Main$viewAddQuestionsList = F2( function (nextQuestionNumber, inputFields) { @@ -10375,15 +10369,15 @@ var $author$project$Main$viewAddQuestionsList = F2( $elm$json$Json$Decode$succeed( $author$project$Main$DragStartNew( { - description: $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing), - label: $author$project$Main$stringFromInputField(inputField) + (' question ' + $elm$core$String$fromInt(nextQuestionNumber)), - name: $elm$core$Maybe$Nothing, - presence: A2( + S: $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing), + d: $author$project$Main$stringFromInputField(inputField) + (' question ' + $elm$core$String$fromInt(nextQuestionNumber)), + Q: $elm$core$Maybe$Nothing, + p: A2( $author$project$Main$when, $author$project$Main$mustBeOptional(inputField), - {_false: $author$project$Main$Required, _true: $author$project$Main$Optional}), - type_: inputField, - visibilityRule: _List_Nil + {aX: 0, a4: 1}), + a: inputField, + m: _List_Nil }))), A2( $elm$html$Html$Events$on, @@ -10399,7 +10393,7 @@ var $author$project$Main$viewAddQuestionsList = F2( inputFields)); }); var $author$project$Main$SelectFieldGroup = function (a) { - return {$: 'SelectFieldGroup', a: a}; + return {$: 16, a: a}; }; var $elm$html$Html$button = _VirtualDom_node('button'); var $author$project$Main$viewFieldGroupTabs = F2( @@ -10432,40 +10426,40 @@ var $author$project$Main$viewFieldGroupTabs = F2( ]), _List_fromArray( [ - $elm$html$Html$text(group.heading) + $elm$html$Html$text(group.aY) ])); }), groups)); }); -var $author$project$Main$AnimateFadeOut = {$: 'AnimateFadeOut'}; +var $author$project$Main$AnimateFadeOut = 1; var $author$project$Main$DeleteFormField = function (a) { - return {$: 'DeleteFormField', a: a}; + return {$: 3, a: a}; }; var $author$project$Main$MoveFormFieldDown = function (a) { - return {$: 'MoveFormFieldDown', a: a}; + return {$: 5, a: a}; }; var $author$project$Main$MoveFormFieldUp = function (a) { - return {$: 'MoveFormFieldUp', a: a}; + return {$: 4, a: a}; }; -var $author$project$Main$OnDescriptionInput = {$: 'OnDescriptionInput'}; +var $author$project$Main$OnDescriptionInput = {$: 1}; var $author$project$Main$OnDescriptionToggle = function (a) { - return {$: 'OnDescriptionToggle', a: a}; + return {$: 2, a: a}; }; var $author$project$Main$OnFormField = F3( function (a, b, c) { - return {$: 'OnFormField', a: a, b: b, c: c}; + return {$: 6, a: a, b: b, c: c}; }); -var $author$project$Main$OnLabelInput = {$: 'OnLabelInput'}; +var $author$project$Main$OnLabelInput = {$: 0}; var $author$project$Main$OnMultipleToggle = function (a) { - return {$: 'OnMultipleToggle', a: a}; + return {$: 5, a: a}; }; var $author$project$Main$OnRequiredInput = function (a) { - return {$: 'OnRequiredInput', a: a}; + return {$: 3, a: a}; }; var $author$project$Main$allowsTogglingMultiple = function (inputField) { switch (inputField.$) { - case 'ShortText': - var attributes = inputField.a.attributes; + case 0: + var attributes = inputField.a.q; return A2( $elm$core$List$member, A2($elm$core$Dict$get, 'multiple', attributes), @@ -10474,11 +10468,11 @@ var $author$project$Main$allowsTogglingMultiple = function (inputField) { $elm$core$Maybe$Just('true'), $elm$core$Maybe$Just('false') ])); - case 'LongText': + case 1: return false; - case 'Dropdown': + case 2: return false; - case 'ChooseOne': + case 3: return false; default: return false; @@ -10490,7 +10484,7 @@ var $author$project$Main$hasDuplicateLabel = F3( $elm$core$List$any, function (_v1) { var f = _v1.b; - return _Utils_eq(f.label, newLabel); + return _Utils_eq(f.d, newLabel); }, A2( $elm$core$List$filter, @@ -10520,7 +10514,7 @@ var $elm$html$Html$Events$onCheck = function (tagger) { var $author$project$Main$inputAttributeOptional = F2( function (options, attributeOptional) { switch (attributeOptional.$) { - case 'AttributeNotNeeded': + case 0: return A2( $elm$html$Html$div, _List_fromArray( @@ -10544,14 +10538,14 @@ var $author$project$Main$inputAttributeOptional = F2( $elm$html$Html$Attributes$type_('checkbox'), $elm$html$Html$Attributes$tabindex(0), $elm$html$Html$Attributes$checked(false), - $elm$html$Html$Events$onCheck(options.onCheck) + $elm$html$Html$Events$onCheck(options.ac) ]), _List_Nil), $elm$html$Html$text(' '), - $elm$html$Html$text(options.label) + $elm$html$Html$text(options.d) ])) ])); - case 'AttributeInvalid': + case 1: var str = attributeOptional.a; return A2( $elm$html$Html$div, @@ -10576,13 +10570,13 @@ var $author$project$Main$inputAttributeOptional = F2( $elm$html$Html$Attributes$type_('checkbox'), $elm$html$Html$Attributes$tabindex(0), $elm$html$Html$Attributes$checked(true), - $elm$html$Html$Events$onCheck(options.onCheck) + $elm$html$Html$Events$onCheck(options.ac) ]), _List_Nil), $elm$html$Html$text(' '), - $elm$html$Html$text(options.label) + $elm$html$Html$text(options.d) ])), - options.htmlNode( + options.ag( $elm$core$Result$Err(str)) ])); default: @@ -10610,36 +10604,36 @@ var $author$project$Main$inputAttributeOptional = F2( $elm$html$Html$Attributes$type_('checkbox'), $elm$html$Html$Attributes$tabindex(0), $elm$html$Html$Attributes$checked(true), - $elm$html$Html$Events$onCheck(options.onCheck) + $elm$html$Html$Events$onCheck(options.ac) ]), _List_Nil), $elm$html$Html$text(' '), - $elm$html$Html$text(options.label) + $elm$html$Html$text(options.d) ])), - options.htmlNode( + options.ag( $elm$core$Result$Ok(a)) ])); } }); var $author$project$Main$maybeMultipleOf = function (formField) { - var _v0 = formField.type_; + var _v0 = formField.a; switch (_v0.$) { - case 'ShortText': - var multiple = _v0.a.multiple; + case 0: + var multiple = _v0.a.aO; switch (multiple.$) { - case 'AttributeGiven': + case 2: var i = multiple.a; return $elm$core$Maybe$Just(i); - case 'AttributeInvalid': + case 1: return $elm$core$Maybe$Nothing; default: return $elm$core$Maybe$Nothing; } - case 'LongText': + case 1: return $elm$core$Maybe$Nothing; - case 'Dropdown': + case 2: return $elm$core$Maybe$Nothing; - case 'ChooseOne': + case 3: return $elm$core$Maybe$Nothing; default: return $elm$core$Maybe$Nothing; @@ -10664,40 +10658,40 @@ var $elm$html$Html$Events$onInput = function (tagger) { }; var $elm$html$Html$Attributes$pattern = $elm$html$Html$Attributes$stringProperty('pattern'); var $author$project$Main$OnCheckboxMaxAllowedInput = function (a) { - return {$: 'OnCheckboxMaxAllowedInput', a: a}; + return {$: 17, a: a}; }; var $author$project$Main$OnCheckboxMinRequiredInput = function (a) { - return {$: 'OnCheckboxMinRequiredInput', a: a}; + return {$: 16, a: a}; }; -var $author$project$Main$OnChoicesInput = {$: 'OnChoicesInput'}; -var $author$project$Main$OnDatalistInput = {$: 'OnDatalistInput'}; +var $author$project$Main$OnChoicesInput = {$: 4}; +var $author$project$Main$OnDatalistInput = {$: 9}; var $author$project$Main$OnDatalistToggle = function (a) { - return {$: 'OnDatalistToggle', a: a}; + return {$: 8, a: a}; }; var $author$project$Main$OnDateMaxInput = function (a) { - return {$: 'OnDateMaxInput', a: a}; + return {$: 21, a: a}; }; var $author$project$Main$OnDateMaxToggle = function (a) { - return {$: 'OnDateMaxToggle', a: a}; + return {$: 19, a: a}; }; var $author$project$Main$OnDateMinInput = function (a) { - return {$: 'OnDateMinInput', a: a}; + return {$: 20, a: a}; }; var $author$project$Main$OnDateMinToggle = function (a) { - return {$: 'OnDateMinToggle', a: a}; + return {$: 18, a: a}; }; var $author$project$Main$OnFilterSourceFieldSelect = function (a) { - return {$: 'OnFilterSourceFieldSelect', a: a}; + return {$: 24, a: a}; }; var $author$project$Main$OnFilterToggle = function (a) { - return {$: 'OnFilterToggle', a: a}; + return {$: 22, a: a}; }; var $author$project$Main$OnFilterTypeSelect = function (a) { - return {$: 'OnFilterTypeSelect', a: a}; + return {$: 23, a: a}; }; -var $author$project$Main$OnMaxLengthInput = {$: 'OnMaxLengthInput'}; +var $author$project$Main$OnMaxLengthInput = {$: 7}; var $author$project$Main$OnMaxLengthToggle = function (a) { - return {$: 'OnMaxLengthToggle', a: a}; + return {$: 6, a: a}; }; var $elm$html$Html$Attributes$max = $elm$html$Html$Attributes$stringProperty('max'); var $elm$html$Html$Attributes$min = $elm$html$Html$Attributes$stringProperty('min'); @@ -10719,7 +10713,7 @@ var $author$project$Main$otherQuestionTitles = F2( $elm$core$List$map, function (_v1) { var f = _v1.b; - return {label: f.label, name: f.name}; + return {d: f.d, Q: f.Q}; }, A2( $elm$core$List$filter, @@ -10742,8 +10736,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( var filterSettings = function (filter) { if (!_Utils_eq(filter, $elm$core$Maybe$Nothing)) { var sourceFieldName = function () { - if (filter.$ === 'Just') { - if (filter.a.$ === 'FilterStartsWithFieldValueOf') { + if (!filter.$) { + if (!filter.a.$) { var name = filter.a.a; return name; } else { @@ -10756,8 +10750,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( }(); var otherFields = A2($author$project$Main$otherQuestionTitles, formFields, index); var filterType = function () { - if (filter.$ === 'Just') { - if (filter.a.$ === 'FilterStartsWithFieldValueOf') { + if (!filter.$) { + if (!filter.a.$) { return 'startswith'; } else { return 'contains'; @@ -10882,7 +10876,7 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( A2( $elm$core$List$map, function (field) { - var fieldValue = A2($elm$core$Maybe$withDefault, field.label, field.name); + var fieldValue = A2($elm$core$Maybe$withDefault, field.d, field.Q); var isSelected = _Utils_eq(fieldValue, sourceFieldName); return A2( $elm$html$Html$option, @@ -10897,7 +10891,7 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( 'value of ' + A2( $elm$json$Json$Encode$encode, 0, - $elm$json$Json$Encode$string(field.label))) + $elm$json$Json$Encode$string(field.d))) ])); }, otherFields))) @@ -10984,11 +10978,11 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( $elm$html$Html$Attributes$required(true), $elm$html$Html$Attributes$readonly( function () { - var _v8 = formField.presence; - switch (_v8.$) { - case 'Required': + var _v8 = formField.p; + switch (_v8) { + case 0: return false; - case 'Optional': + case 1: return false; default: return true; @@ -11003,9 +10997,9 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( _List_Nil) ])); }; - var _v0 = formField.type_; + var _v0 = formField.a; switch (_v0.$) { - case 'ShortText': + case 0: var customElement = _v0.a; var maybeShortTextTypeMaxLength = A2( $elm$core$Maybe$andThen, @@ -11016,27 +11010,27 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( A2( $elm$core$Maybe$map, function ($) { - return $.attributes; + return $.q; }, $elm$core$List$head( A2( $elm$core$List$filter, function (_v6) { - var inputType = _v6.inputType; - return _Utils_eq(inputType, customElement.inputType); + var inputType = _v6.C; + return _Utils_eq(inputType, customElement.C); }, shortTextTypeList))))); return _Utils_ap( _List_fromArray( [ function () { - if (maybeShortTextTypeMaxLength.$ === 'Nothing') { + if (maybeShortTextTypeMaxLength.$ === 1) { return A2( $author$project$Main$inputAttributeOptional, { - htmlNode: function (result) { + ag: function (result) { var valueString = function () { - if (result.$ === 'Ok') { + if (!result.$) { var i = result.a; return $elm$core$String$fromInt(i); } else { @@ -11058,8 +11052,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ]), _List_Nil); }, - label: 'Limit number of characters', - onCheck: function (b) { + d: 'Limit number of characters', + ac: function (b) { return A3( $author$project$Main$OnFormField, $author$project$Main$OnMaxLengthToggle(b), @@ -11067,7 +11061,7 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ''); } }, - customElement.maxlength); + customElement.ai); } else { var i = maybeShortTextTypeMaxLength.a; return A2( @@ -11085,8 +11079,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( A2( $author$project$Main$inputAttributeOptional, { - htmlNode: function (result) { - if (result.$ === 'Ok') { + ag: function (result) { + if (!result.$) { var a = result.a; return A2( $author$project$Main$textarea, @@ -11122,8 +11116,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( _List_Nil); } }, - label: 'Suggested values', - onCheck: function (b) { + d: 'Suggested values', + ac: function (b) { return A3( $author$project$Main$OnFormField, $author$project$Main$OnDatalistToggle(b), @@ -11131,18 +11125,18 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ''); } }, - customElement.datalist) + customElement.af) ]), - ((customElement.inputType === 'date') || (A2( + ((customElement.C === 'date') || (A2( $elm$core$Maybe$withDefault, '', - A2($elm$core$Dict$get, 'type', customElement.attributes)) === 'date')) ? _List_fromArray( + A2($elm$core$Dict$get, 'type', customElement.q)) === 'date')) ? _List_fromArray( [ A2( $author$project$Main$inputAttributeOptional, { - htmlNode: function (result) { - if (result.$ === 'Ok') { + ag: function (result) { + if (!result.$) { var dateStr = result.a; return A2( $elm$html$Html$input, @@ -11184,8 +11178,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( _List_Nil); } }, - label: 'Minimum date', - onCheck: function (b) { + d: 'Minimum date', + ac: function (b) { return A3( $author$project$Main$OnFormField, $author$project$Main$OnDateMinToggle(b), @@ -11193,12 +11187,12 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ''); } }, - customElement.min), + customElement.ar), A2( $author$project$Main$inputAttributeOptional, { - htmlNode: function (result) { - if (result.$ === 'Ok') { + ag: function (result) { + if (!result.$) { var dateStr = result.a; return A2( $elm$html$Html$input, @@ -11240,8 +11234,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( _List_Nil); } }, - label: 'Maximum date', - onCheck: function (b) { + d: 'Maximum date', + ac: function (b) { return A3( $author$project$Main$OnFormField, $author$project$Main$OnDateMaxToggle(b), @@ -11249,17 +11243,17 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ''); } }, - customElement.max) + customElement.aq) ]) : _List_Nil); - case 'LongText': + case 1: var optionalMaxLength = _v0.a; return _List_fromArray( [ A2( $author$project$Main$inputAttributeOptional, { - htmlNode: function (result) { - if (result.$ === 'Ok') { + ag: function (result) { + if (!result.$) { var i = result.a; return A2( $elm$html$Html$input, @@ -11292,8 +11286,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( _List_Nil); } }, - label: 'Limit number of characters', - onCheck: function (b) { + d: 'Limit number of characters', + ac: function (b) { return A3( $author$project$Main$OnFormField, $author$project$Main$OnMaxLengthToggle(b), @@ -11303,9 +11297,9 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( }, optionalMaxLength) ]); - case 'Dropdown': - var choices = _v0.a.choices; - var filter = _v0.a.filter; + case 2: + var choices = _v0.a.k; + var filter = _v0.a.e; return _Utils_ap( _List_fromArray( [ @@ -11313,9 +11307,9 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( filterCheckbox(filter) ]), filterSettings(filter)); - case 'ChooseOne': - var choices = _v0.a.choices; - var filter = _v0.a.filter; + case 3: + var choices = _v0.a.k; + var filter = _v0.a.e; return _Utils_ap( _List_fromArray( [ @@ -11324,10 +11318,10 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ]), filterSettings(filter)); default: - var choices = _v0.a.choices; - var minRequired = _v0.a.minRequired; - var maxAllowed = _v0.a.maxAllowed; - var filter = _v0.a.filter; + var choices = _v0.a.k; + var minRequired = _v0.a.P; + var maxAllowed = _v0.a.U; + var filter = _v0.a.e; return _Utils_ap( _List_fromArray( [ @@ -11369,7 +11363,7 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( '', A2($elm$core$Maybe$map, $elm$core$String$fromInt, minRequired))), $elm$html$Html$Attributes$min( - _Utils_eq(formField.presence, $author$project$Main$System) ? '1' : '0'), + (formField.p === 2) ? '1' : '0'), A2( $elm$core$Maybe$withDefault, $elm$html$Html$Attributes$max( @@ -11391,7 +11385,7 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ''); }) ]), - _Utils_eq(formField.presence, $author$project$Main$System) ? _List_fromArray( + (formField.p === 2) ? _List_fromArray( [ $elm$html$Html$Attributes$required(true) ]) : _List_Nil), @@ -11453,7 +11447,7 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ]))); } }); -var $author$project$Main$OnAddVisibilityRule = {$: 'OnAddVisibilityRule'}; +var $author$project$Main$OnAddVisibilityRule = {$: 14}; var $elm$core$List$intersperse = F2( function (sep, xs) { if (!xs.b) { @@ -11473,23 +11467,23 @@ var $elm$core$List$intersperse = F2( } }); var $author$project$Main$OnVisibilityConditionDuplicate = function (a) { - return {$: 'OnVisibilityConditionDuplicate', a: a}; + return {$: 15, a: a}; }; var $author$project$Main$OnVisibilityConditionFieldInput = F3( function (a, b, c) { - return {$: 'OnVisibilityConditionFieldInput', a: a, b: b, c: c}; + return {$: 12, a: a, b: b, c: c}; }); var $author$project$Main$OnVisibilityConditionTypeInput = F3( function (a, b, c) { - return {$: 'OnVisibilityConditionTypeInput', a: a, b: b, c: c}; + return {$: 11, a: a, b: b, c: c}; }); var $author$project$Main$OnVisibilityConditionValueInput = F3( function (a, b, c) { - return {$: 'OnVisibilityConditionValueInput', a: a, b: b, c: c}; + return {$: 13, a: a, b: b, c: c}; }); var $author$project$Main$OnVisibilityRuleTypeInput = F2( function (a, b) { - return {$: 'OnVisibilityRuleTypeInput', a: a, b: b}; + return {$: 10, a: a, b: b}; }); var $author$project$Main$comparisonOf = function (condition) { var comparison = condition.b; @@ -11498,32 +11492,32 @@ var $author$project$Main$comparisonOf = function (condition) { var $author$project$Main$isComparingWith = F2( function (expected, given) { switch (expected.$) { - case 'Equals': - if (given.$ === 'Equals') { + case 0: + if (!given.$) { return true; } else { return false; } - case 'StringContains': - if (given.$ === 'StringContains') { + case 1: + if (given.$ === 1) { return true; } else { return false; } - case 'EndsWith': - if (given.$ === 'EndsWith') { + case 2: + if (given.$ === 2) { return true; } else { return false; } - case 'GreaterThan': - if (given.$ === 'GreaterThan') { + case 3: + if (given.$ === 3) { return true; } else { return false; } default: - if (given.$ === 'EqualsField') { + if (given.$ === 4) { return true; } else { return false; @@ -11531,14 +11525,14 @@ var $author$project$Main$isComparingWith = F2( } }); var $author$project$Main$isHideWhen = function (rule) { - if (rule.$ === 'ShowWhen') { + if (!rule.$) { return false; } else { return true; } }; var $author$project$Main$isShowWhen = function (rule) { - if (rule.$ === 'ShowWhen') { + if (!rule.$) { return true; } else { return false; @@ -11550,9 +11544,9 @@ var $elm$core$Basics$composeR = F3( f(x)); }); var $author$project$Main$selectInputGroup = function (_v0) { - var selectAttrs = _v0.selectAttrs; - var options = _v0.options; - var inputNode = _v0.inputNode; + var selectAttrs = _v0.cQ; + var options = _v0.cv; + var inputNode = _v0.b8; var optionToNode = function (opt) { return A2( $elm$html$Html$option, @@ -11562,15 +11556,15 @@ var $author$project$Main$selectInputGroup = function (_v0) { _List_fromArray( [ $elm$core$Maybe$Just( - $elm$html$Html$Attributes$value(opt.value)), - opt.selected ? $elm$core$Maybe$Just( + $elm$html$Html$Attributes$value(opt.j)), + opt.bl ? $elm$core$Maybe$Just( $elm$html$Html$Attributes$selected(true)) : $elm$core$Maybe$Nothing, - opt.disabled ? $elm$core$Maybe$Just( + opt.bO ? $elm$core$Maybe$Just( A2($elm$html$Html$Attributes$attribute, 'disabled', 'disabled')) : $elm$core$Maybe$Nothing ])), _List_fromArray( [ - $elm$html$Html$text(opt.label) + $elm$html$Html$text(opt.d) ])); }; var calculatedAttrs = A2( @@ -11584,13 +11578,13 @@ var $author$project$Main$selectInputGroup = function (_v0) { A2( $elm$core$Basics$composeR, function ($) { - return $.value; + return $.j; }, $elm$html$Html$Attributes$value), A2( $elm$core$List$filter, function ($) { - return $.selected; + return $.bl; }, options))); return A2( @@ -11648,12 +11642,12 @@ var $author$project$Main$visibilityRuleSection = F4( $elm$core$Array$toList(formFields))); var datalistId = 'datalist-' + ($elm$core$String$fromInt(fieldIndex) + ('-' + ($elm$core$String$fromInt(ruleIndex) + ('-' + $elm$core$String$fromInt(conditionIndex))))); var datalistElement = function () { - if (selectedField.$ === 'Just') { + if (!selectedField.$) { var field = selectedField.a; - var _v8 = field.type_; + var _v8 = field.a; switch (_v8.$) { - case 'Dropdown': - var choices = _v8.a.choices; + case 2: + var choices = _v8.a.k; return $elm$core$Maybe$Just( A2( $elm$html$Html$datalist, @@ -11668,13 +11662,13 @@ var $author$project$Main$visibilityRuleSection = F4( $elm$html$Html$option, _List_fromArray( [ - $elm$html$Html$Attributes$value(c.value) + $elm$html$Html$Attributes$value(c.j) ]), _List_Nil); }, choices))); - case 'ChooseOne': - var choices = _v8.a.choices; + case 3: + var choices = _v8.a.k; return $elm$core$Maybe$Just( A2( $elm$html$Html$datalist, @@ -11689,13 +11683,13 @@ var $author$project$Main$visibilityRuleSection = F4( $elm$html$Html$option, _List_fromArray( [ - $elm$html$Html$Attributes$value(c.value) + $elm$html$Html$Attributes$value(c.j) ]), _List_Nil); }, choices))); - case 'ChooseMultiple': - var choices = _v8.a.choices; + case 4: + var choices = _v8.a.k; return $elm$core$Maybe$Just( A2( $elm$html$Html$datalist, @@ -11710,7 +11704,7 @@ var $author$project$Main$visibilityRuleSection = F4( $elm$html$Html$option, _List_fromArray( [ - $elm$html$Html$Attributes$value(c.value) + $elm$html$Html$Attributes$value(c.j) ]), _List_Nil); }, @@ -11723,7 +11717,7 @@ var $author$project$Main$visibilityRuleSection = F4( } }(); var datalistAttr = function () { - if (datalistElement.$ === 'Just') { + if (!datalistElement.$) { return _List_fromArray( [ A2($elm$html$Html$Attributes$attribute, 'list', datalistId) @@ -11805,7 +11799,7 @@ var $author$project$Main$visibilityRuleSection = F4( 'value of ' + A2( $elm$json$Json$Encode$encode, 0, - $elm$json$Json$Encode$string(field.label))) + $elm$json$Json$Encode$string(field.d))) ])); }, A2($author$project$Main$otherQuestionTitles, formFields, fieldIndex)))) @@ -11813,20 +11807,20 @@ var $author$project$Main$visibilityRuleSection = F4( function () { var optionRecord = F4( function (value, label, selected, disabled) { - return {disabled: disabled, label: label, selected: selected, value: value}; + return {bO: disabled, d: label, bl: selected, j: value}; }); var comparisonValueString = function () { switch (rule.b.$) { - case 'Equals': + case 0: var v = rule.b.a; return v; - case 'StringContains': + case 1: var v = rule.b.a; return v; - case 'EndsWith': + case 2: var v = rule.b.a; return v; - case 'GreaterThan': + case 3: var v = rule.b.a; return v; default: @@ -11860,7 +11854,7 @@ var $author$project$Main$visibilityRuleSection = F4( datalistAttr), _List_Nil), function () { - if (datalistElement.$ === 'Just') { + if (!datalistElement.$) { var element = datalistElement.a; return _List_fromArray( [element]); @@ -11872,7 +11866,7 @@ var $author$project$Main$visibilityRuleSection = F4( var candidateFieldsExceptSelf = A2( $elm$core$List$filter, function (f) { - var fn = A2($elm$core$Maybe$withDefault, f.label, f.name); + var fn = A2($elm$core$Maybe$withDefault, f.d, f.Q); return !_Utils_eq(fn, selectedFieldName); }, candidateFields); @@ -11928,7 +11922,7 @@ var $author$project$Main$visibilityRuleSection = F4( var otherFields = A2( $elm$core$List$filter, function (f) { - var fn = A2($elm$core$Maybe$withDefault, f.label, f.name); + var fn = A2($elm$core$Maybe$withDefault, f.d, f.Q); return !_Utils_eq(fn, selectedFieldName); }, candidateFields); @@ -11974,7 +11968,7 @@ var $author$project$Main$visibilityRuleSection = F4( A2( $elm$core$List$map, function (f) { - var fn = A2($elm$core$Maybe$withDefault, f.label, f.name); + var fn = A2($elm$core$Maybe$withDefault, f.d, f.Q); return A2( $elm$html$Html$option, _List_fromArray( @@ -11989,7 +11983,7 @@ var $author$project$Main$visibilityRuleSection = F4( 'value of ' + A2( $elm$json$Json$Encode$encode, 0, - $elm$json$Json$Encode$string(f.label))) + $elm$json$Json$Encode$string(f.d))) ])); }, otherFields))), @@ -11997,7 +11991,7 @@ var $author$project$Main$visibilityRuleSection = F4( ])); var inputNode = function () { var _v3 = $author$project$Main$comparisonOf(rule); - if (_v3.$ === 'EqualsField') { + if (_v3.$ === 4) { return equalsFieldDisabled ? A2( $elm$html$Html$input, _List_fromArray( @@ -12014,9 +12008,9 @@ var $author$project$Main$visibilityRuleSection = F4( }(); return $author$project$Main$selectInputGroup( { - inputNode: inputNode, - options: optionsList, - selectAttrs: _List_fromArray( + b8: inputNode, + cv: optionsList, + cQ: _List_fromArray( [ $author$project$Main$onChange( function (str) { @@ -12077,7 +12071,7 @@ var $author$project$Main$visibilityRuleSection = F4( $elm$html$Html$Attributes$required(true), $elm$html$Html$Attributes$value( function () { - if (visibilityRule.$ === 'ShowWhen') { + if (!visibilityRule.$) { return 'ShowWhen'; } else { return 'HideWhen'; @@ -12203,7 +12197,7 @@ var $author$project$Main$visibilityRulesSection = F3( A2( $elm$core$List$indexedMap, A2($author$project$Main$visibilityRuleSection, index, formFields), - formField.visibilityRule))), + formField.m))), A2( $elm$html$Html$div, _List_fromArray( @@ -12230,7 +12224,7 @@ var $author$project$Main$visibilityRulesSection = F3( }); var $author$project$Main$viewFormFieldBuilder = F5( function (shortTextTypeList, index, totalLength, formFields, formField) { - var isDuplicateLabel = A3($author$project$Main$hasDuplicateLabel, index, formField.label, formFields); + var isDuplicateLabel = A3($author$project$Main$hasDuplicateLabel, index, formField.d, formFields); var patternAttr = isDuplicateLabel ? _List_fromArray( [ $elm$html$Html$Attributes$pattern('^$') @@ -12255,7 +12249,7 @@ var $author$project$Main$viewFormFieldBuilder = F5( [ $author$project$Main$SetEditorAnimate( $elm$core$Maybe$Just( - _Utils_Tuple2(index, $author$project$Main$AnimateFadeOut))), + _Utils_Tuple2(index, 1))), $author$project$Main$DeleteFormField(index) ]))) ]), @@ -12288,7 +12282,7 @@ var $author$project$Main$viewFormFieldBuilder = F5( $elm$html$Html$Attributes$type_('checkbox'), $elm$html$Html$Attributes$tabindex(0), $elm$html$Html$Attributes$checked( - $author$project$Main$requiredData(formField.presence)), + $author$project$Main$requiredData(formField.p)), $elm$html$Html$Events$onCheck( function (b) { return A3( @@ -12344,7 +12338,7 @@ var $author$project$Main$viewFormFieldBuilder = F5( $elm$html$Html$text(' '), $elm$html$Html$text( 'Accept multiple ' + $elm$core$String$toLower( - $author$project$Main$stringFromInputField(formField.type_))) + $author$project$Main$stringFromInputField(formField.a))) ])) ])); var buildFieldClass = 'tff-build-field'; @@ -12375,7 +12369,7 @@ var $author$project$Main$viewFormFieldBuilder = F5( _List_fromArray( [ $elm$html$Html$text( - $author$project$Main$stringFromInputField(formField.type_) + ' question title') + $author$project$Main$stringFromInputField(formField.a) + ' question title') ])), A2( $elm$html$Html$input, @@ -12384,7 +12378,7 @@ var $author$project$Main$viewFormFieldBuilder = F5( [ $elm$html$Html$Attributes$type_('text'), $elm$html$Html$Attributes$id('label-' + idSuffix), - $elm$html$Html$Attributes$value(formField.label), + $elm$html$Html$Attributes$value(formField.d), $elm$html$Html$Attributes$required(true), $elm$html$Html$Events$onInput( A2($author$project$Main$OnFormField, $author$project$Main$OnLabelInput, index)), @@ -12404,27 +12398,27 @@ var $author$project$Main$viewFormFieldBuilder = F5( ])) : $elm$html$Html$text('') ])), function () { - if ($author$project$Main$mustBeOptional(formField.type_)) { + if ($author$project$Main$mustBeOptional(formField.a)) { return $elm$html$Html$text(''); } else { - var _v0 = formField.presence; - switch (_v0.$) { - case 'Required': + var _v0 = formField.p; + switch (_v0) { + case 0: return configureRequiredCheckbox; - case 'Optional': + case 1: return configureRequiredCheckbox; default: return $elm$html$Html$text(''); } } }(), - $author$project$Main$allowsTogglingMultiple(formField.type_) ? configureMultipleCheckbox : $elm$html$Html$text(''), + $author$project$Main$allowsTogglingMultiple(formField.a) ? configureMultipleCheckbox : $elm$html$Html$text(''), A2( $author$project$Main$inputAttributeOptional, { - htmlNode: function (result) { + ag: function (result) { var valueString = function () { - if (result.$ === 'Ok') { + if (!result.$) { var a = result.a; return a; } else { @@ -12444,8 +12438,8 @@ var $author$project$Main$viewFormFieldBuilder = F5( ]), _List_Nil); }, - label: 'Question description', - onCheck: function (b) { + d: 'Question description', + ac: function (b) { return A3( $author$project$Main$OnFormField, $author$project$Main$OnDescriptionToggle(b), @@ -12453,7 +12447,7 @@ var $author$project$Main$viewFormFieldBuilder = F5( ''); } }, - formField.description) + formField.S) ]), _Utils_ap( A4($author$project$Main$viewFormFieldOptionsBuilder, shortTextTypeList, index, formFields, formField), @@ -12506,11 +12500,11 @@ var $author$project$Main$viewFormFieldBuilder = F5( ])) ])), function () { - var _v2 = formField.presence; - switch (_v2.$) { - case 'Required': + var _v2 = formField.p; + switch (_v2) { + case 0: return deleteFieldButton; - case 'Optional': + case 1: return deleteFieldButton; default: return $elm$html$Html$text(''); @@ -12526,7 +12520,7 @@ var $author$project$Main$viewRightPanel = function (modelData) { A2( $elm$core$List$cons, 'tff-right-panel', - (!_Utils_eq(modelData.selectedFieldIndex, $elm$core$Maybe$Nothing)) ? _List_fromArray( + (!_Utils_eq(modelData.F, $elm$core$Maybe$Nothing)) ? _List_fromArray( ['tff-panel-visible']) : _List_Nil)); return A2( $elm$html$Html$div, @@ -12574,18 +12568,18 @@ var $author$project$Main$viewRightPanel = function (modelData) { _List_fromArray( [ function () { - var _v0 = modelData.selectedFieldIndex; - if (_v0.$ === 'Just') { + var _v0 = modelData.F; + if (!_v0.$) { var index = _v0.a; - var _v1 = A2($elm$core$Array$get, index, modelData.formFields); - if (_v1.$ === 'Just') { + var _v1 = A2($elm$core$Array$get, index, modelData.g); + if (!_v1.$) { var formField = _v1.a; return A5( $author$project$Main$viewFormFieldBuilder, - $author$project$Main$allCustomElementsFromGroups(modelData.inputFieldGroups), + $author$project$Main$allCustomElementsFromGroups(modelData.T), index, - $elm$core$Array$length(modelData.formFields), - modelData.formFields, + $elm$core$Array$length(modelData.g), + modelData.g, formField); } else { return $elm$html$Html$text('Select a field to edit its settings'); @@ -12601,18 +12595,18 @@ var $author$project$Main$viewFormBuilder = F2( function (maybeAnimate, model) { var maybeFieldsList = A2( $author$project$Main$fieldsWithPlaceholder, - $elm$core$Array$toList(model.formFields), - model.dragged); + $elm$core$Array$toList(model.g), + model.r); var activeFields = A2( $elm$core$Maybe$withDefault, _List_Nil, A2( $elm$core$Maybe$map, function ($) { - return $.fields; + return $.aM; }, $elm$core$List$head( - A2($elm$core$List$drop, model.activeFieldGroupIndex, model.inputFieldGroups)))); + A2($elm$core$List$drop, model.ay, model.T)))); return _List_fromArray( [ A2( @@ -12638,7 +12632,7 @@ var $author$project$Main$viewFormBuilder = F2( [ _Utils_Tuple2( 'tff-panel-hidden', - !_Utils_eq(model.selectedFieldIndex, $elm$core$Maybe$Nothing)) + !_Utils_eq(model.F, $elm$core$Maybe$Nothing)) ])) ]), _Utils_ap( @@ -12656,13 +12650,13 @@ var $author$project$Main$viewFormBuilder = F2( ])) ]), _Utils_ap( - ($elm$core$List$length(model.inputFieldGroups) > 1) ? _List_fromArray( + ($elm$core$List$length(model.T) > 1) ? _List_fromArray( [ - A2($author$project$Main$viewFieldGroupTabs, model.activeFieldGroupIndex, model.inputFieldGroups) + A2($author$project$Main$viewFieldGroupTabs, model.ay, model.T) ]) : _List_Nil, _List_fromArray( [ - A2($author$project$Main$viewAddQuestionsList, model.nextQuestionNumber, activeFields) + A2($author$project$Main$viewAddQuestionsList, model.ab, activeFields) ])))), A2( $elm$html$Html$div, @@ -12674,7 +12668,7 @@ var $author$project$Main$viewFormBuilder = F2( [ _Utils_Tuple2( 'tff-panel-hidden', - !_Utils_eq(model.selectedFieldIndex, $elm$core$Maybe$Nothing)) + !_Utils_eq(model.F, $elm$core$Maybe$Nothing)) ])), $elm$html$Html$Events$onClick( $author$project$Main$SelectField($elm$core$Maybe$Nothing)) @@ -12702,7 +12696,7 @@ var $author$project$Main$viewFormBuilder = F2( }); var $author$project$Main$OnFormValuesUpdated = F2( function (a, b) { - return {$: 'OnFormValuesUpdated', a: a, b: b}; + return {$: 15, a: a, b: b}; }); var $author$project$Main$fieldHasEmptyFilter = F2( function (formField, trackedFormValues) { @@ -12719,8 +12713,8 @@ var $author$project$Main$fieldHasEmptyFilter = F2( A2($elm$core$Dict$get, fieldName, trackedFormValues)))); }; var getFilterField = function (filter) { - if (filter.$ === 'Just') { - if (filter.a.$ === 'FilterStartsWithFieldValueOf') { + if (!filter.$) { + if (!filter.a.$) { var fieldName = filter.a.a; return $elm$core$Maybe$Just(fieldName); } else { @@ -12731,10 +12725,10 @@ var $author$project$Main$fieldHasEmptyFilter = F2( return $elm$core$Maybe$Nothing; } }; - var _v0 = formField.type_; + var _v0 = formField.a; switch (_v0.$) { - case 'Dropdown': - var filter = _v0.a.filter; + case 2: + var filter = _v0.a.e; return A2( $elm$core$Maybe$withDefault, false, @@ -12742,8 +12736,8 @@ var $author$project$Main$fieldHasEmptyFilter = F2( $elm$core$Maybe$map, isFilterFieldEmpty, getFilterField(filter))); - case 'ChooseOne': - var filter = _v0.a.filter; + case 3: + var filter = _v0.a.e; return A2( $elm$core$Maybe$withDefault, false, @@ -12751,8 +12745,8 @@ var $author$project$Main$fieldHasEmptyFilter = F2( $elm$core$Maybe$map, isFilterFieldEmpty, getFilterField(filter))); - case 'ChooseMultiple': - var filter = _v0.a.filter; + case 4: + var filter = _v0.a.e; return A2( $elm$core$Maybe$withDefault, false, @@ -12765,17 +12759,17 @@ var $author$project$Main$fieldHasEmptyFilter = F2( } }); var $author$project$Main$isChooseManyUsingMinMax = function (formField) { - var _v0 = formField.type_; + var _v0 = formField.a; switch (_v0.$) { - case 'ShortText': + case 0: return false; - case 'LongText': + case 1: return false; - case 'ChooseMultiple': - var minRequired = _v0.a.minRequired; - var maxAllowed = _v0.a.maxAllowed; - return (!_Utils_eq(minRequired, $elm$core$Maybe$Nothing)) || ((!_Utils_eq(maxAllowed, $elm$core$Maybe$Nothing)) || _Utils_eq(formField.presence, $author$project$Main$System)); - case 'ChooseOne': + case 4: + var minRequired = _v0.a.P; + var maxAllowed = _v0.a.U; + return (!_Utils_eq(minRequired, $elm$core$Maybe$Nothing)) || ((!_Utils_eq(maxAllowed, $elm$core$Maybe$Nothing)) || (formField.p === 2)); + case 3: return false; default: return false; @@ -12800,7 +12794,7 @@ var $author$project$Main$evaluateCondition = F2( var fieldName = condition.a; var comparison = condition.b; switch (comparison.$) { - case 'Equals': + case 0: var givenValue = comparison.a; return A2( $elm$core$List$member, @@ -12809,7 +12803,7 @@ var $author$project$Main$evaluateCondition = F2( $elm$core$Maybe$withDefault, _List_Nil, A2($elm$core$Dict$get, fieldName, trackedFormValues))); - case 'StringContains': + case 1: var givenValue = comparison.a; return A2( $elm$core$List$any, @@ -12818,7 +12812,7 @@ var $author$project$Main$evaluateCondition = F2( $elm$core$Maybe$withDefault, _List_Nil, A2($elm$core$Dict$get, fieldName, trackedFormValues))); - case 'EndsWith': + case 2: var givenValue = comparison.a; return A2( $elm$core$List$any, @@ -12827,13 +12821,13 @@ var $author$project$Main$evaluateCondition = F2( $elm$core$Maybe$withDefault, _List_Nil, A2($elm$core$Dict$get, fieldName, trackedFormValues))); - case 'GreaterThan': + case 3: var givenValue = comparison.a; return A2( $elm$core$List$any, function (formValue) { var _v2 = $elm$core$String$toFloat(givenValue); - if (_v2.$ === 'Just') { + if (!_v2.$) { var givenFloat = _v2.a; return A2( $elm$core$Maybe$withDefault, @@ -12874,7 +12868,7 @@ var $author$project$Main$isVisibilityRuleSatisfied = F2( return $elm$core$List$isEmpty(rules) || A2( $elm$core$List$any, function (rule) { - if (rule.$ === 'ShowWhen') { + if (!rule.$) { var conditions = rule.a; return A2( $elm$core$List$all, @@ -12896,7 +12890,7 @@ var $elm$core$Array$foldl = F3( var tail = _v0.d; var helper = F2( function (node, acc) { - if (node.$ === 'SubTree') { + if (!node.$) { var subTree = node.a; return A3($elm$core$Elm$JsArray$foldl, helper, acc, subTree); } else { @@ -12922,9 +12916,9 @@ var $author$project$Main$sanitizeFormValuesHelper = F3( F2( function (field, acc) { var fieldName = $author$project$Main$fieldNameOf(field); - if (A2($author$project$Main$isVisibilityRuleSatisfied, field.visibilityRule, currentValues)) { + if (A2($author$project$Main$isVisibilityRuleSatisfied, field.m, currentValues)) { var _v0 = A2($elm$core$Dict$get, fieldName, currentValues); - if (_v0.$ === 'Just') { + if (!_v0.$) { var fieldValues = _v0.a; return A3($elm$core$Dict$insert, fieldName, fieldValues, acc); } else { @@ -12960,10 +12954,10 @@ var $author$project$Main$sanitizeFormValues = F2( }); var $author$project$Main$viewFormPreview = F2( function (customAttrs, _v0) { - var formFields = _v0.formFields; - var needsFormLogic = _v0.needsFormLogic; - var trackedFormValues = _v0.trackedFormValues; - var shortTextTypeDict = _v0.shortTextTypeDict; + var formFields = _v0.g; + var needsFormLogic = _v0.aa; + var trackedFormValues = _v0.v; + var shortTextTypeDict = _v0.al; var onInputAttrs = function (fieldName) { return _List_fromArray( [ @@ -12982,7 +12976,7 @@ var $author$project$Main$viewFormPreview = F2( [ $elm$html$Html$Events$onCheck( function (_v5) { - return A2($author$project$Main$OnFormValuesUpdated, fieldName, choice.value); + return A2($author$project$Main$OnFormValuesUpdated, fieldName, choice.j); }) ]); }); @@ -13003,21 +12997,21 @@ var $author$project$Main$viewFormPreview = F2( $elm$core$Array$toList(formFields)); var needsEventHandlers = needsFormLogic || (isAnyChooseManyUsingMinMax || hasOptionalTemporalInputs); var config = { - customAttrs: customAttrs, - formFields: formFields, - needsFormLogic: needsFormLogic, - onChange: needsEventHandlers ? onChangeAttrs : function (_v1) { + Z: customAttrs, + g: formFields, + aa: needsFormLogic, + bi: needsEventHandlers ? onChangeAttrs : function (_v1) { return _List_Nil; }, - onChooseMany: needsEventHandlers ? onChooseManyAttrs : F2( + bj: needsEventHandlers ? onChooseManyAttrs : F2( function (_v2, _v3) { return _List_Nil; }), - onInput: needsEventHandlers ? onInputAttrs : function (_v4) { + aQ: needsEventHandlers ? onInputAttrs : function (_v4) { return _List_Nil; }, - shortTextTypeDict: shortTextTypeDict, - trackedFormValues: trackedFormValues + al: shortTextTypeDict, + v: trackedFormValues }; return $elm$core$Array$toList( A2( @@ -13028,7 +13022,7 @@ var $author$project$Main$viewFormPreview = F2( function (formField) { return A2( $author$project$Main$isVisibilityRuleSatisfied, - formField.visibilityRule, + formField.m, A2($author$project$Main$sanitizeFormValues, formFields, trackedFormValues)) && (!A2($author$project$Main$fieldHasEmptyFilter, formField, trackedFormValues)); }, formFields))); @@ -13039,11 +13033,11 @@ var $author$project$Main$viewMain = function (model) { _List_fromArray( [ $elm$html$Html$Attributes$class( - 'tff tff-container tff-mode-' + $author$project$Main$stringFromViewMode(model.viewMode)) + 'tff tff-container tff-mode-' + $author$project$Main$stringFromViewMode(model.ad)) ]), function () { - var _v0 = model.viewMode; - if (_v0.$ === 'Editor') { + var _v0 = model.ad; + if (!_v0.$) { var editorAttr = _v0.a; return A2( $elm$core$List$cons, @@ -13057,18 +13051,18 @@ var $author$project$Main$viewMain = function (model) { A2( $elm$json$Json$Encode$encode, 0, - $author$project$Main$encodeFormFields(model.formFields))) + $author$project$Main$encodeFormFields(model.g))) ]), _List_Nil), - A2($author$project$Main$viewFormBuilder, editorAttr.maybeAnimate, model)); + A2($author$project$Main$viewFormBuilder, editorAttr.aC, model)); } else { return A2($author$project$Main$viewFormPreview, _List_Nil, model); } }()); }; var $author$project$Main$view = function (model) { - var _v0 = model.initError; - if (_v0.$ === 'Just') { + var _v0 = model.aZ; + if (!_v0.$) { var errString = _v0.a; return A2( $elm$html$Html$div, @@ -13098,7 +13092,7 @@ var $author$project$Main$view = function (model) { } }; var $author$project$Main$main = $elm$browser$Browser$element( - {init: $author$project$Main$init, subscriptions: $author$project$Main$subscriptions, update: $author$project$Main$update, view: $author$project$Main$view}); + {dv: $author$project$Main$init, dV: $author$project$Main$subscriptions, dY: $author$project$Main$update, dZ: $author$project$Main$view}); /* _Platform_export({'Main':{'init':$author$project$Main$main($elm$json$Json$Decode$value)(0)}});}(this)); */ diff --git a/dist/tiny-form-fields.js b/dist/tiny-form-fields.js index 09a64e0..d275fe0 100644 --- a/dist/tiny-form-fields.js +++ b/dist/tiny-form-fields.js @@ -77,7 +77,7 @@ function A9(fun, a, b, c, d, e, f, g, h, i) { return fun.a === 9 ? fun.f(a, b, c, d, e, f, g, h, i) : fun(a)(b)(c)(d)(e)(f)(g)(h)(i); } -console.warn('Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets.'); + // EQUALITY @@ -113,7 +113,7 @@ function _Utils_eqHelp(x, y, depth, stack) return true; } - /**/ + /**_UNUSED/ if (x.$ === 'Set_elm_builtin') { x = $elm$core$Set$toList(x); @@ -126,7 +126,7 @@ function _Utils_eqHelp(x, y, depth, stack) } //*/ - /**_UNUSED/ + /**/ if (x.$ < 0) { x = $elm$core$Dict$toList(x); @@ -161,7 +161,7 @@ function _Utils_cmp(x, y, ord) return x === y ? /*EQ*/ 0 : x < y ? /*LT*/ -1 : /*GT*/ 1; } - /**/ + /**_UNUSED/ if (x instanceof String) { var a = x.valueOf(); @@ -170,10 +170,10 @@ function _Utils_cmp(x, y, ord) } //*/ - /**_UNUSED/ + /**/ if (typeof x.$ === 'undefined') //*/ - /**/ + /**_UNUSED/ if (x.$[0] === '#') //*/ { @@ -203,17 +203,17 @@ var _Utils_compare = F2(function(x, y) // COMMON VALUES -var _Utils_Tuple0_UNUSED = 0; -var _Utils_Tuple0 = { $: '#0' }; +var _Utils_Tuple0 = 0; +var _Utils_Tuple0_UNUSED = { $: '#0' }; -function _Utils_Tuple2_UNUSED(a, b) { return { a: a, b: b }; } -function _Utils_Tuple2(a, b) { return { $: '#2', a: a, b: b }; } +function _Utils_Tuple2(a, b) { return { a: a, b: b }; } +function _Utils_Tuple2_UNUSED(a, b) { return { $: '#2', a: a, b: b }; } -function _Utils_Tuple3_UNUSED(a, b, c) { return { a: a, b: b, c: c }; } -function _Utils_Tuple3(a, b, c) { return { $: '#3', a: a, b: b, c: c }; } +function _Utils_Tuple3(a, b, c) { return { a: a, b: b, c: c }; } +function _Utils_Tuple3_UNUSED(a, b, c) { return { $: '#3', a: a, b: b, c: c }; } -function _Utils_chr_UNUSED(c) { return c; } -function _Utils_chr(c) { return new String(c); } +function _Utils_chr(c) { return c; } +function _Utils_chr_UNUSED(c) { return new String(c); } // RECORDS @@ -264,11 +264,11 @@ function _Utils_ap(xs, ys) -var _List_Nil_UNUSED = { $: 0 }; -var _List_Nil = { $: '[]' }; +var _List_Nil = { $: 0 }; +var _List_Nil_UNUSED = { $: '[]' }; -function _List_Cons_UNUSED(hd, tl) { return { $: 1, a: hd, b: tl }; } -function _List_Cons(hd, tl) { return { $: '::', a: hd, b: tl }; } +function _List_Cons(hd, tl) { return { $: 1, a: hd, b: tl }; } +function _List_Cons_UNUSED(hd, tl) { return { $: '::', a: hd, b: tl }; } var _List_cons = F2(_List_Cons); @@ -499,12 +499,12 @@ var _JsArray_appendN = F3(function(n, dest, source) // LOG -var _Debug_log_UNUSED = F2(function(tag, value) +var _Debug_log = F2(function(tag, value) { return value; }); -var _Debug_log = F2(function(tag, value) +var _Debug_log_UNUSED = F2(function(tag, value) { console.log(tag + ': ' + _Debug_toString(value)); return value; @@ -530,12 +530,12 @@ function _Debug_todoCase(moduleName, region, value) // TO STRING -function _Debug_toString_UNUSED(value) +function _Debug_toString(value) { return ''; } -function _Debug_toString(value) +function _Debug_toString_UNUSED(value) { return _Debug_toAnsiString(false, value); } @@ -720,13 +720,13 @@ function _Debug_toHexDigit(n) // CRASH -function _Debug_crash_UNUSED(identifier) +function _Debug_crash(identifier) { throw new Error('https://github.com/elm/core/blob/1.0.0/hints/' + identifier + '.md'); } -function _Debug_crash(identifier, fact1, fact2, fact3, fact4) +function _Debug_crash_UNUSED(identifier, fact1, fact2, fact3, fact4) { switch(identifier) { @@ -784,11 +784,11 @@ function _Debug_crash(identifier, fact1, fact2, fact3, fact4) function _Debug_regionToString(region) { - if (region.start.line === region.end.line) + if (region.bo.aN === region.bQ.aN) { - return 'on line ' + region.start.line; + return 'on line ' + region.bo.aN; } - return 'on lines ' + region.start.line + ' through ' + region.end.line; + return 'on lines ' + region.bo.aN + ' through ' + region.bQ.aN; } @@ -1212,7 +1212,7 @@ function _Char_toLocaleLower(char) -/**/ +/**_UNUSED/ function _Json_errorToString(error) { return $elm$json$Json$Decode$errorToString(error); @@ -1616,11 +1616,11 @@ var _Json_encode = F2(function(indentLevel, value) return JSON.stringify(_Json_unwrap(value), null, indentLevel) + ''; }); -function _Json_wrap(value) { return { $: 0, a: value }; } -function _Json_unwrap(value) { return value.a; } +function _Json_wrap_UNUSED(value) { return { $: 0, a: value }; } +function _Json_unwrap_UNUSED(value) { return value.a; } -function _Json_wrap_UNUSED(value) { return value; } -function _Json_unwrap_UNUSED(value) { return value; } +function _Json_wrap(value) { return value; } +function _Json_unwrap(value) { return value; } function _Json_emptyArray() { return []; } function _Json_emptyObject() { return {}; } @@ -1857,9 +1857,9 @@ var _Platform_worker = F4(function(impl, flagDecoder, debugMetadata, args) return _Platform_initialize( flagDecoder, args, - impl.init, - impl.update, - impl.subscriptions, + impl.dv, + impl.dY, + impl.dV, function() { return function() {} } ); }); @@ -1872,7 +1872,7 @@ var _Platform_worker = F4(function(impl, flagDecoder, debugMetadata, args) function _Platform_initialize(flagDecoder, args, init, update, subscriptions, stepperBuilder) { var result = A2(_Json_run, flagDecoder, _Json_wrap(args ? args['flags'] : undefined)); - $elm$core$Result$isOk(result) || _Debug_crash(2 /**/, _Json_errorToString(result.a) /**/); + $elm$core$Result$isOk(result) || _Debug_crash(2 /**_UNUSED/, _Json_errorToString(result.a) /**/); var managers = {}; var initPair = init(result.a); var model = initPair.a; @@ -2316,7 +2316,7 @@ function _Platform_setupIncomingPort(name, sendToApp) // -function _Platform_export_UNUSED(exports) +function _Platform_export(exports) { scope['Elm'] ? _Platform_mergeExportsProd(scope['Elm'], exports) @@ -2337,7 +2337,7 @@ function _Platform_mergeExportsProd(obj, exports) } -function _Platform_export(exports) +function _Platform_export_UNUSED(exports) { scope['Elm'] ? _Platform_mergeExportsDebug('Elm', scope['Elm'], exports) @@ -2377,10 +2377,10 @@ var _VirtualDom_init = F4(function(virtualNode, flagDecoder, debugMetadata, args { // NOTE: this function needs _Platform_export available to work - /**_UNUSED/ + /**/ var node = args['node']; //*/ - /**/ + /**_UNUSED/ var node = args && args['node'] ? args['node'] : _Debug_crash(0); //*/ @@ -2655,14 +2655,14 @@ function _VirtualDom_noInnerHtmlOrFormAction(key) function _VirtualDom_noJavaScriptUri(value) { return _VirtualDom_RE_js.test(value) - ? /**_UNUSED/''//*//**/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ + ? /**/''//*//**_UNUSED/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ : value; } function _VirtualDom_noJavaScriptOrHtmlUri(value) { return _VirtualDom_RE_js_html.test(value) - ? /**_UNUSED/''//*//**/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ + ? /**/''//*//**_UNUSED/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ : value; } @@ -2670,7 +2670,7 @@ function _VirtualDom_noJavaScriptOrHtmlJson(value) { return (typeof _Json_unwrap(value) === 'string' && _VirtualDom_RE_js_html.test(_Json_unwrap(value))) ? _Json_wrap( - /**_UNUSED/''//*//**/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ + /**/''//*//**_UNUSED/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ ) : value; } @@ -2719,9 +2719,9 @@ var _VirtualDom_mapEventTuple = F2(function(func, tuple) var _VirtualDom_mapEventRecord = F2(function(func, record) { return { - message: func(record.message), - stopPropagation: record.stopPropagation, - preventDefault: record.preventDefault + aj: func(record.aj), + bp: record.bp, + bk: record.bk } }); @@ -2989,11 +2989,11 @@ function _VirtualDom_makeCallback(eventNode, initialHandler) // 3 = Custom var value = result.a; - var message = !tag ? value : tag < 3 ? value.a : value.message; - var stopPropagation = tag == 1 ? value.b : tag == 3 && value.stopPropagation; + var message = !tag ? value : tag < 3 ? value.a : value.aj; + var stopPropagation = tag == 1 ? value.b : tag == 3 && value.bp; var currentEventNode = ( stopPropagation && event.stopPropagation(), - (tag == 2 ? value.b : tag == 3 && value.preventDefault) && event.preventDefault(), + (tag == 2 ? value.b : tag == 3 && value.bk) && event.preventDefault(), eventNode ); var tagger; @@ -3943,15 +3943,15 @@ var _Browser_element = _Debugger_element || F4(function(impl, flagDecoder, debug return _Platform_initialize( flagDecoder, args, - impl.init, - impl.update, - impl.subscriptions, + impl.dv, + impl.dY, + impl.dV, function(sendToApp, initialModel) { - var view = impl.view; - /**_UNUSED/ + var view = impl.dZ; + /**/ var domNode = args['node']; //*/ - /**/ + /**_UNUSED/ var domNode = args && args['node'] ? args['node'] : _Debug_crash(0); //*/ var currNode = _VirtualDom_virtualize(domNode); @@ -3979,12 +3979,12 @@ var _Browser_document = _Debugger_document || F4(function(impl, flagDecoder, deb return _Platform_initialize( flagDecoder, args, - impl.init, - impl.update, - impl.subscriptions, + impl.dv, + impl.dY, + impl.dV, function(sendToApp, initialModel) { - var divertHrefToApp = impl.setup && impl.setup(sendToApp) - var view = impl.view; + var divertHrefToApp = impl.bm && impl.bm(sendToApp) + var view = impl.dZ; var title = _VirtualDom_doc.title; var bodyNode = _VirtualDom_doc.body; var currNode = _VirtualDom_virtualize(bodyNode); @@ -3992,12 +3992,12 @@ var _Browser_document = _Debugger_document || F4(function(impl, flagDecoder, deb { _VirtualDom_divertHrefToApp = divertHrefToApp; var doc = view(model); - var nextNode = _VirtualDom_node('body')(_List_Nil)(doc.body); + var nextNode = _VirtualDom_node('body')(_List_Nil)(doc.da); var patches = _VirtualDom_diff(currNode, nextNode); bodyNode = _VirtualDom_applyPatches(bodyNode, currNode, patches, sendToApp); currNode = nextNode; _VirtualDom_divertHrefToApp = 0; - (title !== doc.title) && (_VirtualDom_doc.title = title = doc.title); + (title !== doc.cY) && (_VirtualDom_doc.title = title = doc.cY); }); } ); @@ -4053,12 +4053,12 @@ function _Browser_makeAnimator(model, draw) function _Browser_application(impl) { - var onUrlChange = impl.onUrlChange; - var onUrlRequest = impl.onUrlRequest; + var onUrlChange = impl.dM; + var onUrlRequest = impl.dN; var key = function() { key.a(onUrlChange(_Browser_getUrl())); }; return _Browser_document({ - setup: function(sendToApp) + bm: function(sendToApp) { key.a = sendToApp; _Browser_window.addEventListener('popstate', key); @@ -4074,9 +4074,9 @@ function _Browser_application(impl) var next = $elm$url$Url$fromString(href).a; sendToApp(onUrlRequest( (next - && curr.protocol === next.protocol - && curr.host === next.host - && curr.port_.a === next.port_.a + && curr.cF === next.cF + && curr.b4 === next.b4 + && curr.cz.a === next.cz.a ) ? $elm$browser$Browser$Internal(next) : $elm$browser$Browser$External(href) @@ -4084,13 +4084,13 @@ function _Browser_application(impl) } }); }, - init: function(flags) + dv: function(flags) { - return A3(impl.init, flags, _Browser_getUrl(), key); + return A3(impl.dv, flags, _Browser_getUrl(), key); }, - view: impl.view, - update: impl.update, - subscriptions: impl.subscriptions + dZ: impl.dZ, + dY: impl.dY, + dV: impl.dV }); } @@ -4156,17 +4156,17 @@ var _Browser_decodeEvent = F2(function(decoder, event) function _Browser_visibilityInfo() { return (typeof _VirtualDom_doc.hidden !== 'undefined') - ? { hidden: 'hidden', change: 'visibilitychange' } + ? { ds: 'hidden', de: 'visibilitychange' } : (typeof _VirtualDom_doc.mozHidden !== 'undefined') - ? { hidden: 'mozHidden', change: 'mozvisibilitychange' } + ? { ds: 'mozHidden', de: 'mozvisibilitychange' } : (typeof _VirtualDom_doc.msHidden !== 'undefined') - ? { hidden: 'msHidden', change: 'msvisibilitychange' } + ? { ds: 'msHidden', de: 'msvisibilitychange' } : (typeof _VirtualDom_doc.webkitHidden !== 'undefined') - ? { hidden: 'webkitHidden', change: 'webkitvisibilitychange' } - : { hidden: 'hidden', change: 'visibilitychange' }; + ? { ds: 'webkitHidden', de: 'webkitvisibilitychange' } + : { ds: 'hidden', de: 'visibilitychange' }; } @@ -4247,12 +4247,12 @@ var _Browser_call = F2(function(functionName, id) function _Browser_getViewport() { return { - scene: _Browser_getScene(), - viewport: { - x: _Browser_window.pageXOffset, - y: _Browser_window.pageYOffset, - width: _Browser_doc.documentElement.clientWidth, - height: _Browser_doc.documentElement.clientHeight + cO: _Browser_getScene(), + c0: { + c3: _Browser_window.pageXOffset, + c4: _Browser_window.pageYOffset, + c2: _Browser_doc.documentElement.clientWidth, + b2: _Browser_doc.documentElement.clientHeight } }; } @@ -4262,8 +4262,8 @@ function _Browser_getScene() var body = _Browser_doc.body; var elem = _Browser_doc.documentElement; return { - width: Math.max(body.scrollWidth, body.offsetWidth, elem.scrollWidth, elem.offsetWidth, elem.clientWidth), - height: Math.max(body.scrollHeight, body.offsetHeight, elem.scrollHeight, elem.offsetHeight, elem.clientHeight) + c2: Math.max(body.scrollWidth, body.offsetWidth, elem.scrollWidth, elem.offsetWidth, elem.clientWidth), + b2: Math.max(body.scrollHeight, body.offsetHeight, elem.scrollHeight, elem.offsetHeight, elem.clientHeight) }; } @@ -4286,15 +4286,15 @@ function _Browser_getViewportOf(id) return _Browser_withNode(id, function(node) { return { - scene: { - width: node.scrollWidth, - height: node.scrollHeight + cO: { + c2: node.scrollWidth, + b2: node.scrollHeight }, - viewport: { - x: node.scrollLeft, - y: node.scrollTop, - width: node.clientWidth, - height: node.clientHeight + c0: { + c3: node.scrollLeft, + c4: node.scrollTop, + c2: node.clientWidth, + b2: node.clientHeight } }; }); @@ -4324,18 +4324,18 @@ function _Browser_getElement(id) var x = _Browser_window.pageXOffset; var y = _Browser_window.pageYOffset; return { - scene: _Browser_getScene(), - viewport: { - x: x, - y: y, - width: _Browser_doc.documentElement.clientWidth, - height: _Browser_doc.documentElement.clientHeight + cO: _Browser_getScene(), + c0: { + c3: x, + c4: y, + c2: _Browser_doc.documentElement.clientWidth, + b2: _Browser_doc.documentElement.clientHeight }, - element: { - x: x + rect.left, - y: y + rect.top, - width: rect.width, - height: rect.height + dl: { + c3: x + rect.left, + c4: y + rect.top, + c2: rect.width, + b2: rect.height } }; }); @@ -4407,15 +4407,15 @@ var _Bitwise_shiftRightZfBy = F2(function(offset, a) { return a >>> offset; }); -var $elm$core$Basics$EQ = {$: 'EQ'}; -var $elm$core$Basics$GT = {$: 'GT'}; -var $elm$core$Basics$LT = {$: 'LT'}; +var $elm$core$Basics$EQ = 1; +var $elm$core$Basics$GT = 2; +var $elm$core$Basics$LT = 0; var $elm$core$List$cons = _List_cons; var $elm$core$Dict$foldr = F3( function (func, acc, t) { foldr: while (true) { - if (t.$ === 'RBEmpty_elm_builtin') { + if (t.$ === -2) { return acc; } else { var key = t.b; @@ -4460,7 +4460,7 @@ var $elm$core$Dict$keys = function (dict) { dict); }; var $elm$core$Set$toList = function (_v0) { - var dict = _v0.a; + var dict = _v0; return $elm$core$Dict$keys(dict); }; var $elm$core$Elm$JsArray$foldr = _JsArray_foldr; @@ -4470,7 +4470,7 @@ var $elm$core$Array$foldr = F3( var tail = _v0.d; var helper = F2( function (node, acc) { - if (node.$ === 'SubTree') { + if (!node.$) { var subTree = node.a; return A3($elm$core$Elm$JsArray$foldr, helper, acc, subTree); } else { @@ -4488,32 +4488,32 @@ var $elm$core$Array$toList = function (array) { return A3($elm$core$Array$foldr, $elm$core$List$cons, _List_Nil, array); }; var $elm$core$Result$Err = function (a) { - return {$: 'Err', a: a}; + return {$: 1, a: a}; }; var $elm$json$Json$Decode$Failure = F2( function (a, b) { - return {$: 'Failure', a: a, b: b}; + return {$: 3, a: a, b: b}; }); var $elm$json$Json$Decode$Field = F2( function (a, b) { - return {$: 'Field', a: a, b: b}; + return {$: 0, a: a, b: b}; }); var $elm$json$Json$Decode$Index = F2( function (a, b) { - return {$: 'Index', a: a, b: b}; + return {$: 1, a: a, b: b}; }); var $elm$core$Result$Ok = function (a) { - return {$: 'Ok', a: a}; + return {$: 0, a: a}; }; var $elm$json$Json$Decode$OneOf = function (a) { - return {$: 'OneOf', a: a}; + return {$: 2, a: a}; }; -var $elm$core$Basics$False = {$: 'False'}; +var $elm$core$Basics$False = 1; var $elm$core$Basics$add = _Basics_add; var $elm$core$Maybe$Just = function (a) { - return {$: 'Just', a: a}; + return {$: 0, a: a}; }; -var $elm$core$Maybe$Nothing = {$: 'Nothing'}; +var $elm$core$Maybe$Nothing = {$: 1}; var $elm$core$String$all = _String_all; var $elm$core$Basics$and = _Basics_and; var $elm$core$Basics$append = _Utils_append; @@ -4638,12 +4638,12 @@ var $elm$json$Json$Decode$errorToStringHelp = F2( errorToStringHelp: while (true) { switch (error.$) { - case 'Field': + case 0: var f = error.a; var err = error.b; var isSimple = function () { var _v1 = $elm$core$String$uncons(f); - if (_v1.$ === 'Nothing') { + if (_v1.$ === 1) { return false; } else { var _v2 = _v1.a; @@ -4658,7 +4658,7 @@ var $elm$json$Json$Decode$errorToStringHelp = F2( error = $temp$error; context = $temp$context; continue errorToStringHelp; - case 'Index': + case 1: var i = error.a; var err = error.b; var indexName = '[' + ($elm$core$String$fromInt(i) + ']'); @@ -4667,7 +4667,7 @@ var $elm$json$Json$Decode$errorToStringHelp = F2( error = $temp$error; context = $temp$context; continue errorToStringHelp; - case 'OneOf': + case 2: var errors = error.a; if (!errors.b) { return 'Ran into a Json.Decode.oneOf with no possibilities' + function () { @@ -4731,7 +4731,7 @@ var $elm$json$Json$Decode$errorToStringHelp = F2( var $elm$core$Array$branchFactor = 32; var $elm$core$Array$Array_elm_builtin = F4( function (a, b, c, d) { - return {$: 'Array_elm_builtin', a: a, b: b, c: c, d: d}; + return {$: 0, a: a, b: b, c: c, d: d}; }); var $elm$core$Elm$JsArray$empty = _JsArray_empty; var $elm$core$Basics$ceiling = _Basics_ceiling; @@ -4746,7 +4746,7 @@ var $elm$core$Array$shiftStep = $elm$core$Basics$ceiling( var $elm$core$Array$empty = A4($elm$core$Array$Array_elm_builtin, 0, $elm$core$Array$shiftStep, $elm$core$Elm$JsArray$empty, $elm$core$Elm$JsArray$empty); var $elm$core$Elm$JsArray$initialize = _JsArray_initialize; var $elm$core$Array$Leaf = function (a) { - return {$: 'Leaf', a: a}; + return {$: 1, a: a}; }; var $elm$core$Basics$apL = F2( function (f, x) { @@ -4766,7 +4766,7 @@ var $elm$core$Basics$max = F2( }); var $elm$core$Basics$mul = _Basics_mul; var $elm$core$Array$SubTree = function (a) { - return {$: 'SubTree', a: a}; + return {$: 0, a: a}; }; var $elm$core$Elm$JsArray$initializeFromList = _JsArray_initializeFromList; var $elm$core$Array$compressNodes = F2( @@ -4813,25 +4813,25 @@ var $elm$core$Array$treeFromBuilder = F2( }); var $elm$core$Array$builderToArray = F2( function (reverseNodeList, builder) { - if (!builder.nodeListSize) { + if (!builder.t) { return A4( $elm$core$Array$Array_elm_builtin, - $elm$core$Elm$JsArray$length(builder.tail), + $elm$core$Elm$JsArray$length(builder.x), $elm$core$Array$shiftStep, $elm$core$Elm$JsArray$empty, - builder.tail); + builder.x); } else { - var treeLen = builder.nodeListSize * $elm$core$Array$branchFactor; + var treeLen = builder.t * $elm$core$Array$branchFactor; var depth = $elm$core$Basics$floor( A2($elm$core$Basics$logBase, $elm$core$Array$branchFactor, treeLen - 1)); - var correctNodeList = reverseNodeList ? $elm$core$List$reverse(builder.nodeList) : builder.nodeList; - var tree = A2($elm$core$Array$treeFromBuilder, correctNodeList, builder.nodeListSize); + var correctNodeList = reverseNodeList ? $elm$core$List$reverse(builder.y) : builder.y; + var tree = A2($elm$core$Array$treeFromBuilder, correctNodeList, builder.t); return A4( $elm$core$Array$Array_elm_builtin, - $elm$core$Elm$JsArray$length(builder.tail) + treeLen, + $elm$core$Elm$JsArray$length(builder.x) + treeLen, A2($elm$core$Basics$max, 5, depth * $elm$core$Array$shiftStep), tree, - builder.tail); + builder.x); } }); var $elm$core$Basics$idiv = _Basics_idiv; @@ -4844,7 +4844,7 @@ var $elm$core$Array$initializeHelp = F5( return A2( $elm$core$Array$builderToArray, false, - {nodeList: nodeList, nodeListSize: (len / $elm$core$Array$branchFactor) | 0, tail: tail}); + {y: nodeList, t: (len / $elm$core$Array$branchFactor) | 0, x: tail}); } else { var leaf = $elm$core$Array$Leaf( A3($elm$core$Elm$JsArray$initialize, $elm$core$Array$branchFactor, fromIndex, fn)); @@ -4874,9 +4874,9 @@ var $elm$core$Array$initialize = F2( return A5($elm$core$Array$initializeHelp, fn, initialFromIndex, len, _List_Nil, tail); } }); -var $elm$core$Basics$True = {$: 'True'}; +var $elm$core$Basics$True = 0; var $elm$core$Result$isOk = function (result) { - if (result.$ === 'Ok') { + if (!result.$) { return true; } else { return false; @@ -4887,33 +4887,31 @@ var $elm$json$Json$Decode$map2 = _Json_map2; var $elm$json$Json$Decode$succeed = _Json_succeed; var $elm$virtual_dom$VirtualDom$toHandlerInt = function (handler) { switch (handler.$) { - case 'Normal': + case 0: return 0; - case 'MayStopPropagation': + case 1: return 1; - case 'MayPreventDefault': + case 2: return 2; default: return 3; } }; var $elm$browser$Browser$External = function (a) { - return {$: 'External', a: a}; + return {$: 1, a: a}; }; var $elm$browser$Browser$Internal = function (a) { - return {$: 'Internal', a: a}; + return {$: 0, a: a}; }; var $elm$core$Basics$identity = function (x) { return x; }; -var $elm$browser$Browser$Dom$NotFound = function (a) { - return {$: 'NotFound', a: a}; -}; -var $elm$url$Url$Http = {$: 'Http'}; -var $elm$url$Url$Https = {$: 'Https'}; +var $elm$browser$Browser$Dom$NotFound = $elm$core$Basics$identity; +var $elm$url$Url$Http = 0; +var $elm$url$Url$Https = 1; var $elm$url$Url$Url = F6( function (protocol, host, port_, path, query, fragment) { - return {fragment: fragment, host: host, path: path, port_: port_, protocol: protocol, query: query}; + return {b_: fragment, b4: host, z: path, cz: port_, cF: protocol, cG: query}; }); var $elm$core$String$contains = _String_contains; var $elm$core$String$length = _String_length; @@ -4949,7 +4947,7 @@ var $elm$url$Url$chompBeforePath = F5( var i = _v0.a; var _v1 = $elm$core$String$toInt( A2($elm$core$String$dropLeft, i + 1, str)); - if (_v1.$ === 'Nothing') { + if (_v1.$ === 1) { return $elm$core$Maybe$Nothing; } else { var port_ = _v1; @@ -5032,26 +5030,24 @@ var $elm$core$String$startsWith = _String_startsWith; var $elm$url$Url$fromString = function (str) { return A2($elm$core$String$startsWith, 'http://', str) ? A2( $elm$url$Url$chompAfterProtocol, - $elm$url$Url$Http, + 0, A2($elm$core$String$dropLeft, 7, str)) : (A2($elm$core$String$startsWith, 'https://', str) ? A2( $elm$url$Url$chompAfterProtocol, - $elm$url$Url$Https, + 1, A2($elm$core$String$dropLeft, 8, str)) : $elm$core$Maybe$Nothing); }; var $elm$core$Basics$never = function (_v0) { never: while (true) { - var nvr = _v0.a; + var nvr = _v0; var $temp$_v0 = nvr; _v0 = $temp$_v0; continue never; } }; -var $elm$core$Task$Perform = function (a) { - return {$: 'Perform', a: a}; -}; +var $elm$core$Task$Perform = $elm$core$Basics$identity; var $elm$core$Task$succeed = _Scheduler_succeed; -var $elm$core$Task$init = $elm$core$Task$succeed(_Utils_Tuple0); +var $elm$core$Task$init = $elm$core$Task$succeed(0); var $elm$core$List$foldrHelper = F4( function (fn, acc, ctr, ls) { if (!ls.b) { @@ -5157,7 +5153,7 @@ var $elm$core$Task$sequence = function (tasks) { var $elm$core$Platform$sendToApp = _Platform_sendToApp; var $elm$core$Task$spawnCmd = F2( function (router, _v0) { - var task = _v0.a; + var task = _v0; return _Scheduler_spawn( A2( $elm$core$Task$andThen, @@ -5169,7 +5165,7 @@ var $elm$core$Task$onEffects = F3( return A2( $elm$core$Task$map, function (_v0) { - return _Utils_Tuple0; + return 0; }, $elm$core$Task$sequence( A2( @@ -5179,28 +5175,26 @@ var $elm$core$Task$onEffects = F3( }); var $elm$core$Task$onSelfMsg = F3( function (_v0, _v1, _v2) { - return $elm$core$Task$succeed(_Utils_Tuple0); + return $elm$core$Task$succeed(0); }); var $elm$core$Task$cmdMap = F2( function (tagger, _v0) { - var task = _v0.a; - return $elm$core$Task$Perform( - A2($elm$core$Task$map, tagger, task)); + var task = _v0; + return A2($elm$core$Task$map, tagger, task); }); _Platform_effectManagers['Task'] = _Platform_createManager($elm$core$Task$init, $elm$core$Task$onEffects, $elm$core$Task$onSelfMsg, $elm$core$Task$cmdMap); var $elm$core$Task$command = _Platform_leaf('Task'); var $elm$core$Task$perform = F2( function (toMessage, task) { return $elm$core$Task$command( - $elm$core$Task$Perform( - A2($elm$core$Task$map, toMessage, task))); + A2($elm$core$Task$map, toMessage, task)); }); var $elm$browser$Browser$element = _Browser_element; var $author$project$Main$Editor = function (a) { - return {$: 'Editor', a: a}; + return {$: 0, a: a}; }; var $author$project$Main$PortOutgoingFormFields = function (a) { - return {$: 'PortOutgoingFormFields', a: a}; + return {$: 0, a: a}; }; var $elm$core$List$append = F2( function (xs, ys) { @@ -5221,7 +5215,7 @@ var $elm$core$List$concatMap = F2( var $elm$core$List$maybeCons = F3( function (f, mx, xs) { var _v0 = f(mx); - if (_v0.$ === 'Just') { + if (!_v0.$) { var x = _v0.a; return A2($elm$core$List$cons, x, xs); } else { @@ -5240,7 +5234,7 @@ var $author$project$Main$allCustomElementsFromGroups = function (groups) { return A2( $elm$core$List$filterMap, function (inputField) { - if (inputField.$ === 'ShortText') { + if (!inputField.$) { var customElement = inputField.a; return $elm$core$Maybe$Just(customElement); } else { @@ -5250,33 +5244,33 @@ var $author$project$Main$allCustomElementsFromGroups = function (groups) { A2( $elm$core$List$concatMap, function ($) { - return $.fields; + return $.aM; }, groups)); }; var $elm$core$Platform$Cmd$batch = _Platform_batch; var $author$project$Main$Config = F4( function (viewMode, formFields, formValues, inputFieldGroups) { - return {formFields: formFields, formValues: formValues, inputFieldGroups: inputFieldGroups, viewMode: viewMode}; + return {g: formFields, ba: formValues, T: inputFieldGroups, ad: viewMode}; }); var $elm_community$json_extra$Json$Decode$Extra$andMap = $elm$json$Json$Decode$map2($elm$core$Basics$apR); var $author$project$Main$ShortText = function (a) { - return {$: 'ShortText', a: a}; + return {$: 0, a: a}; }; var $author$project$Main$AttributeGiven = function (a) { - return {$: 'AttributeGiven', a: a}; + return {$: 2, a: a}; }; var $author$project$Main$ChooseMultiple = function (a) { - return {$: 'ChooseMultiple', a: a}; + return {$: 4, a: a}; }; var $author$project$Main$ChooseOne = function (a) { - return {$: 'ChooseOne', a: a}; + return {$: 3, a: a}; }; var $author$project$Main$Dropdown = function (a) { - return {$: 'Dropdown', a: a}; + return {$: 2, a: a}; }; var $author$project$Main$LongText = function (a) { - return {$: 'LongText', a: a}; + return {$: 1, a: a}; }; var $author$project$Main$choiceDelimiter = ' | '; var $elm$core$String$trim = _String_trim; @@ -5286,8 +5280,8 @@ var $author$project$Main$choiceFromString = function (s) { if (!_v0.b.b) { var value = _v0.a; return { - label: value, - value: $elm$core$String$trim(value) + d: value, + j: $elm$core$String$trim(value) }; } else { if (!_v0.b.b.b) { @@ -5295,22 +5289,22 @@ var $author$project$Main$choiceFromString = function (s) { var _v1 = _v0.b; var label = _v1.a; return { - label: label, - value: $elm$core$String$trim(value) + d: label, + j: $elm$core$String$trim(value) }; } else { var value = _v0.a; var labels = _v0.b; return { - label: A2($elm$core$String$join, $author$project$Main$choiceDelimiter, labels), - value: $elm$core$String$trim(value) + d: A2($elm$core$String$join, $author$project$Main$choiceDelimiter, labels), + j: $elm$core$String$trim(value) }; } } } else { return { - label: s, - value: $elm$core$String$trim(s) + d: s, + j: $elm$core$String$trim(s) }; } }; @@ -5318,43 +5312,43 @@ var $author$project$Main$allInputField = _List_fromArray( [ $author$project$Main$Dropdown( { - choices: A2( + k: A2( $elm$core$List$map, $author$project$Main$choiceFromString, _List_fromArray( ['Red', 'Orange', 'Yellow', 'Green', 'Blue', 'Indigo', 'Violet'])), - filter: $elm$core$Maybe$Nothing + e: $elm$core$Maybe$Nothing }), $author$project$Main$ChooseOne( { - choices: A2( + k: A2( $elm$core$List$map, $author$project$Main$choiceFromString, _List_fromArray( ['Yes', 'No'])), - filter: $elm$core$Maybe$Nothing + e: $elm$core$Maybe$Nothing }), $author$project$Main$ChooseMultiple( { - choices: A2( + k: A2( $elm$core$List$map, $author$project$Main$choiceFromString, _List_fromArray( ['Apple', 'Banana', 'Cantaloupe', 'Durian'])), - filter: $elm$core$Maybe$Nothing, - maxAllowed: $elm$core$Maybe$Nothing, - minRequired: $elm$core$Maybe$Nothing + e: $elm$core$Maybe$Nothing, + U: $elm$core$Maybe$Nothing, + P: $elm$core$Maybe$Nothing }), $author$project$Main$LongText( $author$project$Main$AttributeGiven(160)) ]); var $author$project$Main$InputFieldGroup = F2( function (heading, fields) { - return {fields: fields, heading: heading}; + return {aM: fields, aY: heading}; }); var $elm$json$Json$Decode$andThen = _Json_andThen; var $author$project$Main$AttributeNotNeeded = function (a) { - return {$: 'AttributeNotNeeded', a: a}; + return {$: 0, a: a}; }; var $elm$json$Json$Decode$null = _Json_decodeNull; var $elm$json$Json$Decode$oneOf = _Json_oneOf; @@ -5378,10 +5372,10 @@ var $author$project$Main$decodeAttributeOptional = F2( var $elm$json$Json$Decode$string = _Json_decodeString; var $author$project$Main$decodeChoice = A2($elm$json$Json$Decode$map, $author$project$Main$choiceFromString, $elm$json$Json$Decode$string); var $author$project$Main$FilterContainsFieldValueOf = function (a) { - return {$: 'FilterContainsFieldValueOf', a: a}; + return {$: 1, a: a}; }; var $author$project$Main$FilterStartsWithFieldValueOf = function (a) { - return {$: 'FilterStartsWithFieldValueOf', a: a}; + return {$: 0, a: a}; }; var $elm$json$Json$Decode$fail = _Json_fail; var $elm$json$Json$Decode$field = _Json_decodeField; @@ -5406,26 +5400,26 @@ var $author$project$Main$decodeChoiceFilter = A2( A2($elm$json$Json$Decode$field, 'type', $elm$json$Json$Decode$string)); var $author$project$Main$RawCustomElement = F3( function (inputType, inputTag, attributes) { - return {attributes: attributes, inputTag: inputTag, inputType: inputType}; + return {q: attributes, O: inputTag, C: inputType}; }); var $author$project$Main$defaultInputTag = 'input'; -var $elm$core$Dict$RBEmpty_elm_builtin = {$: 'RBEmpty_elm_builtin'}; +var $elm$core$Dict$RBEmpty_elm_builtin = {$: -2}; var $elm$core$Dict$empty = $elm$core$Dict$RBEmpty_elm_builtin; -var $elm$core$Dict$Black = {$: 'Black'}; +var $elm$core$Dict$Black = 1; var $elm$core$Dict$RBNode_elm_builtin = F5( function (a, b, c, d, e) { - return {$: 'RBNode_elm_builtin', a: a, b: b, c: c, d: d, e: e}; + return {$: -1, a: a, b: b, c: c, d: d, e: e}; }); -var $elm$core$Dict$Red = {$: 'Red'}; +var $elm$core$Dict$Red = 0; var $elm$core$Dict$balance = F5( function (color, key, value, left, right) { - if ((right.$ === 'RBNode_elm_builtin') && (right.a.$ === 'Red')) { + if ((right.$ === -1) && (!right.a)) { var _v1 = right.a; var rK = right.b; var rV = right.c; var rLeft = right.d; var rRight = right.e; - if ((left.$ === 'RBNode_elm_builtin') && (left.a.$ === 'Red')) { + if ((left.$ === -1) && (!left.a)) { var _v3 = left.a; var lK = left.b; var lV = left.c; @@ -5433,22 +5427,22 @@ var $elm$core$Dict$balance = F5( var lRight = left.e; return A5( $elm$core$Dict$RBNode_elm_builtin, - $elm$core$Dict$Red, + 0, key, value, - A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Black, lK, lV, lLeft, lRight), - A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Black, rK, rV, rLeft, rRight)); + A5($elm$core$Dict$RBNode_elm_builtin, 1, lK, lV, lLeft, lRight), + A5($elm$core$Dict$RBNode_elm_builtin, 1, rK, rV, rLeft, rRight)); } else { return A5( $elm$core$Dict$RBNode_elm_builtin, color, rK, rV, - A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Red, key, value, left, rLeft), + A5($elm$core$Dict$RBNode_elm_builtin, 0, key, value, left, rLeft), rRight); } } else { - if ((((left.$ === 'RBNode_elm_builtin') && (left.a.$ === 'Red')) && (left.d.$ === 'RBNode_elm_builtin')) && (left.d.a.$ === 'Red')) { + if ((((left.$ === -1) && (!left.a)) && (left.d.$ === -1)) && (!left.d.a)) { var _v5 = left.a; var lK = left.b; var lV = left.c; @@ -5461,11 +5455,11 @@ var $elm$core$Dict$balance = F5( var lRight = left.e; return A5( $elm$core$Dict$RBNode_elm_builtin, - $elm$core$Dict$Red, + 0, lK, lV, - A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Black, llK, llV, llLeft, llRight), - A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Black, key, value, lRight, right)); + A5($elm$core$Dict$RBNode_elm_builtin, 1, llK, llV, llLeft, llRight), + A5($elm$core$Dict$RBNode_elm_builtin, 1, key, value, lRight, right)); } else { return A5($elm$core$Dict$RBNode_elm_builtin, color, key, value, left, right); } @@ -5474,8 +5468,8 @@ var $elm$core$Dict$balance = F5( var $elm$core$Basics$compare = _Utils_compare; var $elm$core$Dict$insertHelp = F3( function (key, value, dict) { - if (dict.$ === 'RBEmpty_elm_builtin') { - return A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Red, key, value, $elm$core$Dict$RBEmpty_elm_builtin, $elm$core$Dict$RBEmpty_elm_builtin); + if (dict.$ === -2) { + return A5($elm$core$Dict$RBNode_elm_builtin, 0, key, value, $elm$core$Dict$RBEmpty_elm_builtin, $elm$core$Dict$RBEmpty_elm_builtin); } else { var nColor = dict.a; var nKey = dict.b; @@ -5483,8 +5477,8 @@ var $elm$core$Dict$insertHelp = F3( var nLeft = dict.d; var nRight = dict.e; var _v1 = A2($elm$core$Basics$compare, key, nKey); - switch (_v1.$) { - case 'LT': + switch (_v1) { + case 0: return A5( $elm$core$Dict$balance, nColor, @@ -5492,7 +5486,7 @@ var $elm$core$Dict$insertHelp = F3( nValue, A3($elm$core$Dict$insertHelp, key, value, nLeft), nRight); - case 'EQ': + case 1: return A5($elm$core$Dict$RBNode_elm_builtin, nColor, nKey, value, nLeft, nRight); default: return A5( @@ -5508,13 +5502,13 @@ var $elm$core$Dict$insertHelp = F3( var $elm$core$Dict$insert = F3( function (key, value, dict) { var _v0 = A3($elm$core$Dict$insertHelp, key, value, dict); - if ((_v0.$ === 'RBNode_elm_builtin') && (_v0.a.$ === 'Red')) { + if ((_v0.$ === -1) && (!_v0.a)) { var _v1 = _v0.a; var k = _v0.b; var v = _v0.c; var l = _v0.d; var r = _v0.e; - return A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Black, k, v, l, r); + return A5($elm$core$Dict$RBNode_elm_builtin, 1, k, v, l, r); } else { var x = _v0; return x; @@ -5533,13 +5527,13 @@ var $elm$core$Dict$fromList = function (assocs) { assocs); }; var $author$project$Main$AttributeInvalid = function (a) { - return {$: 'AttributeInvalid', a: a}; + return {$: 1, a: a}; }; var $elm$core$Dict$foldl = F3( function (func, acc, dict) { foldl: while (true) { - if (dict.$ === 'RBEmpty_elm_builtin') { + if (dict.$ === -2) { return acc; } else { var key = dict.b; @@ -5575,7 +5569,7 @@ var $elm$core$Dict$get = F2( function (targetKey, dict) { get: while (true) { - if (dict.$ === 'RBEmpty_elm_builtin') { + if (dict.$ === -2) { return $elm$core$Maybe$Nothing; } else { var key = dict.b; @@ -5583,14 +5577,14 @@ var $elm$core$Dict$get = F2( var left = dict.d; var right = dict.e; var _v1 = A2($elm$core$Basics$compare, targetKey, key); - switch (_v1.$) { - case 'LT': + switch (_v1) { + case 0: var $temp$targetKey = targetKey, $temp$dict = left; targetKey = $temp$targetKey; dict = $temp$dict; continue get; - case 'EQ': + case 1: return $elm$core$Maybe$Just(value); default: var $temp$targetKey = targetKey, @@ -5605,16 +5599,16 @@ var $elm$core$Dict$get = F2( var $elm$core$Basics$neq = _Utils_notEqual; var $author$project$Main$fromRawCustomElement = function (ele) { return { - attributes: A2( + q: A2( $elm$core$Dict$filter, F2( function (k, _v0) { return k !== 'list'; }), - ele.attributes), - datalist: function () { - var _v1 = A2($elm$core$Dict$get, 'list', ele.attributes); - if (_v1.$ === 'Just') { + ele.q), + af: function () { + var _v1 = A2($elm$core$Dict$get, 'list', ele.q); + if (!_v1.$) { var s = _v1.a; var _v2 = A2( $elm$core$String$split, @@ -5631,11 +5625,11 @@ var $author$project$Main$fromRawCustomElement = function (ele) { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } }(), - inputTag: ele.inputTag, - inputType: ele.inputType, - max: function () { - var _v3 = A2($elm$core$Dict$get, 'max', ele.attributes); - if (_v3.$ === 'Just') { + O: ele.O, + C: ele.C, + aq: function () { + var _v3 = A2($elm$core$Dict$get, 'max', ele.q); + if (!_v3.$) { if (_v3.a === '') { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } else { @@ -5646,15 +5640,15 @@ var $author$project$Main$fromRawCustomElement = function (ele) { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } }(), - maxlength: function () { - var _v4 = A2($elm$core$Dict$get, 'maxlength', ele.attributes); - if (_v4.$ === 'Just') { + ai: function () { + var _v4 = A2($elm$core$Dict$get, 'maxlength', ele.q); + if (!_v4.$) { if (_v4.a === '') { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } else { var value = _v4.a; var _v5 = $elm$core$String$toInt(value); - if (_v5.$ === 'Just') { + if (!_v5.$) { var _int = _v5.a; return $author$project$Main$AttributeGiven(_int); } else { @@ -5665,9 +5659,9 @@ var $author$project$Main$fromRawCustomElement = function (ele) { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } }(), - min: function () { - var _v6 = A2($elm$core$Dict$get, 'min', ele.attributes); - if (_v6.$ === 'Just') { + ar: function () { + var _v6 = A2($elm$core$Dict$get, 'min', ele.q); + if (!_v6.$) { if (_v6.a === '') { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } else { @@ -5678,9 +5672,9 @@ var $author$project$Main$fromRawCustomElement = function (ele) { return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); } }(), - multiple: function () { - var _v7 = A2($elm$core$Dict$get, 'multiple', ele.attributes); - if (_v7.$ === 'Just') { + aO: function () { + var _v7 = A2($elm$core$Dict$get, 'multiple', ele.q); + if (!_v7.$) { switch (_v7.a) { case '': return $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); @@ -5708,7 +5702,7 @@ var $elm_community$json_extra$Json$Decode$Extra$optionalField = F2( $elm$json$Json$Decode$decodeValue, A2($elm$json$Json$Decode$field, fieldName, $elm$json$Json$Decode$value), json); - if (_v0.$ === 'Ok') { + if (!_v0.$) { var val = _v0.a; return A2( $elm$json$Json$Decode$map, @@ -5722,7 +5716,7 @@ var $elm_community$json_extra$Json$Decode$Extra$optionalField = F2( }); var $elm$core$Maybe$withDefault = F2( function (_default, maybe) { - if (maybe.$ === 'Just') { + if (!maybe.$) { var value = maybe.a; return value; } else { @@ -5793,7 +5787,7 @@ var $author$project$Main$decodeInputField = A2( F2( function (choices, filter) { return $author$project$Main$Dropdown( - {choices: choices, filter: filter}); + {k: choices, e: filter}); })))); case 'ChooseOne': return A2( @@ -5810,7 +5804,7 @@ var $author$project$Main$decodeInputField = A2( F2( function (choices, filter) { return $author$project$Main$ChooseOne( - {choices: choices, filter: filter}); + {k: choices, e: filter}); })))); case 'ChooseMultiple': return A2( @@ -5835,7 +5829,7 @@ var $author$project$Main$decodeInputField = A2( F4( function (choices, minRequired, maxAllowed, filter) { return $author$project$Main$ChooseMultiple( - {choices: choices, filter: filter, maxAllowed: maxAllowed, minRequired: minRequired}); + {k: choices, e: filter, U: maxAllowed, P: minRequired}); })))))); default: return $elm$json$Json$Decode$fail('Unknown input field type: ' + type_); @@ -5895,7 +5889,7 @@ var $author$project$Main$decodeShortTextTypeList = function () { var inputTag = _v1.a; var attributes = _v1.b; return $author$project$Main$fromRawCustomElement( - {attributes: attributes, inputTag: inputTag, inputType: inputType}); + {q: attributes, O: inputTag, C: inputType}); }, $elm$core$Dict$toList(dict)); }; @@ -5952,7 +5946,7 @@ var $elm$core$List$member = F2( var $elm$core$Basics$not = _Basics_not; var $elm$core$Maybe$andThen = F2( function (callback, maybeValue) { - if (maybeValue.$ === 'Just') { + if (!maybeValue.$) { var value = maybeValue.a; return callback(value); } else { @@ -5982,13 +5976,13 @@ var $author$project$Main$decodeConfigInputFieldGroups = function () { [ $author$project$Main$fromRawCustomElement( { - attributes: $elm$core$Dict$fromList( + q: $elm$core$Dict$fromList( _List_fromArray( [ _Utils_Tuple2('type', 'text') ])), - inputTag: $author$project$Main$defaultInputTag, - inputType: 'Single-line free text' + O: $author$project$Main$defaultInputTag, + C: 'Single-line free text' }) ]); var fromShortTextTypeList = function (shortTextTypes) { @@ -6003,10 +5997,10 @@ var $author$project$Main$decodeConfigInputFieldGroups = function () { return _List_fromArray( [ { - fields: _Utils_ap( + aM: _Utils_ap( $author$project$Main$allInputField, A2($elm$core$List$map, $author$project$Main$ShortText, effectiveList)), - heading: '' + aY: '' } ]); }; @@ -6025,7 +6019,7 @@ var $author$project$Main$decodeConfigInputFieldGroups = function () { }(); var $author$project$Main$FormField = F6( function (label, name, presence, description, type_, visibilityRule) { - return {description: description, label: label, name: name, presence: presence, type_: type_, visibilityRule: visibilityRule}; + return {S: description, d: label, Q: name, p: presence, a: type_, m: visibilityRule}; }); var $elm$json$Json$Decode$at = F2( function (fields, decoder) { @@ -6069,19 +6063,19 @@ var $author$project$Main$decodeFormFieldMaybeName = $elm$json$Json$Decode$oneOf( A2($elm$json$Json$Decode$field, 'name', $elm$json$Json$Decode$string)), $elm$json$Json$Decode$succeed($elm$core$Maybe$Nothing) ])); -var $author$project$Main$Optional = {$: 'Optional'}; -var $author$project$Main$System = {$: 'System'}; -var $author$project$Main$Required = {$: 'Required'}; +var $author$project$Main$Optional = 1; +var $author$project$Main$System = 2; +var $author$project$Main$Required = 0; var $author$project$Main$decodePresenceString = A2( $elm$json$Json$Decode$andThen, function (str) { switch (str) { case 'Required': - return $elm$json$Json$Decode$succeed($author$project$Main$Required); + return $elm$json$Json$Decode$succeed(0); case 'Optional': - return $elm$json$Json$Decode$succeed($author$project$Main$Optional); + return $elm$json$Json$Decode$succeed(1); case 'System': - return $elm$json$Json$Decode$succeed($author$project$Main$System); + return $elm$json$Json$Decode$succeed(2); default: return $elm$json$Json$Decode$fail('Unknown presence: ' + str); } @@ -6096,11 +6090,11 @@ var $author$project$Main$decodePresence = $elm$json$Json$Decode$oneOf( function (type_) { switch (type_) { case 'System': - return $elm$json$Json$Decode$succeed($author$project$Main$System); + return $elm$json$Json$Decode$succeed(2); case 'SystemRequired': - return $elm$json$Json$Decode$succeed($author$project$Main$System); + return $elm$json$Json$Decode$succeed(2); case 'SystemOptional': - return $elm$json$Json$Decode$succeed($author$project$Main$Optional); + return $elm$json$Json$Decode$succeed(1); default: return $elm$json$Json$Decode$fail('Unknown presence type: ' + type_); } @@ -6111,33 +6105,33 @@ var $elm$json$Json$Decode$bool = _Json_decodeBool; var $author$project$Main$decodeRequired = A2( $elm$json$Json$Decode$map, function (b) { - return b ? $author$project$Main$Required : $author$project$Main$Optional; + return b ? 0 : 1; }, A2($elm$json$Json$Decode$field, 'required', $elm$json$Json$Decode$bool)); var $author$project$Main$HideWhen = function (a) { - return {$: 'HideWhen', a: a}; + return {$: 1, a: a}; }; var $author$project$Main$ShowWhen = function (a) { - return {$: 'ShowWhen', a: a}; + return {$: 0, a: a}; }; var $author$project$Main$Field = F2( function (a, b) { - return {$: 'Field', a: a, b: b}; + return {$: 0, a: a, b: b}; }); var $author$project$Main$EndsWith = function (a) { - return {$: 'EndsWith', a: a}; + return {$: 2, a: a}; }; var $author$project$Main$Equals = function (a) { - return {$: 'Equals', a: a}; + return {$: 0, a: a}; }; var $author$project$Main$EqualsField = function (a) { - return {$: 'EqualsField', a: a}; + return {$: 4, a: a}; }; var $author$project$Main$GreaterThan = function (a) { - return {$: 'GreaterThan', a: a}; + return {$: 3, a: a}; }; var $author$project$Main$StringContains = function (a) { - return {$: 'StringContains', a: a}; + return {$: 1, a: a}; }; var $author$project$Main$decodeComparison = A2( $elm$json$Json$Decode$andThen, @@ -6257,7 +6251,7 @@ var $elm$core$Array$fromListHelp = F3( return A2( $elm$core$Array$builderToArray, true, - {nodeList: nodeList, nodeListSize: nodeListSize, tail: jsArray}); + {y: nodeList, t: nodeListSize, x: jsArray}); } else { var $temp$list = remainingItems, $temp$nodeList = A2( @@ -6285,20 +6279,20 @@ var $author$project$Main$decodeFormFields = A2( $elm$json$Json$Decode$list($author$project$Main$decodeFormField)); var $elm_community$json_extra$Json$Decode$Extra$fromMaybe = F2( function (error, val) { - if (val.$ === 'Just') { + if (!val.$) { var v = val.a; return $elm$json$Json$Decode$succeed(v); } else { return $elm$json$Json$Decode$fail(error); } }); -var $author$project$Main$CollectData = {$: 'CollectData'}; +var $author$project$Main$CollectData = {$: 1}; var $author$project$Main$viewModeFromString = function (str) { switch (str) { case 'Editor': return $elm$core$Maybe$Just( $author$project$Main$Editor( - {maybeAnimate: $elm$core$Maybe$Nothing})); + {aC: $elm$core$Maybe$Nothing})); case 'CollectData': return $elm$core$Maybe$Just($author$project$Main$CollectData); default: @@ -6331,7 +6325,7 @@ var $author$project$Main$decodeConfig = A2( $elm$json$Json$Decode$map, $elm$core$Maybe$withDefault( $author$project$Main$Editor( - {maybeAnimate: $elm$core$Maybe$Nothing})), + {aC: $elm$core$Maybe$Nothing})), A2($elm_community$json_extra$Json$Decode$Extra$optionalNullableField, 'viewMode', $author$project$Main$decodeViewMode)), $elm$json$Json$Decode$succeed($author$project$Main$Config))))); var $elm$core$List$singleton = function (value) { @@ -6349,9 +6343,9 @@ var $author$project$Main$decodeListOrSingleton = function (decoder) { var $author$project$Main$encodeAttributeOptional = F2( function (encodeValue, attributeOptional) { switch (attributeOptional.$) { - case 'AttributeNotNeeded': + case 0: return $elm$json$Json$Encode$null; - case 'AttributeInvalid': + case 1: return $elm$json$Json$Encode$null; default: var value = attributeOptional.a; @@ -6360,10 +6354,10 @@ var $author$project$Main$encodeAttributeOptional = F2( }); var $author$project$Main$choiceToString = function (choice) { return _Utils_eq( - $elm$core$String$trim(choice.label), - $elm$core$String$trim(choice.value)) ? choice.label : _Utils_ap( - choice.value, - _Utils_ap($author$project$Main$choiceDelimiter, choice.label)); + $elm$core$String$trim(choice.d), + $elm$core$String$trim(choice.j)) ? choice.d : _Utils_ap( + choice.j, + _Utils_ap($author$project$Main$choiceDelimiter, choice.d)); }; var $elm$json$Json$Encode$string = _Json_wrap; var $author$project$Main$encodeChoice = function (choice) { @@ -6380,11 +6374,11 @@ var $elm$json$Json$Encode$object = function (pairs) { var v = _v0.b; return A3(_Json_addField, k, v, obj); }), - _Json_emptyObject(_Utils_Tuple0), + _Json_emptyObject(0), pairs)); }; var $author$project$Main$encodeChoiceFilter = function (filter) { - if (filter.$ === 'FilterStartsWithFieldValueOf') { + if (!filter.$) { var fieldName = filter.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6419,17 +6413,17 @@ var $elm$core$Tuple$mapSecond = F2( func(y)); }); var $author$project$Main$encodePairsFromRawCustomElements = function (customElement) { - var inputTagAttrs = _Utils_eq(customElement.inputTag, $author$project$Main$defaultInputTag) ? _List_Nil : _List_fromArray( + var inputTagAttrs = _Utils_eq(customElement.O, $author$project$Main$defaultInputTag) ? _List_Nil : _List_fromArray( [ _Utils_Tuple2( 'inputTag', - $elm$json$Json$Encode$string(customElement.inputTag)) + $elm$json$Json$Encode$string(customElement.O)) ]); var encodedAttrs = function () { var _v0 = A2( $elm$core$List$map, $elm$core$Tuple$mapSecond($elm$json$Json$Encode$string), - $elm$core$Dict$toList(customElement.attributes)); + $elm$core$Dict$toList(customElement.q)); if (!_v0.b) { return _List_Nil; } else { @@ -6446,13 +6440,13 @@ var $author$project$Main$encodePairsFromRawCustomElements = function (customElem $elm$core$List$cons, _Utils_Tuple2( 'inputType', - $elm$json$Json$Encode$string(customElement.inputType)), + $elm$json$Json$Encode$string(customElement.C)), _Utils_ap(inputTagAttrs, encodedAttrs)); }; var $author$project$Main$toRawCustomElement = function (ele) { var addMultipleIfGiven = function (dict) { - var _v7 = ele.multiple; - if (_v7.$ === 'AttributeGiven') { + var _v7 = ele.aO; + if (_v7.$ === 2) { if (_v7.a) { return A3($elm$core$Dict$insert, 'multiple', 'true', dict); } else { @@ -6469,8 +6463,8 @@ var $author$project$Main$toRawCustomElement = function (ele) { } }; var addMinIfGiven = function (dict) { - var _v5 = ele.min; - if (_v5.$ === 'AttributeGiven') { + var _v5 = ele.ar; + if (_v5.$ === 2) { var value = _v5.a; return A3($elm$core$Dict$insert, 'min', value, dict); } else { @@ -6484,8 +6478,8 @@ var $author$project$Main$toRawCustomElement = function (ele) { } }; var addMaxLengthIfGiven = function (dict) { - var _v3 = ele.maxlength; - if (_v3.$ === 'AttributeGiven') { + var _v3 = ele.ai; + if (_v3.$ === 2) { var _int = _v3.a; return A3( $elm$core$Dict$insert, @@ -6503,8 +6497,8 @@ var $author$project$Main$toRawCustomElement = function (ele) { } }; var addMaxIfGiven = function (dict) { - var _v1 = ele.max; - if (_v1.$ === 'AttributeGiven') { + var _v1 = ele.aq; + if (_v1.$ === 2) { var value = _v1.a; return A3($elm$core$Dict$insert, 'max', value, dict); } else { @@ -6518,9 +6512,9 @@ var $author$project$Main$toRawCustomElement = function (ele) { } }; var addDatalistIfGiven = function (dict) { - var _v0 = ele.datalist; + var _v0 = ele.af; switch (_v0.$) { - case 'AttributeGiven': + case 2: var list = _v0.a; return A3( $elm$core$Dict$insert, @@ -6530,20 +6524,20 @@ var $author$project$Main$toRawCustomElement = function (ele) { '\n', A2($elm$core$List$map, $author$project$Main$choiceToString, list)), dict); - case 'AttributeInvalid': + case 1: return dict; default: return dict; } }; return { - attributes: addMaxIfGiven( + q: addMaxIfGiven( addMinIfGiven( addDatalistIfGiven( addMultipleIfGiven( - addMaxLengthIfGiven(ele.attributes))))), - inputTag: ele.inputTag, - inputType: ele.inputType + addMaxLengthIfGiven(ele.q))))), + O: ele.O, + C: ele.C }; }; var $author$project$Main$encodePairsFromCustomElement = function (customElement) { @@ -6557,12 +6551,12 @@ var $elm$json$Json$Encode$list = F2( A3( $elm$core$List$foldl, _Json_addEntry(func), - _Json_emptyArray(_Utils_Tuple0), + _Json_emptyArray(0), entries)); }); var $author$project$Main$encodeInputField = function (inputField) { switch (inputField.$) { - case 'ShortText': + case 0: var customElement = inputField.a; return $elm$json$Json$Encode$object( A2( @@ -6571,7 +6565,7 @@ var $author$project$Main$encodeInputField = function (inputField) { 'type', $elm$json$Json$Encode$string('ShortText')), $author$project$Main$encodePairsFromCustomElement(customElement))); - case 'LongText': + case 1: var optionalMaxLength = inputField.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6583,9 +6577,9 @@ var $author$project$Main$encodeInputField = function (inputField) { 'maxLength', A2($author$project$Main$encodeAttributeOptional, $elm$json$Json$Encode$int, optionalMaxLength)) ])); - case 'Dropdown': - var choices = inputField.a.choices; - var filter = inputField.a.filter; + case 2: + var choices = inputField.a.k; + var filter = inputField.a.e; return $elm$json$Json$Encode$object( _Utils_ap( _List_fromArray( @@ -6601,13 +6595,13 @@ var $author$project$Main$encodeInputField = function (inputField) { A2( $elm$core$List$filter, function (_v1) { - var value = _v1.value; + var value = _v1.j; return $elm$core$String$trim(value) !== ''; }, choices))) ]), function () { - if (filter.$ === 'Just') { + if (!filter.$) { var f = filter.a; return _List_fromArray( [ @@ -6619,9 +6613,9 @@ var $author$project$Main$encodeInputField = function (inputField) { return _List_Nil; } }())); - case 'ChooseOne': - var choices = inputField.a.choices; - var filter = inputField.a.filter; + case 3: + var choices = inputField.a.k; + var filter = inputField.a.e; return $elm$json$Json$Encode$object( _Utils_ap( _List_fromArray( @@ -6637,13 +6631,13 @@ var $author$project$Main$encodeInputField = function (inputField) { A2( $elm$core$List$filter, function (_v3) { - var value = _v3.value; + var value = _v3.j; return $elm$core$String$trim(value) !== ''; }, choices))) ]), function () { - if (filter.$ === 'Just') { + if (!filter.$) { var f = filter.a; return _List_fromArray( [ @@ -6656,10 +6650,10 @@ var $author$project$Main$encodeInputField = function (inputField) { } }())); default: - var choices = inputField.a.choices; - var minRequired = inputField.a.minRequired; - var maxAllowed = inputField.a.maxAllowed; - var filter = inputField.a.filter; + var choices = inputField.a.k; + var minRequired = inputField.a.P; + var maxAllowed = inputField.a.U; + var filter = inputField.a.e; return $elm$json$Json$Encode$object( _Utils_ap( _List_fromArray( @@ -6675,14 +6669,14 @@ var $author$project$Main$encodeInputField = function (inputField) { A2( $elm$core$List$filter, function (_v5) { - var value = _v5.value; + var value = _v5.j; return $elm$core$String$trim(value) !== ''; }, choices))) ]), _Utils_ap( function () { - if (minRequired.$ === 'Just') { + if (!minRequired.$) { var min = minRequired.a; return _List_fromArray( [ @@ -6696,7 +6690,7 @@ var $author$project$Main$encodeInputField = function (inputField) { }(), _Utils_ap( function () { - if (maxAllowed.$ === 'Just') { + if (!maxAllowed.$) { var max = maxAllowed.a; return _List_fromArray( [ @@ -6709,7 +6703,7 @@ var $author$project$Main$encodeInputField = function (inputField) { } }(), function () { - if (filter.$ === 'Just') { + if (!filter.$) { var f = filter.a; return _List_fromArray( [ @@ -6724,10 +6718,10 @@ var $author$project$Main$encodeInputField = function (inputField) { } }; var $author$project$Main$encodePresence = function (presence) { - switch (presence.$) { - case 'Required': + switch (presence) { + case 0: return $elm$json$Json$Encode$string('Required'); - case 'Optional': + case 1: return $elm$json$Json$Encode$string('Optional'); default: return $elm$json$Json$Encode$string('System'); @@ -6735,7 +6729,7 @@ var $author$project$Main$encodePresence = function (presence) { }; var $author$project$Main$encodeComparison = function (comparison) { switch (comparison.$) { - case 'Equals': + case 0: var value = comparison.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6747,7 +6741,7 @@ var $author$project$Main$encodeComparison = function (comparison) { 'value', $elm$json$Json$Encode$string(value)) ])); - case 'StringContains': + case 1: var value = comparison.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6759,7 +6753,7 @@ var $author$project$Main$encodeComparison = function (comparison) { 'value', $elm$json$Json$Encode$string(value)) ])); - case 'EndsWith': + case 2: var value = comparison.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6771,7 +6765,7 @@ var $author$project$Main$encodeComparison = function (comparison) { 'value', $elm$json$Json$Encode$string(value)) ])); - case 'GreaterThan': + case 3: var value = comparison.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6815,7 +6809,7 @@ var $author$project$Main$encodeCondition = function (condition) { ])); }; var $author$project$Main$encodeVisibilityRule = function (rule) { - if (rule.$ === 'ShowWhen') { + if (!rule.$) { var conditions = rule.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6859,12 +6853,12 @@ var $author$project$Main$encodeFormFields = function (formFields) { [ _Utils_Tuple2( 'label', - $elm$json$Json$Encode$string(formField.label)), + $elm$json$Json$Encode$string(formField.d)), _Utils_Tuple2( 'name', function () { - var _v0 = formField.name; - if (_v0.$ === 'Just') { + var _v0 = formField.Q; + if (!_v0.$) { var name = _v0.a; return $elm$json$Json$Encode$string(name); } else { @@ -6873,22 +6867,22 @@ var $author$project$Main$encodeFormFields = function (formFields) { }()), _Utils_Tuple2( 'presence', - $author$project$Main$encodePresence(formField.presence)), + $author$project$Main$encodePresence(formField.p)), _Utils_Tuple2( 'description', - A2($author$project$Main$encodeAttributeOptional, $elm$json$Json$Encode$string, formField.description)), + A2($author$project$Main$encodeAttributeOptional, $elm$json$Json$Encode$string, formField.S)), _Utils_Tuple2( 'type', - $author$project$Main$encodeInputField(formField.type_)), + $author$project$Main$encodeInputField(formField.a)), _Utils_Tuple2( 'visibilityRule', - A2($elm$json$Json$Encode$list, $author$project$Main$encodeVisibilityRule, formField.visibilityRule)) + A2($elm$json$Json$Encode$list, $author$project$Main$encodeVisibilityRule, formField.m)) ]))); }, $elm$core$Array$toList(formFields))); }; var $author$project$Main$encodePortOutgoingValue = function (value) { - if (value.$ === 'PortOutgoingFormFields') { + if (!value.$) { var formFields = value.a; return $elm$json$Json$Encode$object( _List_fromArray( @@ -6913,7 +6907,7 @@ var $author$project$Main$encodePortOutgoingValue = function (value) { } }; var $author$project$Main$fieldNameOf = function (formField) { - return A2($elm$core$Maybe$withDefault, formField.label, formField.name); + return A2($elm$core$Maybe$withDefault, formField.d, formField.Q); }; var $elm$core$Array$filter = F2( function (isGood, array) { @@ -6929,14 +6923,14 @@ var $elm$core$Array$filter = F2( }); var $author$project$Main$filterValuesByFieldChoices = F2( function (field, values) { - var _v0 = field.type_; + var _v0 = field.a; switch (_v0.$) { - case 'Dropdown': - var choices = _v0.a.choices; + case 2: + var choices = _v0.a.k; var validChoiceValues = A2( $elm$core$List$map, function ($) { - return $.value; + return $.j; }, choices); return A2( @@ -6945,12 +6939,12 @@ var $author$project$Main$filterValuesByFieldChoices = F2( return A2($elm$core$List$member, value, validChoiceValues); }, values); - case 'ChooseOne': - var choices = _v0.a.choices; + case 3: + var choices = _v0.a.k; var validChoiceValues = A2( $elm$core$List$map, function ($) { - return $.value; + return $.j; }, choices); return A2( @@ -6959,12 +6953,12 @@ var $author$project$Main$filterValuesByFieldChoices = F2( return A2($elm$core$List$member, value, validChoiceValues); }, values); - case 'ChooseMultiple': - var choices = _v0.a.choices; + case 4: + var choices = _v0.a.k; var validChoiceValues = A2( $elm$core$List$map, function ($) { - return $.value; + return $.j; }, choices); return A2( @@ -6989,20 +6983,20 @@ var $elm$core$List$isEmpty = function (xs) { } }; var $author$project$Main$isUsingFilter = function (formField) { - var _v0 = formField.type_; + var _v0 = formField.a; switch (_v0.$) { - case 'ShortText': + case 0: return false; - case 'LongText': + case 1: return false; - case 'ChooseMultiple': - var filter = _v0.a.filter; + case 4: + var filter = _v0.a.e; return !_Utils_eq(filter, $elm$core$Maybe$Nothing); - case 'ChooseOne': - var filter = _v0.a.filter; + case 3: + var filter = _v0.a.e; return !_Utils_eq(filter, $elm$core$Maybe$Nothing); default: - var filter = _v0.a.filter; + var filter = _v0.a.e; return !_Utils_eq(filter, $elm$core$Maybe$Nothing); } }; @@ -7012,7 +7006,7 @@ var $elm$core$Array$length = function (_v0) { }; var $elm$core$Maybe$map = F2( function (f, maybe) { - if (maybe.$ === 'Just') { + if (!maybe.$) { var value = maybe.a; return $elm$core$Maybe$Just( f(value)); @@ -7021,7 +7015,7 @@ var $elm$core$Maybe$map = F2( } }); var $elm$core$Result$toMaybe = function (result) { - if (result.$ === 'Ok') { + if (!result.$) { var v = result.a; return $elm$core$Maybe$Just(v); } else { @@ -7043,7 +7037,7 @@ var $elm$core$Platform$Cmd$none = $elm$core$Platform$Cmd$batch(_List_Nil); var $author$project$Main$outgoing = _Platform_outgoingPort('outgoing', $elm$core$Basics$identity); var $author$project$Main$init = function (flags) { var _v0 = A2($elm$json$Json$Decode$decodeValue, $author$project$Main$decodeConfig, flags); - if (_v0.$ === 'Ok') { + if (!_v0.$) { var config = _v0.a; var initialTrackedFormValues = $elm$core$Dict$fromList( A2( @@ -7051,8 +7045,8 @@ var $author$project$Main$init = function (flags) { function (field) { var fieldName = $author$project$Main$fieldNameOf(field); var rawValues = function () { - var _v1 = field.type_; - if (_v1.$ === 'ChooseMultiple') { + var _v1 = field.a; + if (_v1.$ === 4) { return A2( $elm$core$Maybe$withDefault, _List_Nil, @@ -7060,7 +7054,7 @@ var $author$project$Main$init = function (flags) { $author$project$Main$maybeDecode, fieldName, $author$project$Main$decodeListOrSingleton($elm$json$Json$Decode$string), - config.formValues)); + config.ba)); } else { return A2( $elm$core$Maybe$withDefault, @@ -7068,94 +7062,94 @@ var $author$project$Main$init = function (flags) { A2( $elm$core$Maybe$map, $elm$core$List$singleton, - A3($author$project$Main$maybeDecode, fieldName, $elm$json$Json$Decode$string, config.formValues))); + A3($author$project$Main$maybeDecode, fieldName, $elm$json$Json$Decode$string, config.ba))); } }(); var filteredValues = A2($author$project$Main$filterValuesByFieldChoices, field, rawValues); return _Utils_Tuple2(fieldName, filteredValues); }, - $elm$core$Array$toList(config.formFields))); - var allCustomElements = $author$project$Main$allCustomElementsFromGroups(config.inputFieldGroups); + $elm$core$Array$toList(config.g))); + var allCustomElements = $author$project$Main$allCustomElementsFromGroups(config.T); return _Utils_Tuple2( { - activeFieldGroupIndex: 0, - dragged: $elm$core$Maybe$Nothing, - formFields: config.formFields, - initError: $elm$core$Maybe$Nothing, - inputFieldGroups: config.inputFieldGroups, - needsFormLogic: !$elm$core$Array$isEmpty( + ay: 0, + r: $elm$core$Maybe$Nothing, + g: config.g, + aZ: $elm$core$Maybe$Nothing, + T: config.T, + aa: !$elm$core$Array$isEmpty( A2( $elm$core$Array$filter, function (f) { - return $author$project$Main$isUsingFilter(f) || (!$elm$core$List$isEmpty(f.visibilityRule)); + return $author$project$Main$isUsingFilter(f) || (!$elm$core$List$isEmpty(f.m)); }, - config.formFields)), - nextQuestionNumber: $elm$core$Array$length(config.formFields) + 1, - selectedFieldIndex: $elm$core$Maybe$Nothing, - shortTextTypeDict: $elm$core$Dict$fromList( + config.g)), + ab: $elm$core$Array$length(config.g) + 1, + F: $elm$core$Maybe$Nothing, + al: $elm$core$Dict$fromList( A2( $elm$core$List$map, function (customElement) { - return _Utils_Tuple2(customElement.inputType, customElement); + return _Utils_Tuple2(customElement.C, customElement); }, allCustomElements)), - trackedFormValues: initialTrackedFormValues, - viewMode: config.viewMode + v: initialTrackedFormValues, + ad: config.ad }, $elm$core$Platform$Cmd$batch( _List_fromArray( [ $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( - $author$project$Main$PortOutgoingFormFields(config.formFields))) + $author$project$Main$PortOutgoingFormFields(config.g))) ]))); } else { var err = _v0.a; return _Utils_Tuple2( { - activeFieldGroupIndex: 0, - dragged: $elm$core$Maybe$Nothing, - formFields: $elm$core$Array$empty, - initError: $elm$core$Maybe$Just( + ay: 0, + r: $elm$core$Maybe$Nothing, + g: $elm$core$Array$empty, + aZ: $elm$core$Maybe$Just( $elm$json$Json$Decode$errorToString(err)), - inputFieldGroups: _List_Nil, - needsFormLogic: false, - nextQuestionNumber: 1, - selectedFieldIndex: $elm$core$Maybe$Nothing, - shortTextTypeDict: $elm$core$Dict$empty, - trackedFormValues: $elm$core$Dict$empty, - viewMode: $author$project$Main$Editor( - {maybeAnimate: $elm$core$Maybe$Nothing}) + T: _List_Nil, + aa: false, + ab: 1, + F: $elm$core$Maybe$Nothing, + al: $elm$core$Dict$empty, + v: $elm$core$Dict$empty, + ad: $author$project$Main$Editor( + {aC: $elm$core$Maybe$Nothing}) }, $elm$core$Platform$Cmd$none); } }; var $author$project$Main$OnPortIncoming = function (a) { - return {$: 'OnPortIncoming', a: a}; + return {$: 1, a: a}; }; var $author$project$Main$incoming = _Platform_incomingPort('incoming', $elm$json$Json$Decode$value); var $author$project$Main$subscriptions = function (_v0) { return $author$project$Main$incoming($author$project$Main$OnPortIncoming); }; -var $author$project$Main$AnimateYellowFade = {$: 'AnimateYellowFade'}; +var $author$project$Main$AnimateYellowFade = 0; var $author$project$Main$DoSleepDo = F2( function (a, b) { - return {$: 'DoSleepDo', a: a, b: b}; + return {$: 14, a: a, b: b}; }); var $author$project$Main$DragExisting = function (a) { - return {$: 'DragExisting', a: a}; + return {$: 0, a: a}; }; var $author$project$Main$DragNew = function (a) { - return {$: 'DragNew', a: a}; + return {$: 1, a: a}; }; var $author$project$Main$Drop = function (a) { - return {$: 'Drop', a: a}; + return {$: 13, a: a}; }; var $author$project$Main$PortOutgoingFormValues = function (a) { - return {$: 'PortOutgoingFormValues', a: a}; + return {$: 1, a: a}; }; var $author$project$Main$SetEditorAnimate = function (a) { - return {$: 'SetEditorAnimate', a: a}; + return {$: 7, a: a}; }; var $elm$core$Basics$always = F2( function (a, _v0) { @@ -7181,7 +7175,7 @@ var $elm$json$Json$Encode$dict = F3( toValue(value), obj); }), - _Json_emptyObject(_Utils_Tuple0), + _Json_emptyObject(0), dictionary)); }); var $elm$core$List$head = function (list) { @@ -7206,9 +7200,9 @@ var $elm$core$Array$indexedMap = F2( var tree = _v0.c; var tail = _v0.d; var initialBuilder = { - nodeList: _List_Nil, - nodeListSize: 0, - tail: A3( + y: _List_Nil, + t: 0, + x: A3( $elm$core$Elm$JsArray$indexedMap, func, $elm$core$Array$tailIndex(len), @@ -7216,18 +7210,18 @@ var $elm$core$Array$indexedMap = F2( }; var helper = F2( function (node, builder) { - if (node.$ === 'SubTree') { + if (!node.$) { var subTree = node.a; return A3($elm$core$Elm$JsArray$foldl, helper, builder, subTree); } else { var leaf = node.a; - var offset = builder.nodeListSize * $elm$core$Array$branchFactor; + var offset = builder.t * $elm$core$Array$branchFactor; var mappedLeaf = $elm$core$Array$Leaf( A3($elm$core$Elm$JsArray$indexedMap, func, offset, leaf)); return { - nodeList: A2($elm$core$List$cons, mappedLeaf, builder.nodeList), - nodeListSize: builder.nodeListSize + 1, - tail: builder.tail + y: A2($elm$core$List$cons, mappedLeaf, builder.y), + t: builder.t + 1, + x: builder.x }; } }); @@ -7238,13 +7232,13 @@ var $elm$core$Array$indexedMap = F2( }); var $author$project$Main$mustBeOptional = function (inputField) { switch (inputField.$) { - case 'ShortText': + case 0: return false; - case 'LongText': + case 1: return false; - case 'Dropdown': + case 2: return false; - case 'ChooseOne': + case 3: return false; default: return true; @@ -7260,7 +7254,7 @@ var $elm$core$Array$getHelp = F3( while (true) { var pos = $elm$core$Array$bitMask & (index >>> shift); var _v0 = A2($elm$core$Elm$JsArray$unsafeGet, pos, tree); - if (_v0.$ === 'SubTree') { + if (!_v0.$) { var subTree = _v0.a; var $temp$shift = shift - $elm$core$Array$shiftStep, $temp$index = index, @@ -7446,32 +7440,32 @@ var $elm_community$list_extra$List$Extra$splitAt = F2( }); var $author$project$Main$onDropped = F2( function (targetIndex, model) { - var _v0 = model.dragged; - if (_v0.$ === 'Just') { - if (_v0.a.$ === 'DragExisting') { - var dragIndex = _v0.a.a.dragIndex; - var dropIndex = _v0.a.a.dropIndex; - if (targetIndex.$ === 'Nothing') { + var _v0 = model.r; + if (!_v0.$) { + if (!_v0.a.$) { + var dragIndex = _v0.a.a.a9; + var dropIndex = _v0.a.a.G; + if (targetIndex.$ === 1) { return _Utils_update( model, - {dragged: $elm$core$Maybe$Nothing}); + {r: $elm$core$Maybe$Nothing}); } else { var index = targetIndex.a; - if (dropIndex.$ === 'Just') { + if (!dropIndex.$) { var _v3 = dropIndex.a; var dropTargetIndex = _v3.a; if (_Utils_eq(dragIndex, index) || (!_Utils_eq(index, dropTargetIndex))) { return _Utils_update( model, - {dragged: $elm$core$Maybe$Nothing}); + {r: $elm$core$Maybe$Nothing}); } else { var newFormFields = $elm$core$Array$fromList( function (list) { - var draggedField = A2($elm$core$Array$get, dragIndex, model.formFields); + var draggedField = A2($elm$core$Array$get, dragIndex, model.g); var _v5 = A2($elm_community$list_extra$List$Extra$splitAt, index, list); var before = _v5.a; var after = _v5.b; - if (draggedField.$ === 'Just') { + if (!draggedField.$) { var field = draggedField.a; return $elm$core$List$concat( _List_fromArray( @@ -7497,33 +7491,33 @@ var $author$project$Main$onDropped = F2( A2( $elm$core$List$indexedMap, $elm$core$Tuple$pair, - $elm$core$Array$toList(model.formFields)))))); + $elm$core$Array$toList(model.g)))))); return _Utils_update( model, - {dragged: $elm$core$Maybe$Nothing, formFields: newFormFields}); + {r: $elm$core$Maybe$Nothing, g: newFormFields}); } } else { return _Utils_update( model, - {dragged: $elm$core$Maybe$Nothing}); + {r: $elm$core$Maybe$Nothing}); } } } else { - var field = _v0.a.a.field; - var dropIndex = _v0.a.a.dropIndex; - if (targetIndex.$ === 'Nothing') { + var field = _v0.a.a.bX; + var dropIndex = _v0.a.a.G; + if (targetIndex.$ === 1) { return _Utils_update( model, - {dragged: $elm$core$Maybe$Nothing}); + {r: $elm$core$Maybe$Nothing}); } else { var index = targetIndex.a; - if (dropIndex.$ === 'Just') { + if (!dropIndex.$) { var _v9 = dropIndex.a; var dropTargetIndex = _v9.a; if (!_Utils_eq(index, dropTargetIndex)) { return _Utils_update( model, - {dragged: $elm$core$Maybe$Nothing}); + {r: $elm$core$Maybe$Nothing}); } else { var newFormFields = $elm$core$Array$fromList( function (list) { @@ -7534,22 +7528,22 @@ var $author$project$Main$onDropped = F2( before, A2($elm$core$List$cons, field, after)); }( - $elm$core$Array$toList(model.formFields))); + $elm$core$Array$toList(model.g))); return _Utils_update( model, - {dragged: $elm$core$Maybe$Nothing, formFields: newFormFields, nextQuestionNumber: model.nextQuestionNumber + 1}); + {r: $elm$core$Maybe$Nothing, g: newFormFields, ab: model.ab + 1}); } } else { return _Utils_update( model, - {dragged: $elm$core$Maybe$Nothing}); + {r: $elm$core$Maybe$Nothing}); } } } } else { return _Utils_update( model, - {dragged: $elm$core$Maybe$Nothing}); + {r: $elm$core$Maybe$Nothing}); } }); var $elm$core$Elm$JsArray$push = _JsArray_push; @@ -7573,7 +7567,7 @@ var $elm$core$Array$insertTailInTree = F4( } } else { var value = A2($elm$core$Elm$JsArray$unsafeGet, pos, tree); - if (value.$ === 'SubTree') { + if (!value.$) { var subTree = value.a; var newSub = $elm$core$Array$SubTree( A4($elm$core$Array$insertTailInTree, shift - $elm$core$Array$shiftStep, index, tail, subTree)); @@ -7634,14 +7628,14 @@ var $elm$core$Array$push = F2( var $elm$core$Process$sleep = _Process_sleep; var $author$project$Main$stringFromInputField = function (inputField) { switch (inputField.$) { - case 'ShortText': - var inputType = inputField.a.inputType; + case 0: + var inputType = inputField.a.C; return inputType; - case 'LongText': + case 1: return 'Multi-line description'; - case 'Dropdown': + case 2: return 'Dropdown'; - case 'ChooseOne': + case 3: return 'Radio buttons'; default: return 'Checkboxes'; @@ -7651,7 +7645,7 @@ var $elm$core$Array$setHelp = F4( function (shift, index, value, tree) { var pos = $elm$core$Array$bitMask & (index >>> shift); var _v0 = A2($elm$core$Elm$JsArray$unsafeGet, pos, tree); - if (_v0.$ === 'SubTree') { + if (!_v0.$) { var subTree = _v0.a; var newSub = A4($elm$core$Array$setHelp, shift - $elm$core$Array$shiftStep, index, value, subTree); return A3( @@ -7694,7 +7688,7 @@ var $author$project$Main$swapArrayIndex = F3( var maybeJ = A2($elm$core$Array$get, j, arr); var maybeI = A2($elm$core$Array$get, i, arr); var _v0 = _Utils_Tuple2(maybeI, maybeJ); - if ((_v0.a.$ === 'Just') && (_v0.b.$ === 'Just')) { + if ((!_v0.a.$) && (!_v0.b.$)) { var iVal = _v0.a.a; var jVal = _v0.b.a; return A3( @@ -7727,42 +7721,42 @@ var $elm$core$Array$toIndexedList = function (array) { }; var $author$project$Main$updateDragged = F2( function (maybeDroppable, dragged) { - if (maybeDroppable.$ === 'Nothing') { + if (maybeDroppable.$ === 1) { return dragged; } else { var _v1 = maybeDroppable.a; var targetField = _v1.b; - if (dragged.$ === 'DragExisting') { + if (!dragged.$) { var details = dragged.a; - var _v3 = details.dropIndex; - if (_v3.$ === 'Just') { + var _v3 = details.G; + if (!_v3.$) { var _v4 = _v3.a; var existingField = _v4.b; return _Utils_eq(existingField, targetField) ? dragged : $author$project$Main$DragExisting( _Utils_update( details, - {dropIndex: maybeDroppable})); + {G: maybeDroppable})); } else { return $author$project$Main$DragExisting( _Utils_update( details, - {dropIndex: maybeDroppable})); + {G: maybeDroppable})); } } else { var details = dragged.a; - var _v5 = details.dropIndex; - if (_v5.$ === 'Just') { + var _v5 = details.G; + if (!_v5.$) { var _v6 = _v5.a; var existingField = _v6.b; return _Utils_eq(existingField, targetField) ? dragged : $author$project$Main$DragNew( _Utils_update( details, - {dropIndex: maybeDroppable})); + {G: maybeDroppable})); } else { return $author$project$Main$DragNew( _Utils_update( details, - {dropIndex: maybeDroppable})); + {G: maybeDroppable})); } } } @@ -7797,15 +7791,15 @@ var $elm_community$list_extra$List$Extra$removeAt = F2( var $author$project$Main$toggleAttributeOptional = F2( function (toggle, attributeOptional) { switch (attributeOptional.$) { - case 'AttributeNotNeeded': - if (attributeOptional.a.$ === 'Nothing') { + case 0: + if (attributeOptional.a.$ === 1) { var _v1 = attributeOptional.a; return toggle ? $author$project$Main$AttributeInvalid('') : attributeOptional; } else { var a = attributeOptional.a.a; return toggle ? $author$project$Main$AttributeGiven(a) : attributeOptional; } - case 'AttributeInvalid': + case 1: return toggle ? attributeOptional : $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing); default: var a = attributeOptional.a; @@ -7818,16 +7812,16 @@ var $author$project$Main$updateComparison = F2( switch (comparisonType) { case 'Equals': switch (comparison.$) { - case 'Equals': + case 0: var str = comparison.a; return $author$project$Main$Equals(str); - case 'StringContains': + case 1: var str = comparison.a; return $author$project$Main$Equals(str); - case 'EndsWith': + case 2: var str = comparison.a; return $author$project$Main$Equals(str); - case 'GreaterThan': + case 3: var str = comparison.a; return $author$project$Main$Equals(str); default: @@ -7836,16 +7830,16 @@ var $author$project$Main$updateComparison = F2( } case 'StringContains': switch (comparison.$) { - case 'Equals': + case 0: var str = comparison.a; return $author$project$Main$StringContains(str); - case 'StringContains': + case 1: var str = comparison.a; return $author$project$Main$StringContains(str); - case 'EndsWith': + case 2: var str = comparison.a; return $author$project$Main$StringContains(str); - case 'GreaterThan': + case 3: var str = comparison.a; return $author$project$Main$StringContains(str); default: @@ -7854,16 +7848,16 @@ var $author$project$Main$updateComparison = F2( } case 'EndsWith': switch (comparison.$) { - case 'Equals': + case 0: var str = comparison.a; return $author$project$Main$EndsWith(str); - case 'StringContains': + case 1: var str = comparison.a; return $author$project$Main$EndsWith(str); - case 'EndsWith': + case 2: var str = comparison.a; return $author$project$Main$EndsWith(str); - case 'GreaterThan': + case 3: var str = comparison.a; return $author$project$Main$EndsWith(str); default: @@ -7872,16 +7866,16 @@ var $author$project$Main$updateComparison = F2( } case 'GreaterThan': switch (comparison.$) { - case 'Equals': + case 0: var str = comparison.a; return $author$project$Main$GreaterThan(str); - case 'StringContains': + case 1: var str = comparison.a; return $author$project$Main$GreaterThan(str); - case 'EndsWith': + case 2: var str = comparison.a; return $author$project$Main$GreaterThan(str); - case 'GreaterThan': + case 3: var str = comparison.a; return $author$project$Main$GreaterThan(str); default: @@ -7890,16 +7884,16 @@ var $author$project$Main$updateComparison = F2( } case 'EqualsField': switch (comparison.$) { - case 'Equals': + case 0: var str = comparison.a; return $author$project$Main$EqualsField(str); - case 'StringContains': + case 1: var str = comparison.a; return $author$project$Main$EqualsField(str); - case 'EndsWith': + case 2: var str = comparison.a; return $author$project$Main$EqualsField(str); - case 'GreaterThan': + case 3: var str = comparison.a; return $author$project$Main$EqualsField(str); default: @@ -7922,13 +7916,13 @@ var $author$project$Main$updateComparisonInCondition = F2( var $author$project$Main$updateComparisonValue = F2( function (newValue, comparison) { switch (comparison.$) { - case 'Equals': + case 0: return $author$project$Main$Equals(newValue); - case 'StringContains': + case 1: return $author$project$Main$StringContains(newValue); - case 'EndsWith': + case 2: return $author$project$Main$EndsWith(newValue); - case 'GreaterThan': + case 3: return $author$project$Main$GreaterThan(newValue); default: return $author$project$Main$EqualsField(newValue); @@ -7946,7 +7940,7 @@ var $author$project$Main$updateConditions = F3( }); var $author$project$Main$updateConditionsInRule = F2( function (updater, rule) { - if (rule.$ === 'ShowWhen') { + if (!rule.$) { var conditions = rule.a; return $author$project$Main$ShowWhen( updater(conditions)); @@ -7976,7 +7970,7 @@ var $author$project$Main$updateVisibilityRuleAt = F3( rules); }); var $author$project$Main$visibilityRuleCondition = function (rule) { - if (rule.$ === 'ShowWhen') { + if (!rule.$) { var conditions = rule.a; return conditions; } else { @@ -7987,43 +7981,43 @@ var $author$project$Main$visibilityRuleCondition = function (rule) { var $author$project$Main$updateFormField = F5( function (msg, fieldIndex, string, formFields, formField) { switch (msg.$) { - case 'OnLabelInput': + case 0: return _Utils_update( formField, - {label: string}); - case 'OnDescriptionInput': + {d: string}); + case 1: return (string === '') ? _Utils_update( formField, { - description: $author$project$Main$AttributeInvalid('') + S: $author$project$Main$AttributeInvalid('') }) : _Utils_update( formField, { - description: $author$project$Main$AttributeGiven(string) + S: $author$project$Main$AttributeGiven(string) }); - case 'OnDescriptionToggle': + case 2: var bool = msg.a; return _Utils_update( formField, { - description: A2($author$project$Main$toggleAttributeOptional, bool, formField.description) + S: A2($author$project$Main$toggleAttributeOptional, bool, formField.S) }); - case 'OnRequiredInput': + case 3: var bool = msg.a; return bool ? _Utils_update( formField, - {presence: $author$project$Main$Required}) : _Utils_update( + {p: 0}) : _Utils_update( formField, - {presence: $author$project$Main$Optional}); - case 'OnCheckboxMinRequiredInput': + {p: 1}); + case 16: var minStr = msg.a; - var _v1 = formField.type_; - if (_v1.$ === 'ChooseMultiple') { + var _v1 = formField.a; + if (_v1.$ === 4) { var settings = _v1.a; var newMinRequired = $elm$core$String$isEmpty(minStr) ? $elm$core$Maybe$Nothing : $elm$core$String$toInt(minStr); var adjustedMinRequired = function () { - var _v3 = _Utils_Tuple2(newMinRequired, settings.maxAllowed); - if ((_v3.a.$ === 'Just') && (_v3.b.$ === 'Just')) { + var _v3 = _Utils_Tuple2(newMinRequired, settings.U); + if ((!_v3.a.$) && (!_v3.b.$)) { var min = _v3.a.a; var max = _v3.b.a; return (_Utils_cmp(min, max) > 0) ? $elm$core$Maybe$Just(max) : $elm$core$Maybe$Just(min); @@ -8033,12 +8027,12 @@ var $author$project$Main$updateFormField = F5( } }(); var finalMinRequired = function () { - if (adjustedMinRequired.$ === 'Just') { + if (!adjustedMinRequired.$) { var min = adjustedMinRequired.a; return (_Utils_cmp( min, - $elm$core$List$length(settings.choices)) > 0) ? $elm$core$Maybe$Just( - $elm$core$List$length(settings.choices)) : $elm$core$Maybe$Just(min); + $elm$core$List$length(settings.k)) > 0) ? $elm$core$Maybe$Just( + $elm$core$List$length(settings.k)) : $elm$core$Maybe$Just(min); } else { return $elm$core$Maybe$Nothing; } @@ -8046,23 +8040,23 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - type_: $author$project$Main$ChooseMultiple( + a: $author$project$Main$ChooseMultiple( _Utils_update( settings, - {minRequired: finalMinRequired})) + {P: finalMinRequired})) }); } else { return formField; } - case 'OnCheckboxMaxAllowedInput': + case 17: var maxStr = msg.a; - var _v4 = formField.type_; - if (_v4.$ === 'ChooseMultiple') { + var _v4 = formField.a; + if (_v4.$ === 4) { var settings = _v4.a; var newMaxAllowed = $elm$core$String$isEmpty(maxStr) ? $elm$core$Maybe$Nothing : $elm$core$String$toInt(maxStr); var adjustedMaxAllowed = function () { - var _v6 = _Utils_Tuple2(newMaxAllowed, settings.minRequired); - if ((_v6.a.$ === 'Just') && (_v6.b.$ === 'Just')) { + var _v6 = _Utils_Tuple2(newMaxAllowed, settings.P); + if ((!_v6.a.$) && (!_v6.b.$)) { var max = _v6.a.a; var min = _v6.b.a; return (_Utils_cmp(max, min) < 0) ? $elm$core$Maybe$Just(min) : $elm$core$Maybe$Just(max); @@ -8072,12 +8066,12 @@ var $author$project$Main$updateFormField = F5( } }(); var finalMaxAllowed = function () { - if (adjustedMaxAllowed.$ === 'Just') { + if (!adjustedMaxAllowed.$) { var max = adjustedMaxAllowed.a; return (_Utils_cmp( max, - $elm$core$List$length(settings.choices)) > 0) ? $elm$core$Maybe$Just( - $elm$core$List$length(settings.choices)) : $elm$core$Maybe$Just(max); + $elm$core$List$length(settings.k)) > 0) ? $elm$core$Maybe$Just( + $elm$core$List$length(settings.k)) : $elm$core$Maybe$Just(max); } else { return $elm$core$Maybe$Nothing; } @@ -8085,82 +8079,82 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - type_: $author$project$Main$ChooseMultiple( + a: $author$project$Main$ChooseMultiple( _Utils_update( settings, - {maxAllowed: finalMaxAllowed})) + {U: finalMaxAllowed})) }); } else { return formField; } - case 'OnDateMinInput': + case 20: var minStr = msg.a; - var _v7 = formField.type_; - if (_v7.$ === 'ShortText') { + var _v7 = formField.a; + if (!_v7.$) { var customElement = _v7.a; var newCustomElement = _Utils_update( customElement, { - min: $elm$core$String$isEmpty(minStr) ? $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing) : $author$project$Main$AttributeGiven(minStr) + ar: $elm$core$String$isEmpty(minStr) ? $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing) : $author$project$Main$AttributeGiven(minStr) }); return _Utils_update( formField, { - type_: $author$project$Main$ShortText(newCustomElement) + a: $author$project$Main$ShortText(newCustomElement) }); } else { return formField; } - case 'OnDateMaxInput': + case 21: var maxStr = msg.a; - var _v8 = formField.type_; - if (_v8.$ === 'ShortText') { + var _v8 = formField.a; + if (!_v8.$) { var customElement = _v8.a; var newCustomElement = _Utils_update( customElement, { - max: $elm$core$String$isEmpty(maxStr) ? $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing) : $author$project$Main$AttributeGiven(maxStr) + aq: $elm$core$String$isEmpty(maxStr) ? $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing) : $author$project$Main$AttributeGiven(maxStr) }); return _Utils_update( formField, { - type_: $author$project$Main$ShortText(newCustomElement) + a: $author$project$Main$ShortText(newCustomElement) }); } else { return formField; } - case 'OnChoicesInput': - var _v9 = formField.type_; + case 4: + var _v9 = formField.a; switch (_v9.$) { - case 'ShortText': + case 0: return formField; - case 'LongText': + case 1: return formField; - case 'Dropdown': + case 2: var settings = _v9.a; return _Utils_update( formField, { - type_: $author$project$Main$Dropdown( + a: $author$project$Main$Dropdown( _Utils_update( settings, { - choices: A2( + k: A2( $elm$core$List$map, $author$project$Main$choiceFromString, $elm$core$String$lines(string)) })) }); - case 'ChooseOne': + case 3: var settings = _v9.a; return _Utils_update( formField, { - type_: $author$project$Main$ChooseOne( + a: $author$project$Main$ChooseOne( _Utils_update( settings, { - choices: A2( + k: A2( $elm$core$List$map, $author$project$Main$choiceFromString, $elm$core$String$lines(string)) @@ -8174,8 +8168,8 @@ var $author$project$Main$updateFormField = F5( $elm$core$String$lines(string)); var newChoicesCount = $elm$core$List$length(newChoices); var newMaxAllowed = function () { - var _v11 = settings.maxAllowed; - if (_v11.$ === 'Just') { + var _v11 = settings.U; + if (!_v11.$) { var max = _v11.a; return (_Utils_cmp(max, newChoicesCount) > 0) ? ((newChoicesCount > 0) ? $elm$core$Maybe$Just(newChoicesCount) : $elm$core$Maybe$Nothing) : $elm$core$Maybe$Just(max); } else { @@ -8183,8 +8177,8 @@ var $author$project$Main$updateFormField = F5( } }(); var newMinRequired = function () { - var _v10 = settings.minRequired; - if (_v10.$ === 'Just') { + var _v10 = settings.P; + if (!_v10.$) { var min = _v10.a; return (_Utils_cmp(min, newChoicesCount) > 0) ? ((newChoicesCount > 0) ? $elm$core$Maybe$Just(newChoicesCount) : $elm$core$Maybe$Nothing) : $elm$core$Maybe$Just(min); } else { @@ -8194,79 +8188,79 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - type_: $author$project$Main$ChooseMultiple( + a: $author$project$Main$ChooseMultiple( _Utils_update( settings, - {choices: newChoices, maxAllowed: newMaxAllowed, minRequired: newMinRequired})) + {k: newChoices, U: newMaxAllowed, P: newMinRequired})) }); } - case 'OnMultipleToggle': + case 5: var bool = msg.a; - var _v12 = formField.type_; + var _v12 = formField.a; switch (_v12.$) { - case 'ShortText': + case 0: var customElement = _v12.a; var newCustomElement = _Utils_update( customElement, { - multiple: $author$project$Main$AttributeGiven(bool) + aO: $author$project$Main$AttributeGiven(bool) }); return _Utils_update( formField, { - type_: $author$project$Main$ShortText(newCustomElement) + a: $author$project$Main$ShortText(newCustomElement) }); - case 'LongText': + case 1: return formField; - case 'Dropdown': + case 2: return formField; - case 'ChooseOne': + case 3: return formField; default: return formField; } - case 'OnMaxLengthToggle': + case 6: var bool = msg.a; - var _v13 = formField.type_; + var _v13 = formField.a; switch (_v13.$) { - case 'ShortText': + case 0: var customElement = _v13.a; var newCustomElement = _Utils_update( customElement, { - maxlength: A2($author$project$Main$toggleAttributeOptional, bool, customElement.maxlength) + ai: A2($author$project$Main$toggleAttributeOptional, bool, customElement.ai) }); return _Utils_update( formField, { - type_: $author$project$Main$ShortText(newCustomElement) + a: $author$project$Main$ShortText(newCustomElement) }); - case 'LongText': + case 1: var maxlength = _v13.a; return _Utils_update( formField, { - type_: $author$project$Main$LongText( + a: $author$project$Main$LongText( A2($author$project$Main$toggleAttributeOptional, bool, maxlength)) }); - case 'Dropdown': + case 2: return formField; - case 'ChooseOne': + case 3: return formField; default: return formField; } - case 'OnMaxLengthInput': - var _v14 = formField.type_; + case 7: + var _v14 = formField.a; switch (_v14.$) { - case 'ShortText': + case 0: var customElement = _v14.a; var newCustomElement = _Utils_update( customElement, { - maxlength: function () { + ai: function () { var _v15 = $elm$core$String$toInt(string); - if (_v15.$ === 'Just') { + if (!_v15.$) { var i = _v15.a; return $author$project$Main$AttributeGiven(i); } else { @@ -8277,12 +8271,12 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - type_: $author$project$Main$ShortText(newCustomElement) + a: $author$project$Main$ShortText(newCustomElement) }); - case 'LongText': + case 1: var newMaxlength = function () { var _v16 = $elm$core$String$toInt(string); - if (_v16.$ === 'Just') { + if (!_v16.$) { var i = _v16.a; return $author$project$Main$AttributeGiven(i); } else { @@ -8292,85 +8286,85 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - type_: $author$project$Main$LongText(newMaxlength) + a: $author$project$Main$LongText(newMaxlength) }); - case 'Dropdown': + case 2: return formField; - case 'ChooseOne': + case 3: return formField; default: return formField; } - case 'OnDateMinToggle': + case 18: var bool = msg.a; - var _v17 = formField.type_; - if (_v17.$ === 'ShortText') { + var _v17 = formField.a; + if (!_v17.$) { var customElement = _v17.a; var newCustomElement = _Utils_update( customElement, { - min: A2($author$project$Main$toggleAttributeOptional, bool, customElement.min) + ar: A2($author$project$Main$toggleAttributeOptional, bool, customElement.ar) }); return _Utils_update( formField, { - type_: $author$project$Main$ShortText(newCustomElement) + a: $author$project$Main$ShortText(newCustomElement) }); } else { return formField; } - case 'OnDateMaxToggle': + case 19: var bool = msg.a; - var _v18 = formField.type_; - if (_v18.$ === 'ShortText') { + var _v18 = formField.a; + if (!_v18.$) { var customElement = _v18.a; var newCustomElement = _Utils_update( customElement, { - max: A2($author$project$Main$toggleAttributeOptional, bool, customElement.max) + aq: A2($author$project$Main$toggleAttributeOptional, bool, customElement.aq) }); return _Utils_update( formField, { - type_: $author$project$Main$ShortText(newCustomElement) + a: $author$project$Main$ShortText(newCustomElement) }); } else { return formField; } - case 'OnDatalistToggle': + case 8: var bool = msg.a; - var _v19 = formField.type_; + var _v19 = formField.a; switch (_v19.$) { - case 'ShortText': + case 0: var customElement = _v19.a; var newCustomElement = _Utils_update( customElement, { - datalist: A2($author$project$Main$toggleAttributeOptional, bool, customElement.datalist) + af: A2($author$project$Main$toggleAttributeOptional, bool, customElement.af) }); return _Utils_update( formField, { - type_: $author$project$Main$ShortText(newCustomElement) + a: $author$project$Main$ShortText(newCustomElement) }); - case 'LongText': + case 1: return formField; - case 'Dropdown': + case 2: return formField; - case 'ChooseOne': + case 3: return formField; default: return formField; } - case 'OnDatalistInput': - var _v20 = formField.type_; + case 9: + var _v20 = formField.a; switch (_v20.$) { - case 'ShortText': + case 0: var customElement = _v20.a; var newCustomElement = _Utils_update( customElement, { - datalist: function () { + af: function () { var _v21 = A2($elm$core$String$split, '\n', string); if (!_v21.b) { return $author$project$Main$AttributeInvalid(string); @@ -8384,24 +8378,24 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - type_: $author$project$Main$ShortText(newCustomElement) + a: $author$project$Main$ShortText(newCustomElement) }); - case 'LongText': + case 1: return formField; - case 'Dropdown': + case 2: return formField; - case 'ChooseOne': + case 3: return formField; default: return formField; } - case 'OnVisibilityRuleTypeInput': + case 10: if (msg.b === '\n') { var ruleIndex = msg.a; return _Utils_update( formField, { - visibilityRule: A2($elm_community$list_extra$List$Extra$removeAt, ruleIndex, formField.visibilityRule) + m: A2($elm_community$list_extra$List$Extra$removeAt, ruleIndex, formField.m) }); } else { var ruleIndex = msg.a; @@ -8409,7 +8403,7 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - visibilityRule: A3( + m: A3( $author$project$Main$updateVisibilityRuleAt, ruleIndex, function (rule) { @@ -8424,17 +8418,17 @@ var $author$project$Main$updateFormField = F5( return rule; } }, - formField.visibilityRule) + formField.m) }); } - case 'OnVisibilityConditionTypeInput': + case 11: var ruleIndex = msg.a; var conditionIndex = msg.b; var str = msg.c; return _Utils_update( formField, { - visibilityRule: A3( + m: A3( $author$project$Main$updateVisibilityRuleAt, ruleIndex, $author$project$Main$updateConditionsInRule( @@ -8443,21 +8437,21 @@ var $author$project$Main$updateFormField = F5( conditionIndex, $author$project$Main$updateComparisonInCondition( $author$project$Main$updateComparison(str)))), - formField.visibilityRule) + formField.m) }); - case 'OnVisibilityConditionFieldInput': + case 12: if (msg.c === '\n') { var ruleIndex = msg.a; var conditionIndex = msg.b; return _Utils_update( formField, { - visibilityRule: A3( + m: A3( $author$project$Main$updateVisibilityRuleAt, ruleIndex, $author$project$Main$updateConditionsInRule( $elm_community$list_extra$List$Extra$removeAt(conditionIndex)), - formField.visibilityRule) + formField.m) }); } else { var ruleIndex = msg.a; @@ -8466,7 +8460,7 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - visibilityRule: A3( + m: A3( $author$project$Main$updateVisibilityRuleAt, ruleIndex, $author$project$Main$updateConditionsInRule( @@ -8475,17 +8469,17 @@ var $author$project$Main$updateFormField = F5( conditionIndex, $author$project$Main$updateFieldnameInCondition( $elm$core$Basics$always(newFieldName)))), - formField.visibilityRule) + formField.m) }); } - case 'OnVisibilityConditionValueInput': + case 13: var ruleIndex = msg.a; var conditionIndex = msg.b; var newValue = msg.c; return _Utils_update( formField, { - visibilityRule: A3( + m: A3( $author$project$Main$updateVisibilityRuleAt, ruleIndex, $author$project$Main$updateConditionsInRule( @@ -8494,14 +8488,14 @@ var $author$project$Main$updateFormField = F5( conditionIndex, $author$project$Main$updateComparisonInCondition( $author$project$Main$updateComparisonValue(newValue)))), - formField.visibilityRule) + formField.m) }); - case 'OnAddVisibilityRule': + case 14: return _Utils_update( formField, { - visibilityRule: _Utils_ap( - formField.visibilityRule, + m: _Utils_ap( + formField.m, _List_fromArray( [ $author$project$Main$ShowWhen( @@ -8514,7 +8508,7 @@ var $author$project$Main$updateFormField = F5( ])) ])) }); - case 'OnVisibilityConditionDuplicate': + case 15: var ruleIndex = msg.a; var newCondition = function (conditions) { var _v24 = $elm$core$List$reverse(conditions); @@ -8534,11 +8528,11 @@ var $author$project$Main$updateFormField = F5( return _Utils_update( formField, { - visibilityRule: A3( + m: A3( $author$project$Main$updateVisibilityRuleAt, ruleIndex, function (rule) { - if (rule.$ === 'ShowWhen') { + if (!rule.$) { var conditions = rule.a; return $author$project$Main$ShowWhen( _Utils_ap( @@ -8558,56 +8552,56 @@ var $author$project$Main$updateFormField = F5( ]))); } }, - formField.visibilityRule) + formField.m) }); - case 'OnFilterToggle': + case 22: var checked = msg.a; - var _v25 = formField.type_; + var _v25 = formField.a; switch (_v25.$) { - case 'Dropdown': + case 2: var settings = _v25.a; var newFilter = checked ? $elm$core$Maybe$Just( $author$project$Main$FilterStartsWithFieldValueOf('')) : $elm$core$Maybe$Nothing; return _Utils_update( formField, { - type_: $author$project$Main$Dropdown( + a: $author$project$Main$Dropdown( _Utils_update( settings, - {filter: newFilter})) + {e: newFilter})) }); - case 'ChooseOne': + case 3: var settings = _v25.a; var newFilter = checked ? $elm$core$Maybe$Just( $author$project$Main$FilterStartsWithFieldValueOf('')) : $elm$core$Maybe$Nothing; return _Utils_update( formField, { - type_: $author$project$Main$ChooseOne( + a: $author$project$Main$ChooseOne( _Utils_update( settings, - {filter: newFilter})) + {e: newFilter})) }); - case 'ChooseMultiple': + case 4: var settings = _v25.a; var newFilter = checked ? $elm$core$Maybe$Just( $author$project$Main$FilterStartsWithFieldValueOf('')) : $elm$core$Maybe$Nothing; return _Utils_update( formField, { - type_: $author$project$Main$ChooseMultiple( + a: $author$project$Main$ChooseMultiple( _Utils_update( settings, - {filter: newFilter})) + {e: newFilter})) }); default: return formField; } - case 'OnFilterTypeSelect': + case 23: var filterType = msg.a; var updateFilter = function (existingFilter) { - if (existingFilter.$ === 'Just') { - if (existingFilter.a.$ === 'FilterStartsWithFieldValueOf') { + if (!existingFilter.$) { + if (!existingFilter.a.$) { var fieldName = existingFilter.a.a; return (filterType === 'contains') ? $elm$core$Maybe$Just( $author$project$Main$FilterContainsFieldValueOf(fieldName)) : existingFilter; @@ -8622,42 +8616,42 @@ var $author$project$Main$updateFormField = F5( $author$project$Main$FilterContainsFieldValueOf('')) : $elm$core$Maybe$Nothing); } }; - var _v26 = formField.type_; + var _v26 = formField.a; switch (_v26.$) { - case 'Dropdown': + case 2: var settings = _v26.a; return _Utils_update( formField, { - type_: $author$project$Main$Dropdown( + a: $author$project$Main$Dropdown( _Utils_update( settings, { - filter: updateFilter(settings.filter) + e: updateFilter(settings.e) })) }); - case 'ChooseOne': + case 3: var settings = _v26.a; return _Utils_update( formField, { - type_: $author$project$Main$ChooseOne( + a: $author$project$Main$ChooseOne( _Utils_update( settings, { - filter: updateFilter(settings.filter) + e: updateFilter(settings.e) })) }); - case 'ChooseMultiple': + case 4: var settings = _v26.a; return _Utils_update( formField, { - type_: $author$project$Main$ChooseMultiple( + a: $author$project$Main$ChooseMultiple( _Utils_update( settings, { - filter: updateFilter(settings.filter) + e: updateFilter(settings.e) })) }); default: @@ -8666,8 +8660,8 @@ var $author$project$Main$updateFormField = F5( default: var fieldName = msg.a; var updateSourceField = function (existingFilter) { - if (existingFilter.$ === 'Just') { - if (existingFilter.a.$ === 'FilterStartsWithFieldValueOf') { + if (!existingFilter.$) { + if (!existingFilter.a.$) { return $elm$core$Maybe$Just( $author$project$Main$FilterStartsWithFieldValueOf(fieldName)); } else { @@ -8679,42 +8673,42 @@ var $author$project$Main$updateFormField = F5( $author$project$Main$FilterStartsWithFieldValueOf(fieldName)); } }; - var _v28 = formField.type_; + var _v28 = formField.a; switch (_v28.$) { - case 'Dropdown': + case 2: var settings = _v28.a; return _Utils_update( formField, { - type_: $author$project$Main$Dropdown( + a: $author$project$Main$Dropdown( _Utils_update( settings, { - filter: updateSourceField(settings.filter) + e: updateSourceField(settings.e) })) }); - case 'ChooseOne': + case 3: var settings = _v28.a; return _Utils_update( formField, { - type_: $author$project$Main$ChooseOne( + a: $author$project$Main$ChooseOne( _Utils_update( settings, { - filter: updateSourceField(settings.filter) + e: updateSourceField(settings.e) })) }); - case 'ChooseMultiple': + case 4: var settings = _v28.a; return _Utils_update( formField, { - type_: $author$project$Main$ChooseMultiple( + a: $author$project$Main$ChooseMultiple( _Utils_update( settings, { - filter: updateSourceField(settings.filter) + e: updateSourceField(settings.e) })) }); default: @@ -8724,43 +8718,43 @@ var $author$project$Main$updateFormField = F5( }); var $author$project$Main$when = F2( function (bool, condition) { - return bool ? condition._true : condition._false; + return bool ? condition.a4 : condition.aX; }); var $author$project$Main$update = F2( function (msg, model) { update: while (true) { switch (msg.$) { - case 'NoOp': + case 0: return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none); - case 'OnPortIncoming': + case 1: var value = msg.a; var _v1 = A2($elm$json$Json$Decode$decodeValue, $author$project$Main$decodePortIncomingValue, value); - if (_v1.$ === 'Ok') { + if (!_v1.$) { var _v2 = _v1.a; return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none); } else { return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none); } - case 'AddFormField': + case 2: var fieldType = msg.a; var newFormField = { - description: $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing), - label: $author$project$Main$stringFromInputField(fieldType) + (' question ' + $elm$core$String$fromInt(model.nextQuestionNumber)), - name: $elm$core$Maybe$Nothing, - presence: A2( + S: $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing), + d: $author$project$Main$stringFromInputField(fieldType) + (' question ' + $elm$core$String$fromInt(model.ab)), + Q: $elm$core$Maybe$Nothing, + p: A2( $author$project$Main$when, $author$project$Main$mustBeOptional(fieldType), - {_false: $author$project$Main$Required, _true: $author$project$Main$Optional}), - type_: fieldType, - visibilityRule: _List_Nil + {aX: 0, a4: 1}), + a: fieldType, + m: _List_Nil }; - var newFormFields = A2($elm$core$Array$push, newFormField, model.formFields); + var newFormFields = A2($elm$core$Array$push, newFormField, model.g); var newIndex = $elm$core$Array$length(newFormFields) - 1; return _Utils_Tuple2( _Utils_update( model, - {formFields: newFormFields, nextQuestionNumber: model.nextQuestionNumber + 1}), + {g: newFormFields, ab: model.ab + 1}), $elm$core$Platform$Cmd$batch( _List_fromArray( [ @@ -8778,11 +8772,11 @@ var $author$project$Main$update = F2( [ $author$project$Main$SetEditorAnimate( $elm$core$Maybe$Just( - _Utils_Tuple2(newIndex, $author$project$Main$AnimateYellowFade))), + _Utils_Tuple2(newIndex, 0))), $author$project$Main$SetEditorAnimate($elm$core$Maybe$Nothing) ])))) ]))); - case 'DeleteFormField': + case 3: var fieldIndex = msg.a; var newFormFields = $elm$core$Array$fromList( A2( @@ -8794,41 +8788,41 @@ var $author$project$Main$update = F2( var i = _v3.a; return !_Utils_eq(i, fieldIndex); }, - $elm$core$Array$toIndexedList(model.formFields)))); + $elm$core$Array$toIndexedList(model.g)))); return _Utils_Tuple2( _Utils_update( model, - {formFields: newFormFields, selectedFieldIndex: $elm$core$Maybe$Nothing}), + {g: newFormFields, F: $elm$core$Maybe$Nothing}), $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( $author$project$Main$PortOutgoingFormFields(newFormFields)))); - case 'MoveFormFieldUp': + case 4: var fieldIndex = msg.a; - var newFormFields = A3($author$project$Main$swapArrayIndex, fieldIndex, fieldIndex - 1, model.formFields); + var newFormFields = A3($author$project$Main$swapArrayIndex, fieldIndex, fieldIndex - 1, model.g); return _Utils_Tuple2( _Utils_update( model, { - formFields: newFormFields, - selectedFieldIndex: $elm$core$Maybe$Just(fieldIndex - 1) + g: newFormFields, + F: $elm$core$Maybe$Just(fieldIndex - 1) }), $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( $author$project$Main$PortOutgoingFormFields(newFormFields)))); - case 'MoveFormFieldDown': + case 5: var fieldIndex = msg.a; - var newFormFields = A3($author$project$Main$swapArrayIndex, fieldIndex, fieldIndex + 1, model.formFields); + var newFormFields = A3($author$project$Main$swapArrayIndex, fieldIndex, fieldIndex + 1, model.g); return _Utils_Tuple2( _Utils_update( model, { - formFields: newFormFields, - selectedFieldIndex: $elm$core$Maybe$Just(fieldIndex + 1) + g: newFormFields, + F: $elm$core$Maybe$Just(fieldIndex + 1) }), $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( $author$project$Main$PortOutgoingFormFields(newFormFields)))); - case 'OnFormField': + case 6: var fmsg = msg.a; var fieldIndex = msg.b; var string = msg.c; @@ -8836,41 +8830,41 @@ var $author$project$Main$update = F2( $elm$core$Array$indexedMap, F2( function (i, formField) { - return _Utils_eq(i, fieldIndex) ? A5($author$project$Main$updateFormField, fmsg, fieldIndex, string, model.formFields, formField) : formField; + return _Utils_eq(i, fieldIndex) ? A5($author$project$Main$updateFormField, fmsg, fieldIndex, string, model.g, formField) : formField; }), - model.formFields); + model.g); return _Utils_Tuple2( _Utils_update( model, - {formFields: newFormFields}), + {g: newFormFields}), $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( $author$project$Main$PortOutgoingFormFields(newFormFields)))); - case 'SetEditorAnimate': + case 7: var maybeAnimate = msg.a; return _Utils_Tuple2( _Utils_update( model, { - viewMode: $author$project$Main$Editor( - {maybeAnimate: maybeAnimate}) + ad: $author$project$Main$Editor( + {aC: maybeAnimate}) }), $elm$core$Platform$Cmd$none); - case 'SelectField': + case 8: var fieldIndex = msg.a; - var _v4 = _Utils_Tuple2(model.selectedFieldIndex, fieldIndex); - if ((_v4.a.$ === 'Just') && (_v4.b.$ === 'Nothing')) { + var _v4 = _Utils_Tuple2(model.F, fieldIndex); + if ((!_v4.a.$) && (_v4.b.$ === 1)) { var prevIndex = _v4.a.a; var _v5 = _v4.b; return _Utils_Tuple2( _Utils_update( model, { - selectedFieldIndex: $elm$core$Maybe$Nothing, - viewMode: $author$project$Main$Editor( + F: $elm$core$Maybe$Nothing, + ad: $author$project$Main$Editor( { - maybeAnimate: $elm$core$Maybe$Just( - _Utils_Tuple2(prevIndex, $author$project$Main$AnimateYellowFade)) + aC: $elm$core$Maybe$Just( + _Utils_Tuple2(prevIndex, 0)) }) }), $elm$core$Platform$Cmd$none); @@ -8878,41 +8872,41 @@ var $author$project$Main$update = F2( return _Utils_Tuple2( _Utils_update( model, - {selectedFieldIndex: fieldIndex}), + {F: fieldIndex}), $elm$core$Platform$Cmd$none); } - case 'DragStart': + case 9: var fieldIndex = msg.a; return _Utils_Tuple2( _Utils_update( model, { - dragged: $elm$core$Maybe$Just( + r: $elm$core$Maybe$Just( $author$project$Main$DragExisting( - {dragIndex: fieldIndex, dropIndex: $elm$core$Maybe$Nothing})), - selectedFieldIndex: $elm$core$Maybe$Nothing + {a9: fieldIndex, G: $elm$core$Maybe$Nothing})), + F: $elm$core$Maybe$Nothing }), $elm$core$Platform$Cmd$none); - case 'DragStartNew': + case 10: var fieldIndex = msg.a; return _Utils_Tuple2( _Utils_update( model, { - dragged: $elm$core$Maybe$Just( + r: $elm$core$Maybe$Just( $author$project$Main$DragNew( { - dropIndex: $elm$core$Maybe$Just( + G: $elm$core$Maybe$Just( _Utils_Tuple2(0, $elm$core$Maybe$Nothing)), - field: fieldIndex + bX: fieldIndex })) }), $elm$core$Platform$Cmd$none); - case 'DragEnd': - var _v6 = model.dragged; - if (_v6.$ === 'Just') { - if (_v6.a.$ === 'DragExisting') { - var dropIndex = _v6.a.a.dropIndex; + case 11: + var _v6 = model.r; + if (!_v6.$) { + if (!_v6.a.$) { + var dropIndex = _v6.a.a.G; var $temp$msg = $author$project$Main$Drop( A2($elm$core$Maybe$map, $elm$core$Tuple$first, dropIndex)), $temp$model = model; @@ -8920,7 +8914,7 @@ var $author$project$Main$update = F2( model = $temp$model; continue update; } else { - var dropIndex = _v6.a.a.dropIndex; + var dropIndex = _v6.a.a.G; var $temp$msg = $author$project$Main$Drop( A2($elm$core$Maybe$map, $elm$core$Tuple$first, dropIndex)), $temp$model = model; @@ -8932,30 +8926,30 @@ var $author$project$Main$update = F2( return _Utils_Tuple2( _Utils_update( model, - {dragged: $elm$core$Maybe$Nothing}), + {r: $elm$core$Maybe$Nothing}), $elm$core$Platform$Cmd$none); } - case 'DragOver': + case 12: var maybeDroppable = msg.a; return _Utils_Tuple2( _Utils_update( model, { - dragged: A2( + r: A2( $elm$core$Maybe$map, $author$project$Main$updateDragged(maybeDroppable), - model.dragged) + model.r) }), $elm$core$Platform$Cmd$none); - case 'Drop': + case 13: var targetFieldIndex = msg.a; var newModel = A2($author$project$Main$onDropped, targetFieldIndex, model); return _Utils_Tuple2( newModel, - (!_Utils_eq(newModel.formFields, model.formFields)) ? $author$project$Main$outgoing( + (!_Utils_eq(newModel.g, model.g)) ? $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( - $author$project$Main$PortOutgoingFormFields(newModel.formFields))) : $elm$core$Platform$Cmd$none); - case 'DoSleepDo': + $author$project$Main$PortOutgoingFormFields(newModel.g))) : $elm$core$Platform$Cmd$none); + case 14: if (!msg.b.b) { return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none); } else { @@ -8979,12 +8973,12 @@ var $author$project$Main$update = F2( $elm$core$Process$sleep(duration)) ]))); } - case 'SelectFieldGroup': + case 16: var index = msg.a; return _Utils_Tuple2( _Utils_update( model, - {activeFieldGroupIndex: index}), + {ay: index}), $elm$core$Platform$Cmd$none); default: var fieldName = msg.a; @@ -8997,16 +8991,16 @@ var $author$project$Main$update = F2( $author$project$Main$fieldNameOf(f), fieldName); }, - $elm$core$Array$toList(model.formFields))); + $elm$core$Array$toList(model.g))); var currentValues = A2( $elm$core$Maybe$withDefault, _List_Nil, - A2($elm$core$Dict$get, fieldName, model.trackedFormValues)); + A2($elm$core$Dict$get, fieldName, model.v)); var newValues = function () { - if (formField.$ === 'Just') { + if (!formField.$) { var field = formField.a; - var _v11 = field.type_; - if (_v11.$ === 'ChooseMultiple') { + var _v11 = field.a; + if (_v11.$ === 4) { return A2($elm$core$List$member, value, currentValues) ? A2( $elm$core$List$filter, $elm$core$Basics$neq(value), @@ -9020,7 +9014,7 @@ var $author$project$Main$update = F2( [value]); } }(); - var newTrackedFormValues = A3($elm$core$Dict$insert, fieldName, newValues, model.trackedFormValues); + var newTrackedFormValues = A3($elm$core$Dict$insert, fieldName, newValues, model.v); var formValues = A3( $elm$json$Json$Encode$dict, $elm$core$Basics$identity, @@ -9039,7 +9033,7 @@ var $author$project$Main$update = F2( return _Utils_Tuple2( _Utils_update( model, - {trackedFormValues: newTrackedFormValues}), + {v: newTrackedFormValues}), $author$project$Main$outgoing( $author$project$Main$encodePortOutgoingValue( $author$project$Main$PortOutgoingFormValues(formValues)))); @@ -9062,7 +9056,7 @@ var $elm$html$Html$text = $elm$virtual_dom$VirtualDom$text; var $elm$html$Html$input = _VirtualDom_node('input'); var $elm$html$Html$Attributes$name = $elm$html$Html$Attributes$stringProperty('name'); var $author$project$Main$stringFromViewMode = function (viewMode) { - if (viewMode.$ === 'Editor') { + if (!viewMode.$) { return 'Editor'; } else { return 'CollectData'; @@ -9070,10 +9064,10 @@ var $author$project$Main$stringFromViewMode = function (viewMode) { }; var $elm$html$Html$Attributes$type_ = $elm$html$Html$Attributes$stringProperty('type'); var $elm$html$Html$Attributes$value = $elm$html$Html$Attributes$stringProperty('value'); -var $author$project$Main$DragEnd = {$: 'DragEnd'}; -var $author$project$Main$NoOp = {$: 'NoOp'}; +var $author$project$Main$DragEnd = {$: 11}; +var $author$project$Main$NoOp = {$: 0}; var $author$project$Main$SelectField = function (a) { - return {$: 'SelectField', a: a}; + return {$: 8, a: a}; }; var $elm$html$Html$Attributes$classList = function (classes) { return $elm$html$Html$Attributes$class( @@ -9087,13 +9081,13 @@ var $elm$html$Html$Attributes$classList = function (classes) { }; var $author$project$Main$fieldsWithPlaceholder = F2( function (fields, dragged) { - if (dragged.$ === 'Nothing') { + if (dragged.$ === 1) { return A2($elm$core$List$map, $elm$core$Maybe$Just, fields); } else { - if (dragged.a.$ === 'DragExisting') { - var dragIndex = dragged.a.a.dragIndex; - var dropIndex = dragged.a.a.dropIndex; - if (dropIndex.$ === 'Nothing') { + if (!dragged.a.$) { + var dragIndex = dragged.a.a.a9; + var dropIndex = dragged.a.a.G; + if (dropIndex.$ === 1) { return A2($elm$core$List$map, $elm$core$Maybe$Just, fields); } else { var _v2 = dropIndex.a; @@ -9124,8 +9118,8 @@ var $author$project$Main$fieldsWithPlaceholder = F2( ])); } } else { - var dropIndex = dragged.a.a.dropIndex; - if (dropIndex.$ === 'Nothing') { + var dropIndex = dragged.a.a.G; + if (dropIndex.$ === 1) { return A2($elm$core$List$map, $elm$core$Maybe$Just, fields); } else { var _v4 = dropIndex.a; @@ -9145,7 +9139,7 @@ var $author$project$Main$fieldsWithPlaceholder = F2( }); var $elm$html$Html$h2 = _VirtualDom_node('h2'); var $elm$virtual_dom$VirtualDom$Normal = function (a) { - return {$: 'Normal', a: a}; + return {$: 0, a: a}; }; var $elm$virtual_dom$VirtualDom$on = _VirtualDom_on; var $elm$html$Html$Events$on = F2( @@ -9162,7 +9156,7 @@ var $elm$html$Html$Events$onClick = function (msg) { $elm$json$Json$Decode$succeed(msg)); }; var $elm$virtual_dom$VirtualDom$MayPreventDefault = function (a) { - return {$: 'MayPreventDefault', a: a}; + return {$: 2, a: a}; }; var $elm$html$Html$Events$preventDefaultOn = F2( function (event, decoder) { @@ -9172,7 +9166,7 @@ var $elm$html$Html$Events$preventDefaultOn = F2( $elm$virtual_dom$VirtualDom$MayPreventDefault(decoder)); }); var $author$project$Main$DragStart = function (a) { - return {$: 'DragStart', a: a}; + return {$: 9, a: a}; }; var $elm$virtual_dom$VirtualDom$attribute = F2( function (key, value) { @@ -9235,7 +9229,7 @@ var $author$project$Main$dragHandleIcon = A2( _List_Nil) ])); var $author$project$Main$DragOver = function (a) { - return {$: 'DragOver', a: a}; + return {$: 12, a: a}; }; var $author$project$Main$dragOverDecoder = F2( function (index, maybeFormField) { @@ -9251,7 +9245,7 @@ var $author$project$Main$isConditionReferencingField = F2( var conditionFieldName = condition.a; var comparison = condition.b; return _Utils_eq(conditionFieldName, fieldName) || function () { - if (comparison.$ === 'EqualsField') { + if (comparison.$ === 4) { var targetFieldName = comparison.a; return _Utils_eq(targetFieldName, fieldName); } else { @@ -9261,8 +9255,8 @@ var $author$project$Main$isConditionReferencingField = F2( }); var $author$project$Main$isFieldUsedInChoiceFilter = F2( function (fieldName, maybeFilter) { - if (maybeFilter.$ === 'Just') { - if (maybeFilter.a.$ === 'FilterStartsWithFieldValueOf') { + if (!maybeFilter.$) { + if (!maybeFilter.a.$) { var sourceField = maybeFilter.a.a; return _Utils_eq(sourceField, fieldName); } else { @@ -9276,14 +9270,14 @@ var $author$project$Main$isFieldUsedInChoiceFilter = F2( var $author$project$Main$isFieldUsedInFilter = F2( function (fieldName, inputField) { switch (inputField.$) { - case 'Dropdown': - var filter = inputField.a.filter; + case 2: + var filter = inputField.a.e; return A2($author$project$Main$isFieldUsedInChoiceFilter, fieldName, filter); - case 'ChooseOne': - var filter = inputField.a.filter; + case 3: + var filter = inputField.a.e; return A2($author$project$Main$isFieldUsedInChoiceFilter, fieldName, filter); - case 'ChooseMultiple': - var filter = inputField.a.filter; + case 4: + var filter = inputField.a.e; return A2($author$project$Main$isFieldUsedInChoiceFilter, fieldName, filter); default: return false; @@ -9295,7 +9289,7 @@ var $author$project$Main$isFieldReferencedBy = F2( var isUsedInChoiceFilters = A2( $elm$core$List$any, function (field) { - return A2($author$project$Main$isFieldUsedInFilter, fieldName, field.type_); + return A2($author$project$Main$isFieldUsedInFilter, fieldName, field.a); }, fieldList); var isUsedInVisibilityRules = A2( @@ -9304,7 +9298,7 @@ var $author$project$Main$isFieldReferencedBy = F2( return A2( $elm$core$List$any, function (rule) { - if (rule.$ === 'ShowWhen') { + if (!rule.$) { var conditions = rule.a; return A2( $elm$core$List$any, @@ -9318,13 +9312,13 @@ var $author$project$Main$isFieldReferencedBy = F2( conditions); } }, - field.visibilityRule); + field.m); }, fieldList); - return {usedInChoiceFilters: isUsedInChoiceFilters, usedInVisibilityRules: isUsedInVisibilityRules}; + return {a6: isUsedInChoiceFilters, a7: isUsedInVisibilityRules}; }); var $elm$virtual_dom$VirtualDom$MayStopPropagation = function (a) { - return {$: 'MayStopPropagation', a: a}; + return {$: 1, a: a}; }; var $elm$html$Html$Events$stopPropagationOn = F2( function (event, decoder) { @@ -9337,43 +9331,43 @@ var $elm$html$Html$Attributes$title = $elm$html$Html$Attributes$stringProperty(' var $elm$html$Html$Attributes$for = $elm$html$Html$Attributes$stringProperty('htmlFor'); var $elm$html$Html$label = _VirtualDom_node('label'); var $author$project$Main$maybeMaxLengthOf = function (formField) { - var _v0 = formField.type_; + var _v0 = formField.a; switch (_v0.$) { - case 'ShortText': - var maxlength = _v0.a.maxlength; + case 0: + var maxlength = _v0.a.ai; switch (maxlength.$) { - case 'AttributeGiven': + case 2: var i = maxlength.a; return $elm$core$Maybe$Just(i); - case 'AttributeInvalid': + case 1: return $elm$core$Maybe$Nothing; default: return $elm$core$Maybe$Nothing; } - case 'LongText': + case 1: var maxlength = _v0.a; switch (maxlength.$) { - case 'AttributeGiven': + case 2: var i = maxlength.a; return $elm$core$Maybe$Just(i); - case 'AttributeInvalid': + case 1: return $elm$core$Maybe$Nothing; default: return $elm$core$Maybe$Nothing; } - case 'Dropdown': + case 2: return $elm$core$Maybe$Nothing; - case 'ChooseOne': + case 3: return $elm$core$Maybe$Nothing; default: return $elm$core$Maybe$Nothing; } }; var $author$project$Main$requiredData = function (presence) { - switch (presence.$) { - case 'Required': + switch (presence) { + case 0: return true; - case 'Optional': + case 1: return false; default: return true; @@ -9412,14 +9406,14 @@ var $author$project$Main$attributesFromTuple = function (_v0) { A2($elm$html$Html$Attributes$attribute, k, v)); }; var $author$project$Main$isOptionalTemporalInput = function (formField) { - var _v0 = _Utils_Tuple2(formField.presence, formField.type_); - if ((_v0.a.$ === 'Optional') && (_v0.b.$ === 'ShortText')) { + var _v0 = _Utils_Tuple2(formField.p, formField.a); + if ((_v0.a === 1) && (!_v0.b.$)) { var _v1 = _v0.a; var customElement = _v0.b.a; var inputType = A2( $elm$core$Maybe$withDefault, '', - A2($elm$core$Dict$get, 'type', customElement.attributes)); + A2($elm$core$Dict$get, 'type', customElement.q)); return A2( $elm$core$List$member, inputType, @@ -9457,14 +9451,14 @@ var $author$project$Main$defaultValue = function (str) { var $elm$core$String$toLower = _String_toLower; var $author$project$Main$filterChoices = F3( function (maybeFilter, formValues, choices) { - if (maybeFilter.$ === 'Just') { - if (maybeFilter.a.$ === 'FilterStartsWithFieldValueOf') { + if (!maybeFilter.$) { + if (!maybeFilter.a.$) { var fieldName = maybeFilter.a.a; var _v1 = A2( $elm$core$Maybe$andThen, $elm$core$List$head, A2($elm$core$Dict$get, fieldName, formValues)); - if (_v1.$ === 'Just') { + if (!_v1.$) { var filterValue = _v1.a; return $elm$core$String$isEmpty(filterValue) ? _List_Nil : A2( $elm$core$List$filter, @@ -9472,10 +9466,10 @@ var $author$project$Main$filterChoices = F3( return A2( $elm$core$String$startsWith, $elm$core$String$toLower(filterValue), - $elm$core$String$toLower(choice.value)) || A2( + $elm$core$String$toLower(choice.j)) || A2( $elm$core$String$startsWith, $elm$core$String$toLower(filterValue), - $elm$core$String$toLower(choice.label)); + $elm$core$String$toLower(choice.d)); }, choices); } else { @@ -9487,7 +9481,7 @@ var $author$project$Main$filterChoices = F3( $elm$core$Maybe$andThen, $elm$core$List$head, A2($elm$core$Dict$get, fieldName, formValues)); - if (_v2.$ === 'Just') { + if (!_v2.$) { var filterValue = _v2.a; return $elm$core$String$isEmpty(filterValue) ? _List_Nil : A2( $elm$core$List$filter, @@ -9495,10 +9489,10 @@ var $author$project$Main$filterChoices = F3( return A2( $elm$core$String$contains, $elm$core$String$toLower(filterValue), - $elm$core$String$toLower(choice.value)) || A2( + $elm$core$String$toLower(choice.j)) || A2( $elm$core$String$contains, $elm$core$String$toLower(filterValue), - $elm$core$String$toLower(choice.label)); + $elm$core$String$toLower(choice.d)); }, choices); } else { @@ -9577,21 +9571,21 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( var disabledMode = A2( $elm$core$List$member, A2($elm$html$Html$Attributes$attribute, 'disabled', 'disabled'), - config.customAttrs); + config.Z); var chosenForYou = function (choices) { - var _v13 = formField.presence; - switch (_v13.$) { - case 'Optional': + var _v13 = formField.p; + switch (_v13) { + case 1: return false; - case 'Required': + case 0: return $elm$core$List$length(choices) === 1; default: return $elm$core$List$length(choices) === 1; } }; - var _v0 = formField.type_; + var _v0 = formField.a; switch (_v0.$) { - case 'ShortText': + case 0: var customElement = _v0.a; var extraAttrs = A2( $elm$core$List$filterMap, @@ -9606,12 +9600,12 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( A2( $elm$core$Maybe$andThen, $elm$core$List$head, - A2($elm$core$Dict$get, fieldName, config.trackedFormValues))), + A2($elm$core$Dict$get, fieldName, config.v))), A2( $elm$core$List$map, $author$project$Main$attributesFromTuple, - $elm$core$Dict$toList(customElement.attributes)))); - var extraAttrKeys = $elm$core$Dict$keys(customElement.attributes); + $elm$core$Dict$toList(customElement.q)))); + var extraAttrKeys = $elm$core$Dict$keys(customElement.q); var shortTextAttrs = A2( $elm$core$List$filterMap, $author$project$Main$attributesFromTuple, @@ -9628,13 +9622,13 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( A2( $elm$core$Maybe$map, function ($) { - return $.attributes; + return $.q; }, - A2($elm$core$Dict$get, customElement.inputType, config.shortTextTypeDict)))))); + A2($elm$core$Dict$get, customElement.C, config.al)))))); var _v1 = function () { - var _v2 = customElement.datalist; + var _v2 = customElement.af; switch (_v2.$) { - case 'AttributeGiven': + case 2: var list = _v2.a; return _Utils_Tuple2( _List_fromArray( @@ -9654,15 +9648,15 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$html$Html$option, _List_fromArray( [ - $elm$html$Html$Attributes$value(choice.value) + $elm$html$Html$Attributes$value(choice.j) ]), _List_fromArray( [ - $elm$html$Html$text(choice.label) + $elm$html$Html$text(choice.d) ])); }, list))); - case 'AttributeNotNeeded': + case 0: return _Utils_Tuple2( _List_Nil, $elm$html$Html$text('')); @@ -9681,18 +9675,18 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( [ A3( $elm$html$Html$node, - customElement.inputTag, + customElement.O, _Utils_ap( _List_fromArray( [ A2( $elm$html$Html$Attributes$attribute, 'class', - A3($author$project$Main$buildInputClassString, formField, fieldName, config.trackedFormValues)), + A3($author$project$Main$buildInputClassString, formField, fieldName, config.v)), $elm$html$Html$Attributes$name(fieldName), $elm$html$Html$Attributes$id(fieldID), $elm$html$Html$Attributes$required( - $author$project$Main$requiredData(formField.presence)) + $author$project$Main$requiredData(formField.p)) ]), _Utils_ap( dataListAttrs, @@ -9701,12 +9695,12 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( _Utils_ap( extraAttrs, _Utils_ap( - config.customAttrs, - config.onInput(fieldName)))))), + config.Z, + config.aQ(fieldName)))))), _List_Nil), dataListElement ])); - case 'LongText': + case 1: var extraAttrs = A2( $elm$core$List$filterMap, $elm$core$Basics$identity, @@ -9726,7 +9720,7 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( A2( $elm$core$Maybe$andThen, $elm$core$List$head, - A2($elm$core$Dict$get, fieldName, config.trackedFormValues))) + A2($elm$core$Dict$get, fieldName, config.v))) ])); return A2( $author$project$Main$textarea, @@ -9737,28 +9731,28 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$html$Html$Attributes$name(fieldName), $elm$html$Html$Attributes$id(fieldID), $elm$html$Html$Attributes$required( - $author$project$Main$requiredData(formField.presence)), + $author$project$Main$requiredData(formField.p)), $elm$html$Html$Attributes$placeholder(' ') ]), _Utils_ap( extraAttrs, _Utils_ap( - config.customAttrs, - config.onInput(fieldName)))), + config.Z, + config.aQ(fieldName)))), _List_Nil); - case 'Dropdown': - var choices = _v0.a.choices; - var filter = _v0.a.filter; + case 2: + var choices = _v0.a.k; + var filter = _v0.a.e; var valueString = A2( $elm$core$Maybe$withDefault, '', A2( $elm$core$Maybe$andThen, $elm$core$List$head, - A2($elm$core$Dict$get, fieldName, config.trackedFormValues))); - var filteredChoices = disabledMode ? choices : A3($author$project$Main$filterChoices, filter, config.trackedFormValues, choices); + A2($elm$core$Dict$get, fieldName, config.v))); + var filteredChoices = disabledMode ? choices : A3($author$project$Main$filterChoices, filter, config.v, choices); var noChoicesAfterFiltering = (!$elm$core$List$isEmpty(choices)) && $elm$core$List$isEmpty(filteredChoices); - return (noChoicesAfterFiltering && config.needsFormLogic) ? A2($elm$html$Html$div, _List_Nil, _List_Nil) : A2( + return (noChoicesAfterFiltering && config.aa) ? A2($elm$html$Html$div, _List_Nil, _List_Nil) : A2( $elm$html$Html$div, _List_fromArray( [ @@ -9775,9 +9769,9 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$html$Html$Attributes$name(fieldName), $elm$html$Html$Attributes$id(fieldID), disabledMode ? $elm$html$Html$Attributes$class('tff-select-disabled') : $elm$html$Html$Attributes$required( - $author$project$Main$requiredData(formField.presence)) + $author$project$Main$requiredData(formField.p)) ]), - config.onChange(fieldName)), + config.bi(fieldName)), A2( $elm$core$List$cons, A2( @@ -9790,7 +9784,7 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( (valueString === '') && (!chosenForYou(filteredChoices))), A2($elm$html$Html$Attributes$attribute, 'value', '') ]), - config.customAttrs), + config.Z), _List_fromArray( [ $elm$html$Html$text('-- Select an option --') @@ -9802,32 +9796,32 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$html$Html$option, A2( $elm$core$List$cons, - $elm$html$Html$Attributes$value(choice.value), + $elm$html$Html$Attributes$value(choice.j), A2( $elm$core$List$cons, $author$project$Main$defaultSelected( - _Utils_eq(valueString, choice.value) || chosenForYou(filteredChoices)), - config.customAttrs)), + _Utils_eq(valueString, choice.j) || chosenForYou(filteredChoices)), + config.Z)), _List_fromArray( [ - $elm$html$Html$text(choice.label) + $elm$html$Html$text(choice.d) ])); }, filteredChoices))) ])); - case 'ChooseOne': - var choices = _v0.a.choices; - var filter = _v0.a.filter; + case 3: + var choices = _v0.a.k; + var filter = _v0.a.e; var valueString = A2( $elm$core$Maybe$withDefault, '', A2( $elm$core$Maybe$andThen, $elm$core$List$head, - A2($elm$core$Dict$get, fieldName, config.trackedFormValues))); - var filteredChoices = disabledMode ? choices : A3($author$project$Main$filterChoices, filter, config.trackedFormValues, choices); + A2($elm$core$Dict$get, fieldName, config.v))); + var filteredChoices = disabledMode ? choices : A3($author$project$Main$filterChoices, filter, config.v, choices); var noChoicesAfterFiltering = (!$elm$core$List$isEmpty(choices)) && $elm$core$List$isEmpty(filteredChoices); - return (noChoicesAfterFiltering && config.needsFormLogic) ? A2($elm$html$Html$div, _List_Nil, _List_Nil) : A2( + return (noChoicesAfterFiltering && config.aa) ? A2($elm$html$Html$div, _List_Nil, _List_Nil) : A2( $elm$html$Html$div, _List_fromArray( [ @@ -9868,37 +9862,37 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$html$Html$Attributes$type_('radio'), $elm$html$Html$Attributes$tabindex(0), $elm$html$Html$Attributes$name(fieldName), - $elm$html$Html$Attributes$value(choice.value), + $elm$html$Html$Attributes$value(choice.j), $elm$html$Html$Attributes$checked( - _Utils_eq(valueString, choice.value) || chosenForYou(filteredChoices)), + _Utils_eq(valueString, choice.j) || chosenForYou(filteredChoices)), $elm$html$Html$Attributes$required( - $author$project$Main$requiredData(formField.presence)) + $author$project$Main$requiredData(formField.p)) ]), _Utils_ap( - config.customAttrs, - config.onInput(fieldName))), + config.Z, + config.aQ(fieldName))), _List_Nil), $elm$html$Html$text(' '), - $elm$html$Html$text(choice.label) + $elm$html$Html$text(choice.d) ])) ])); }, filteredChoices)) ])); default: - var choices = _v0.a.choices; - var minRequired = _v0.a.minRequired; - var maxAllowed = _v0.a.maxAllowed; - var filter = _v0.a.filter; + var choices = _v0.a.k; + var minRequired = _v0.a.P; + var maxAllowed = _v0.a.U; + var filter = _v0.a.e; var values = A2( $elm$core$Maybe$withDefault, _List_Nil, - A2($elm$core$Dict$get, fieldName, config.trackedFormValues)); + A2($elm$core$Dict$get, fieldName, config.v)); var selectedCount = $elm$core$List$length(values); var validationElement = function () { var effectiveMin = function () { - var _v10 = _Utils_Tuple2(formField.presence, minRequired); - if ((_v10.a.$ === 'System') && (_v10.b.$ === 'Nothing')) { + var _v10 = _Utils_Tuple2(formField.p, minRequired); + if ((_v10.a === 2) && (_v10.b.$ === 1)) { var _v11 = _v10.a; var _v12 = _v10.b; return $elm$core$Maybe$Just(1); @@ -9940,8 +9934,8 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( }(); var isValid = function () { var _v5 = _Utils_Tuple2(minRequired, maxAllowed); - if (_v5.a.$ === 'Just') { - if (_v5.b.$ === 'Just') { + if (!_v5.a.$) { + if (!_v5.b.$) { var min = _v5.a.a; var max = _v5.b.a; return (_Utils_cmp(selectedCount, min) > -1) && (_Utils_cmp(selectedCount, max) < 1); @@ -9951,7 +9945,7 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( return _Utils_cmp(selectedCount, min) > -1; } } else { - if (_v5.b.$ === 'Just') { + if (!_v5.b.$) { var _v7 = _v5.a; var max = _v5.b.a; return _Utils_cmp(selectedCount, max) < 1; @@ -9962,9 +9956,9 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( } } }(); - var filteredChoices = disabledMode ? choices : A3($author$project$Main$filterChoices, filter, config.trackedFormValues, choices); + var filteredChoices = disabledMode ? choices : A3($author$project$Main$filterChoices, filter, config.v, choices); var noChoicesAfterFiltering = (!$elm$core$List$isEmpty(choices)) && $elm$core$List$isEmpty(filteredChoices); - return (noChoicesAfterFiltering && config.needsFormLogic) ? A2($elm$html$Html$div, _List_Nil, _List_Nil) : A2( + return (noChoicesAfterFiltering && config.aa) ? A2($elm$html$Html$div, _List_Nil, _List_Nil) : A2( $elm$html$Html$div, _List_fromArray( [ @@ -9985,14 +9979,14 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$core$List$map, function (choice) { var alreadyFull = function () { - if (maxAllowed.$ === 'Just') { + if (!maxAllowed.$) { var m = maxAllowed.a; return _Utils_cmp(selectedCount, m) > -1; } else { return false; } }(); - var shouldDisable = alreadyFull && (!A2($elm$core$List$member, choice.value, values)); + var shouldDisable = alreadyFull && (!A2($elm$core$List$member, choice.j, values)); return A2( $elm$html$Html$div, _List_fromArray( @@ -10017,9 +10011,9 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( $elm$html$Html$Attributes$type_('checkbox'), $elm$html$Html$Attributes$tabindex(0), $elm$html$Html$Attributes$name(fieldName), - $elm$html$Html$Attributes$value(choice.value), + $elm$html$Html$Attributes$value(choice.j), $elm$html$Html$Attributes$checked( - A2($elm$core$List$member, choice.value, values) || chosenForYou(filteredChoices)) + A2($elm$core$List$member, choice.j, values) || chosenForYou(filteredChoices)) ]), _Utils_ap( shouldDisable ? _List_fromArray( @@ -10027,11 +10021,11 @@ var $author$project$Main$viewFormFieldOptionsPreview = F3( A2($elm$html$Html$Attributes$attribute, 'disabled', 'disabled') ]) : _List_Nil, _Utils_ap( - config.customAttrs, - A2(config.onChooseMany, fieldName, choice)))), + config.Z, + A2(config.bj, fieldName, choice)))), _List_Nil), $elm$html$Html$text(' '), - $elm$html$Html$text(choice.label) + $elm$html$Html$text(choice.d) ])) ])); }, @@ -10054,8 +10048,8 @@ var $author$project$Main$viewFormFieldPreview = F3( $elm$html$Html$Attributes$class( 'tff-field-group' + A2( $author$project$Main$when, - $author$project$Main$requiredData(formField.presence), - {_false: '', _true: ' tff-required'})) + $author$project$Main$requiredData(formField.p), + {aX: '', a4: ' tff-required'})) ]), _List_fromArray( [ @@ -10068,16 +10062,16 @@ var $author$project$Main$viewFormFieldPreview = F3( ]), _List_fromArray( [ - $elm$html$Html$text(formField.label), + $elm$html$Html$text(formField.d), function () { - var _v0 = formField.presence; - switch (_v0.$) { - case 'Required': + var _v0 = formField.p; + switch (_v0) { + case 0: return $elm$html$Html$text(''); - case 'Optional': - var _v1 = formField.type_; - if (_v1.$ === 'ChooseMultiple') { - var minRequired = _v1.a.minRequired; + case 1: + var _v1 = formField.a; + if (_v1.$ === 4) { + var minRequired = _v1.a.P; return (!_Utils_eq(minRequired, $elm$core$Maybe$Nothing)) ? $elm$html$Html$text('') : $elm$html$Html$text(' (optional)'); } else { return $elm$html$Html$text(' (optional)'); @@ -10098,11 +10092,11 @@ var $author$project$Main$viewFormFieldPreview = F3( [ $elm$html$Html$text( function () { - var _v2 = formField.description; + var _v2 = formField.S; switch (_v2.$) { - case 'AttributeNotNeeded': + case 0: return ''; - case 'AttributeInvalid': + case 1: var s = _v2.a; return s; default: @@ -10112,7 +10106,7 @@ var $author$project$Main$viewFormFieldPreview = F3( }()), function () { var _v3 = $author$project$Main$maybeMaxLengthOf(formField); - if (_v3.$ === 'Just') { + if (!_v3.$) { var maxLength = _v3.a; return $elm$html$Html$text( ' (max ' + ($elm$core$String$fromInt(maxLength) + ' characters)')); @@ -10126,7 +10120,7 @@ var $author$project$Main$viewFormFieldPreview = F3( }); var $author$project$Main$renderFormBuilderField = F4( function (maybeAnimate, model, index, maybeFormField) { - if (maybeFormField.$ === 'Nothing') { + if (maybeFormField.$ === 1) { return A2( $elm$html$Html$div, _List_fromArray( @@ -10161,7 +10155,7 @@ var $author$project$Main$renderFormBuilderField = F4( A2( $elm$html$Html$Attributes$attribute, 'data-input-field', - $author$project$Main$stringFromInputField(formField.type_)), + $author$project$Main$stringFromInputField(formField.a)), A2( $elm$html$Html$Events$preventDefaultOn, 'dragover', @@ -10191,7 +10185,7 @@ var $author$project$Main$renderFormBuilderField = F4( _Utils_Tuple2( 'tff-animate-fadeOut', function () { - if ((maybeAnimate.$ === 'Just') && (maybeAnimate.a.b.$ === 'AnimateFadeOut')) { + if ((!maybeAnimate.$) && (maybeAnimate.a.b === 1)) { var _v2 = maybeAnimate.a; var i = _v2.a; var _v3 = _v2.b; @@ -10203,7 +10197,7 @@ var $author$project$Main$renderFormBuilderField = F4( _Utils_Tuple2( 'tff-animate-yellowFade', function () { - if ((maybeAnimate.$ === 'Just') && (maybeAnimate.a.b.$ === 'AnimateYellowFade')) { + if ((!maybeAnimate.$) && (!maybeAnimate.a.b)) { var _v5 = maybeAnimate.a; var i = _v5.a; var _v6 = _v5.b; @@ -10225,7 +10219,7 @@ var $author$project$Main$renderFormBuilderField = F4( $elm$html$Html$Attributes$attribute, 'data-selected', _Utils_eq( - model.selectedFieldIndex, + model.F, $elm$core$Maybe$Just(index)) ? 'true' : 'false'), A2($elm$html$Html$Attributes$attribute, 'draggable', 'true'), A2( @@ -10249,25 +10243,25 @@ var $author$project$Main$renderFormBuilderField = F4( _List_fromArray( [$author$project$Main$dragHandleIcon])), function () { - var hasVisibilityRules = !$elm$core$List$isEmpty(formField.visibilityRule); + var hasVisibilityRules = !$elm$core$List$isEmpty(formField.m); var hasFilterChoices = function () { - var _v7 = formField.type_; + var _v7 = formField.a; switch (_v7.$) { - case 'Dropdown': - var filter = _v7.a.filter; + case 2: + var filter = _v7.a.e; return !_Utils_eq(filter, $elm$core$Maybe$Nothing); - case 'ChooseOne': - var filter = _v7.a.filter; + case 3: + var filter = _v7.a.e; return !_Utils_eq(filter, $elm$core$Maybe$Nothing); - case 'ChooseMultiple': - var filter = _v7.a.filter; + case 4: + var filter = _v7.a.e; return !_Utils_eq(filter, $elm$core$Maybe$Nothing); default: return false; } }(); var fieldName = $author$project$Main$fieldNameOf(formField); - var referencedInfo = A2($author$project$Main$isFieldReferencedBy, fieldName, model.formFields); + var referencedInfo = A2($author$project$Main$isFieldReferencedBy, fieldName, model.g); return A2( $elm$html$Html$div, _List_fromArray( @@ -10276,57 +10270,57 @@ var $author$project$Main$renderFormBuilderField = F4( ]), _List_fromArray( [ - (hasVisibilityRules || referencedInfo.usedInVisibilityRules) ? A2( + (hasVisibilityRules || referencedInfo.a7) ? A2( $elm$html$Html$div, _List_fromArray( [ $elm$html$Html$Attributes$class( hasVisibilityRules ? 'tff-logic-indicator tff-logic-indicator-blue' : 'tff-logic-indicator tff-logic-indicator-gray'), $elm$html$Html$Attributes$title( - (hasVisibilityRules && referencedInfo.usedInVisibilityRules) ? 'This field has visibility logic and other fields\' visibility depends on it' : (hasVisibilityRules ? 'This field has visibility logic' : 'Other fields\' visibility depends on this field\'s value')) + (hasVisibilityRules && referencedInfo.a7) ? 'This field has visibility logic and other fields\' visibility depends on it' : (hasVisibilityRules ? 'This field has visibility logic' : 'Other fields\' visibility depends on this field\'s value')) ]), _List_fromArray( [ $elm$html$Html$text( - (hasVisibilityRules && referencedInfo.usedInVisibilityRules) ? 'Contains & affects logic' : (hasVisibilityRules ? 'Contains logic' : 'Affects logic')) + (hasVisibilityRules && referencedInfo.a7) ? 'Contains & affects logic' : (hasVisibilityRules ? 'Contains logic' : 'Affects logic')) ])) : $elm$html$Html$text(''), - (hasFilterChoices || referencedInfo.usedInChoiceFilters) ? A2( + (hasFilterChoices || referencedInfo.a6) ? A2( $elm$html$Html$div, _List_fromArray( [ $elm$html$Html$Attributes$class( hasFilterChoices ? 'tff-logic-indicator tff-logic-indicator-orange' : 'tff-logic-indicator tff-logic-indicator-gray'), $elm$html$Html$Attributes$title( - (hasFilterChoices && referencedInfo.usedInChoiceFilters) ? 'This field filters choices and other fields\' choices depend on it' : (hasFilterChoices ? 'This field filters choices based on another field' : 'Other fields\' choices depend on this field\'s value')) + (hasFilterChoices && referencedInfo.a6) ? 'This field filters choices and other fields\' choices depend on it' : (hasFilterChoices ? 'This field filters choices based on another field' : 'Other fields\' choices depend on this field\'s value')) ]), _List_fromArray( [ $elm$html$Html$text( - (hasFilterChoices && referencedInfo.usedInChoiceFilters) ? 'Filters & affects choices' : (hasFilterChoices ? 'Filters choices' : 'Affects choices')) + (hasFilterChoices && referencedInfo.a6) ? 'Filters & affects choices' : (hasFilterChoices ? 'Filters choices' : 'Affects choices')) ])) : $elm$html$Html$text('') ])); }(), A3( $author$project$Main$viewFormFieldPreview, { - customAttrs: _List_fromArray( + Z: _List_fromArray( [ A2($elm$html$Html$Attributes$attribute, 'disabled', 'disabled') ]), - formFields: model.formFields, - needsFormLogic: false, - onChange: function (_v8) { + g: model.g, + aa: false, + bi: function (_v8) { return _List_Nil; }, - onChooseMany: F2( + bj: F2( function (_v9, _v10) { return _List_Nil; }), - onInput: function (_v11) { + aQ: function (_v11) { return _List_Nil; }, - shortTextTypeDict: model.shortTextTypeDict, - trackedFormValues: model.trackedFormValues + al: model.al, + v: model.v }, index, formField) @@ -10336,10 +10330,10 @@ var $author$project$Main$renderFormBuilderField = F4( } }); var $author$project$Main$AddFormField = function (a) { - return {$: 'AddFormField', a: a}; + return {$: 2, a: a}; }; var $author$project$Main$DragStartNew = function (a) { - return {$: 'DragStartNew', a: a}; + return {$: 10, a: a}; }; var $author$project$Main$viewAddQuestionsList = F2( function (nextQuestionNumber, inputFields) { @@ -10367,15 +10361,15 @@ var $author$project$Main$viewAddQuestionsList = F2( $elm$json$Json$Decode$succeed( $author$project$Main$DragStartNew( { - description: $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing), - label: $author$project$Main$stringFromInputField(inputField) + (' question ' + $elm$core$String$fromInt(nextQuestionNumber)), - name: $elm$core$Maybe$Nothing, - presence: A2( + S: $author$project$Main$AttributeNotNeeded($elm$core$Maybe$Nothing), + d: $author$project$Main$stringFromInputField(inputField) + (' question ' + $elm$core$String$fromInt(nextQuestionNumber)), + Q: $elm$core$Maybe$Nothing, + p: A2( $author$project$Main$when, $author$project$Main$mustBeOptional(inputField), - {_false: $author$project$Main$Required, _true: $author$project$Main$Optional}), - type_: inputField, - visibilityRule: _List_Nil + {aX: 0, a4: 1}), + a: inputField, + m: _List_Nil }))), A2( $elm$html$Html$Events$on, @@ -10391,7 +10385,7 @@ var $author$project$Main$viewAddQuestionsList = F2( inputFields)); }); var $author$project$Main$SelectFieldGroup = function (a) { - return {$: 'SelectFieldGroup', a: a}; + return {$: 16, a: a}; }; var $elm$html$Html$button = _VirtualDom_node('button'); var $author$project$Main$viewFieldGroupTabs = F2( @@ -10424,40 +10418,40 @@ var $author$project$Main$viewFieldGroupTabs = F2( ]), _List_fromArray( [ - $elm$html$Html$text(group.heading) + $elm$html$Html$text(group.aY) ])); }), groups)); }); -var $author$project$Main$AnimateFadeOut = {$: 'AnimateFadeOut'}; +var $author$project$Main$AnimateFadeOut = 1; var $author$project$Main$DeleteFormField = function (a) { - return {$: 'DeleteFormField', a: a}; + return {$: 3, a: a}; }; var $author$project$Main$MoveFormFieldDown = function (a) { - return {$: 'MoveFormFieldDown', a: a}; + return {$: 5, a: a}; }; var $author$project$Main$MoveFormFieldUp = function (a) { - return {$: 'MoveFormFieldUp', a: a}; + return {$: 4, a: a}; }; -var $author$project$Main$OnDescriptionInput = {$: 'OnDescriptionInput'}; +var $author$project$Main$OnDescriptionInput = {$: 1}; var $author$project$Main$OnDescriptionToggle = function (a) { - return {$: 'OnDescriptionToggle', a: a}; + return {$: 2, a: a}; }; var $author$project$Main$OnFormField = F3( function (a, b, c) { - return {$: 'OnFormField', a: a, b: b, c: c}; + return {$: 6, a: a, b: b, c: c}; }); -var $author$project$Main$OnLabelInput = {$: 'OnLabelInput'}; +var $author$project$Main$OnLabelInput = {$: 0}; var $author$project$Main$OnMultipleToggle = function (a) { - return {$: 'OnMultipleToggle', a: a}; + return {$: 5, a: a}; }; var $author$project$Main$OnRequiredInput = function (a) { - return {$: 'OnRequiredInput', a: a}; + return {$: 3, a: a}; }; var $author$project$Main$allowsTogglingMultiple = function (inputField) { switch (inputField.$) { - case 'ShortText': - var attributes = inputField.a.attributes; + case 0: + var attributes = inputField.a.q; return A2( $elm$core$List$member, A2($elm$core$Dict$get, 'multiple', attributes), @@ -10466,11 +10460,11 @@ var $author$project$Main$allowsTogglingMultiple = function (inputField) { $elm$core$Maybe$Just('true'), $elm$core$Maybe$Just('false') ])); - case 'LongText': + case 1: return false; - case 'Dropdown': + case 2: return false; - case 'ChooseOne': + case 3: return false; default: return false; @@ -10482,7 +10476,7 @@ var $author$project$Main$hasDuplicateLabel = F3( $elm$core$List$any, function (_v1) { var f = _v1.b; - return _Utils_eq(f.label, newLabel); + return _Utils_eq(f.d, newLabel); }, A2( $elm$core$List$filter, @@ -10512,7 +10506,7 @@ var $elm$html$Html$Events$onCheck = function (tagger) { var $author$project$Main$inputAttributeOptional = F2( function (options, attributeOptional) { switch (attributeOptional.$) { - case 'AttributeNotNeeded': + case 0: return A2( $elm$html$Html$div, _List_fromArray( @@ -10536,14 +10530,14 @@ var $author$project$Main$inputAttributeOptional = F2( $elm$html$Html$Attributes$type_('checkbox'), $elm$html$Html$Attributes$tabindex(0), $elm$html$Html$Attributes$checked(false), - $elm$html$Html$Events$onCheck(options.onCheck) + $elm$html$Html$Events$onCheck(options.ac) ]), _List_Nil), $elm$html$Html$text(' '), - $elm$html$Html$text(options.label) + $elm$html$Html$text(options.d) ])) ])); - case 'AttributeInvalid': + case 1: var str = attributeOptional.a; return A2( $elm$html$Html$div, @@ -10568,13 +10562,13 @@ var $author$project$Main$inputAttributeOptional = F2( $elm$html$Html$Attributes$type_('checkbox'), $elm$html$Html$Attributes$tabindex(0), $elm$html$Html$Attributes$checked(true), - $elm$html$Html$Events$onCheck(options.onCheck) + $elm$html$Html$Events$onCheck(options.ac) ]), _List_Nil), $elm$html$Html$text(' '), - $elm$html$Html$text(options.label) + $elm$html$Html$text(options.d) ])), - options.htmlNode( + options.ag( $elm$core$Result$Err(str)) ])); default: @@ -10602,36 +10596,36 @@ var $author$project$Main$inputAttributeOptional = F2( $elm$html$Html$Attributes$type_('checkbox'), $elm$html$Html$Attributes$tabindex(0), $elm$html$Html$Attributes$checked(true), - $elm$html$Html$Events$onCheck(options.onCheck) + $elm$html$Html$Events$onCheck(options.ac) ]), _List_Nil), $elm$html$Html$text(' '), - $elm$html$Html$text(options.label) + $elm$html$Html$text(options.d) ])), - options.htmlNode( + options.ag( $elm$core$Result$Ok(a)) ])); } }); var $author$project$Main$maybeMultipleOf = function (formField) { - var _v0 = formField.type_; + var _v0 = formField.a; switch (_v0.$) { - case 'ShortText': - var multiple = _v0.a.multiple; + case 0: + var multiple = _v0.a.aO; switch (multiple.$) { - case 'AttributeGiven': + case 2: var i = multiple.a; return $elm$core$Maybe$Just(i); - case 'AttributeInvalid': + case 1: return $elm$core$Maybe$Nothing; default: return $elm$core$Maybe$Nothing; } - case 'LongText': + case 1: return $elm$core$Maybe$Nothing; - case 'Dropdown': + case 2: return $elm$core$Maybe$Nothing; - case 'ChooseOne': + case 3: return $elm$core$Maybe$Nothing; default: return $elm$core$Maybe$Nothing; @@ -10656,40 +10650,40 @@ var $elm$html$Html$Events$onInput = function (tagger) { }; var $elm$html$Html$Attributes$pattern = $elm$html$Html$Attributes$stringProperty('pattern'); var $author$project$Main$OnCheckboxMaxAllowedInput = function (a) { - return {$: 'OnCheckboxMaxAllowedInput', a: a}; + return {$: 17, a: a}; }; var $author$project$Main$OnCheckboxMinRequiredInput = function (a) { - return {$: 'OnCheckboxMinRequiredInput', a: a}; + return {$: 16, a: a}; }; -var $author$project$Main$OnChoicesInput = {$: 'OnChoicesInput'}; -var $author$project$Main$OnDatalistInput = {$: 'OnDatalistInput'}; +var $author$project$Main$OnChoicesInput = {$: 4}; +var $author$project$Main$OnDatalistInput = {$: 9}; var $author$project$Main$OnDatalistToggle = function (a) { - return {$: 'OnDatalistToggle', a: a}; + return {$: 8, a: a}; }; var $author$project$Main$OnDateMaxInput = function (a) { - return {$: 'OnDateMaxInput', a: a}; + return {$: 21, a: a}; }; var $author$project$Main$OnDateMaxToggle = function (a) { - return {$: 'OnDateMaxToggle', a: a}; + return {$: 19, a: a}; }; var $author$project$Main$OnDateMinInput = function (a) { - return {$: 'OnDateMinInput', a: a}; + return {$: 20, a: a}; }; var $author$project$Main$OnDateMinToggle = function (a) { - return {$: 'OnDateMinToggle', a: a}; + return {$: 18, a: a}; }; var $author$project$Main$OnFilterSourceFieldSelect = function (a) { - return {$: 'OnFilterSourceFieldSelect', a: a}; + return {$: 24, a: a}; }; var $author$project$Main$OnFilterToggle = function (a) { - return {$: 'OnFilterToggle', a: a}; + return {$: 22, a: a}; }; var $author$project$Main$OnFilterTypeSelect = function (a) { - return {$: 'OnFilterTypeSelect', a: a}; + return {$: 23, a: a}; }; -var $author$project$Main$OnMaxLengthInput = {$: 'OnMaxLengthInput'}; +var $author$project$Main$OnMaxLengthInput = {$: 7}; var $author$project$Main$OnMaxLengthToggle = function (a) { - return {$: 'OnMaxLengthToggle', a: a}; + return {$: 6, a: a}; }; var $elm$html$Html$Attributes$max = $elm$html$Html$Attributes$stringProperty('max'); var $elm$html$Html$Attributes$min = $elm$html$Html$Attributes$stringProperty('min'); @@ -10711,7 +10705,7 @@ var $author$project$Main$otherQuestionTitles = F2( $elm$core$List$map, function (_v1) { var f = _v1.b; - return {label: f.label, name: f.name}; + return {d: f.d, Q: f.Q}; }, A2( $elm$core$List$filter, @@ -10734,8 +10728,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( var filterSettings = function (filter) { if (!_Utils_eq(filter, $elm$core$Maybe$Nothing)) { var sourceFieldName = function () { - if (filter.$ === 'Just') { - if (filter.a.$ === 'FilterStartsWithFieldValueOf') { + if (!filter.$) { + if (!filter.a.$) { var name = filter.a.a; return name; } else { @@ -10748,8 +10742,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( }(); var otherFields = A2($author$project$Main$otherQuestionTitles, formFields, index); var filterType = function () { - if (filter.$ === 'Just') { - if (filter.a.$ === 'FilterStartsWithFieldValueOf') { + if (!filter.$) { + if (!filter.a.$) { return 'startswith'; } else { return 'contains'; @@ -10874,7 +10868,7 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( A2( $elm$core$List$map, function (field) { - var fieldValue = A2($elm$core$Maybe$withDefault, field.label, field.name); + var fieldValue = A2($elm$core$Maybe$withDefault, field.d, field.Q); var isSelected = _Utils_eq(fieldValue, sourceFieldName); return A2( $elm$html$Html$option, @@ -10889,7 +10883,7 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( 'value of ' + A2( $elm$json$Json$Encode$encode, 0, - $elm$json$Json$Encode$string(field.label))) + $elm$json$Json$Encode$string(field.d))) ])); }, otherFields))) @@ -10976,11 +10970,11 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( $elm$html$Html$Attributes$required(true), $elm$html$Html$Attributes$readonly( function () { - var _v8 = formField.presence; - switch (_v8.$) { - case 'Required': + var _v8 = formField.p; + switch (_v8) { + case 0: return false; - case 'Optional': + case 1: return false; default: return true; @@ -10995,9 +10989,9 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( _List_Nil) ])); }; - var _v0 = formField.type_; + var _v0 = formField.a; switch (_v0.$) { - case 'ShortText': + case 0: var customElement = _v0.a; var maybeShortTextTypeMaxLength = A2( $elm$core$Maybe$andThen, @@ -11008,27 +11002,27 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( A2( $elm$core$Maybe$map, function ($) { - return $.attributes; + return $.q; }, $elm$core$List$head( A2( $elm$core$List$filter, function (_v6) { - var inputType = _v6.inputType; - return _Utils_eq(inputType, customElement.inputType); + var inputType = _v6.C; + return _Utils_eq(inputType, customElement.C); }, shortTextTypeList))))); return _Utils_ap( _List_fromArray( [ function () { - if (maybeShortTextTypeMaxLength.$ === 'Nothing') { + if (maybeShortTextTypeMaxLength.$ === 1) { return A2( $author$project$Main$inputAttributeOptional, { - htmlNode: function (result) { + ag: function (result) { var valueString = function () { - if (result.$ === 'Ok') { + if (!result.$) { var i = result.a; return $elm$core$String$fromInt(i); } else { @@ -11050,8 +11044,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ]), _List_Nil); }, - label: 'Limit number of characters', - onCheck: function (b) { + d: 'Limit number of characters', + ac: function (b) { return A3( $author$project$Main$OnFormField, $author$project$Main$OnMaxLengthToggle(b), @@ -11059,7 +11053,7 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ''); } }, - customElement.maxlength); + customElement.ai); } else { var i = maybeShortTextTypeMaxLength.a; return A2( @@ -11077,8 +11071,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( A2( $author$project$Main$inputAttributeOptional, { - htmlNode: function (result) { - if (result.$ === 'Ok') { + ag: function (result) { + if (!result.$) { var a = result.a; return A2( $author$project$Main$textarea, @@ -11114,8 +11108,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( _List_Nil); } }, - label: 'Suggested values', - onCheck: function (b) { + d: 'Suggested values', + ac: function (b) { return A3( $author$project$Main$OnFormField, $author$project$Main$OnDatalistToggle(b), @@ -11123,18 +11117,18 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ''); } }, - customElement.datalist) + customElement.af) ]), - ((customElement.inputType === 'date') || (A2( + ((customElement.C === 'date') || (A2( $elm$core$Maybe$withDefault, '', - A2($elm$core$Dict$get, 'type', customElement.attributes)) === 'date')) ? _List_fromArray( + A2($elm$core$Dict$get, 'type', customElement.q)) === 'date')) ? _List_fromArray( [ A2( $author$project$Main$inputAttributeOptional, { - htmlNode: function (result) { - if (result.$ === 'Ok') { + ag: function (result) { + if (!result.$) { var dateStr = result.a; return A2( $elm$html$Html$input, @@ -11176,8 +11170,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( _List_Nil); } }, - label: 'Minimum date', - onCheck: function (b) { + d: 'Minimum date', + ac: function (b) { return A3( $author$project$Main$OnFormField, $author$project$Main$OnDateMinToggle(b), @@ -11185,12 +11179,12 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ''); } }, - customElement.min), + customElement.ar), A2( $author$project$Main$inputAttributeOptional, { - htmlNode: function (result) { - if (result.$ === 'Ok') { + ag: function (result) { + if (!result.$) { var dateStr = result.a; return A2( $elm$html$Html$input, @@ -11232,8 +11226,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( _List_Nil); } }, - label: 'Maximum date', - onCheck: function (b) { + d: 'Maximum date', + ac: function (b) { return A3( $author$project$Main$OnFormField, $author$project$Main$OnDateMaxToggle(b), @@ -11241,17 +11235,17 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ''); } }, - customElement.max) + customElement.aq) ]) : _List_Nil); - case 'LongText': + case 1: var optionalMaxLength = _v0.a; return _List_fromArray( [ A2( $author$project$Main$inputAttributeOptional, { - htmlNode: function (result) { - if (result.$ === 'Ok') { + ag: function (result) { + if (!result.$) { var i = result.a; return A2( $elm$html$Html$input, @@ -11284,8 +11278,8 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( _List_Nil); } }, - label: 'Limit number of characters', - onCheck: function (b) { + d: 'Limit number of characters', + ac: function (b) { return A3( $author$project$Main$OnFormField, $author$project$Main$OnMaxLengthToggle(b), @@ -11295,9 +11289,9 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( }, optionalMaxLength) ]); - case 'Dropdown': - var choices = _v0.a.choices; - var filter = _v0.a.filter; + case 2: + var choices = _v0.a.k; + var filter = _v0.a.e; return _Utils_ap( _List_fromArray( [ @@ -11305,9 +11299,9 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( filterCheckbox(filter) ]), filterSettings(filter)); - case 'ChooseOne': - var choices = _v0.a.choices; - var filter = _v0.a.filter; + case 3: + var choices = _v0.a.k; + var filter = _v0.a.e; return _Utils_ap( _List_fromArray( [ @@ -11316,10 +11310,10 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ]), filterSettings(filter)); default: - var choices = _v0.a.choices; - var minRequired = _v0.a.minRequired; - var maxAllowed = _v0.a.maxAllowed; - var filter = _v0.a.filter; + var choices = _v0.a.k; + var minRequired = _v0.a.P; + var maxAllowed = _v0.a.U; + var filter = _v0.a.e; return _Utils_ap( _List_fromArray( [ @@ -11361,7 +11355,7 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( '', A2($elm$core$Maybe$map, $elm$core$String$fromInt, minRequired))), $elm$html$Html$Attributes$min( - _Utils_eq(formField.presence, $author$project$Main$System) ? '1' : '0'), + (formField.p === 2) ? '1' : '0'), A2( $elm$core$Maybe$withDefault, $elm$html$Html$Attributes$max( @@ -11383,7 +11377,7 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ''); }) ]), - _Utils_eq(formField.presence, $author$project$Main$System) ? _List_fromArray( + (formField.p === 2) ? _List_fromArray( [ $elm$html$Html$Attributes$required(true) ]) : _List_Nil), @@ -11445,7 +11439,7 @@ var $author$project$Main$viewFormFieldOptionsBuilder = F4( ]))); } }); -var $author$project$Main$OnAddVisibilityRule = {$: 'OnAddVisibilityRule'}; +var $author$project$Main$OnAddVisibilityRule = {$: 14}; var $elm$core$List$intersperse = F2( function (sep, xs) { if (!xs.b) { @@ -11465,23 +11459,23 @@ var $elm$core$List$intersperse = F2( } }); var $author$project$Main$OnVisibilityConditionDuplicate = function (a) { - return {$: 'OnVisibilityConditionDuplicate', a: a}; + return {$: 15, a: a}; }; var $author$project$Main$OnVisibilityConditionFieldInput = F3( function (a, b, c) { - return {$: 'OnVisibilityConditionFieldInput', a: a, b: b, c: c}; + return {$: 12, a: a, b: b, c: c}; }); var $author$project$Main$OnVisibilityConditionTypeInput = F3( function (a, b, c) { - return {$: 'OnVisibilityConditionTypeInput', a: a, b: b, c: c}; + return {$: 11, a: a, b: b, c: c}; }); var $author$project$Main$OnVisibilityConditionValueInput = F3( function (a, b, c) { - return {$: 'OnVisibilityConditionValueInput', a: a, b: b, c: c}; + return {$: 13, a: a, b: b, c: c}; }); var $author$project$Main$OnVisibilityRuleTypeInput = F2( function (a, b) { - return {$: 'OnVisibilityRuleTypeInput', a: a, b: b}; + return {$: 10, a: a, b: b}; }); var $author$project$Main$comparisonOf = function (condition) { var comparison = condition.b; @@ -11490,32 +11484,32 @@ var $author$project$Main$comparisonOf = function (condition) { var $author$project$Main$isComparingWith = F2( function (expected, given) { switch (expected.$) { - case 'Equals': - if (given.$ === 'Equals') { + case 0: + if (!given.$) { return true; } else { return false; } - case 'StringContains': - if (given.$ === 'StringContains') { + case 1: + if (given.$ === 1) { return true; } else { return false; } - case 'EndsWith': - if (given.$ === 'EndsWith') { + case 2: + if (given.$ === 2) { return true; } else { return false; } - case 'GreaterThan': - if (given.$ === 'GreaterThan') { + case 3: + if (given.$ === 3) { return true; } else { return false; } default: - if (given.$ === 'EqualsField') { + if (given.$ === 4) { return true; } else { return false; @@ -11523,14 +11517,14 @@ var $author$project$Main$isComparingWith = F2( } }); var $author$project$Main$isHideWhen = function (rule) { - if (rule.$ === 'ShowWhen') { + if (!rule.$) { return false; } else { return true; } }; var $author$project$Main$isShowWhen = function (rule) { - if (rule.$ === 'ShowWhen') { + if (!rule.$) { return true; } else { return false; @@ -11542,9 +11536,9 @@ var $elm$core$Basics$composeR = F3( f(x)); }); var $author$project$Main$selectInputGroup = function (_v0) { - var selectAttrs = _v0.selectAttrs; - var options = _v0.options; - var inputNode = _v0.inputNode; + var selectAttrs = _v0.cQ; + var options = _v0.cv; + var inputNode = _v0.b8; var optionToNode = function (opt) { return A2( $elm$html$Html$option, @@ -11554,15 +11548,15 @@ var $author$project$Main$selectInputGroup = function (_v0) { _List_fromArray( [ $elm$core$Maybe$Just( - $elm$html$Html$Attributes$value(opt.value)), - opt.selected ? $elm$core$Maybe$Just( + $elm$html$Html$Attributes$value(opt.j)), + opt.bl ? $elm$core$Maybe$Just( $elm$html$Html$Attributes$selected(true)) : $elm$core$Maybe$Nothing, - opt.disabled ? $elm$core$Maybe$Just( + opt.bO ? $elm$core$Maybe$Just( A2($elm$html$Html$Attributes$attribute, 'disabled', 'disabled')) : $elm$core$Maybe$Nothing ])), _List_fromArray( [ - $elm$html$Html$text(opt.label) + $elm$html$Html$text(opt.d) ])); }; var calculatedAttrs = A2( @@ -11576,13 +11570,13 @@ var $author$project$Main$selectInputGroup = function (_v0) { A2( $elm$core$Basics$composeR, function ($) { - return $.value; + return $.j; }, $elm$html$Html$Attributes$value), A2( $elm$core$List$filter, function ($) { - return $.selected; + return $.bl; }, options))); return A2( @@ -11640,12 +11634,12 @@ var $author$project$Main$visibilityRuleSection = F4( $elm$core$Array$toList(formFields))); var datalistId = 'datalist-' + ($elm$core$String$fromInt(fieldIndex) + ('-' + ($elm$core$String$fromInt(ruleIndex) + ('-' + $elm$core$String$fromInt(conditionIndex))))); var datalistElement = function () { - if (selectedField.$ === 'Just') { + if (!selectedField.$) { var field = selectedField.a; - var _v8 = field.type_; + var _v8 = field.a; switch (_v8.$) { - case 'Dropdown': - var choices = _v8.a.choices; + case 2: + var choices = _v8.a.k; return $elm$core$Maybe$Just( A2( $elm$html$Html$datalist, @@ -11660,13 +11654,13 @@ var $author$project$Main$visibilityRuleSection = F4( $elm$html$Html$option, _List_fromArray( [ - $elm$html$Html$Attributes$value(c.value) + $elm$html$Html$Attributes$value(c.j) ]), _List_Nil); }, choices))); - case 'ChooseOne': - var choices = _v8.a.choices; + case 3: + var choices = _v8.a.k; return $elm$core$Maybe$Just( A2( $elm$html$Html$datalist, @@ -11681,13 +11675,13 @@ var $author$project$Main$visibilityRuleSection = F4( $elm$html$Html$option, _List_fromArray( [ - $elm$html$Html$Attributes$value(c.value) + $elm$html$Html$Attributes$value(c.j) ]), _List_Nil); }, choices))); - case 'ChooseMultiple': - var choices = _v8.a.choices; + case 4: + var choices = _v8.a.k; return $elm$core$Maybe$Just( A2( $elm$html$Html$datalist, @@ -11702,7 +11696,7 @@ var $author$project$Main$visibilityRuleSection = F4( $elm$html$Html$option, _List_fromArray( [ - $elm$html$Html$Attributes$value(c.value) + $elm$html$Html$Attributes$value(c.j) ]), _List_Nil); }, @@ -11715,7 +11709,7 @@ var $author$project$Main$visibilityRuleSection = F4( } }(); var datalistAttr = function () { - if (datalistElement.$ === 'Just') { + if (!datalistElement.$) { return _List_fromArray( [ A2($elm$html$Html$Attributes$attribute, 'list', datalistId) @@ -11797,7 +11791,7 @@ var $author$project$Main$visibilityRuleSection = F4( 'value of ' + A2( $elm$json$Json$Encode$encode, 0, - $elm$json$Json$Encode$string(field.label))) + $elm$json$Json$Encode$string(field.d))) ])); }, A2($author$project$Main$otherQuestionTitles, formFields, fieldIndex)))) @@ -11805,20 +11799,20 @@ var $author$project$Main$visibilityRuleSection = F4( function () { var optionRecord = F4( function (value, label, selected, disabled) { - return {disabled: disabled, label: label, selected: selected, value: value}; + return {bO: disabled, d: label, bl: selected, j: value}; }); var comparisonValueString = function () { switch (rule.b.$) { - case 'Equals': + case 0: var v = rule.b.a; return v; - case 'StringContains': + case 1: var v = rule.b.a; return v; - case 'EndsWith': + case 2: var v = rule.b.a; return v; - case 'GreaterThan': + case 3: var v = rule.b.a; return v; default: @@ -11852,7 +11846,7 @@ var $author$project$Main$visibilityRuleSection = F4( datalistAttr), _List_Nil), function () { - if (datalistElement.$ === 'Just') { + if (!datalistElement.$) { var element = datalistElement.a; return _List_fromArray( [element]); @@ -11864,7 +11858,7 @@ var $author$project$Main$visibilityRuleSection = F4( var candidateFieldsExceptSelf = A2( $elm$core$List$filter, function (f) { - var fn = A2($elm$core$Maybe$withDefault, f.label, f.name); + var fn = A2($elm$core$Maybe$withDefault, f.d, f.Q); return !_Utils_eq(fn, selectedFieldName); }, candidateFields); @@ -11920,7 +11914,7 @@ var $author$project$Main$visibilityRuleSection = F4( var otherFields = A2( $elm$core$List$filter, function (f) { - var fn = A2($elm$core$Maybe$withDefault, f.label, f.name); + var fn = A2($elm$core$Maybe$withDefault, f.d, f.Q); return !_Utils_eq(fn, selectedFieldName); }, candidateFields); @@ -11966,7 +11960,7 @@ var $author$project$Main$visibilityRuleSection = F4( A2( $elm$core$List$map, function (f) { - var fn = A2($elm$core$Maybe$withDefault, f.label, f.name); + var fn = A2($elm$core$Maybe$withDefault, f.d, f.Q); return A2( $elm$html$Html$option, _List_fromArray( @@ -11981,7 +11975,7 @@ var $author$project$Main$visibilityRuleSection = F4( 'value of ' + A2( $elm$json$Json$Encode$encode, 0, - $elm$json$Json$Encode$string(f.label))) + $elm$json$Json$Encode$string(f.d))) ])); }, otherFields))), @@ -11989,7 +11983,7 @@ var $author$project$Main$visibilityRuleSection = F4( ])); var inputNode = function () { var _v3 = $author$project$Main$comparisonOf(rule); - if (_v3.$ === 'EqualsField') { + if (_v3.$ === 4) { return equalsFieldDisabled ? A2( $elm$html$Html$input, _List_fromArray( @@ -12006,9 +12000,9 @@ var $author$project$Main$visibilityRuleSection = F4( }(); return $author$project$Main$selectInputGroup( { - inputNode: inputNode, - options: optionsList, - selectAttrs: _List_fromArray( + b8: inputNode, + cv: optionsList, + cQ: _List_fromArray( [ $author$project$Main$onChange( function (str) { @@ -12069,7 +12063,7 @@ var $author$project$Main$visibilityRuleSection = F4( $elm$html$Html$Attributes$required(true), $elm$html$Html$Attributes$value( function () { - if (visibilityRule.$ === 'ShowWhen') { + if (!visibilityRule.$) { return 'ShowWhen'; } else { return 'HideWhen'; @@ -12195,7 +12189,7 @@ var $author$project$Main$visibilityRulesSection = F3( A2( $elm$core$List$indexedMap, A2($author$project$Main$visibilityRuleSection, index, formFields), - formField.visibilityRule))), + formField.m))), A2( $elm$html$Html$div, _List_fromArray( @@ -12222,7 +12216,7 @@ var $author$project$Main$visibilityRulesSection = F3( }); var $author$project$Main$viewFormFieldBuilder = F5( function (shortTextTypeList, index, totalLength, formFields, formField) { - var isDuplicateLabel = A3($author$project$Main$hasDuplicateLabel, index, formField.label, formFields); + var isDuplicateLabel = A3($author$project$Main$hasDuplicateLabel, index, formField.d, formFields); var patternAttr = isDuplicateLabel ? _List_fromArray( [ $elm$html$Html$Attributes$pattern('^$') @@ -12247,7 +12241,7 @@ var $author$project$Main$viewFormFieldBuilder = F5( [ $author$project$Main$SetEditorAnimate( $elm$core$Maybe$Just( - _Utils_Tuple2(index, $author$project$Main$AnimateFadeOut))), + _Utils_Tuple2(index, 1))), $author$project$Main$DeleteFormField(index) ]))) ]), @@ -12280,7 +12274,7 @@ var $author$project$Main$viewFormFieldBuilder = F5( $elm$html$Html$Attributes$type_('checkbox'), $elm$html$Html$Attributes$tabindex(0), $elm$html$Html$Attributes$checked( - $author$project$Main$requiredData(formField.presence)), + $author$project$Main$requiredData(formField.p)), $elm$html$Html$Events$onCheck( function (b) { return A3( @@ -12336,7 +12330,7 @@ var $author$project$Main$viewFormFieldBuilder = F5( $elm$html$Html$text(' '), $elm$html$Html$text( 'Accept multiple ' + $elm$core$String$toLower( - $author$project$Main$stringFromInputField(formField.type_))) + $author$project$Main$stringFromInputField(formField.a))) ])) ])); var buildFieldClass = 'tff-build-field'; @@ -12367,7 +12361,7 @@ var $author$project$Main$viewFormFieldBuilder = F5( _List_fromArray( [ $elm$html$Html$text( - $author$project$Main$stringFromInputField(formField.type_) + ' question title') + $author$project$Main$stringFromInputField(formField.a) + ' question title') ])), A2( $elm$html$Html$input, @@ -12376,7 +12370,7 @@ var $author$project$Main$viewFormFieldBuilder = F5( [ $elm$html$Html$Attributes$type_('text'), $elm$html$Html$Attributes$id('label-' + idSuffix), - $elm$html$Html$Attributes$value(formField.label), + $elm$html$Html$Attributes$value(formField.d), $elm$html$Html$Attributes$required(true), $elm$html$Html$Events$onInput( A2($author$project$Main$OnFormField, $author$project$Main$OnLabelInput, index)), @@ -12396,27 +12390,27 @@ var $author$project$Main$viewFormFieldBuilder = F5( ])) : $elm$html$Html$text('') ])), function () { - if ($author$project$Main$mustBeOptional(formField.type_)) { + if ($author$project$Main$mustBeOptional(formField.a)) { return $elm$html$Html$text(''); } else { - var _v0 = formField.presence; - switch (_v0.$) { - case 'Required': + var _v0 = formField.p; + switch (_v0) { + case 0: return configureRequiredCheckbox; - case 'Optional': + case 1: return configureRequiredCheckbox; default: return $elm$html$Html$text(''); } } }(), - $author$project$Main$allowsTogglingMultiple(formField.type_) ? configureMultipleCheckbox : $elm$html$Html$text(''), + $author$project$Main$allowsTogglingMultiple(formField.a) ? configureMultipleCheckbox : $elm$html$Html$text(''), A2( $author$project$Main$inputAttributeOptional, { - htmlNode: function (result) { + ag: function (result) { var valueString = function () { - if (result.$ === 'Ok') { + if (!result.$) { var a = result.a; return a; } else { @@ -12436,8 +12430,8 @@ var $author$project$Main$viewFormFieldBuilder = F5( ]), _List_Nil); }, - label: 'Question description', - onCheck: function (b) { + d: 'Question description', + ac: function (b) { return A3( $author$project$Main$OnFormField, $author$project$Main$OnDescriptionToggle(b), @@ -12445,7 +12439,7 @@ var $author$project$Main$viewFormFieldBuilder = F5( ''); } }, - formField.description) + formField.S) ]), _Utils_ap( A4($author$project$Main$viewFormFieldOptionsBuilder, shortTextTypeList, index, formFields, formField), @@ -12498,11 +12492,11 @@ var $author$project$Main$viewFormFieldBuilder = F5( ])) ])), function () { - var _v2 = formField.presence; - switch (_v2.$) { - case 'Required': + var _v2 = formField.p; + switch (_v2) { + case 0: return deleteFieldButton; - case 'Optional': + case 1: return deleteFieldButton; default: return $elm$html$Html$text(''); @@ -12518,7 +12512,7 @@ var $author$project$Main$viewRightPanel = function (modelData) { A2( $elm$core$List$cons, 'tff-right-panel', - (!_Utils_eq(modelData.selectedFieldIndex, $elm$core$Maybe$Nothing)) ? _List_fromArray( + (!_Utils_eq(modelData.F, $elm$core$Maybe$Nothing)) ? _List_fromArray( ['tff-panel-visible']) : _List_Nil)); return A2( $elm$html$Html$div, @@ -12566,18 +12560,18 @@ var $author$project$Main$viewRightPanel = function (modelData) { _List_fromArray( [ function () { - var _v0 = modelData.selectedFieldIndex; - if (_v0.$ === 'Just') { + var _v0 = modelData.F; + if (!_v0.$) { var index = _v0.a; - var _v1 = A2($elm$core$Array$get, index, modelData.formFields); - if (_v1.$ === 'Just') { + var _v1 = A2($elm$core$Array$get, index, modelData.g); + if (!_v1.$) { var formField = _v1.a; return A5( $author$project$Main$viewFormFieldBuilder, - $author$project$Main$allCustomElementsFromGroups(modelData.inputFieldGroups), + $author$project$Main$allCustomElementsFromGroups(modelData.T), index, - $elm$core$Array$length(modelData.formFields), - modelData.formFields, + $elm$core$Array$length(modelData.g), + modelData.g, formField); } else { return $elm$html$Html$text('Select a field to edit its settings'); @@ -12593,18 +12587,18 @@ var $author$project$Main$viewFormBuilder = F2( function (maybeAnimate, model) { var maybeFieldsList = A2( $author$project$Main$fieldsWithPlaceholder, - $elm$core$Array$toList(model.formFields), - model.dragged); + $elm$core$Array$toList(model.g), + model.r); var activeFields = A2( $elm$core$Maybe$withDefault, _List_Nil, A2( $elm$core$Maybe$map, function ($) { - return $.fields; + return $.aM; }, $elm$core$List$head( - A2($elm$core$List$drop, model.activeFieldGroupIndex, model.inputFieldGroups)))); + A2($elm$core$List$drop, model.ay, model.T)))); return _List_fromArray( [ A2( @@ -12630,7 +12624,7 @@ var $author$project$Main$viewFormBuilder = F2( [ _Utils_Tuple2( 'tff-panel-hidden', - !_Utils_eq(model.selectedFieldIndex, $elm$core$Maybe$Nothing)) + !_Utils_eq(model.F, $elm$core$Maybe$Nothing)) ])) ]), _Utils_ap( @@ -12648,13 +12642,13 @@ var $author$project$Main$viewFormBuilder = F2( ])) ]), _Utils_ap( - ($elm$core$List$length(model.inputFieldGroups) > 1) ? _List_fromArray( + ($elm$core$List$length(model.T) > 1) ? _List_fromArray( [ - A2($author$project$Main$viewFieldGroupTabs, model.activeFieldGroupIndex, model.inputFieldGroups) + A2($author$project$Main$viewFieldGroupTabs, model.ay, model.T) ]) : _List_Nil, _List_fromArray( [ - A2($author$project$Main$viewAddQuestionsList, model.nextQuestionNumber, activeFields) + A2($author$project$Main$viewAddQuestionsList, model.ab, activeFields) ])))), A2( $elm$html$Html$div, @@ -12666,7 +12660,7 @@ var $author$project$Main$viewFormBuilder = F2( [ _Utils_Tuple2( 'tff-panel-hidden', - !_Utils_eq(model.selectedFieldIndex, $elm$core$Maybe$Nothing)) + !_Utils_eq(model.F, $elm$core$Maybe$Nothing)) ])), $elm$html$Html$Events$onClick( $author$project$Main$SelectField($elm$core$Maybe$Nothing)) @@ -12694,7 +12688,7 @@ var $author$project$Main$viewFormBuilder = F2( }); var $author$project$Main$OnFormValuesUpdated = F2( function (a, b) { - return {$: 'OnFormValuesUpdated', a: a, b: b}; + return {$: 15, a: a, b: b}; }); var $author$project$Main$fieldHasEmptyFilter = F2( function (formField, trackedFormValues) { @@ -12711,8 +12705,8 @@ var $author$project$Main$fieldHasEmptyFilter = F2( A2($elm$core$Dict$get, fieldName, trackedFormValues)))); }; var getFilterField = function (filter) { - if (filter.$ === 'Just') { - if (filter.a.$ === 'FilterStartsWithFieldValueOf') { + if (!filter.$) { + if (!filter.a.$) { var fieldName = filter.a.a; return $elm$core$Maybe$Just(fieldName); } else { @@ -12723,10 +12717,10 @@ var $author$project$Main$fieldHasEmptyFilter = F2( return $elm$core$Maybe$Nothing; } }; - var _v0 = formField.type_; + var _v0 = formField.a; switch (_v0.$) { - case 'Dropdown': - var filter = _v0.a.filter; + case 2: + var filter = _v0.a.e; return A2( $elm$core$Maybe$withDefault, false, @@ -12734,8 +12728,8 @@ var $author$project$Main$fieldHasEmptyFilter = F2( $elm$core$Maybe$map, isFilterFieldEmpty, getFilterField(filter))); - case 'ChooseOne': - var filter = _v0.a.filter; + case 3: + var filter = _v0.a.e; return A2( $elm$core$Maybe$withDefault, false, @@ -12743,8 +12737,8 @@ var $author$project$Main$fieldHasEmptyFilter = F2( $elm$core$Maybe$map, isFilterFieldEmpty, getFilterField(filter))); - case 'ChooseMultiple': - var filter = _v0.a.filter; + case 4: + var filter = _v0.a.e; return A2( $elm$core$Maybe$withDefault, false, @@ -12757,17 +12751,17 @@ var $author$project$Main$fieldHasEmptyFilter = F2( } }); var $author$project$Main$isChooseManyUsingMinMax = function (formField) { - var _v0 = formField.type_; + var _v0 = formField.a; switch (_v0.$) { - case 'ShortText': + case 0: return false; - case 'LongText': + case 1: return false; - case 'ChooseMultiple': - var minRequired = _v0.a.minRequired; - var maxAllowed = _v0.a.maxAllowed; - return (!_Utils_eq(minRequired, $elm$core$Maybe$Nothing)) || ((!_Utils_eq(maxAllowed, $elm$core$Maybe$Nothing)) || _Utils_eq(formField.presence, $author$project$Main$System)); - case 'ChooseOne': + case 4: + var minRequired = _v0.a.P; + var maxAllowed = _v0.a.U; + return (!_Utils_eq(minRequired, $elm$core$Maybe$Nothing)) || ((!_Utils_eq(maxAllowed, $elm$core$Maybe$Nothing)) || (formField.p === 2)); + case 3: return false; default: return false; @@ -12792,7 +12786,7 @@ var $author$project$Main$evaluateCondition = F2( var fieldName = condition.a; var comparison = condition.b; switch (comparison.$) { - case 'Equals': + case 0: var givenValue = comparison.a; return A2( $elm$core$List$member, @@ -12801,7 +12795,7 @@ var $author$project$Main$evaluateCondition = F2( $elm$core$Maybe$withDefault, _List_Nil, A2($elm$core$Dict$get, fieldName, trackedFormValues))); - case 'StringContains': + case 1: var givenValue = comparison.a; return A2( $elm$core$List$any, @@ -12810,7 +12804,7 @@ var $author$project$Main$evaluateCondition = F2( $elm$core$Maybe$withDefault, _List_Nil, A2($elm$core$Dict$get, fieldName, trackedFormValues))); - case 'EndsWith': + case 2: var givenValue = comparison.a; return A2( $elm$core$List$any, @@ -12819,13 +12813,13 @@ var $author$project$Main$evaluateCondition = F2( $elm$core$Maybe$withDefault, _List_Nil, A2($elm$core$Dict$get, fieldName, trackedFormValues))); - case 'GreaterThan': + case 3: var givenValue = comparison.a; return A2( $elm$core$List$any, function (formValue) { var _v2 = $elm$core$String$toFloat(givenValue); - if (_v2.$ === 'Just') { + if (!_v2.$) { var givenFloat = _v2.a; return A2( $elm$core$Maybe$withDefault, @@ -12866,7 +12860,7 @@ var $author$project$Main$isVisibilityRuleSatisfied = F2( return $elm$core$List$isEmpty(rules) || A2( $elm$core$List$any, function (rule) { - if (rule.$ === 'ShowWhen') { + if (!rule.$) { var conditions = rule.a; return A2( $elm$core$List$all, @@ -12888,7 +12882,7 @@ var $elm$core$Array$foldl = F3( var tail = _v0.d; var helper = F2( function (node, acc) { - if (node.$ === 'SubTree') { + if (!node.$) { var subTree = node.a; return A3($elm$core$Elm$JsArray$foldl, helper, acc, subTree); } else { @@ -12914,9 +12908,9 @@ var $author$project$Main$sanitizeFormValuesHelper = F3( F2( function (field, acc) { var fieldName = $author$project$Main$fieldNameOf(field); - if (A2($author$project$Main$isVisibilityRuleSatisfied, field.visibilityRule, currentValues)) { + if (A2($author$project$Main$isVisibilityRuleSatisfied, field.m, currentValues)) { var _v0 = A2($elm$core$Dict$get, fieldName, currentValues); - if (_v0.$ === 'Just') { + if (!_v0.$) { var fieldValues = _v0.a; return A3($elm$core$Dict$insert, fieldName, fieldValues, acc); } else { @@ -12952,10 +12946,10 @@ var $author$project$Main$sanitizeFormValues = F2( }); var $author$project$Main$viewFormPreview = F2( function (customAttrs, _v0) { - var formFields = _v0.formFields; - var needsFormLogic = _v0.needsFormLogic; - var trackedFormValues = _v0.trackedFormValues; - var shortTextTypeDict = _v0.shortTextTypeDict; + var formFields = _v0.g; + var needsFormLogic = _v0.aa; + var trackedFormValues = _v0.v; + var shortTextTypeDict = _v0.al; var onInputAttrs = function (fieldName) { return _List_fromArray( [ @@ -12974,7 +12968,7 @@ var $author$project$Main$viewFormPreview = F2( [ $elm$html$Html$Events$onCheck( function (_v5) { - return A2($author$project$Main$OnFormValuesUpdated, fieldName, choice.value); + return A2($author$project$Main$OnFormValuesUpdated, fieldName, choice.j); }) ]); }); @@ -12995,21 +12989,21 @@ var $author$project$Main$viewFormPreview = F2( $elm$core$Array$toList(formFields)); var needsEventHandlers = needsFormLogic || (isAnyChooseManyUsingMinMax || hasOptionalTemporalInputs); var config = { - customAttrs: customAttrs, - formFields: formFields, - needsFormLogic: needsFormLogic, - onChange: needsEventHandlers ? onChangeAttrs : function (_v1) { + Z: customAttrs, + g: formFields, + aa: needsFormLogic, + bi: needsEventHandlers ? onChangeAttrs : function (_v1) { return _List_Nil; }, - onChooseMany: needsEventHandlers ? onChooseManyAttrs : F2( + bj: needsEventHandlers ? onChooseManyAttrs : F2( function (_v2, _v3) { return _List_Nil; }), - onInput: needsEventHandlers ? onInputAttrs : function (_v4) { + aQ: needsEventHandlers ? onInputAttrs : function (_v4) { return _List_Nil; }, - shortTextTypeDict: shortTextTypeDict, - trackedFormValues: trackedFormValues + al: shortTextTypeDict, + v: trackedFormValues }; return $elm$core$Array$toList( A2( @@ -13020,7 +13014,7 @@ var $author$project$Main$viewFormPreview = F2( function (formField) { return A2( $author$project$Main$isVisibilityRuleSatisfied, - formField.visibilityRule, + formField.m, A2($author$project$Main$sanitizeFormValues, formFields, trackedFormValues)) && (!A2($author$project$Main$fieldHasEmptyFilter, formField, trackedFormValues)); }, formFields))); @@ -13031,11 +13025,11 @@ var $author$project$Main$viewMain = function (model) { _List_fromArray( [ $elm$html$Html$Attributes$class( - 'tff tff-container tff-mode-' + $author$project$Main$stringFromViewMode(model.viewMode)) + 'tff tff-container tff-mode-' + $author$project$Main$stringFromViewMode(model.ad)) ]), function () { - var _v0 = model.viewMode; - if (_v0.$ === 'Editor') { + var _v0 = model.ad; + if (!_v0.$) { var editorAttr = _v0.a; return A2( $elm$core$List$cons, @@ -13049,18 +13043,18 @@ var $author$project$Main$viewMain = function (model) { A2( $elm$json$Json$Encode$encode, 0, - $author$project$Main$encodeFormFields(model.formFields))) + $author$project$Main$encodeFormFields(model.g))) ]), _List_Nil), - A2($author$project$Main$viewFormBuilder, editorAttr.maybeAnimate, model)); + A2($author$project$Main$viewFormBuilder, editorAttr.aC, model)); } else { return A2($author$project$Main$viewFormPreview, _List_Nil, model); } }()); }; var $author$project$Main$view = function (model) { - var _v0 = model.initError; - if (_v0.$ === 'Just') { + var _v0 = model.aZ; + if (!_v0.$) { var errString = _v0.a; return A2( $elm$html$Html$div, @@ -13090,5 +13084,5 @@ var $author$project$Main$view = function (model) { } }; var $author$project$Main$main = $elm$browser$Browser$element( - {init: $author$project$Main$init, subscriptions: $author$project$Main$subscriptions, update: $author$project$Main$update, view: $author$project$Main$view}); + {dv: $author$project$Main$init, dV: $author$project$Main$subscriptions, dY: $author$project$Main$update, dZ: $author$project$Main$view}); _Platform_export({'Main':{'init':$author$project$Main$main($elm$json$Json$Decode$value)(0)}});}(this)); \ No newline at end of file diff --git a/dist/tiny-form-fields.min.css b/dist/tiny-form-fields.min.css index a78f2c4..ec400bd 100644 --- a/dist/tiny-form-fields.min.css +++ b/dist/tiny-form-fields.min.css @@ -1,4 +1,4 @@ -*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.float-right{float:right}.float-left{float:left}.clear-both{clear:both}.my-8{margin-top:2rem;margin-bottom:2rem}.mb-4{margin-bottom:1rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mr-auto{margin-right:auto}.inline-block{display:inline-block}.hidden{display:none}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.cursor-not-allowed{cursor:not-allowed}.rounded{border-radius:.25rem}.border{border-width:1px}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.p-1{padding:.25rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.text-right{text-align:right}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.leading-4{line-height:1rem}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.opacity-50{opacity:.5}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.tff-error h3{font-weight:700;font-size:1.125rem;line-height:1.75rem}.tff-error pre{white-space:pre-wrap}.tff-error pre,.tff-error-text{font-size:.875rem;line-height:1.25rem}.tff-error-text{margin-top:.25rem;--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.tff-center-panel .tff-field-group,.tff-center-panel .tff-toggle-group,.tff-settings-content .tff-field-group,.tff-settings-content .tff-toggle-group{margin-bottom:1rem}.tff-center-panel .tff-field-group:last-child,.tff-center-panel .tff-toggle-group:last-child,.tff-settings-content .tff-field-group:last-child,.tff-settings-content .tff-toggle-group:last-child{margin-bottom:0}.tff-field-group{position:relative;margin-bottom:3rem}.tff-field-rule{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));padding:.5rem;border-radius:.25rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1));margin-bottom:1rem}.tff-field-rule-conditions{padding-left:1rem;margin-bottom:.5rem}.tff-toggle-group{margin-bottom:3rem}.tff-field-group input:not(:-moz-placeholder-shown):invalid,.tff-toggle-group input:not(:-moz-placeholder-shown):invalid{border-color:red}.tff-field-group input:not(:placeholder-shown):invalid,.tff-field-group.tff-required select:invalid,.tff-field-group.tff-required textarea:invalid,.tff-invalid-checkbox .tff-checkbox-group input[type=checkbox],.tff-toggle-group input:not(:placeholder-shown):invalid,.tff-toggle-group textarea:invalid{border-color:red}.tff-invalid-checkbox .tff-checkbox-group input[type=checkbox]{-moz-appearance:none;appearance:none;-webkit-appearance:none;width:1em;height:1em;border:1px solid red;border-radius:.2em;outline:none;cursor:pointer;position:relative}.tff-invalid-checkbox .tff-checkbox-group input[type=checkbox]:checked:after{content:"✓";position:absolute;color:red;font-size:1em;line-height:1;top:50%;left:50%;transform:translate(-50%,-50%)}.tff-radiobuttons-group .tff-field-label input[type=radio]:invalid{-webkit-appearance:none;height:.94em;width:.94em;box-shadow:none;border:1px solid red;border-radius:50%;outline:none}.tff-visually-hidden{position:absolute;left:-9999px;height:1px;width:1px;overflow:hidden}.tff-radiobuttons-group .tff-field-label input[type=radio]:invalid:before{content:"";display:block;width:100%;height:100%;border-radius:50%}.tff-field-label{font-size:.875rem;line-height:1.25rem;vertical-align:middle}.tff-field-description,.tff-field-label{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.tff-field-description{margin-top:.25rem;font-size:.75rem;line-height:1rem}.tff-text-field{display:block;border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1));padding:.5rem;width:100%;border-radius:.25rem}.tff-text-field[type=color]{max-width:2.5rem;height:2.5rem;padding:.25rem}.tff-text-field[type=date],.tff-text-field[type=datetime-local],.tff-text-field[type=time]{-webkit-appearance:none;-moz-appearance:none;background-color:inherit}.tff-text-field::-webkit-date-and-time-value,.tff-text-field::-webkit-date-value,.tff-text-field::-webkit-time-value{min-height:1.5rem;text-align:inherit}.tff-field-group input[type=date]:not(:valid)::-webkit-datetime-edit-day-field,.tff-field-group input[type=date]:not(:valid)::-webkit-datetime-edit-month-field,.tff-field-group input[type=date]:not(:valid)::-webkit-datetime-edit-text,.tff-field-group input[type=date]:not(:valid)::-webkit-datetime-edit-year-field,.tff-field-group input[type=datetime-local]:not(:valid)::-webkit-datetime-edit-day-field,.tff-field-group input[type=datetime-local]:not(:valid)::-webkit-datetime-edit-hour-field,.tff-field-group input[type=datetime-local]:not(:valid)::-webkit-datetime-edit-minute-field,.tff-field-group input[type=datetime-local]:not(:valid)::-webkit-datetime-edit-month-field,.tff-field-group input[type=datetime-local]:not(:valid)::-webkit-datetime-edit-text,.tff-field-group input[type=datetime-local]:not(:valid)::-webkit-datetime-edit-year-field,.tff-field-group input[type=time]:not(:valid)::-webkit-datetime-edit-ampm-field,.tff-field-group input[type=time]:not(:valid)::-webkit-datetime-edit-hour-field,.tff-field-group input[type=time]:not(:valid)::-webkit-datetime-edit-minute-field,.tff-field-group input[type=time]:not(:valid)::-webkit-datetime-edit-second-field,.tff-field-group input[type=time]:not(:valid)::-webkit-datetime-edit-text{color:#f87171;opacity:.7}.tff-field-group +*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.16 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.float-right{float:right}.float-left{float:left}.clear-both{clear:both}.my-8{margin-top:2rem;margin-bottom:2rem}.mb-4{margin-bottom:1rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mr-auto{margin-right:auto}.inline-block{display:inline-block}.hidden{display:none}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.cursor-not-allowed{cursor:not-allowed}.rounded{border-radius:.25rem}.border{border-width:1px}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.p-1{padding:.25rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.text-right{text-align:right}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.leading-4{line-height:1rem}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.opacity-50{opacity:.5}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.tff-error h3{font-weight:700;font-size:1.125rem;line-height:1.75rem}.tff-error pre{white-space:pre-wrap}.tff-error pre,.tff-error-text{font-size:.875rem;line-height:1.25rem}.tff-error-text{margin-top:.25rem;--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.tff-center-panel .tff-field-group,.tff-center-panel .tff-toggle-group,.tff-settings-content .tff-field-group,.tff-settings-content .tff-toggle-group{margin-bottom:1rem}.tff-center-panel .tff-field-group:last-child,.tff-center-panel .tff-toggle-group:last-child,.tff-settings-content .tff-field-group:last-child,.tff-settings-content .tff-toggle-group:last-child{margin-bottom:0}.tff-field-group{position:relative;margin-bottom:3rem}.tff-field-rule{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));padding:.5rem;border-radius:.25rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1));margin-bottom:1rem}.tff-field-rule-conditions{padding-left:1rem;margin-bottom:.5rem}.tff-toggle-group{margin-bottom:3rem}.tff-field-group input:not(:-moz-placeholder-shown):invalid,.tff-toggle-group input:not(:-moz-placeholder-shown):invalid{border-color:red}.tff-field-group input:not(:placeholder-shown):invalid,.tff-field-group.tff-required select:invalid,.tff-field-group.tff-required textarea:invalid,.tff-invalid-checkbox .tff-checkbox-group input[type=checkbox],.tff-toggle-group input:not(:placeholder-shown):invalid,.tff-toggle-group textarea:invalid{border-color:red}.tff-invalid-checkbox .tff-checkbox-group input[type=checkbox]{-moz-appearance:none;appearance:none;-webkit-appearance:none;width:1em;height:1em;border:1px solid red;border-radius:.2em;outline:none;cursor:pointer;position:relative}.tff-invalid-checkbox .tff-checkbox-group input[type=checkbox]:checked:after{content:"✓";position:absolute;color:red;font-size:1em;line-height:1;top:50%;left:50%;transform:translate(-50%,-50%)}.tff-radiobuttons-group .tff-field-label input[type=radio]:invalid{-webkit-appearance:none;height:.94em;width:.94em;box-shadow:none;border:1px solid red;border-radius:50%;outline:none}.tff-visually-hidden{position:absolute;left:-9999px;height:1px;width:1px;overflow:hidden}.tff-radiobuttons-group .tff-field-label input[type=radio]:invalid:before{content:"";display:block;width:100%;height:100%;border-radius:50%}.tff-field-label{font-size:.875rem;line-height:1.25rem;vertical-align:middle}.tff-field-description,.tff-field-label{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.tff-field-description{margin-top:.25rem;font-size:.75rem;line-height:1rem}.tff-text-field{display:block;border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1));padding:.5rem;width:100%;border-radius:.25rem}.tff-text-field[type=color]{max-width:2.5rem;height:2.5rem;padding:.25rem}.tff-text-field[type=date],.tff-text-field[type=datetime-local],.tff-text-field[type=time]{-webkit-appearance:none;-moz-appearance:none;background-color:inherit}.tff-text-field::-webkit-date-and-time-value,.tff-text-field::-webkit-date-value,.tff-text-field::-webkit-time-value{min-height:1.5rem;text-align:inherit}.tff-field-group input[type=date]:not(:valid)::-webkit-datetime-edit-day-field,.tff-field-group input[type=date]:not(:valid)::-webkit-datetime-edit-month-field,.tff-field-group input[type=date]:not(:valid)::-webkit-datetime-edit-text,.tff-field-group input[type=date]:not(:valid)::-webkit-datetime-edit-year-field,.tff-field-group input[type=datetime-local]:not(:valid)::-webkit-datetime-edit-day-field,.tff-field-group input[type=datetime-local]:not(:valid)::-webkit-datetime-edit-hour-field,.tff-field-group input[type=datetime-local]:not(:valid)::-webkit-datetime-edit-minute-field,.tff-field-group input[type=datetime-local]:not(:valid)::-webkit-datetime-edit-month-field,.tff-field-group input[type=datetime-local]:not(:valid)::-webkit-datetime-edit-text,.tff-field-group input[type=datetime-local]:not(:valid)::-webkit-datetime-edit-year-field,.tff-field-group input[type=time]:not(:valid)::-webkit-datetime-edit-ampm-field,.tff-field-group input[type=time]:not(:valid)::-webkit-datetime-edit-hour-field,.tff-field-group input[type=time]:not(:valid)::-webkit-datetime-edit-minute-field,.tff-field-group input[type=time]:not(:valid)::-webkit-datetime-edit-second-field,.tff-field-group input[type=time]:not(:valid)::-webkit-datetime-edit-text{color:#f87171;opacity:.7}.tff-field-group input[type=datetime-local].tff-empty-optional::-webkit-datetime-edit-minute-field,.tff-field-group input[type=date].tff-empty-optional::-webkit-datetime-edit-day-field,.tff-field-group input[type=date].tff-empty-optional::-webkit-datetime-edit-month-field,.tff-field-group input[type=date].tff-empty-optional::-webkit-datetime-edit-text,.tff-field-group input[type=date].tff-empty-optional::-webkit-datetime-edit-year-field,.tff-field-group input[type=datetime-local].tff-empty-optional::-webkit-datetime-edit-day-field,.tff-field-group input[type=datetime-local].tff-empty-optional::-webkit-datetime-edit-hour-field,.tff-field-group input[type=datetime-local].tff-empty-optional::-webkit-datetime-edit-month-field,.tff-field-group input[type=datetime-local].tff-empty-optional::-webkit-datetime-edit-text,.tff-field-group input[type=datetime-local].tff-empty-optional::-webkit-datetime-edit-year-field,.tff-field-group input[type=time].tff-empty-optional::-webkit-datetime-edit-ampm-field,.tff-field-group input[type=time].tff-empty-optional::-webkit-datetime-edit-hour-field,.tff-field-group input[type=time].tff-empty-optional::-webkit-datetime-edit-minute-field,.tff-field-group input[type=time].tff-empty-optional::-webkit-datetime-edit-second-field,.tff-field-group input[type=time].tff-empty-optional::-webkit-datetime-edit-text{color:#f87171;opacity:.7}.tff-field-group input[type=date]:not(:valid),.tff-field-group input[type=datetime-local]:not(:valid),.tff-field-group input[type=time]:not(:valid){color:#f87171!important;opacity:.7!important}.tff-field-group input[type=date].tff-empty-optional,.tff-field-group input[type=datetime-local].tff-empty-optional,.tff-field-group input[type=time].tff-empty-optional{color:#f87171!important;opacity:.7!important}.tff-editor-layout .tff-center-panel input[type=date].tff-empty-optional::-webkit-datetime-edit-day-field,.tff-editor-layout