New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@evs-chris/raui

Package Overview
Dependencies
Maintainers
1
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@evs-chris/raui - npm Package Compare versions

Comparing version 0.10.1 to 0.10.2

es/SideBar.d.ts

7

es/form.js

@@ -248,4 +248,5 @@ import globalRegister from './globalRegister';

}); }
if (label) { body.unshift.apply(body, Array.isArray(label.f) ? label.f : [label.f]); }
else { body.unshift('\xa0'); }
var inline = attrs.find(function (a) { return a.n === 'inline'; });
if (label && !inline) { body.unshift.apply(body, Array.isArray(label.f) ? label.f : [label.f]); }
else if (!inline) { body.unshift('\xa0'); }

@@ -257,3 +258,3 @@ var outer = {

if (attrs.find(function (a) { return a.n === 'inline'; })) { outer.m.push({ t: 13, n: 'class', f: 'inline' }); }
if (inline) { outer.m.push({ t: 13, n: 'class', f: 'inline' }); }

@@ -260,0 +261,0 @@ handle.setTemplate([outer]);

@@ -1,1 +0,1 @@

import globalRegister from"./globalRegister";import Ractive from"ractive";export function style(data){var primary=Object.assign({},data("raui.primary"),data("raui.form.primary"));var active=Object.assign({},data("raui.primary.active"),data("raui.form.primary.active"));var boxy=data("raui.form.boxy");return"\n label.field {\n display: inline-block;\n font-size: 0.9em;\n font-weight: 500;\n color: "+(primary.fg||"#222")+";\n transition: 0.2s ease-in-out;\n transition-property: color;\n vertical-align: top;\n box-sizing: border-box;\n padding: 0.25em 0.5em;\n line-height: 1.5em;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: inherit;\n }\n\n label.field.textarea {\n display: block;\n border: 0.0625em solid "+(primary.bc||"#ccc")+";\n padding: 0.5em 0.8em 0.8em 0.8em;\n border-radius: "+(primary.radius||"0.2em")+";\n box-shadow: none;\n transition-property: color, border-color, box-shadow;\n margin: 0.8em 0.2em;\n min-height: auto;\n background-color: "+(boxy?primary.bg||"#fff":"transparent")+";\n }\n\n label.field.focus {\n color: "+(active.fg||primary.fga||"#07e")+";\n }\n\n label.field.textarea.focus {\n border-color: "+(active.fg||primary.fga||"#07e")+";\n "+(!boxy?"box-shadow: 0.0625em 0.0625em "+(active.fg||primary.fga||"#07e")+",\n -0.0625em 0.0625em "+(active.fg||primary.fga||"#07e")+",\n 0.0625em -0.0625em "+(active.fg||primary.fga||"#07e")+",\n -0.0625em -0.0625em "+(active.fg||primary.fga||"#07e")+";":"")+"\n }\n\n label.field input,\n label.field select,\n label.field textarea\n {\n display: block;\n border-width: "+(boxy?"0.0625em":"0 0 0.0625em 0")+";\n border-color: "+(primary.bc||"#ccc")+";\n border-style: solid;\n box-sizing: border-box;\n background-color: "+(boxy?primary.bg||"#fff":"transparent")+";\n transition: 0.2s ease-in-out;\n transition-property: box-shadow, color;\n outline: none;\n box-shadow: none;\n width: 100%;\n margin-bottom: 0.8em;\n font-size: 1.1em;"+(boxy?"\n border-radius: "+(primary.radius||"0.2em")+";":"")+"\n font-weight: 400;\n font-family: inherit;\n }\n\n label.field input"+(boxy?"":":disabled")+",\n label.field select"+(boxy?"":":disabled")+" {\n padding: 0 0.75em;\n }\n label.field select"+(boxy?"":":disabled")+" {\n padding-right: 2em;\n }\n\n label.field input:disabled,\n label.field select:disabled,\n label.field textarea:disabled {\n background: #f4f4f4;\n }\n\n label.field textarea {\n line-height: 1.2em;\n }\n label.field .field-wrapper {\n display: block;\n }\n label.field > select, label.field > input,\n label.field > .field-wrapper > input, label.field > .field-wrapper > select {\n height: 2.5em;\n }\n\n "+(!boxy?"label.field:hover > input,\n label.field:hover select,\n label.field.file:hover:after {\n box-shadow: 0 0.0625em 0 0 "+(primary.bc||"#ccc")+";\n }\n\n label.field.textarea:hover {\n box-shadow: 0.0625em 0.0625em "+(primary.bc||"#ccc")+",\n -0.0625em 0.0625em "+(primary.bc||"#ccc")+",\n 0.0625em -0.0625em "+(primary.bc||"#ccc")+",\n -0.0625em -0.0625em "+(primary.bc||"#ccc")+";\n }\n\n label.field.textarea.focus:hover {\n box-shadow: 0.0625em 0.0625em "+(active.fg||primary.fga||"#07e")+",\n -0.0625em 0.0625em "+(active.fg||primary.fga||"#07e")+",\n 0.0625em -0.0625em "+(active.fg||primary.fga||"#07e")+",\n -0.0625em -0.0625em "+(active.fg||primary.fga||"#07e")+";\n }":"")+"\n\n /**** CHECK BOXES ****/\n\n label.field.check {\n position:relative;\n z-index: 0;\n overflow: visible;\n cursor: pointer;\n padding-top: 2.2em;\n white-space: normal;\n }\n label.field.check.inline {\n padding-top: 0.7em;\n }\n\n label.field.check input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: -0.5em;\n top: 1em;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 3.2em;\n height: 3.2em;\n background-color: "+(primary.bc||"#ccc")+";\n box-shadow: none;\n outline: none;\n opacity: 0;\n transform: scale(1);\n pointer-events: none;\n transition: opacity 0.3s, transform 0.2s;\n }\n label.field.inline.check input {\n top: -0.45em;\n left: -0.55em;\n }\n\n label.field.check input:checked {\n background-color: "+(primary.fga||"#07e")+';\n }\n\n label.field.check:hover > input {\n opacity: 0.04;\n }\n\n label.field.check input:focus {\n opacity: 0.12;\n }\n\n label.field.check:hover > input:focus {\n opacity: 0.16;\n }\n\n label.field.check input:active {\n opacity: 0.6;\n transform: scale(0);\n transition: transform 0s, opacity 0s;\n }\n\n label.field.check:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n margin: 0 0.5em 0.2em 0.1em;\n border: solid 0.125em; /* Safari */\n border-color: '+(primary.fg||"#222")+';\n border-radius: 0.125em;\n width: 1.2em;\n height: 1.2em;\n vertical-align: bottom;\n transition: border-color 0.2s, background-color 0.2s;\n }\n\n label.field.check:after {\n content: "";\n display: block;\n position: absolute;\n top: -0.15em;\n left: -0.05em;\n width: 0.7em;\n height: 0.3em;\n border: solid 0.125em transparent;\n border-right: none;\n border-top: none;\n transform: translate(0.8em, 2.65em) rotate(-45deg);\n }\n\n label.field.check.inline:after {\n transform: translate(0.8em, 1.2em) rotate(-45deg);\n }\n\n label.field.check.checked:before {\n border-color: '+(primary.fga||"#07e")+";\n background-color: "+(primary.fga||"#07e")+";\n }\n label.field.check.focus:before {\n border-color: "+(primary.fga||"#07e")+";\n }\n\n label.field.check.checked:after {\n border-color: "+(primary.bg||"#fff")+";\n }\n\n label.field.check input:disabled {\n opacity: 0;\n }\n\n label.field.check.disabled {\n color: "+(primary.bc||"#ccc")+";\n cursor: initial;\n }\n\n label.field.check.disabled:before {\n border-color: "+(primary.bc||"#ccc")+";\n }\n\n label.field.check.checked.disabled:before {\n border-color: transparent;\n background-color: "+(primary.bc||"#ccc")+";\n }\n\n\n /**** RADIO BUTTONS ****/\n \n label.field.radio {\n z-index: 0;\n position: relative;\n display: inline-block;\n overflow: visible;\n padding-top: 2.2em;\n white-space: normal;\n }\n label.field.radio.inline {\n padding-top: 0.8em;\n }\n\n label.field.radio input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: 0;\n top: 0;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 3.2em;\n height: 3.2em;\n background-color: "+(primary.bc||"#ccc")+';\n outline: none;\n opacity: 0;\n pointer-events: none;\n transform: translate(-0.2em, 1.5em) scale(1);\n transition: opacity 0.3s, transform 0.3s;\n }\n label.field.inline.radio input {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio {\n cursor: pointer;\n position: relative;\n }\n\n label.field.radio:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n margin: 0 0.5em 0.2em 0.1em;\n border: solid 0.125em; /* Safari */\n border-color: '+(primary.fg||"#222")+';\n border-radius: 0.125em;\n width: 1.2em;\n height: 1.2em;\n vertical-align: middle;\n transition: border-color 0.2s;\n }\n\n label.field.radio:after {\n content: "";\n display: block;\n position: absolute;\n border-radius: 50%;\n width: 0.625em;\n height: 0.625em;\n background-color: '+(primary.fga||"#07e")+";\n transform: translate(5px, -17px) scale(0);\n transition: transform 0.2s;\n }\n\n label.field.radio input:checked {\n background-color: "+(primary.fga||"#07e")+";\n }\n\n label.field.radio.checked:before {\n border-color: "+(primary.fga||"#07e")+";\n }\n\n label.field.radio.checked:after {\n transform: translate(5px, -17px) scale(1);\n }\n\n label.field.radio:hover input {\n opacity: 0.04;\n }\n\n label.field.radio input:focus {\n opacity: 0.12;\n transform: translate(-0.2em, 24px) scale(1);\n transition: transform 0.2s, opacity 0.2s;\n }\n label.field.inline.radio input:focus {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio:hover input:focus {\n opacity: 0.16;\n }\n\n label.field.radio input:active {\n opacity: 1;\n transform: translate(-0.2em, 24px) scale(0);\n transition: transform 0s, opacity 0s;\n }\n label.field.inline.radio input:active {\n transform: translate(-0.2em, 3px) scale(0);\n }\n\n label.field.radio.checked:before {\n border-color: "+(primary.fga||"#07e")+";\n }\n\n label.field.radio.focus:before {\n border-color: "+(primary.fga||"#07e")+";\n }\n\n label.field.radio input:disabled {\n opacity: 0;\n }\n\n label.field.radio.disabled {\n color: "+(primary.bc||"#ccc")+";\n cursor: initial;\n }\n\n label.field.radio.disabled:before {\n border-color: "+(primary.bc||"#ccc")+";\n }\n\n label.field.radio.disabled:after {\n background-color: "+(primary.bc||"#ccc")+";\n }\n\n\n\n label.field select {\n padding-right: 2em;\n }\n\n label.field.select {\n cursor: pointer;\n position: relative;\n }\n\n label.field.select:after {\n content: ' ';\n position: absolute;\n display: block;\n width: 0.6em;\n right: 19px;\n height: 0.6em;\n top: 2.6em;\n border-bottom: 0.125em solid;\n border-right: 0.125em solid;\n transform: rotate(45deg);\n pointer-events: none;\n color: "+(primary.bc||"#ccc")+";\n }\n\n label.field textarea {\n border: none;"+(boxy?"\n padding: 0;":"")+"\n }\n\n label.field > select {\n -moz-appearance: none;\n -webkit-appearance: none;\n }\n\n label.field input:focus,\n label.field select:focus,\n label.field.file.focus:after\n {\n border-color: "+(active.fg||primary.fga||"#07e")+";\n "+(!boxy?"box-shadow: 0 0.0625em 0 0 "+(active.fg||primary.fga||"#07e")+";":"")+"\n }\n\n label.field input[type=checkbox]:focus,\n label.field input[type=radio]:focus {\n box-shadow: none;\n }\n\n label.field.file.focus:after {\n color: "+(active.fg||primary.fga||"#07e")+";\n }\n label.field.file [type=file] {\n position: absolute;\n width: 0;\n height: 0;\n opacity: 0;\n z-index: -1;\n }\n label.field.file {\n position: relative;\n min-width: 9em;\n height: 5em;\n }\n label.field.file:after {\n position: absolute;\n content: 'Choose a file';\n box-sizing: border-box;\n width: calc(100% - 0.3em);\n height: 2.5em;\n font-size: 1.1em;\n line-height: 1.5em;\n color: "+(primary.fg||"#222")+";\n text-align: "+(boxy?"center":"left")+";\n padding: 0.5em "+(boxy?"0.5em":"0")+";\n cursor: pointer;\n font-style: oblique;\n left: 0.25em;\n top: 1.6em;\n transition: 0.2s ease-in-out;\n transition-property: color, border-bolor, box-shadow;"+(boxy?"\n border-radius: "+(primary.radius||"0.2em")+";\n border-color: "+(primary.bc||"#ccc")+";\n border-style: solid;\n border-width: 0.0625em;":"\n border-bottom-color: "+(primary.bc||"#ccc")+";\n border-bottom-width: 0.0625em;\n border-bottom-style: solid;\n ")+"\n }\n label.field.file.inline:after {\n top: 0.2em;\n }\n\n label.field.button {\n vertical-align: top;\n padding-top: "+(boxy?"1.7":"1.958")+"em;\n }\n label.field .with-buttons button, label.field.button button {\n font-size: 1.1em;\n margin-top: "+(boxy?"0.15em":"0")+";\n }\n\n label.field .field-wrapper.with-buttons {\n display: flex;\n }\n label.field .with-buttons button {\n flex-shrink: 0;\n padding-left: 0.5em;\n padding-right: 0.5em;\n margin-top: 0;\n margin-right: 0;\n "+(boxy?"height: 2.5em;\n box-shadow: none;\n border-radius: 0;\n border-left: 1px solid "+(primary.bg||"#fff")+";\n margin-left: 0;":"height: 2.25em;")+"\n }"+(boxy?"\n label.field .with-buttons button:first-of-type {\n margin-left: -0.05em;\n border-left: none;\n }\n label.field .with-buttons button:last-of-type {\n border-radius: 0 "+(primary.radius||"0.2em")+" "+(primary.radius||"0.2em")+" 0;\n }\n label.field .with-buttons input {\n border-radius: "+(primary.radius||"0.2em")+" 0 0 "+(primary.radius||"0.2em")+";\n min-width: 0;\n }\n ":"")+"\n\n label.field.plain > div {\n position: absolute;\n font-size: 1.1em;\n top: 2.4em;\n font-weight: normal;\n }\n\n /* inline fields (no labels) */\n label.field.inline {\n height: 3.3em;\n }\n\n label.field.button.inline {\n margin-top: 0.2em;\n padding-top: 0.12em;\n }\n\n label.field.button.inline button {\n margin-top: 0;\n }\n\n label.field.inline.select:after {\n top: 1."+(boxy?"15":"1")+"em;\n }\n\n label.field .field-tip {\n display: inline-block;\n width: 1em;\n height: 1em;\n background-color: "+(primary.fga||"#07e")+";\n color: "+(primary.bg||"#fff;")+";\n cursor: default;\n user-select: none;\n border-radius: 1em;\n margin-left: 0.5em;\n line-height: 1.2em;\n text-align: center;\n margin-top: -0.2em;\n }\n\n label.field .field-solo-tip {\n margin-left: -0.1em;\n }\n "}function noop(){}function focused(ev){if(!~this.className.indexOf("focus")){this.className+=" focus"}}function blurred(ev){this.className=this.className.replace(/\bfocus\b/g,"").trim()}export function field(node){var ctx=this.getContext(node);var isField,isCheck,isRadio,isArea,isSelect,isFile,isButton,isPlain,isInput;var change,attrs,desc,last;function invalidate(){var val=setup().split(/\s+/).filter(function(c){return!!c});isField=!!~val.indexOf("field");if(!isField){val.push("field");isField=true}isCheck=node.querySelector("input[type=checkbox]");if(isCheck&&!~val.indexOf("check")){val.push("check")}isRadio=node.querySelector("input[type=radio]");if(isRadio&&!~val.indexOf("radio")){val.push("radio")}var checkable=isCheck||isRadio;if(checkable&&checkable.checked&&!~val.indexOf("checked")){val.push("checked")}if(checkable&&checkable.disabled&&!~val.indexOf("disabled")){val.push("disabled")}if(!checkable&&change){change.cancel();change=0;if(attrs){attrs.disconnect();attrs=0}delete checkable._form_callback;if(last){delete last.checked;desc=last=undefined}}else if(checkable){checkable._form_callback=function(ev,init){if(init===void 0)init=true;if(init&&checkable.type==="radio"&&checkable.name){var list=[];list.push.apply(list,document.querySelectorAll("input[type=radio][name="+checkable.name+"]"));list=list.filter(function(i){return i!==checkable});list.forEach(function(l){return l._form_callback&&l._form_callback(ev,false)})}var checked=checkable.checked;if(checked&&!~node.className.indexOf("checked")){node.className+=" checked"}else if(!checked&&~node.className.indexOf("checked")){node.className=node.className.replace(/\bchecked\b/g,"").replace(/ +/g," ").trim()}};if(MutationObserver){attrs=new MutationObserver(function(){var val;val=checkable.disabled;if(val&&!~node.className.indexOf("disabled")){node.className+=" disabled"}else if(!val&&~node.className.indexOf("disabled")){node.className=node.className.replace(/\bdisabled\b/g,"").replace(/ +/g," ").trim()}});attrs.observe(checkable,{attributes:true})}change=this.getContext(checkable).listen("change",checkable._form_callback);desc=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(checkable),"checked");if(desc&&desc.configurable){last=checkable;Object.defineProperty(checkable,"checked",{get:desc.get,set:function set(v){desc.set.call(last,v);checkable._form_callback()},enumerable:true,configurable:true})}}isArea=!!node.querySelector("textarea");if(isArea&&!~val.indexOf("textarea")){val.push("textarea")}isSelect=!!node.querySelector("select");if(isSelect&&!~val.indexOf("select")){val.push("select")}isFile=!!node.querySelector("input[type=file]");if(isFile&&!~val.indexOf("file")){val.push("file")}isButton=node.querySelector("button");isButton=!!isButton&&isButton.parentNode===node;if(isButton&&!~val.indexOf("button")){val.push("button")}isPlain=!!node.querySelector("div");if(isPlain&&!~val.indexOf("plain")){val.push("plain")}isInput=!isCheck&&!isRadio&&!isFile&&!!node.querySelector("input");if(isInput&&!~val.indexOf("input")){val.push("input")}node.className=val.join(" ")}function setup(){var cls=node.className;if(!isField){cls=cls.replace(/\bfield\b/g,"").trim()}if(!isCheck){cls=cls.replace(/\bcheck(ed)?\b/g,"").trim()}if(!isRadio){cls=cls.replace(/\bradio\b/g,"").trim()}if(!isArea){cls=cls.replace(/\btextarea\b/g,"").trim()}if(!isSelect){cls=cls.replace(/\bselect\b/g,"").trim()}if(!isFile){cls=cls.replace(/\bfile\b/g,"").trim()}if(!isButton){cls=cls.replace(/\bbutton\b/g,"").trim()}if(!isPlain){cls=cls.replace(/\bplain\b/g,"").trim()}if(!isInput){cls=cls.replace(/\binput\b/g,"").trim()}cls=cls.replace(/ +/g," ");return cls}var focus=ctx.listen("focusin",focused);var blur=ctx.listen("focusout",blurred);invalidate.call(this);return{update:noop,invalidate:invalidate.bind(this),teardown:function teardown(){var cls=setup();cls=cls.replace(/\bfocus\b/g,"").trim();focus.cancel();blur.cancel();change&&change.cancel();if(attrs){attrs.disconnect()}if(last){delete last.checked;desc=last=undefined}node.className=cls}}}field.style=style;function findDeep(els,el){if(!els){return false}for(var i=0;i<els.length;i++){if(els[i].e===el){return true}if(els[i].f&&findDeep(els[i].f,el)){return true}}return false}export var macro=Ractive.macro(function(handle){var body=[];var attrs=(handle.template.m||[]).slice();var content=handle.template.f||[];var value=attrs.find(function(a){return a.n==="value"});var type=attrs.find(function(a){return a.n==="type"});var tip=attrs.find(function(a){return a.n==="tip"});var disabled=attrs.find(function(a){return a.n==="disabled"});if(tip){attrs.splice(attrs.indexOf(tip),1)}if(type&&typeof macro.types[type.f]==="function"){body.push.apply(body,macro.types[type.f](attrs,content,handle))}else if(value){var el={t:7,e:"input",m:[value]};if(disabled){el.m.push(disabled)}if(findDeep(content,"option")){el.e="select";el.f=content}if(type){el.m.push(type);if(type.f==="checkbox"||type.f==="radio"){var target=attrs.find(function(a){return a.n==="target"});if(target){el.m.push(Object.assign({},target,{n:"name"}))}else{el.m.splice(el.m.indexOf(value),1,Object.assign({},value,{n:"checked"}))}}}el.m=el.m.concat(attrs.filter(function(a){return a.t===73||a.t===73||a.n==="placeholder"}));body.push(el);var btns=content.filter(function(e){return e.e==="button"||findDeep(e.f,"button")});if(btns.length){body.push.apply(body,btns);body=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:body}]}}else{var els=content.filter(function(e){return e.e});if(els.find(function(e){return e.e==="button"})&&els.length>1){body=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:content}]}else{body.push.apply(body,content)}}var label=attrs.find(function(a){return a.n==="label"});if(tip){body.unshift({t:7,e:"span",m:[{t:13,n:"class",f:"field-tip"+(!label?" field-solo-tip":""),g:1},{t:13,n:"title",f:tip.f},{t:70,n:["click"],f:{r:[],s:"[false]"}}],f:"?"})}if(label){body.unshift.apply(body,Array.isArray(label.f)?label.f:[label.f])}else{body.unshift(" ")}var outer={t:7,e:"label",m:[{t:71,n:"field"}].concat(attrs.filter(function(a){return a.t!==13&&a.t!==73||a.n!=="value"&&a.n!=="type"&&a.n!=="inline"&&a.n!=="label"&&a.n!=="placeholder"&&a.n!=="target"&&a.n!=="disabled"})),f:body};if(attrs.find(function(a){return a.n==="inline"})){outer.m.push({t:13,n:"class",f:"inline"})}handle.setTemplate([outer])});macro.types={};export function autofocus(node){if(typeof node.focus==="function"){node.focus()}return{teardown:noop}}export function plugin(opts){if(opts===void 0)opts={};return function(ref){var Ractive=ref.Ractive;var instance=ref.instance;if(!Ractive.isInstance(instance)){if(opts.includeStyle){if(instance===Ractive){Ractive.addCSS("form-decorator",style)}else{var css=instance.css;instance.css=function(data){var res=typeof css!=="function"?css||"":css(data);return res+style(data)}}}}instance.partials[opts.name||"field"]=macro;instance.decorators[opts.name||"field"]=field;instance.decorators[opts.autofocusName||"autofocus"]=autofocus}}globalRegister("field","decorators",field);globalRegister("field","partials",macro);globalRegister("autofocus","decorators",autofocus);export default plugin;
import globalRegister from"./globalRegister";import Ractive from"ractive";export function style(data){var primary=Object.assign({},data("raui.primary"),data("raui.form.primary"));var active=Object.assign({},data("raui.primary.active"),data("raui.form.primary.active"));var boxy=data("raui.form.boxy");return"\n label.field {\n display: inline-block;\n font-size: 0.9em;\n font-weight: 500;\n color: "+(primary.fg||"#222")+";\n transition: 0.2s ease-in-out;\n transition-property: color;\n vertical-align: top;\n box-sizing: border-box;\n padding: 0.25em 0.5em;\n line-height: 1.5em;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: inherit;\n }\n\n label.field.textarea {\n display: block;\n border: 0.0625em solid "+(primary.bc||"#ccc")+";\n padding: 0.5em 0.8em 0.8em 0.8em;\n border-radius: "+(primary.radius||"0.2em")+";\n box-shadow: none;\n transition-property: color, border-color, box-shadow;\n margin: 0.8em 0.2em;\n min-height: auto;\n background-color: "+(boxy?primary.bg||"#fff":"transparent")+";\n }\n\n label.field.focus {\n color: "+(active.fg||primary.fga||"#07e")+";\n }\n\n label.field.textarea.focus {\n border-color: "+(active.fg||primary.fga||"#07e")+";\n "+(!boxy?"box-shadow: 0.0625em 0.0625em "+(active.fg||primary.fga||"#07e")+",\n -0.0625em 0.0625em "+(active.fg||primary.fga||"#07e")+",\n 0.0625em -0.0625em "+(active.fg||primary.fga||"#07e")+",\n -0.0625em -0.0625em "+(active.fg||primary.fga||"#07e")+";":"")+"\n }\n\n label.field input,\n label.field select,\n label.field textarea\n {\n display: block;\n border-width: "+(boxy?"0.0625em":"0 0 0.0625em 0")+";\n border-color: "+(primary.bc||"#ccc")+";\n border-style: solid;\n box-sizing: border-box;\n background-color: "+(boxy?primary.bg||"#fff":"transparent")+";\n transition: 0.2s ease-in-out;\n transition-property: box-shadow, color;\n outline: none;\n box-shadow: none;\n width: 100%;\n margin-bottom: 0.8em;\n font-size: 1.1em;"+(boxy?"\n border-radius: "+(primary.radius||"0.2em")+";":"")+"\n font-weight: 400;\n font-family: inherit;\n }\n\n label.field input"+(boxy?"":":disabled")+",\n label.field select"+(boxy?"":":disabled")+" {\n padding: 0 0.75em;\n }\n label.field select"+(boxy?"":":disabled")+" {\n padding-right: 2em;\n }\n\n label.field input:disabled,\n label.field select:disabled,\n label.field textarea:disabled {\n background: #f4f4f4;\n }\n\n label.field textarea {\n line-height: 1.2em;\n }\n label.field .field-wrapper {\n display: block;\n }\n label.field > select, label.field > input,\n label.field > .field-wrapper > input, label.field > .field-wrapper > select {\n height: 2.5em;\n }\n\n "+(!boxy?"label.field:hover > input,\n label.field:hover select,\n label.field.file:hover:after {\n box-shadow: 0 0.0625em 0 0 "+(primary.bc||"#ccc")+";\n }\n\n label.field.textarea:hover {\n box-shadow: 0.0625em 0.0625em "+(primary.bc||"#ccc")+",\n -0.0625em 0.0625em "+(primary.bc||"#ccc")+",\n 0.0625em -0.0625em "+(primary.bc||"#ccc")+",\n -0.0625em -0.0625em "+(primary.bc||"#ccc")+";\n }\n\n label.field.textarea.focus:hover {\n box-shadow: 0.0625em 0.0625em "+(active.fg||primary.fga||"#07e")+",\n -0.0625em 0.0625em "+(active.fg||primary.fga||"#07e")+",\n 0.0625em -0.0625em "+(active.fg||primary.fga||"#07e")+",\n -0.0625em -0.0625em "+(active.fg||primary.fga||"#07e")+";\n }":"")+"\n\n /**** CHECK BOXES ****/\n\n label.field.check {\n position:relative;\n z-index: 0;\n overflow: visible;\n cursor: pointer;\n padding-top: 2.2em;\n white-space: normal;\n }\n label.field.check.inline {\n padding-top: 0.7em;\n }\n\n label.field.check input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: -0.5em;\n top: 1em;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 3.2em;\n height: 3.2em;\n background-color: "+(primary.bc||"#ccc")+";\n box-shadow: none;\n outline: none;\n opacity: 0;\n transform: scale(1);\n pointer-events: none;\n transition: opacity 0.3s, transform 0.2s;\n }\n label.field.inline.check input {\n top: -0.45em;\n left: -0.55em;\n }\n\n label.field.check input:checked {\n background-color: "+(primary.fga||"#07e")+';\n }\n\n label.field.check:hover > input {\n opacity: 0.04;\n }\n\n label.field.check input:focus {\n opacity: 0.12;\n }\n\n label.field.check:hover > input:focus {\n opacity: 0.16;\n }\n\n label.field.check input:active {\n opacity: 0.6;\n transform: scale(0);\n transition: transform 0s, opacity 0s;\n }\n\n label.field.check:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n margin: 0 0.5em 0.2em 0.1em;\n border: solid 0.125em; /* Safari */\n border-color: '+(primary.fg||"#222")+';\n border-radius: 0.125em;\n width: 1.2em;\n height: 1.2em;\n vertical-align: bottom;\n transition: border-color 0.2s, background-color 0.2s;\n }\n\n label.field.check:after {\n content: "";\n display: block;\n position: absolute;\n top: -0.15em;\n left: -0.05em;\n width: 0.7em;\n height: 0.3em;\n border: solid 0.125em transparent;\n border-right: none;\n border-top: none;\n transform: translate(0.8em, 2.65em) rotate(-45deg);\n }\n\n label.field.check.inline:after {\n transform: translate(0.8em, 1.2em) rotate(-45deg);\n }\n\n label.field.check.checked:before {\n border-color: '+(primary.fga||"#07e")+";\n background-color: "+(primary.fga||"#07e")+";\n }\n label.field.check.focus:before {\n border-color: "+(primary.fga||"#07e")+";\n }\n\n label.field.check.checked:after {\n border-color: "+(primary.bg||"#fff")+";\n }\n\n label.field.check input:disabled {\n opacity: 0;\n }\n\n label.field.check.disabled {\n color: "+(primary.bc||"#ccc")+";\n cursor: initial;\n }\n\n label.field.check.disabled:before {\n border-color: "+(primary.bc||"#ccc")+";\n }\n\n label.field.check.checked.disabled:before {\n border-color: transparent;\n background-color: "+(primary.bc||"#ccc")+";\n }\n\n\n /**** RADIO BUTTONS ****/\n \n label.field.radio {\n z-index: 0;\n position: relative;\n display: inline-block;\n overflow: visible;\n padding-top: 2.2em;\n white-space: normal;\n }\n label.field.radio.inline {\n padding-top: 0.8em;\n }\n\n label.field.radio input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: 0;\n top: 0;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 3.2em;\n height: 3.2em;\n background-color: "+(primary.bc||"#ccc")+';\n outline: none;\n opacity: 0;\n pointer-events: none;\n transform: translate(-0.2em, 1.5em) scale(1);\n transition: opacity 0.3s, transform 0.3s;\n }\n label.field.inline.radio input {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio {\n cursor: pointer;\n position: relative;\n }\n\n label.field.radio:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n margin: 0 0.5em 0.2em 0.1em;\n border: solid 0.125em; /* Safari */\n border-color: '+(primary.fg||"#222")+';\n border-radius: 0.125em;\n width: 1.2em;\n height: 1.2em;\n vertical-align: middle;\n transition: border-color 0.2s;\n }\n\n label.field.radio:after {\n content: "";\n display: block;\n position: absolute;\n border-radius: 50%;\n width: 0.625em;\n height: 0.625em;\n background-color: '+(primary.fga||"#07e")+";\n transform: translate(5px, -17px) scale(0);\n transition: transform 0.2s;\n }\n\n label.field.radio input:checked {\n background-color: "+(primary.fga||"#07e")+";\n }\n\n label.field.radio.checked:before {\n border-color: "+(primary.fga||"#07e")+";\n }\n\n label.field.radio.checked:after {\n transform: translate(5px, -17px) scale(1);\n }\n\n label.field.radio:hover input {\n opacity: 0.04;\n }\n\n label.field.radio input:focus {\n opacity: 0.12;\n transform: translate(-0.2em, 24px) scale(1);\n transition: transform 0.2s, opacity 0.2s;\n }\n label.field.inline.radio input:focus {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio:hover input:focus {\n opacity: 0.16;\n }\n\n label.field.radio input:active {\n opacity: 1;\n transform: translate(-0.2em, 24px) scale(0);\n transition: transform 0s, opacity 0s;\n }\n label.field.inline.radio input:active {\n transform: translate(-0.2em, 3px) scale(0);\n }\n\n label.field.radio.checked:before {\n border-color: "+(primary.fga||"#07e")+";\n }\n\n label.field.radio.focus:before {\n border-color: "+(primary.fga||"#07e")+";\n }\n\n label.field.radio input:disabled {\n opacity: 0;\n }\n\n label.field.radio.disabled {\n color: "+(primary.bc||"#ccc")+";\n cursor: initial;\n }\n\n label.field.radio.disabled:before {\n border-color: "+(primary.bc||"#ccc")+";\n }\n\n label.field.radio.disabled:after {\n background-color: "+(primary.bc||"#ccc")+";\n }\n\n\n\n label.field select {\n padding-right: 2em;\n }\n\n label.field.select {\n cursor: pointer;\n position: relative;\n }\n\n label.field.select:after {\n content: ' ';\n position: absolute;\n display: block;\n width: 0.6em;\n right: 19px;\n height: 0.6em;\n top: 2.6em;\n border-bottom: 0.125em solid;\n border-right: 0.125em solid;\n transform: rotate(45deg);\n pointer-events: none;\n color: "+(primary.bc||"#ccc")+";\n }\n\n label.field textarea {\n border: none;"+(boxy?"\n padding: 0;":"")+"\n }\n\n label.field > select {\n -moz-appearance: none;\n -webkit-appearance: none;\n }\n\n label.field input:focus,\n label.field select:focus,\n label.field.file.focus:after\n {\n border-color: "+(active.fg||primary.fga||"#07e")+";\n "+(!boxy?"box-shadow: 0 0.0625em 0 0 "+(active.fg||primary.fga||"#07e")+";":"")+"\n }\n\n label.field input[type=checkbox]:focus,\n label.field input[type=radio]:focus {\n box-shadow: none;\n }\n\n label.field.file.focus:after {\n color: "+(active.fg||primary.fga||"#07e")+";\n }\n label.field.file [type=file] {\n position: absolute;\n width: 0;\n height: 0;\n opacity: 0;\n z-index: -1;\n }\n label.field.file {\n position: relative;\n min-width: 9em;\n height: 5em;\n }\n label.field.file:after {\n position: absolute;\n content: 'Choose a file';\n box-sizing: border-box;\n width: calc(100% - 0.3em);\n height: 2.5em;\n font-size: 1.1em;\n line-height: 1.5em;\n color: "+(primary.fg||"#222")+";\n text-align: "+(boxy?"center":"left")+";\n padding: 0.5em "+(boxy?"0.5em":"0")+";\n cursor: pointer;\n font-style: oblique;\n left: 0.25em;\n top: 1.6em;\n transition: 0.2s ease-in-out;\n transition-property: color, border-bolor, box-shadow;"+(boxy?"\n border-radius: "+(primary.radius||"0.2em")+";\n border-color: "+(primary.bc||"#ccc")+";\n border-style: solid;\n border-width: 0.0625em;":"\n border-bottom-color: "+(primary.bc||"#ccc")+";\n border-bottom-width: 0.0625em;\n border-bottom-style: solid;\n ")+"\n }\n label.field.file.inline:after {\n top: 0.2em;\n }\n\n label.field.button {\n vertical-align: top;\n padding-top: "+(boxy?"1.7":"1.958")+"em;\n }\n label.field .with-buttons button, label.field.button button {\n font-size: 1.1em;\n margin-top: "+(boxy?"0.15em":"0")+";\n }\n\n label.field .field-wrapper.with-buttons {\n display: flex;\n }\n label.field .with-buttons button {\n flex-shrink: 0;\n padding-left: 0.5em;\n padding-right: 0.5em;\n margin-top: 0;\n margin-right: 0;\n "+(boxy?"height: 2.5em;\n box-shadow: none;\n border-radius: 0;\n border-left: 1px solid "+(primary.bg||"#fff")+";\n margin-left: 0;":"height: 2.25em;")+"\n }"+(boxy?"\n label.field .with-buttons button:first-of-type {\n margin-left: -0.05em;\n border-left: none;\n }\n label.field .with-buttons button:last-of-type {\n border-radius: 0 "+(primary.radius||"0.2em")+" "+(primary.radius||"0.2em")+" 0;\n }\n label.field .with-buttons input {\n border-radius: "+(primary.radius||"0.2em")+" 0 0 "+(primary.radius||"0.2em")+";\n min-width: 0;\n }\n ":"")+"\n\n label.field.plain > div {\n position: absolute;\n font-size: 1.1em;\n top: 2.4em;\n font-weight: normal;\n }\n\n /* inline fields (no labels) */\n label.field.inline {\n height: 3.3em;\n }\n\n label.field.button.inline {\n margin-top: 0.2em;\n padding-top: 0.12em;\n }\n\n label.field.button.inline button {\n margin-top: 0;\n }\n\n label.field.inline.select:after {\n top: 1."+(boxy?"15":"1")+"em;\n }\n\n label.field .field-tip {\n display: inline-block;\n width: 1em;\n height: 1em;\n background-color: "+(primary.fga||"#07e")+";\n color: "+(primary.bg||"#fff;")+";\n cursor: default;\n user-select: none;\n border-radius: 1em;\n margin-left: 0.5em;\n line-height: 1.2em;\n text-align: center;\n margin-top: -0.2em;\n }\n\n label.field .field-solo-tip {\n margin-left: -0.1em;\n }\n "}function noop(){}function focused(ev){if(!~this.className.indexOf("focus")){this.className+=" focus"}}function blurred(ev){this.className=this.className.replace(/\bfocus\b/g,"").trim()}export function field(node){var ctx=this.getContext(node);var isField,isCheck,isRadio,isArea,isSelect,isFile,isButton,isPlain,isInput;var change,attrs,desc,last;function invalidate(){var val=setup().split(/\s+/).filter(function(c){return!!c});isField=!!~val.indexOf("field");if(!isField){val.push("field");isField=true}isCheck=node.querySelector("input[type=checkbox]");if(isCheck&&!~val.indexOf("check")){val.push("check")}isRadio=node.querySelector("input[type=radio]");if(isRadio&&!~val.indexOf("radio")){val.push("radio")}var checkable=isCheck||isRadio;if(checkable&&checkable.checked&&!~val.indexOf("checked")){val.push("checked")}if(checkable&&checkable.disabled&&!~val.indexOf("disabled")){val.push("disabled")}if(!checkable&&change){change.cancel();change=0;if(attrs){attrs.disconnect();attrs=0}delete checkable._form_callback;if(last){delete last.checked;desc=last=undefined}}else if(checkable){checkable._form_callback=function(ev,init){if(init===void 0)init=true;if(init&&checkable.type==="radio"&&checkable.name){var list=[];list.push.apply(list,document.querySelectorAll("input[type=radio][name="+checkable.name+"]"));list=list.filter(function(i){return i!==checkable});list.forEach(function(l){return l._form_callback&&l._form_callback(ev,false)})}var checked=checkable.checked;if(checked&&!~node.className.indexOf("checked")){node.className+=" checked"}else if(!checked&&~node.className.indexOf("checked")){node.className=node.className.replace(/\bchecked\b/g,"").replace(/ +/g," ").trim()}};if(MutationObserver){attrs=new MutationObserver(function(){var val;val=checkable.disabled;if(val&&!~node.className.indexOf("disabled")){node.className+=" disabled"}else if(!val&&~node.className.indexOf("disabled")){node.className=node.className.replace(/\bdisabled\b/g,"").replace(/ +/g," ").trim()}});attrs.observe(checkable,{attributes:true})}change=this.getContext(checkable).listen("change",checkable._form_callback);desc=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(checkable),"checked");if(desc&&desc.configurable){last=checkable;Object.defineProperty(checkable,"checked",{get:desc.get,set:function set(v){desc.set.call(last,v);checkable._form_callback()},enumerable:true,configurable:true})}}isArea=!!node.querySelector("textarea");if(isArea&&!~val.indexOf("textarea")){val.push("textarea")}isSelect=!!node.querySelector("select");if(isSelect&&!~val.indexOf("select")){val.push("select")}isFile=!!node.querySelector("input[type=file]");if(isFile&&!~val.indexOf("file")){val.push("file")}isButton=node.querySelector("button");isButton=!!isButton&&isButton.parentNode===node;if(isButton&&!~val.indexOf("button")){val.push("button")}isPlain=!!node.querySelector("div");if(isPlain&&!~val.indexOf("plain")){val.push("plain")}isInput=!isCheck&&!isRadio&&!isFile&&!!node.querySelector("input");if(isInput&&!~val.indexOf("input")){val.push("input")}node.className=val.join(" ")}function setup(){var cls=node.className;if(!isField){cls=cls.replace(/\bfield\b/g,"").trim()}if(!isCheck){cls=cls.replace(/\bcheck(ed)?\b/g,"").trim()}if(!isRadio){cls=cls.replace(/\bradio\b/g,"").trim()}if(!isArea){cls=cls.replace(/\btextarea\b/g,"").trim()}if(!isSelect){cls=cls.replace(/\bselect\b/g,"").trim()}if(!isFile){cls=cls.replace(/\bfile\b/g,"").trim()}if(!isButton){cls=cls.replace(/\bbutton\b/g,"").trim()}if(!isPlain){cls=cls.replace(/\bplain\b/g,"").trim()}if(!isInput){cls=cls.replace(/\binput\b/g,"").trim()}cls=cls.replace(/ +/g," ");return cls}var focus=ctx.listen("focusin",focused);var blur=ctx.listen("focusout",blurred);invalidate.call(this);return{update:noop,invalidate:invalidate.bind(this),teardown:function teardown(){var cls=setup();cls=cls.replace(/\bfocus\b/g,"").trim();focus.cancel();blur.cancel();change&&change.cancel();if(attrs){attrs.disconnect()}if(last){delete last.checked;desc=last=undefined}node.className=cls}}}field.style=style;function findDeep(els,el){if(!els){return false}for(var i=0;i<els.length;i++){if(els[i].e===el){return true}if(els[i].f&&findDeep(els[i].f,el)){return true}}return false}export var macro=Ractive.macro(function(handle){var body=[];var attrs=(handle.template.m||[]).slice();var content=handle.template.f||[];var value=attrs.find(function(a){return a.n==="value"});var type=attrs.find(function(a){return a.n==="type"});var tip=attrs.find(function(a){return a.n==="tip"});var disabled=attrs.find(function(a){return a.n==="disabled"});if(tip){attrs.splice(attrs.indexOf(tip),1)}if(type&&typeof macro.types[type.f]==="function"){body.push.apply(body,macro.types[type.f](attrs,content,handle))}else if(value){var el={t:7,e:"input",m:[value]};if(disabled){el.m.push(disabled)}if(findDeep(content,"option")){el.e="select";el.f=content}if(type){el.m.push(type);if(type.f==="checkbox"||type.f==="radio"){var target=attrs.find(function(a){return a.n==="target"});if(target){el.m.push(Object.assign({},target,{n:"name"}))}else{el.m.splice(el.m.indexOf(value),1,Object.assign({},value,{n:"checked"}))}}}el.m=el.m.concat(attrs.filter(function(a){return a.t===73||a.t===73||a.n==="placeholder"}));body.push(el);var btns=content.filter(function(e){return e.e==="button"||findDeep(e.f,"button")});if(btns.length){body.push.apply(body,btns);body=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:body}]}}else{var els=content.filter(function(e){return e.e});if(els.find(function(e){return e.e==="button"})&&els.length>1){body=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:content}]}else{body.push.apply(body,content)}}var label=attrs.find(function(a){return a.n==="label"});if(tip){body.unshift({t:7,e:"span",m:[{t:13,n:"class",f:"field-tip"+(!label?" field-solo-tip":""),g:1},{t:13,n:"title",f:tip.f},{t:70,n:["click"],f:{r:[],s:"[false]"}}],f:"?"})}var inline=attrs.find(function(a){return a.n==="inline"});if(label&&!inline){body.unshift.apply(body,Array.isArray(label.f)?label.f:[label.f])}else if(!inline){body.unshift(" ")}var outer={t:7,e:"label",m:[{t:71,n:"field"}].concat(attrs.filter(function(a){return a.t!==13&&a.t!==73||a.n!=="value"&&a.n!=="type"&&a.n!=="inline"&&a.n!=="label"&&a.n!=="placeholder"&&a.n!=="target"&&a.n!=="disabled"})),f:body};if(inline){outer.m.push({t:13,n:"class",f:"inline"})}handle.setTemplate([outer])});macro.types={};export function autofocus(node){if(typeof node.focus==="function"){node.focus()}return{teardown:noop}}export function plugin(opts){if(opts===void 0)opts={};return function(ref){var Ractive=ref.Ractive;var instance=ref.instance;if(!Ractive.isInstance(instance)){if(opts.includeStyle){if(instance===Ractive){Ractive.addCSS("form-decorator",style)}else{var css=instance.css;instance.css=function(data){var res=typeof css!=="function"?css||"":css(data);return res+style(data)}}}}instance.partials[opts.name||"field"]=macro;instance.decorators[opts.name||"field"]=field;instance.decorators[opts.autofocusName||"autofocus"]=autofocus}}globalRegister("field","decorators",field);globalRegister("field","partials",macro);globalRegister("autofocus","decorators",autofocus);export default plugin;

@@ -14,12 +14,20 @@ import Ractive from 'ractive';

SideBar.prototype.select = function select (idx) {
SideBar.prototype.select = function select (idx, open) {
if (idx < 0 || idx > (this.get('tabs.length') || 0) - 1) { return; }
if (open !== false) { this.open(); }
return this.set('selected', idx);
};
SideBar.prototype.blur = function blur () {
if (this.get('size') !== 'wide' && this.get('open')) { return this.close().then(function () { return true; }); }
else { return Promise.resolve(false); }
};
SideBar.prototype.open = function open () { return this.set('open', true); };
SideBar.prototype.close = function close () { return this.set('open', false); };
SideBar.prototype.toggle = function toggle (key) {
var this$1 = this;
if (key === undefined) {
return Ractive.prototype.toggle.call(this, 'open');
return Ractive.prototype.toggle.call(this, 'open').then(function () { return this$1.get('open'); });
} else {

@@ -34,3 +42,3 @@ return Ractive.prototype.toggle.call(this, key);

Ractive.extendWith(SideBar, {
template: {v:4,t:[{t:7,e:"div",m:[{t:16,r:"extra-attributes",z:[{n:"sidebar",x:{r:"@this"}}]},{n:"class",f:["rsidebar rsb-",{t:2,r:"~/size"}],t:13},{n:"class-rsb-open",t:13,f:[{t:2,r:"~/open"}]},{n:"class-rsb-closed",t:13,f:[{t:2,x:{r:["~/open"],s:"!_0"}}]},{n:"class-rsb-right",t:13,f:[{t:2,r:"~/right"}]},{n:"class-rsb-left",t:13,f:[{t:2,x:{r:["~/right"],s:"!_0"}}]},{n:"class-rsb-has-tabs",t:13,f:[{t:2,r:"~/tabs.length"}]},{n:"class-rsb-no-tabs",t:13,f:[{t:2,x:{r:["~/tabs.length"],s:"!_0"}}]},{n:"sized",t:71,f:{r:[],s:"[{clientWidth:\"~/clientWidth\"}]"}}],f:[{t:4,f:[{t:4,f:[{t:16,r:"~/tabs.mobile",z:[{n:"sidebar",x:{r:"@this"}}]}],n:50,r:"~/tabs.mobile"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-mobile",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.toggle(\"open\")]"}}],f:[{t:7,e:"svg",m:[{n:"viewBox",f:"4 7 16 10",t:13,g:1}],f:[{t:7,e:"path",m:[{n:"d",f:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z",t:13,g:1}]}]}]}],n:51,l:1}],n:50,x:{r:["~/size","~/open","~/"],s:"_0===\"narrow\"&&!_1&&!_2[\"no-mobile\"]"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-bar",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tabs",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab rsb-indicator",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.toggle(\"open\")]"}}],f:[{t:7,e:"svg",m:[{n:"viewBox",f:"4 7 16 10",t:13,g:1}],f:[{t:7,e:"path",m:[{n:"d",f:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z",t:13,g:1}]}]}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab",g:1},{n:"class-rsb-selected",t:13,f:[{t:2,x:{r:["@index","~/selected"],s:"_0===_1"}}]},{t:4,f:[{n:"label",f:[{t:16,r:".label"}],t:13}],n:50,r:".label"},{t:4,f:[{t:16,r:".tabattrs"}],n:50,r:".tabattrs"},{n:["click"],t:70,f:{r:["@this","@index"],s:"[_0.set({selected:_1,open:true})]"}}],f:[{t:16,r:".tab",z:[{n:"sidebar",x:{r:"@this"}}]}]}],n:52,r:"~/tabs"}]}],n:50,r:"~/tabs.length"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab-contents",g:1},{t:4,f:[{n:"style-min-width",f:[{t:2,r:"~/width"}],t:13}],n:50,r:"~/width"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab-content",g:1},{n:"class-rsb-selected",t:13,f:[{t:2,x:{r:["@index","~/selected"],s:"_0===_1"}}]},{t:16,r:".attrs"}],f:[{t:16,r:".content",z:[{n:"sidebar",x:{r:"@this"}}]}]}],n:52,r:"~/tabs"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-contents",g:1},{t:16,r:"~/tabs.sideattrs"}],f:[{t:16,r:"~/tabs.side",z:[{n:"sidebar",x:{r:"@this"}}]}]}],n:50,r:"~/tabs.side"}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-main",g:1}],f:[{t:16,r:"~/tabs.main",z:[{n:"sidebar",x:{r:"@this"}}]}]}]}],e:{"!_0":function (_0){return(!_0);},"[{clientWidth:\"~/clientWidth\"}]":function (){return([{clientWidth:"~/clientWidth"}]);},"[_0.toggle(\"open\")]":function (_0){return([_0.toggle("open")]);},"_0===\"narrow\"&&!_1&&!_2[\"no-mobile\"]":function (_0,_1,_2){return(_0==="narrow"&&!_1&&!_2["no-mobile"]);},"_0===_1":function (_0,_1){return(_0===_1);},"[_0.set({selected:_1,open:true})]":function (_0,_1){return([_0.set({selected:_1,open:true})]);}}},
template: {v:4,t:[{t:7,e:"div",m:[{t:16,r:"extra-attributes",z:[{n:"sidebar",x:{r:"@this"}}]},{n:"class",f:["rsidebar rsb-",{t:2,r:"~/size"}],t:13},{n:"class-rsb-open",t:13,f:[{t:2,r:"~/open"}]},{n:"class-rsb-closed",t:13,f:[{t:2,x:{r:["~/open"],s:"!_0"}}]},{n:"class-rsb-right",t:13,f:[{t:2,r:"~/right"}]},{n:"class-rsb-left",t:13,f:[{t:2,x:{r:["~/right"],s:"!_0"}}]},{n:"class-rsb-has-tabs",t:13,f:[{t:2,r:"~/tabs.length"}]},{n:"class-rsb-no-tabs",t:13,f:[{t:2,x:{r:["~/tabs.length"],s:"!_0"}}]},{n:"sized",t:71,f:{r:[],s:"[{clientWidth:\"~/clientWidth\"}]"}}],f:[{t:4,f:[{t:4,f:[{t:16,r:"~/tabs.mobile",z:[{n:"sidebar",x:{r:"@this"}}]}],n:50,r:"~/tabs.mobile"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-mobile",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.toggle(\"open\")]"}}],f:[{t:7,e:"svg",m:[{n:"viewBox",f:"4 7 16 10",t:13,g:1}],f:[{t:7,e:"path",m:[{n:"d",f:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z",t:13,g:1}]}]}]}],n:51,l:1}],n:50,x:{r:["~/size","~/open","~/"],s:"_0===\"narrow\"&&!_1&&!_2[\"no-mobile\"]"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-bar",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tabs",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab rsb-indicator",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.toggle(\"open\")]"}}],f:[{t:7,e:"svg",m:[{n:"viewBox",f:"4 7 16 10",t:13,g:1}],f:[{t:7,e:"path",m:[{n:"d",f:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z",t:13,g:1}]}]}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab",g:1},{n:"class-rsb-selected",t:13,f:[{t:2,x:{r:["@index","~/selected"],s:"_0===_1"}}]},{t:4,f:[{n:"label",f:[{t:16,r:".label"}],t:13}],n:50,r:".label"},{t:4,f:[{t:16,r:".tabattrs"}],n:50,r:".tabattrs"},{n:["click"],t:70,f:{r:["@this","@index"],s:"[_0.set({selected:_1,open:true})]"}}],f:[{t:16,r:".tab",z:[{n:"sidebar",x:{r:"@this"}}]}]}],n:52,r:"~/tabs"}]}],n:50,r:"~/tabs.length"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab-contents",g:1},{t:4,f:[{n:"style-min-width",f:[{t:2,r:"~/width"},"em"],t:13}],n:50,r:"~/width"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab-content",g:1},{n:"class-rsb-selected",t:13,f:[{t:2,x:{r:["@index","~/selected"],s:"_0===_1"}}]},{t:16,r:".attrs"}],f:[{t:16,r:".content",z:[{n:"sidebar",x:{r:"@this"}}]}]}],n:52,r:"~/tabs"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-contents",g:1},{t:16,r:"~/tabs.sideattrs"}],f:[{t:16,r:"~/tabs.side",z:[{n:"sidebar",x:{r:"@this"}}]}]}],n:50,r:"~/tabs.side"}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-main",g:1}],f:[{t:16,r:"~/tabs.main",z:[{n:"sidebar",x:{r:"@this"}}]}]}]}],e:{"!_0":function (_0){return(!_0);},"[{clientWidth:\"~/clientWidth\"}]":function (){return([{clientWidth:"~/clientWidth"}]);},"[_0.toggle(\"open\")]":function (_0){return([_0.toggle("open")]);},"_0===\"narrow\"&&!_1&&!_2[\"no-mobile\"]":function (_0,_1,_2){return(_0==="narrow"&&!_1&&!_2["no-mobile"]);},"_0===_1":function (_0,_1){return(_0===_1);},"[_0.set({selected:_1,open:true})]":function (_0,_1){return([_0.set({selected:_1,open:true})]);}}},
css: function(data) { return [(function(data) {

@@ -37,0 +45,0 @@ var primary = Object.assign({}, data('raui.primary'), data('raui.sidebar.primary'));

@@ -1,1 +0,1 @@

import Ractive from"ractive";import{sized,sizeInEm}from"./watch-size";import globalRegister from"./globalRegister";export var SideBar=function(Ractive){function SideBar(opts){Ractive.call(this,opts)}if(Ractive)SideBar.__proto__=Ractive;SideBar.prototype=Object.create(Ractive&&Ractive.prototype);SideBar.prototype.constructor=SideBar;SideBar.prototype.select=function select(idx){if(idx<0||idx>(this.get("tabs.length")||0)-1){return}return this.set("selected",idx)};SideBar.prototype.open=function open(){return this.set("open",true)};SideBar.prototype.close=function close(){return this.set("open",false)};SideBar.prototype.toggle=function toggle(key){if(key===undefined){return Ractive.prototype.toggle.call(this,"open")}else{return Ractive.prototype.toggle.call(this,key)}};return SideBar}(Ractive);Ractive.extendWith(SideBar,{template:{v:4,t:[{t:7,e:"div",m:[{t:16,r:"extra-attributes",z:[{n:"sidebar",x:{r:"@this"}}]},{n:"class",f:["rsidebar rsb-",{t:2,r:"~/size"}],t:13},{n:"class-rsb-open",t:13,f:[{t:2,r:"~/open"}]},{n:"class-rsb-closed",t:13,f:[{t:2,x:{r:["~/open"],s:"!_0"}}]},{n:"class-rsb-right",t:13,f:[{t:2,r:"~/right"}]},{n:"class-rsb-left",t:13,f:[{t:2,x:{r:["~/right"],s:"!_0"}}]},{n:"class-rsb-has-tabs",t:13,f:[{t:2,r:"~/tabs.length"}]},{n:"class-rsb-no-tabs",t:13,f:[{t:2,x:{r:["~/tabs.length"],s:"!_0"}}]},{n:"sized",t:71,f:{r:[],s:'[{clientWidth:"~/clientWidth"}]'}}],f:[{t:4,f:[{t:4,f:[{t:16,r:"~/tabs.mobile",z:[{n:"sidebar",x:{r:"@this"}}]}],n:50,r:"~/tabs.mobile"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-mobile",g:1},{n:["click"],t:70,f:{r:["@this"],s:'[_0.toggle("open")]'}}],f:[{t:7,e:"svg",m:[{n:"viewBox",f:"4 7 16 10",t:13,g:1}],f:[{t:7,e:"path",m:[{n:"d",f:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z",t:13,g:1}]}]}]}],n:51,l:1}],n:50,x:{r:["~/size","~/open","~/"],s:'_0==="narrow"&&!_1&&!_2["no-mobile"]'}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-bar",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tabs",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab rsb-indicator",g:1},{n:["click"],t:70,f:{r:["@this"],s:'[_0.toggle("open")]'}}],f:[{t:7,e:"svg",m:[{n:"viewBox",f:"4 7 16 10",t:13,g:1}],f:[{t:7,e:"path",m:[{n:"d",f:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z",t:13,g:1}]}]}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab",g:1},{n:"class-rsb-selected",t:13,f:[{t:2,x:{r:["@index","~/selected"],s:"_0===_1"}}]},{t:4,f:[{n:"label",f:[{t:16,r:".label"}],t:13}],n:50,r:".label"},{t:4,f:[{t:16,r:".tabattrs"}],n:50,r:".tabattrs"},{n:["click"],t:70,f:{r:["@this","@index"],s:"[_0.set({selected:_1,open:true})]"}}],f:[{t:16,r:".tab",z:[{n:"sidebar",x:{r:"@this"}}]}]}],n:52,r:"~/tabs"}]}],n:50,r:"~/tabs.length"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab-contents",g:1},{t:4,f:[{n:"style-min-width",f:[{t:2,r:"~/width"}],t:13}],n:50,r:"~/width"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab-content",g:1},{n:"class-rsb-selected",t:13,f:[{t:2,x:{r:["@index","~/selected"],s:"_0===_1"}}]},{t:16,r:".attrs"}],f:[{t:16,r:".content",z:[{n:"sidebar",x:{r:"@this"}}]}]}],n:52,r:"~/tabs"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-contents",g:1},{t:16,r:"~/tabs.sideattrs"}],f:[{t:16,r:"~/tabs.side",z:[{n:"sidebar",x:{r:"@this"}}]}]}],n:50,r:"~/tabs.side"}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-main",g:1}],f:[{t:16,r:"~/tabs.main",z:[{n:"sidebar",x:{r:"@this"}}]}]}]}],e:{"!_0":function(_0){return!_0},'[{clientWidth:"~/clientWidth"}]':function(){return[{clientWidth:"~/clientWidth"}]},'[_0.toggle("open")]':function(_0){return[_0.toggle("open")]},'_0==="narrow"&&!_1&&!_2["no-mobile"]':function(_0,_1,_2){return _0==="narrow"&&!_1&&!_2["no-mobile"]},"_0===_1":function(_0,_1){return _0===_1},"[_0.set({selected:_1,open:true})]":function(_0,_1){return[_0.set({selected:_1,open:true})]}}},css:function(data){return[function(data){var primary=Object.assign({},data("raui.primary"),data("raui.sidebar.primary"));var themes=(data("raui.themes")||[]).slice();(data("raui.sidebar.themes")||[]).forEach(function(t){if(!~themes.indexOf(t)){themes.push(t)}});return"\n .rsidebar {\n display: flex;\n flex-grow: 1;\n overflow: hidden;\n }\n \n .rsidebar.rsb-right {\n flex-direction: row-reverse;\n }\n \n .rsb-left.rsb-narrow.rsb-closed .rsb-bar,\n .rsb-left.rsb-medium.rsb-closed.rsb-no-tabs .rsb-bar,\n .rsb-left.rsb-wide.rsb-closed.rsb-no-tabs .rsb-bar {\n transform: translateX(-100%);\n }\n .rsb-right.rsb-narrow.rsb-closed .rsb-bar,\n .rsb-right.rsb-medium.rsb-closed.rsb-no-tabs .rsb-bar,\n .rsb-right.rsb-wide.rsb-closed.rsb-no-tabs .rsb-bar {\n transform: translateX(100%);\n }\n .rsb-left.rsb-wide.rsb-closed .rsb-bar,\n .rsb-left.rsb-medium.rsb-closed .rsb-bar {\n transform: translateX(calc(-100% + "+(primary.tabsize||"3em")+" + "+(primary.border||1)+"px));\n }\n .rsb-right.rsb-wide.rsb-closed .rsb-bar,\n .rsb-right.rsb-medium.rsb-closed .rsb-bar {\n transform: translateX(calc(100% - "+(primary.tabsize||"3em")+" - "+(primary.border||1)+"px));\n }\n .rsb-narrow.rsb-open .rsb-bar,\n .rsb-narrow.rsb-open .rsb-bar {\n transform: translateX(0);\n }\n \n .rsb-bar {\n flex-shrink: 0;\n display: flex;\n border-color: "+(primary.bc||"#ccc")+";\n border-style: solid;\n border-width: 0;\n transition: transform 0.2s ease-in-out;\n transform: translateX(0);\n z-index: 2;\n background-color: "+(primary.bg||"#fff")+";\n }\n .rsb-narrow .rsb-bar,\n .rsb-medium .rsb-bar {\n position: absolute;\n height: 100%;\n }\n .rsb-narrow.rsb-open .rsb-bar,\n .rsb-medium.rsb-open .rsb-bar {\n box-shadow: 0em 0em 0.5em 0.25em rgba(0, 0, 0, 0.25);\n }\n .rsb-right .rsb-bar {\n border-left-width: 1px;\n }\n .rsb-left .rsb-bar {\n flex-direction: row-reverse;\n border-right-width: 1px;\n }\n \n .rsb-indicator svg, .rsb-mobile svg {\n transition: transform 0.2s ease-in-out;\n width: 1.2em;\n height: 1.2em;\n }\n .rsb-open.rsb-left .rsb-indicator svg,\n .rsb-closed.rsb-right .rsb-indicator svg,\n .rsb-closed.rsb-right .rsb-mobile svg,\n .rsb-closed.rsb-right .rsb-moble svg {\n transform: rotate(90deg);\n }\n .rsb-closed.rsb-left .rsb-indicator svg,\n .rsb-open.rsb-right .rsb-indicator svg,\n .rsb-closed.rsb-left .rsb-mobile svg,\n .rsb-open.rsb-right .rsb-mobile svg {\n transform: rotate(-90deg);\n }\n \n .rsb-tabs {\n display: flex;\n flex-direction: column;\n border-color: "+(primary.bc||"#ccc")+";\n border-style: solid;\n border-width: 0;\n }\n .rsb-right .rsb-tabs {\n border-right-width: 1px;\n }\n .rsb-left .rsb-tabs {\n border-left-width: 1px;\n }\n \n .rsb-tab {\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n width: "+(primary.tabsize||"3em")+";\n height: "+(primary.tabsize||"3em")+";\n border-style: solid;\n border-color: transparent;\n border-width: "+(primary.border||1)+"px 0 "+(primary.border||1)+"px 0;\n background-color: "+(primary.bg||"#fff")+";\n color: "+(primary.fg||"#222")+";\n cursor: pointer;\n }\n .rsb-tab.rsb-selected {\n border-color: "+(primary.bc||"#ccc")+";\n background-color: "+(primary.bg||"#fff")+";\n color: "+(primary.fga||"#07e")+";\n width: calc("+(primary.tabsize||"3em")+" + "+(primary.border||1)+"px);\n }\n .rsb-right .rsb-tab.rsb-selected {\n margin-right: -"+(primary.border||1)+"px;\n }\n .rsb-left .rsb-tab.rsb-selected {\n margin-left: -"+(primary.border||1)+"px;\n }\n .rsb-tab[label]:hover:after {\n position: absolute;\n content: attr(label);\n top: 50%;\n display: block;\n padding: 0.4em;\n background: #333;\n color: #fff;\n font-family: Arial, Helvetica, sans-serif;\n font-size: 1em;\n font-weight: 400;\n border-radius: 0.4em;\n pointer-events: none;\n white-space: nowrap;\n transform: translateY(-50%);\n }\n .rsb-left .rsb-tab[label]:after {\n left: 110%;\n }\n .rsb-right .rsb-tab[label]:after {\n right: 110%;\n }\n \n .rsb-tab-contents {\n position: relative;\n flex-grow: 1;\n overflow: hidden;\n box-sizing: border-box;\n transition: transform 0.2s ease-in-out;\n background-color: "+(primary.bg||"#fff")+";\n min-width: 16em;\n }\n \n .rsb-open .rsb-content {\n padding: "+(primary.padding||"0.5em")+";\n }\n \n .rsb-contents, .rsb-tab-content {\n position: absolute;\n padding: "+(primary.padding||"0.5em")+";\n top: 0;\n left: 0;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n overflow: auto;\n opacity: 0;\n z-index: 0;\n transition: opacity 0.2s ease-in-out;\n }\n .rsb-tab-content.rsb-selected {\n z-index: 1;\n opacity: 1;\n }\n \n .rsb-contents {\n z-index: 1;\n opacity: 1;\n }\n \n .rsb-main {\n flex-grow: 1;\n background-color: "+(primary.bg||"#fff")+";\n padding: "+(primary.padding||"0.5em")+";\n overflow: auto;\n box-sizing: border-box;\n z-index: 1;\n }\n \n .rsb-closed.rsb-wide .rsb-main,\n .rsb-medium .rsb-main {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n .rsb-closed.rsb-wide.rsb-has-tabs .rsb-main,\n .rsb-medium.rsb-has-tabs .rsb-main {\n width: calc(100% - "+(primary.tabsize||"3em")+" - 1px);\n }\n .rsb-left.rsb-closed.rsb-wide.rsb-has-tabs .rsb-main,\n .rsb-left.rsb-medium.rsb-has-tabs .rsb-main {\n left: calc("+(primary.tabsize||"3em")+" + 1px);\n }\n .rsb-right.rsb-closed.rsb-wide.rsb-has-tabs .rsb-main,\n .rsb-right.rsb-medium.rsb-has-tabs .rsb-main {\n right: calc("+(primary.tabsize||"3em")+" + 1px);\n }\n \n .rsb-mobile {\n position: absolute;\n top: 1em;\n width: 3em;\n height: 3em;\n border-style: solid;\n border-color: "+(primary.bc||"#ccc")+";\n background-color: "+(primary.bg||"#fff")+";\n box-shadow: 0 0 0.25em rgba(0, 0, 0, 0.25);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 2;\n }\n .rsb-left .rsb-mobile {\n border-width: 1px 1px 1px 0;\n border-radius: 0 0.5em 0.5em 0;\n }\n .rsb-right .rsb-mobile {\n border-width: 1px 0 1px 1px;\n border-radius: 0.5em 0 0 0.5em;\n }\n "}.call(this,data)].join(" ")},cssId:"rsidebar",attributes:["right","open","no-mobile","width"],decorators:{sized:sized},data:function data(){return{selected:0,open:true}},computed:{size:function size(){var size=sizeInEm(this.get("~/clientWidth")||1280);if(size>(this.get("@style.raui.sidebar.wide.break")||76)){return"wide"}else if(size>(this.get("@style.raui.sidebar.medium.break")||40)){return"medium"}else{return"narrow"}}},on:{construct:initTemplate,config:function config(){if(this._tabs){var data=this.get("tabs");if(Array.isArray(data)){this._tabs.unshit.apply(this._tabs,data)}this.set("tabs",this._tabs,{shuffle:true})}this._tabs=0}},observe:{size:function size(n){this.set("open",n==="wide")}}});function initTemplate(){var cmp=this.component;if(!cmp){return}var tpl=cmp.template.f||[];var attrs=cmp.template.m?cmp.template.m.slice():[];var orig=cmp.template;var main=tpl.filter(function(e){return e.e!=="tab"&&e.e!=="side"});cmp.template={e:orig.e,f:main,t:orig.t,m:attrs,p:Object.assign({},orig.p,{main:main})};var tabs=tpl.filter(function(e){return e.e==="tab"}).map(function(t){var res={content:(t.f||[]).filter(function(e){return e.e!=="tab"}),attrs:(t.m||[]).filter(function(a){return a.n!=="label"&&a.n!=="tab"})};res.label=(t.m&&t.m.find(function(a){return a.n==="label"})||{}).f;if(typeof res.label==="string"){res.label=[res.label]}res.tab=(t.f||[]).find(function(e){return e.e==="tab"});if(res.tab){res.tabattrs=res.tab.m||[]}if(!res.tab){res.tab=t.m.find(function(a){return a.n==="tab"})}if(res.tab){res.tab=typeof res.tab.f==="string"?[res.tab.f]:res.tab.f}return res});tabs.side=tpl.find(function(e){return e.e==="side"});if(tabs.side){tabs.sideattrs=tabs.side.m||[];tabs.side=tabs.side.f}tabs.main=main;if(tabs.side&&tabs.length){console.warn("Raui SideBar should not have both side and tabs elements")}this._tabs=tabs}export function plugin(opts){if(opts===void 0)opts={};return function(ref){var instance=ref.instance;instance.components[opts.name||"sidebar"]=SideBar}}export default plugin;globalRegister("RMSideBar","components",SideBar);
import Ractive from"ractive";import{sized,sizeInEm}from"./watch-size";import globalRegister from"./globalRegister";export var SideBar=function(Ractive){function SideBar(opts){Ractive.call(this,opts)}if(Ractive)SideBar.__proto__=Ractive;SideBar.prototype=Object.create(Ractive&&Ractive.prototype);SideBar.prototype.constructor=SideBar;SideBar.prototype.select=function select(idx,open){if(idx<0||idx>(this.get("tabs.length")||0)-1){return}if(open!==false){this.open()}return this.set("selected",idx)};SideBar.prototype.blur=function blur(){if(this.get("size")!=="wide"&&this.get("open")){return this.close().then(function(){return true})}else{return Promise.resolve(false)}};SideBar.prototype.open=function open(){return this.set("open",true)};SideBar.prototype.close=function close(){return this.set("open",false)};SideBar.prototype.toggle=function toggle(key){var this$1=this;if(key===undefined){return Ractive.prototype.toggle.call(this,"open").then(function(){return this$1.get("open")})}else{return Ractive.prototype.toggle.call(this,key)}};return SideBar}(Ractive);Ractive.extendWith(SideBar,{template:{v:4,t:[{t:7,e:"div",m:[{t:16,r:"extra-attributes",z:[{n:"sidebar",x:{r:"@this"}}]},{n:"class",f:["rsidebar rsb-",{t:2,r:"~/size"}],t:13},{n:"class-rsb-open",t:13,f:[{t:2,r:"~/open"}]},{n:"class-rsb-closed",t:13,f:[{t:2,x:{r:["~/open"],s:"!_0"}}]},{n:"class-rsb-right",t:13,f:[{t:2,r:"~/right"}]},{n:"class-rsb-left",t:13,f:[{t:2,x:{r:["~/right"],s:"!_0"}}]},{n:"class-rsb-has-tabs",t:13,f:[{t:2,r:"~/tabs.length"}]},{n:"class-rsb-no-tabs",t:13,f:[{t:2,x:{r:["~/tabs.length"],s:"!_0"}}]},{n:"sized",t:71,f:{r:[],s:'[{clientWidth:"~/clientWidth"}]'}}],f:[{t:4,f:[{t:4,f:[{t:16,r:"~/tabs.mobile",z:[{n:"sidebar",x:{r:"@this"}}]}],n:50,r:"~/tabs.mobile"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-mobile",g:1},{n:["click"],t:70,f:{r:["@this"],s:'[_0.toggle("open")]'}}],f:[{t:7,e:"svg",m:[{n:"viewBox",f:"4 7 16 10",t:13,g:1}],f:[{t:7,e:"path",m:[{n:"d",f:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z",t:13,g:1}]}]}]}],n:51,l:1}],n:50,x:{r:["~/size","~/open","~/"],s:'_0==="narrow"&&!_1&&!_2["no-mobile"]'}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-bar",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tabs",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab rsb-indicator",g:1},{n:["click"],t:70,f:{r:["@this"],s:'[_0.toggle("open")]'}}],f:[{t:7,e:"svg",m:[{n:"viewBox",f:"4 7 16 10",t:13,g:1}],f:[{t:7,e:"path",m:[{n:"d",f:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z",t:13,g:1}]}]}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab",g:1},{n:"class-rsb-selected",t:13,f:[{t:2,x:{r:["@index","~/selected"],s:"_0===_1"}}]},{t:4,f:[{n:"label",f:[{t:16,r:".label"}],t:13}],n:50,r:".label"},{t:4,f:[{t:16,r:".tabattrs"}],n:50,r:".tabattrs"},{n:["click"],t:70,f:{r:["@this","@index"],s:"[_0.set({selected:_1,open:true})]"}}],f:[{t:16,r:".tab",z:[{n:"sidebar",x:{r:"@this"}}]}]}],n:52,r:"~/tabs"}]}],n:50,r:"~/tabs.length"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab-contents",g:1},{t:4,f:[{n:"style-min-width",f:[{t:2,r:"~/width"},"em"],t:13}],n:50,r:"~/width"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab-content",g:1},{n:"class-rsb-selected",t:13,f:[{t:2,x:{r:["@index","~/selected"],s:"_0===_1"}}]},{t:16,r:".attrs"}],f:[{t:16,r:".content",z:[{n:"sidebar",x:{r:"@this"}}]}]}],n:52,r:"~/tabs"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-contents",g:1},{t:16,r:"~/tabs.sideattrs"}],f:[{t:16,r:"~/tabs.side",z:[{n:"sidebar",x:{r:"@this"}}]}]}],n:50,r:"~/tabs.side"}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-main",g:1}],f:[{t:16,r:"~/tabs.main",z:[{n:"sidebar",x:{r:"@this"}}]}]}]}],e:{"!_0":function(_0){return!_0},'[{clientWidth:"~/clientWidth"}]':function(){return[{clientWidth:"~/clientWidth"}]},'[_0.toggle("open")]':function(_0){return[_0.toggle("open")]},'_0==="narrow"&&!_1&&!_2["no-mobile"]':function(_0,_1,_2){return _0==="narrow"&&!_1&&!_2["no-mobile"]},"_0===_1":function(_0,_1){return _0===_1},"[_0.set({selected:_1,open:true})]":function(_0,_1){return[_0.set({selected:_1,open:true})]}}},css:function(data){return[function(data){var primary=Object.assign({},data("raui.primary"),data("raui.sidebar.primary"));var themes=(data("raui.themes")||[]).slice();(data("raui.sidebar.themes")||[]).forEach(function(t){if(!~themes.indexOf(t)){themes.push(t)}});return"\n .rsidebar {\n display: flex;\n flex-grow: 1;\n overflow: hidden;\n }\n \n .rsidebar.rsb-right {\n flex-direction: row-reverse;\n }\n \n .rsb-left.rsb-narrow.rsb-closed .rsb-bar,\n .rsb-left.rsb-medium.rsb-closed.rsb-no-tabs .rsb-bar,\n .rsb-left.rsb-wide.rsb-closed.rsb-no-tabs .rsb-bar {\n transform: translateX(-100%);\n }\n .rsb-right.rsb-narrow.rsb-closed .rsb-bar,\n .rsb-right.rsb-medium.rsb-closed.rsb-no-tabs .rsb-bar,\n .rsb-right.rsb-wide.rsb-closed.rsb-no-tabs .rsb-bar {\n transform: translateX(100%);\n }\n .rsb-left.rsb-wide.rsb-closed .rsb-bar,\n .rsb-left.rsb-medium.rsb-closed .rsb-bar {\n transform: translateX(calc(-100% + "+(primary.tabsize||"3em")+" + "+(primary.border||1)+"px));\n }\n .rsb-right.rsb-wide.rsb-closed .rsb-bar,\n .rsb-right.rsb-medium.rsb-closed .rsb-bar {\n transform: translateX(calc(100% - "+(primary.tabsize||"3em")+" - "+(primary.border||1)+"px));\n }\n .rsb-narrow.rsb-open .rsb-bar,\n .rsb-narrow.rsb-open .rsb-bar {\n transform: translateX(0);\n }\n \n .rsb-bar {\n flex-shrink: 0;\n display: flex;\n border-color: "+(primary.bc||"#ccc")+";\n border-style: solid;\n border-width: 0;\n transition: transform 0.2s ease-in-out;\n transform: translateX(0);\n z-index: 2;\n background-color: "+(primary.bg||"#fff")+";\n }\n .rsb-narrow .rsb-bar,\n .rsb-medium .rsb-bar {\n position: absolute;\n height: 100%;\n }\n .rsb-narrow.rsb-open .rsb-bar,\n .rsb-medium.rsb-open .rsb-bar {\n box-shadow: 0em 0em 0.5em 0.25em rgba(0, 0, 0, 0.25);\n }\n .rsb-right .rsb-bar {\n border-left-width: 1px;\n }\n .rsb-left .rsb-bar {\n flex-direction: row-reverse;\n border-right-width: 1px;\n }\n \n .rsb-indicator svg, .rsb-mobile svg {\n transition: transform 0.2s ease-in-out;\n width: 1.2em;\n height: 1.2em;\n }\n .rsb-open.rsb-left .rsb-indicator svg,\n .rsb-closed.rsb-right .rsb-indicator svg,\n .rsb-closed.rsb-right .rsb-mobile svg,\n .rsb-closed.rsb-right .rsb-moble svg {\n transform: rotate(90deg);\n }\n .rsb-closed.rsb-left .rsb-indicator svg,\n .rsb-open.rsb-right .rsb-indicator svg,\n .rsb-closed.rsb-left .rsb-mobile svg,\n .rsb-open.rsb-right .rsb-mobile svg {\n transform: rotate(-90deg);\n }\n \n .rsb-tabs {\n display: flex;\n flex-direction: column;\n border-color: "+(primary.bc||"#ccc")+";\n border-style: solid;\n border-width: 0;\n }\n .rsb-right .rsb-tabs {\n border-right-width: 1px;\n }\n .rsb-left .rsb-tabs {\n border-left-width: 1px;\n }\n \n .rsb-tab {\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n width: "+(primary.tabsize||"3em")+";\n height: "+(primary.tabsize||"3em")+";\n border-style: solid;\n border-color: transparent;\n border-width: "+(primary.border||1)+"px 0 "+(primary.border||1)+"px 0;\n background-color: "+(primary.bg||"#fff")+";\n color: "+(primary.fg||"#222")+";\n cursor: pointer;\n }\n .rsb-tab.rsb-selected {\n border-color: "+(primary.bc||"#ccc")+";\n background-color: "+(primary.bg||"#fff")+";\n color: "+(primary.fga||"#07e")+";\n width: calc("+(primary.tabsize||"3em")+" + "+(primary.border||1)+"px);\n }\n .rsb-right .rsb-tab.rsb-selected {\n margin-right: -"+(primary.border||1)+"px;\n }\n .rsb-left .rsb-tab.rsb-selected {\n margin-left: -"+(primary.border||1)+"px;\n }\n .rsb-tab[label]:hover:after {\n position: absolute;\n content: attr(label);\n top: 50%;\n display: block;\n padding: 0.4em;\n background: #333;\n color: #fff;\n font-family: Arial, Helvetica, sans-serif;\n font-size: 1em;\n font-weight: 400;\n border-radius: 0.4em;\n pointer-events: none;\n white-space: nowrap;\n transform: translateY(-50%);\n }\n .rsb-left .rsb-tab[label]:after {\n left: 110%;\n }\n .rsb-right .rsb-tab[label]:after {\n right: 110%;\n }\n \n .rsb-tab-contents {\n position: relative;\n flex-grow: 1;\n overflow: hidden;\n box-sizing: border-box;\n transition: transform 0.2s ease-in-out;\n background-color: "+(primary.bg||"#fff")+";\n min-width: 16em;\n }\n \n .rsb-open .rsb-content {\n padding: "+(primary.padding||"0.5em")+";\n }\n \n .rsb-contents, .rsb-tab-content {\n position: absolute;\n padding: "+(primary.padding||"0.5em")+";\n top: 0;\n left: 0;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n overflow: auto;\n opacity: 0;\n z-index: 0;\n transition: opacity 0.2s ease-in-out;\n }\n .rsb-tab-content.rsb-selected {\n z-index: 1;\n opacity: 1;\n }\n \n .rsb-contents {\n z-index: 1;\n opacity: 1;\n }\n \n .rsb-main {\n flex-grow: 1;\n background-color: "+(primary.bg||"#fff")+";\n padding: "+(primary.padding||"0.5em")+";\n overflow: auto;\n box-sizing: border-box;\n z-index: 1;\n }\n \n .rsb-closed.rsb-wide .rsb-main,\n .rsb-medium .rsb-main {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n .rsb-closed.rsb-wide.rsb-has-tabs .rsb-main,\n .rsb-medium.rsb-has-tabs .rsb-main {\n width: calc(100% - "+(primary.tabsize||"3em")+" - 1px);\n }\n .rsb-left.rsb-closed.rsb-wide.rsb-has-tabs .rsb-main,\n .rsb-left.rsb-medium.rsb-has-tabs .rsb-main {\n left: calc("+(primary.tabsize||"3em")+" + 1px);\n }\n .rsb-right.rsb-closed.rsb-wide.rsb-has-tabs .rsb-main,\n .rsb-right.rsb-medium.rsb-has-tabs .rsb-main {\n right: calc("+(primary.tabsize||"3em")+" + 1px);\n }\n \n .rsb-mobile {\n position: absolute;\n top: 1em;\n width: 3em;\n height: 3em;\n border-style: solid;\n border-color: "+(primary.bc||"#ccc")+";\n background-color: "+(primary.bg||"#fff")+";\n box-shadow: 0 0 0.25em rgba(0, 0, 0, 0.25);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 2;\n }\n .rsb-left .rsb-mobile {\n border-width: 1px 1px 1px 0;\n border-radius: 0 0.5em 0.5em 0;\n }\n .rsb-right .rsb-mobile {\n border-width: 1px 0 1px 1px;\n border-radius: 0.5em 0 0 0.5em;\n }\n "}.call(this,data)].join(" ")},cssId:"rsidebar",attributes:["right","open","no-mobile","width"],decorators:{sized:sized},data:function data(){return{selected:0,open:true}},computed:{size:function size(){var size=sizeInEm(this.get("~/clientWidth")||1280);if(size>(this.get("@style.raui.sidebar.wide.break")||76)){return"wide"}else if(size>(this.get("@style.raui.sidebar.medium.break")||40)){return"medium"}else{return"narrow"}}},on:{construct:initTemplate,config:function config(){if(this._tabs){var data=this.get("tabs");if(Array.isArray(data)){this._tabs.unshit.apply(this._tabs,data)}this.set("tabs",this._tabs,{shuffle:true})}this._tabs=0}},observe:{size:function size(n){this.set("open",n==="wide")}}});function initTemplate(){var cmp=this.component;if(!cmp){return}var tpl=cmp.template.f||[];var attrs=cmp.template.m?cmp.template.m.slice():[];var orig=cmp.template;var main=tpl.filter(function(e){return e.e!=="tab"&&e.e!=="side"});cmp.template={e:orig.e,f:main,t:orig.t,m:attrs,p:Object.assign({},orig.p,{main:main})};var tabs=tpl.filter(function(e){return e.e==="tab"}).map(function(t){var res={content:(t.f||[]).filter(function(e){return e.e!=="tab"}),attrs:(t.m||[]).filter(function(a){return a.n!=="label"&&a.n!=="tab"})};res.label=(t.m&&t.m.find(function(a){return a.n==="label"})||{}).f;if(typeof res.label==="string"){res.label=[res.label]}res.tab=(t.f||[]).find(function(e){return e.e==="tab"});if(res.tab){res.tabattrs=res.tab.m||[]}if(!res.tab){res.tab=t.m.find(function(a){return a.n==="tab"})}if(res.tab){res.tab=typeof res.tab.f==="string"?[res.tab.f]:res.tab.f}return res});tabs.side=tpl.find(function(e){return e.e==="side"});if(tabs.side){tabs.sideattrs=tabs.side.m||[];tabs.side=tabs.side.f}tabs.main=main;if(tabs.side&&tabs.length){console.warn("Raui SideBar should not have both side and tabs elements")}this._tabs=tabs}export function plugin(opts){if(opts===void 0)opts={};return function(ref){var instance=ref.instance;instance.components[opts.name||"sidebar"]=SideBar}}export default plugin;globalRegister("RMSideBar","components",SideBar);
{
"name": "@evs-chris/raui",
"version": "0.10.1",
"version": "0.10.2",
"description": "Components, decorators, and helpers for Ractive apps that are generally Material-ish",

@@ -5,0 +5,0 @@ "homepage": "https://evs-chris.github.io/raui/demo",

@@ -785,4 +785,5 @@ import globalRegister from './globalRegister';

});
if (label) body.unshift.apply(body, Array.isArray(label.f) ? label.f : [label.f]);
else body.unshift('\xa0');
const inline = attrs.find(a => a.n === 'inline');
if (label && !inline) body.unshift.apply(body, Array.isArray(label.f) ? label.f : [label.f]);
else if (!inline) body.unshift('\xa0');

@@ -794,3 +795,3 @@ const outer = {

if (attrs.find(a => a.n === 'inline')) outer.m.push({ t: 13, n: 'class', f: 'inline' });
if (inline) outer.m.push({ t: 13, n: 'class', f: 'inline' });

@@ -797,0 +798,0 @@ handle.setTemplate([outer]);

@@ -715,4 +715,5 @@ (function (global, factory) {

}); }
if (label) { body.unshift.apply(body, Array.isArray(label.f) ? label.f : [label.f]); }
else { body.unshift('\xa0'); }
var inline = attrs.find(function (a) { return a.n === 'inline'; });
if (label && !inline) { body.unshift.apply(body, Array.isArray(label.f) ? label.f : [label.f]); }
else if (!inline) { body.unshift('\xa0'); }

@@ -724,3 +725,3 @@ var outer = {

if (attrs.find(function (a) { return a.n === 'inline'; })) { outer.m.push({ t: 13, n: 'class', f: 'inline' }); }
if (inline) { outer.m.push({ t: 13, n: 'class', f: 'inline' }); }

@@ -727,0 +728,0 @@ handle.setTemplate([outer]);

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],t):t(e.RMAutocomplete={},e.Ractive)}(this,function(e,t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var n="undefined"!=typeof window?window:null;function i(e,t,i){if(n&&n.Ractive&&"object"==typeof n.Ractive[t]){var o=document.currentScript;if(o||(o=(o=document.querySelectorAll("script"))[o.length-1]),o){var r=o.getAttribute("data-alias");r&&(r=(r=r.split("&")).reduce(function(e,t){var n=t.split("="),i=n[0],o=n[1];return e[i]=o,e},{})),Ractive[t][r&&r[e]||e]=i}}}function o(e,t){void 0===t&&(t={});var n=e.processParams(t,{duration:400,easing:"easeInOut"});t.dir=t.dir||!1;var i=t.distance||"20px",o=t.scale||"0.9",r="above"===t.dir?"translateY("+i+")":"left"===t.dir?"translateX("+i+")":"right"===t.dir?"translateX(-"+i+")":"translateY(-"+i+")";return e.isIntro||n.intro?(e.setStyle("opacity",0),e.setStyle("transform","scale("+o+") "+r),e.animateStyle({opacity:1,transform:"none"},n)):(e.setStyle("opacity",1),e.setStyle("transform","none"),e.animateStyle({opacity:0,transform:"scale("+o+") "+r},n))}function r(e){return void 0===e&&(e={}),function(t){t.instance.transitions[e.name||"pop"]=o}}function a(e,t){var n=!1,i=!1;function o(n){for(var i=n.target;i;){if(i===e)return;if(!i.parentNode&&i!==document)return;i=i.parentNode}t(n)}return setTimeout(function(){n=!0,i||(document.body.addEventListener("click",o,{capture:!0}),document.body.addEventListener("touchstop",o,{capture:!0}))}),{teardown:function(){i=!0,n&&(document.body.removeEventListener("click",o,{capture:!0}),document.body.removeEventListener("touchstop",o,{capture:!0}))}}}function l(e,t){var n=e.processParams(t,{duration:200,easing:"easeInOut"});return e.isIntro||n.intro?(e.setStyle("opacity",0),e.animateStyle("opacity",1,n)):(e.setStyle("opacity",1),e.animateStyle("opacity",0,n))}function c(e){return void 0===e&&(e={}),function(t){t.instance.transitions[e.name||"fade"]=l}}i("pop","transitions",o),i("fade","transitions",l);var s,p,f,d={v:4,t:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-wrapper",g:1},{n:"class-rpop-with-tail",t:13,f:[{t:2,r:"position.tail"}]},{n:"class",f:["rpop-",{t:2,x:{r:["where"],s:'_0||"below"'}}," rpop-align-",{t:2,x:{r:["align"],s:'_0||"middle"'}}],t:13},{t:4,f:[{n:"style-top",f:[{t:2,r:"position.popTop"},"px"],t:13},{n:"style-left",f:[{t:2,r:"position.popLeft"},"px"],t:13}],n:50,r:"position"},{t:4,f:[{t:4,f:[{n:"style-top",f:[{t:2,r:"top"}],t:13}],n:50,r:"top"},{t:4,f:[{n:"style-left",f:[{t:2,r:"left"}],t:13}],n:50,r:"left"}],n:51,l:1},{n:"pop",t:72,f:{r:["where"],s:'[{dir:_0||"below"}]'},v:"t2"},{n:"cleanup",t:71},{t:4,f:[{n:["click"],t:70,f:{r:["@this"],s:'[_0.set("popped",false)]'}}],n:50,r:"clickClose"},{t:4,f:[{n:["clickout"],t:70,f:{r:["@this"],s:'[_0.set("popped",false)]'}}],n:51,r:"noClickout"},{t:16,r:"extra-attributes"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-tail",g:1},{t:4,f:[{n:"style-top",f:[{t:2,x:{r:["position.tailTop","position.vert"],s:"_0+(_1?1:0)"}},"px"],t:13}],n:50,r:"position.tailTop"},{t:4,f:[{n:"style-bottom",f:[{t:2,x:{r:["position.tailBottom","position.vert"],s:"_0+(_1?1:0)"}},"px"],t:13}],n:50,r:"position.tailBottom"},{t:4,f:[{n:"style-left",f:[{t:2,x:{r:["position.tailLeft","position.vert"],s:"_0+(_1?0:1)"}},"px"],t:13}],n:50,r:"position.tailLeft"},{t:4,f:[{n:"style-right",f:[{t:2,x:{r:["position.tailRight","position.vert"],s:"_0+(_1?0:1)"}},"px"],t:13}],n:50,r:"position.tailRight"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-tail-outer",g:1},{t:4,f:[{n:"style-top",f:[{t:2,x:{r:["position.tailTop"],s:"_0-2"}},"px"],t:13}],n:50,r:"position.tailTop"},{t:4,f:[{n:"style-bottom",f:[{t:2,x:{r:["position.tailBottom"],s:"_0-2"}},"px"],t:13}],n:50,r:"position.tailBottom"},{t:4,f:[{n:"style-left",f:[{t:2,x:{r:["position.tailLeft"],s:"_0-2"}},"px"],t:13}],n:50,r:"position.tailLeft"},{t:4,f:[{n:"style-right",f:[{t:2,x:{r:["position.tailRight"],s:"_0-2"}},"px"],t:13}],n:50,r:"position.tailRight"}]}],n:50,r:"~/tail"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rpop",g:1}],f:[{t:16,r:"content"}]}]}],n:50,r:"__popped"}],e:{'_0||"below"':function(e){return e||"below"},'_0||"middle"':function(e){return e||"middle"},'[{dir:_0||"below"}]':function(e){return[{dir:e||"below"}]},'[_0.set("popped",false)]':function(e){return[e.set("popped",!1)]},"_0+(_1?1:0)":function(e,t){return e+(t?1:0)},"_0+(_1?0:1)":function(e,t){return e+(t?0:1)},"_0-2":function(e){return e-2},"[{delay:200}]":function(){return[{delay:200}]},"[_0===_1&&_2.done(),true]":function(e,t,n){return[e===t&&n.done(),!0]},"[_0.done()]":function(e){return[e.done()]},true:function(){return!0}},p:{modal:[{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-modal",g:1},{n:"fade",t:72,v:"t1"},{n:"fade",t:72,f:{r:[],s:"[{delay:200}]"},v:"t2"},{t:4,f:[{n:["click"],t:70,f:{r:["@node","@event.target","."],s:"[_0===_1&&_2.done(),true]"}}],n:51,r:".noClickout"}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop",g:1},{n:"pop",t:72,f:{r:[],s:"[{delay:200}]"},v:"t1"},{n:"pop",t:72,v:"t2"},{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.done()]"}}],n:50,r:".clickClose"},{t:8,r:".attrs",c:{r:".context"},z:[{n:"inModal",x:{x:{r:[],s:"true"}}}]}],f:[{t:8,r:".content",c:{r:".context"},z:[{n:"inModal",x:{x:{r:[],s:"true"}}}]}]}]}],n:54,r:"contents.0"}],n:50,r:"contents.length"}]}},u=function(e){function t(t){e.call(this,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.position=function(e){var t=e||this.source,n=this.get("popped");if(t&&n){var i=this.find("div");if(t&&i&&i.offsetParent){var o=i.offsetParent,r=o.getBoundingClientRect(),a=i.getBoundingClientRect(),l=t.getBoundingClientRect(),c=this.get("where")||"below",s=this.get("align")||"middle",p=this.get("tail"),f="above"===c||"below"===c,d=this.get("fit"),u=this.get("gap"),b="above"===c||"below"===c?0:"left"===c?-a.width-u:l.width+u,m="left"===c||"right"===c?-l.height:"above"===c?-l.height-a.height-u:u;"middle"===s?"below"===c||"above"===c?b-=(a.width-l.width)/2:"left"!==c&&"right"!==c||(m-=(a.height-l.height)/2):"end"===s&&("below"===c||"above"===c?b+=l.width-a.width:"left"!==c&&"right"!==c||(m+=l.height-a.height));var h={popTop:l.bottom-r.top+m,popLeft:l.left-r.left+b,tail:p,vert:"above"===c||"below"===c};if(o.scrollTop&&(h.popTop+=o.scrollTop),o.scrollLeft&&(h.popLeft+=o.scrollLeft),p){"above"===c?h.tailBottom=-10:"below"===c?h.tailTop=-10:"left"===c?h.tailRight=-10:"right"===c&&(h.tailLeft=-10);var g=this.tailSource?this.tailSource.getBoundingClientRect():l;"start"===s?f?h.tailLeft=Math.floor(g.width/2)-10:h.tailTop=Math.floor(g.height/2)-10:"end"===s?f?h.tailRight=Math.floor(g.width/2)-10:h.tailBottom=Math.floor(g.height/2)-10:"middle"===s&&(f?h.tailLeft=Math.floor(g.width/2)-10:h.tailTop=Math.floor(g.height/2)-10),g!==l?f?(null!=h.tailLeft&&(h.tailLeft+=g.left-l.left),null!=h.tailRight&&(h.tailRight+=l.right-g.right)):(null!=h.tailTop&&(h.tailTop+=g.top-l.top),null!=h.tailBottom&&(h.tailBottom+=l.bottom-g.bottom)):"middle"===s&&(f?(null!=h.tailLeft&&(h.tailLeft+=g.left-(h.popLeft+r.left)),null!=h.tailRight&&(h.tailRight+=h.popLeft+r.left+a.width-g.right)):(null!=h.tailTop&&(h.tailTop+=g.top-(h.popTop+r.top)),null!=h.tailBottom&&(h.tailBottom+=h.popTop+r.top+a.height-g.bottom)))}if(d){var v=o;if(this.get("offsets"))for(var y=this.get("offsets");y--;)v=v.offsetParent;var w=o.scrollWidth,x=o.scrollHeight;if(h.popLeft+a.width>w){var _=h.popLeft-(w-a.width);h.popLeft-=_,f&&h.tailLeft&&(h.tailLeft+=_),f&&h.tailRight&&(h.tailRight-=_),p&&!f&&(h.tail=!1)}if(h.popLeft<0){var k=-1*h.popLeft;h.popLeft+=k,f&&h.tailLeft&&(h.tailLeft-=k),f&&h.tailRight&&(h.tailRight+=k),p&&!f&&(h.tail=!1)}if(h.popTop+a.height>x){var T=h.popTop-(x-a.height);h.popTop-=T,!f&&h.tailTop&&(h.tailTop+=T),!f&&h.tailBottom&&(h.tailBottom-=T),p&&f&&(h.tail=!1)}if(h.popTop<0){var O=-1*h.popTop;h.popTop+=O,!f&&h.tailTop&&(h.tailTop-=O),!f&&h.tailBottom&&(h.tailBottom+=O),p&&f&&(h.tail=!1)}}if(r.left+h.popLeft<0){var L=0-(r.left+h.popLeft);h.popLeft+=L,f&&h.tailLeft&&(h.tailLeft-=L),f&&h.tailRight&&(h.tailRight+=L),p&&!f&&(h.tail=!1)}if(r.top+h.popTop<0){var S=0-(r.top+h.popTop);h.popTop+=S,!f&&h.tailTop&&(h.tailTop-=S),!f&&h.tailBottom&&(h.tailBottom+=S),p&&f&&(h.tail=!1)}this.set("position",h)}else this.set("position",null)}},t.prototype.show=function(e){this.source=e,this.set("popped",!0)},t.prototype.hide=function(){this.set("popped",!1)},t}(t);t.extendWith(u,{attributes:["popped","tail","where","align","top","left","fit","clickClose","noClickout","gap","offsets"],use:[r(),(void 0===f&&(f={}),function(e){e.instance.events[f.name||"clickout"]=a}),c()],template:d,css:function(e){return[function(e){var t=Object.assign({},e("raui.primary"),e("raui.pop.primary")),n=(e("raui.themes")||[]).slice();return(e("raui.pop.themes")||[]).forEach(function(e){~n.indexOf(e)||n.push(e)}),"\n .rpop-wrapper {\n position: absolute;\n display: inline-block;\n z-index: 21;\n transition-property: top, left, padding;\n transition-timing-function: ease-in-out;\n transition-duration: 0.3s;\n }\n .rpop-with-tail.rpop-above {\n padding-bottom: 10px;\n }\n .rpop-with-tail.rpop-below {\n padding-top: 10px;\n }\n .rpop-with-tail.rpop-left {\n padding-right: 10px;\n }\n .rpop-with-tail.rpop-right {\n padding-left: 10px;\n }\n \n .rpop {\n position: relative;\n box-shadow: 0 1px 4px 0 rgba(0,0,0,0.24);\n border: 1px solid #ccc;\n border-radius: 0.2em;\n background-color: "+(t.bg||"#fff")+";\n color: "+(t.fg||"#222")+";\n padding: 0.5em;\n z-index: 2;\n }\n \n .rpop-modal {\n position: fixed;\n display: flex;\n z-index: 20;\n background-color: rgba(0, 0, 0, 0.2);\n align-items: center;\n justify-content: center;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n padding: 1em;\n overflow: auto;\n }\n \n .rpop-tail, .rpop-tail-outer {\n z-index: 3;\n width: 0;\n height: 0;\n position: absolute;\n border-style: solid;\n border-width: 10px;\n border-color: transparent;\n transition-property: top, left, bottom, right, border-color;\n transition-timing-function: ease-in-out;\n transition-duration: 0.3s;\n }\n .rpop-tail-outer {\n z-index: 1;\n border-width: 12px;\n border-color: transparent;\n }\n \n .rpop-below .rpop-tail {\n border-bottom-color: "+(t.bg||"#fff")+";\n }\n .rpop-below .rpop-tail-outer {\n border-bottom-color: "+(t.bc||"#ccc")+";\n }\n \n .rpop-above .rpop-tail {\n border-top-color: "+(t.bg||"#fff")+";\n }\n .rpop-above .rpop-tail-outer {\n border-top-color: "+(t.bc||"#ccc")+";\n }\n \n .rpop-left .rpop-tail {\n border-left-color: "+(t.bg||"#fff")+";\n }\n .rpop-left .rpop-tail-outer {\n border-left-color: "+(t.bc||"#ccc")+";\n }\n \n .rpop-right .rpop-tail {\n border-right-color: "+(t.bg||"#fff")+";\n }\n .rpop-right .rpop-tail-outer {\n border-right-color: "+(t.bc||"#ccc")+";\n }\n "+n.map(function(t){var n=Object.assign({},e("raui.primary"),e("raui.pop.primary"),e("raui."+t),e("raui.pop."+t));return"\n ."+t+" .rpop {\n background-color: "+(n.bg||"#fff")+";\n color: "+(n.fg||"#222")+";\n }\n \n ."+t+".rpop-below .rpop-tail {\n border-bottom-color: "+(n.bg||"#fff")+";\n }\n ."+t+".rpop-below .rpop-tail-outer {\n border-bottom-color: "+(n.bc||"#ccc")+";\n }\n \n ."+t+".rpop-above .rpop-tail {\n border-top-color: "+(n.bg||"#fff")+";\n }\n ."+t+".rpop-above .rpop-tail-outer {\n border-top-color: "+(n.bc||"#ccc")+";\n }\n \n ."+t+".rpop-left .rpop-tail {\n border-left-color: "+(n.bg||"#fff")+";\n }\n ."+t+".rpop-left .rpop-tail-outer {\n border-left-color: "+(n.bc||"#ccc")+";\n }\n \n ."+t+".rpop-right .rpop-tail {\n border-right-color: "+(n.bg||"#fff")+";\n }\n ."+t+".rpop-right .rpop-tail-outer {\n border-right-color: "+(n.bc||"#ccc")+";\n }\n "})}.call(this,e)].join(" ")},cssId:"rpop",noCssTransform:!0,observe:{popped:function(e){var t=this;setTimeout(function(){t.get("popped")===e&&t.set("_popped",e)},1)},_popped:{handler:function(e){var t=this;if(e){var n=this.get("@style.raui.pop.mobile");if(n&&window.matchMedia("(max-width: "+n+")").matches){p||(p=new b({target:document.body,append:!0}));var i=this.getContext().getParent(!0);i.isContext=1,this.set("__popped",!1),p.unshift("contents",{content:this.partials.content,context:i,attrs:this.partials["extra-attributes"]||[],clickClose:this.get("clickClose"),noClickout:this.get("noClickout"),done:function(){t.set("popped",!1)}})}else this.set("__popped",!0)}else s?p.shift("contents"):this.set("__popped",!1)},defer:!0,init:!1},__popped:{handler:function(e){if(e){var t=this.find("div"),n=t,i=n.offsetHeight+n.offsetTop,o=n.offsetWidth+n.offsetLeft,r=n.offsetParent;if(!this.overflows)for(var a=this.overflows={e:[],v:[]};t&&t.style;){if(t===r){if(t.offsetWidth>=o&&t.offsetHeight>=i)break;o+=t.offsetLeft,i+=t.offsetTop,r=t.offsetParent}var l=getComputedStyle(t);if("auto"===l.overflow)break;"hidden"===l.overflow&&(a.e.push(t),a.v.push(t.style.overflow),t.style.overflow="visible"),t=t.parentNode}this.position(),this.transition("pop",n,{intro:!0,dir:this.get("where")||"below"})}else this.source=null,this.tailSource=null},defer:!0,init:!1},"align where tail fit":{handler:function(){this.position()},defer:!0}},decorators:{cleanup:function(e){var t=this;return{teardown:function(){var e=t.overflows;if(e){t.overflows=null;for(var n=0;n<e.e.length;n++)e.e[n].style.overflow=e.v[n]}}}}},data:function(){return{gap:4}}});var b=function(e){function t(t){e.call(this,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(t);function m(){}function h(e){~this.className.indexOf("focus")||(this.className+=" focus")}function g(e){this.className=this.className.replace(/\bfocus\b/g,"").trim()}function v(e){var t,n,i,o,r,a,l,c,s,p,f,d,u,b=this.getContext(e);function v(){var b=y().split(/\s+/).filter(function(e){return!!e});(t=!!~b.indexOf("field"))||(b.push("field"),t=!0),(n=e.querySelector("input[type=checkbox]"))&&!~b.indexOf("check")&&b.push("check"),(i=e.querySelector("input[type=radio]"))&&!~b.indexOf("radio")&&b.push("radio");var m=n||i;m&&m.checked&&!~b.indexOf("checked")&&b.push("checked"),m&&m.disabled&&!~b.indexOf("disabled")&&b.push("disabled"),!m&&p?(p.cancel(),p=0,f&&(f.disconnect(),f=0),delete m._form_callback,u&&(delete u.checked,d=u=void 0)):m&&(m._form_callback=function(t,n){if(void 0===n&&(n=!0),n&&"radio"===m.type&&m.name){var i=[];i.push.apply(i,document.querySelectorAll("input[type=radio][name="+m.name+"]")),(i=i.filter(function(e){return e!==m})).forEach(function(e){return e._form_callback&&e._form_callback(t,!1)})}var o=m.checked;o&&!~e.className.indexOf("checked")?e.className+=" checked":!o&&~e.className.indexOf("checked")&&(e.className=e.className.replace(/\bchecked\b/g,"").replace(/ +/g," ").trim())},MutationObserver&&(f=new MutationObserver(function(){var t;(t=m.disabled)&&!~e.className.indexOf("disabled")?e.className+=" disabled":!t&&~e.className.indexOf("disabled")&&(e.className=e.className.replace(/\bdisabled\b/g,"").replace(/ +/g," ").trim())})).observe(m,{attributes:!0}),p=this.getContext(m).listen("change",m._form_callback),(d=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(m),"checked"))&&d.configurable&&(u=m,Object.defineProperty(m,"checked",{get:d.get,set:function(e){d.set.call(u,e),m._form_callback()},enumerable:!0,configurable:!0}))),(o=!!e.querySelector("textarea"))&&!~b.indexOf("textarea")&&b.push("textarea"),(r=!!e.querySelector("select"))&&!~b.indexOf("select")&&b.push("select"),(a=!!e.querySelector("input[type=file]"))&&!~b.indexOf("file")&&b.push("file"),(l=!!(l=e.querySelector("button"))&&l.parentNode===e)&&!~b.indexOf("button")&&b.push("button"),(c=!!e.querySelector("div"))&&!~b.indexOf("plain")&&b.push("plain"),(s=!(n||i||a||!e.querySelector("input")))&&!~b.indexOf("input")&&b.push("input"),e.className=b.join(" ")}function y(){var p=e.className;return t||(p=p.replace(/\bfield\b/g,"").trim()),n||(p=p.replace(/\bcheck(ed)?\b/g,"").trim()),i||(p=p.replace(/\bradio\b/g,"").trim()),o||(p=p.replace(/\btextarea\b/g,"").trim()),r||(p=p.replace(/\bselect\b/g,"").trim()),a||(p=p.replace(/\bfile\b/g,"").trim()),l||(p=p.replace(/\bbutton\b/g,"").trim()),c||(p=p.replace(/\bplain\b/g,"").trim()),s||(p=p.replace(/\binput\b/g,"").trim()),p=p.replace(/ +/g," ")}var w=b.listen("focusin",h),x=b.listen("focusout",g);return v.call(this),{update:m,invalidate:v.bind(this),teardown:function(){var t=y();t=t.replace(/\bfocus\b/g,"").trim(),w.cancel(),x.cancel(),p&&p.cancel(),f&&f.disconnect(),u&&(delete u.checked,d=u=void 0),e.className=t}}}function y(e,t){if(!e)return!1;for(var n=0;n<e.length;n++){if(e[n].e===t)return!0;if(e[n].f&&y(e[n].f,t))return!0}return!1}t.extendWith(b,{template:{v:d.v,t:d.p.modal},data:function(){return{contents:[]}},use:[r(),c()],observe:{contents:function(e){s=(e||[]).length>0}},on:{init:function(){p?console.warn("More than one PopOver mobile host created."):p=this}}}),v.style=function(e){var t=Object.assign({},e("raui.primary"),e("raui.form.primary")),n=Object.assign({},e("raui.primary.active"),e("raui.form.primary.active")),i=e("raui.form.boxy");return"\n label.field {\n display: inline-block;\n font-size: 0.9em;\n font-weight: 500;\n color: "+(t.fg||"#222")+";\n transition: 0.2s ease-in-out;\n transition-property: color;\n vertical-align: top;\n box-sizing: border-box;\n padding: 0.25em 0.5em;\n line-height: 1.5em;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: inherit;\n }\n\n label.field.textarea {\n display: block;\n border: 0.0625em solid "+(t.bc||"#ccc")+";\n padding: 0.5em 0.8em 0.8em 0.8em;\n border-radius: "+(t.radius||"0.2em")+";\n box-shadow: none;\n transition-property: color, border-color, box-shadow;\n margin: 0.8em 0.2em;\n min-height: auto;\n background-color: "+(i?t.bg||"#fff":"transparent")+";\n }\n\n label.field.focus {\n color: "+(n.fg||t.fga||"#07e")+";\n }\n\n label.field.textarea.focus {\n border-color: "+(n.fg||t.fga||"#07e")+";\n "+(i?"":"box-shadow: 0.0625em 0.0625em "+(n.fg||t.fga||"#07e")+",\n -0.0625em 0.0625em "+(n.fg||t.fga||"#07e")+",\n 0.0625em -0.0625em "+(n.fg||t.fga||"#07e")+",\n -0.0625em -0.0625em "+(n.fg||t.fga||"#07e")+";")+"\n }\n\n label.field input,\n label.field select,\n label.field textarea\n {\n display: block;\n border-width: "+(i?"0.0625em":"0 0 0.0625em 0")+";\n border-color: "+(t.bc||"#ccc")+";\n border-style: solid;\n box-sizing: border-box;\n background-color: "+(i?t.bg||"#fff":"transparent")+";\n transition: 0.2s ease-in-out;\n transition-property: box-shadow, color;\n outline: none;\n box-shadow: none;\n width: 100%;\n margin-bottom: 0.8em;\n font-size: 1.1em;"+(i?"\n border-radius: "+(t.radius||"0.2em")+";":"")+"\n font-weight: 400;\n font-family: inherit;\n }\n\n label.field input"+(i?"":":disabled")+",\n label.field select"+(i?"":":disabled")+" {\n padding: 0 0.75em;\n }\n label.field select"+(i?"":":disabled")+" {\n padding-right: 2em;\n }\n\n label.field input:disabled,\n label.field select:disabled,\n label.field textarea:disabled {\n background: #f4f4f4;\n }\n\n label.field textarea {\n line-height: 1.2em;\n }\n label.field .field-wrapper {\n display: block;\n }\n label.field > select, label.field > input,\n label.field > .field-wrapper > input, label.field > .field-wrapper > select {\n height: 2.5em;\n }\n\n "+(i?"":"label.field:hover > input,\n label.field:hover select,\n label.field.file:hover:after {\n box-shadow: 0 0.0625em 0 0 "+(t.bc||"#ccc")+";\n }\n\n label.field.textarea:hover {\n box-shadow: 0.0625em 0.0625em "+(t.bc||"#ccc")+",\n -0.0625em 0.0625em "+(t.bc||"#ccc")+",\n 0.0625em -0.0625em "+(t.bc||"#ccc")+",\n -0.0625em -0.0625em "+(t.bc||"#ccc")+";\n }\n\n label.field.textarea.focus:hover {\n box-shadow: 0.0625em 0.0625em "+(n.fg||t.fga||"#07e")+",\n -0.0625em 0.0625em "+(n.fg||t.fga||"#07e")+",\n 0.0625em -0.0625em "+(n.fg||t.fga||"#07e")+",\n -0.0625em -0.0625em "+(n.fg||t.fga||"#07e")+";\n }")+"\n\n /**** CHECK BOXES ****/\n\n label.field.check {\n position:relative;\n z-index: 0;\n overflow: visible;\n cursor: pointer;\n padding-top: 2.2em;\n white-space: normal;\n }\n label.field.check.inline {\n padding-top: 0.7em;\n }\n\n label.field.check input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: -0.5em;\n top: 1em;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 3.2em;\n height: 3.2em;\n background-color: "+(t.bc||"#ccc")+";\n box-shadow: none;\n outline: none;\n opacity: 0;\n transform: scale(1);\n pointer-events: none;\n transition: opacity 0.3s, transform 0.2s;\n }\n label.field.inline.check input {\n top: -0.45em;\n left: -0.55em;\n }\n\n label.field.check input:checked {\n background-color: "+(t.fga||"#07e")+';\n }\n\n label.field.check:hover > input {\n opacity: 0.04;\n }\n\n label.field.check input:focus {\n opacity: 0.12;\n }\n\n label.field.check:hover > input:focus {\n opacity: 0.16;\n }\n\n label.field.check input:active {\n opacity: 0.6;\n transform: scale(0);\n transition: transform 0s, opacity 0s;\n }\n\n label.field.check:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n margin: 0 0.5em 0.2em 0.1em;\n border: solid 0.125em; /* Safari */\n border-color: '+(t.fg||"#222")+';\n border-radius: 0.125em;\n width: 1.2em;\n height: 1.2em;\n vertical-align: bottom;\n transition: border-color 0.2s, background-color 0.2s;\n }\n\n label.field.check:after {\n content: "";\n display: block;\n position: absolute;\n top: -0.15em;\n left: -0.05em;\n width: 0.7em;\n height: 0.3em;\n border: solid 0.125em transparent;\n border-right: none;\n border-top: none;\n transform: translate(0.8em, 2.65em) rotate(-45deg);\n }\n\n label.field.check.inline:after {\n transform: translate(0.8em, 1.2em) rotate(-45deg);\n }\n\n label.field.check.checked:before {\n border-color: '+(t.fga||"#07e")+";\n background-color: "+(t.fga||"#07e")+";\n }\n label.field.check.focus:before {\n border-color: "+(t.fga||"#07e")+";\n }\n\n label.field.check.checked:after {\n border-color: "+(t.bg||"#fff")+";\n }\n\n label.field.check input:disabled {\n opacity: 0;\n }\n\n label.field.check.disabled {\n color: "+(t.bc||"#ccc")+";\n cursor: initial;\n }\n\n label.field.check.disabled:before {\n border-color: "+(t.bc||"#ccc")+";\n }\n\n label.field.check.checked.disabled:before {\n border-color: transparent;\n background-color: "+(t.bc||"#ccc")+";\n }\n\n\n /**** RADIO BUTTONS ****/\n \n label.field.radio {\n z-index: 0;\n position: relative;\n display: inline-block;\n overflow: visible;\n padding-top: 2.2em;\n white-space: normal;\n }\n label.field.radio.inline {\n padding-top: 0.8em;\n }\n\n label.field.radio input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: 0;\n top: 0;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 3.2em;\n height: 3.2em;\n background-color: "+(t.bc||"#ccc")+';\n outline: none;\n opacity: 0;\n pointer-events: none;\n transform: translate(-0.2em, 1.5em) scale(1);\n transition: opacity 0.3s, transform 0.3s;\n }\n label.field.inline.radio input {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio {\n cursor: pointer;\n position: relative;\n }\n\n label.field.radio:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n margin: 0 0.5em 0.2em 0.1em;\n border: solid 0.125em; /* Safari */\n border-color: '+(t.fg||"#222")+';\n border-radius: 0.125em;\n width: 1.2em;\n height: 1.2em;\n vertical-align: middle;\n transition: border-color 0.2s;\n }\n\n label.field.radio:after {\n content: "";\n display: block;\n position: absolute;\n border-radius: 50%;\n width: 0.625em;\n height: 0.625em;\n background-color: '+(t.fga||"#07e")+";\n transform: translate(5px, -17px) scale(0);\n transition: transform 0.2s;\n }\n\n label.field.radio input:checked {\n background-color: "+(t.fga||"#07e")+";\n }\n\n label.field.radio.checked:before {\n border-color: "+(t.fga||"#07e")+";\n }\n\n label.field.radio.checked:after {\n transform: translate(5px, -17px) scale(1);\n }\n\n label.field.radio:hover input {\n opacity: 0.04;\n }\n\n label.field.radio input:focus {\n opacity: 0.12;\n transform: translate(-0.2em, 24px) scale(1);\n transition: transform 0.2s, opacity 0.2s;\n }\n label.field.inline.radio input:focus {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio:hover input:focus {\n opacity: 0.16;\n }\n\n label.field.radio input:active {\n opacity: 1;\n transform: translate(-0.2em, 24px) scale(0);\n transition: transform 0s, opacity 0s;\n }\n label.field.inline.radio input:active {\n transform: translate(-0.2em, 3px) scale(0);\n }\n\n label.field.radio.checked:before {\n border-color: "+(t.fga||"#07e")+";\n }\n\n label.field.radio.focus:before {\n border-color: "+(t.fga||"#07e")+";\n }\n\n label.field.radio input:disabled {\n opacity: 0;\n }\n\n label.field.radio.disabled {\n color: "+(t.bc||"#ccc")+";\n cursor: initial;\n }\n\n label.field.radio.disabled:before {\n border-color: "+(t.bc||"#ccc")+";\n }\n\n label.field.radio.disabled:after {\n background-color: "+(t.bc||"#ccc")+";\n }\n\n\n\n label.field select {\n padding-right: 2em;\n }\n\n label.field.select {\n cursor: pointer;\n position: relative;\n }\n\n label.field.select:after {\n content: ' ';\n position: absolute;\n display: block;\n width: 0.6em;\n right: 19px;\n height: 0.6em;\n top: 2.6em;\n border-bottom: 0.125em solid;\n border-right: 0.125em solid;\n transform: rotate(45deg);\n pointer-events: none;\n color: "+(t.bc||"#ccc")+";\n }\n\n label.field textarea {\n border: none;"+(i?"\n padding: 0;":"")+"\n }\n\n label.field > select {\n -moz-appearance: none;\n -webkit-appearance: none;\n }\n\n label.field input:focus,\n label.field select:focus,\n label.field.file.focus:after\n {\n border-color: "+(n.fg||t.fga||"#07e")+";\n "+(i?"":"box-shadow: 0 0.0625em 0 0 "+(n.fg||t.fga||"#07e")+";")+"\n }\n\n label.field input[type=checkbox]:focus,\n label.field input[type=radio]:focus {\n box-shadow: none;\n }\n\n label.field.file.focus:after {\n color: "+(n.fg||t.fga||"#07e")+";\n }\n label.field.file [type=file] {\n position: absolute;\n width: 0;\n height: 0;\n opacity: 0;\n z-index: -1;\n }\n label.field.file {\n position: relative;\n min-width: 9em;\n height: 5em;\n }\n label.field.file:after {\n position: absolute;\n content: 'Choose a file';\n box-sizing: border-box;\n width: calc(100% - 0.3em);\n height: 2.5em;\n font-size: 1.1em;\n line-height: 1.5em;\n color: "+(t.fg||"#222")+";\n text-align: "+(i?"center":"left")+";\n padding: 0.5em "+(i?"0.5em":"0")+";\n cursor: pointer;\n font-style: oblique;\n left: 0.25em;\n top: 1.6em;\n transition: 0.2s ease-in-out;\n transition-property: color, border-bolor, box-shadow;"+(i?"\n border-radius: "+(t.radius||"0.2em")+";\n border-color: "+(t.bc||"#ccc")+";\n border-style: solid;\n border-width: 0.0625em;":"\n border-bottom-color: "+(t.bc||"#ccc")+";\n border-bottom-width: 0.0625em;\n border-bottom-style: solid;\n ")+"\n }\n label.field.file.inline:after {\n top: 0.2em;\n }\n\n label.field.button {\n vertical-align: top;\n padding-top: "+(i?"1.7":"1.958")+"em;\n }\n label.field .with-buttons button, label.field.button button {\n font-size: 1.1em;\n margin-top: "+(i?"0.15em":"0")+";\n }\n\n label.field .field-wrapper.with-buttons {\n display: flex;\n }\n label.field .with-buttons button {\n flex-shrink: 0;\n padding-left: 0.5em;\n padding-right: 0.5em;\n margin-top: 0;\n margin-right: 0;\n "+(i?"height: 2.5em;\n box-shadow: none;\n border-radius: 0;\n border-left: 1px solid "+(t.bg||"#fff")+";\n margin-left: 0;":"height: 2.25em;")+"\n }"+(i?"\n label.field .with-buttons button:first-of-type {\n margin-left: -0.05em;\n border-left: none;\n }\n label.field .with-buttons button:last-of-type {\n border-radius: 0 "+(t.radius||"0.2em")+" "+(t.radius||"0.2em")+" 0;\n }\n label.field .with-buttons input {\n border-radius: "+(t.radius||"0.2em")+" 0 0 "+(t.radius||"0.2em")+";\n min-width: 0;\n }\n ":"")+"\n\n label.field.plain > div {\n position: absolute;\n font-size: 1.1em;\n top: 2.4em;\n font-weight: normal;\n }\n\n /* inline fields (no labels) */\n label.field.inline {\n height: 3.3em;\n }\n\n label.field.button.inline {\n margin-top: 0.2em;\n padding-top: 0.12em;\n }\n\n label.field.button.inline button {\n margin-top: 0;\n }\n\n label.field.inline.select:after {\n top: 1."+(i?"15":"1")+"em;\n }\n\n label.field .field-tip {\n display: inline-block;\n width: 1em;\n height: 1em;\n background-color: "+(t.fga||"#07e")+";\n color: "+(t.bg||"#fff;")+";\n cursor: default;\n user-select: none;\n border-radius: 1em;\n margin-left: 0.5em;\n line-height: 1.2em;\n text-align: center;\n margin-top: -0.2em;\n }\n\n label.field .field-solo-tip {\n margin-left: -0.1em;\n }\n "};var w=t.macro(function(e){var t=[],n=(e.template.m||[]).slice(),i=e.template.f||[],o=n.find(function(e){return"value"===e.n}),r=n.find(function(e){return"type"===e.n}),a=n.find(function(e){return"tip"===e.n}),l=n.find(function(e){return"disabled"===e.n});if(a&&n.splice(n.indexOf(a),1),r&&"function"==typeof w.types[r.f])t.push.apply(t,w.types[r.f](n,i,e));else if(o){var c={t:7,e:"input",m:[o]};if(l&&c.m.push(l),y(i,"option")&&(c.e="select",c.f=i),r&&(c.m.push(r),"checkbox"===r.f||"radio"===r.f)){var s=n.find(function(e){return"target"===e.n});s?c.m.push(Object.assign({},s,{n:"name"})):c.m.splice(c.m.indexOf(o),1,Object.assign({},o,{n:"checked"}))}c.m=c.m.concat(n.filter(function(e){return 73===e.t||73===e.t||"placeholder"===e.n})),t.push(c);var p=i.filter(function(e){return"button"===e.e||y(e.f,"button")});p.length&&(t.push.apply(t,p),t=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:t}])}else{var f=i.filter(function(e){return e.e});f.find(function(e){return"button"===e.e})&&f.length>1?t=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:i}]:t.push.apply(t,i)}var d=n.find(function(e){return"label"===e.n});a&&t.unshift({t:7,e:"span",m:[{t:13,n:"class",f:"field-tip"+(d?"":" field-solo-tip"),g:1},{t:13,n:"title",f:a.f},{t:70,n:["click"],f:{r:[],s:"[false]"}}],f:"?"}),d?t.unshift.apply(t,Array.isArray(d.f)?d.f:[d.f]):t.unshift(" ");var u={t:7,e:"label",m:[{t:71,n:"field"}].concat(n.filter(function(e){return 13!==e.t&&73!==e.t||"value"!==e.n&&"type"!==e.n&&"inline"!==e.n&&"label"!==e.n&&"placeholder"!==e.n&&"target"!==e.n&&"disabled"!==e.n})),f:t};n.find(function(e){return"inline"===e.n})&&u.m.push({t:13,n:"class",f:"inline"}),e.setTemplate([u])});function x(e){return"function"==typeof e.focus&&e.focus(),{teardown:m}}w.types={},i("field","decorators",v),i("field","partials",w),i("autofocus","decorators",x);var _={v:4,t:[{t:7,e:"span",m:[{t:13,n:"class",f:"rautocomplete field-wrapper",g:1},{n:["pop"],t:70,f:{r:["@context","$1"],s:'[(_0).set("rac.pop",_1)]'}}],f:[{t:7,e:"input",m:[{t:8,r:"extra-attributes"},{n:["dblclick"],t:70,f:{r:["rac.pop","@node"],s:"[_0.show(_1)]"}},{n:["focus"],t:70,f:{r:["rac"],s:"[_0.stash()]"}},{n:["blur"],t:70,f:{r:["rac"],s:"[_0.key({which:9})]"}},{n:["input"],t:70,f:{r:["rac","@event"],s:"[_0.input(_1)]"}},{n:["keydown"],t:70,f:{r:["rac","@event"],s:"[_0.key(_1)]"}},{t:73,v:"t",f:"false"},{n:"value",f:[{t:2,r:"rac.display"}],t:13}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rac-drop",g:1},{n:["click"],t:70,f:{r:["rac.pop","@context"],s:'[_0.show((_1).find("input"))]'}}]}," ",{t:7,e:"rac-pop",m:[{t:13,n:"style",f:"padding: 0;",g:1},{t:13,n:"class",f:"rac-pop",g:1},{n:["init"],t:70,f:{r:["@context","$1"],s:'[(_0).raise("pop",{},_1)]'}},{n:"popped",t:13,f:[{t:2,r:"rac.popped"}]},{n:"where",f:"below",t:13,g:1},{n:"align",f:"end",t:13,g:1},{n:"gap",f:[{t:2,x:{r:[],s:"2"},s:1}],t:13},{n:"offsets",t:13,f:[{t:2,r:"rac.offsets"}]},{n:"fit",t:13,f:[{t:2,r:"rac.fit"}]}],f:[{t:4,f:[{t:7,e:"input",m:[{n:"class-rac-modal",t:13},{n:["input"],t:70,f:{r:["rac","@event"],s:"[_0.input(_1)]"}},{n:["keydown"],t:70,f:{r:["rac","@event"],s:"[_0.key(_1)]"}},{t:73,v:"t",f:"false"},{n:"value",f:[{t:2,r:"rac.display"}],t:13},{n:"autocompletefocus",t:71}]}],n:50,r:"inModal"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rac-list",g:1},{n:"tabindex",f:"-1",t:13,g:1}],f:[{t:55,f:[{f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rac-item rac-invalid",g:1}],f:["Loading..."]}],t:4},{t:62,f:[" ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rac-item",g:1},{n:"tabindex",f:"-1",t:13,g:1},{t:4,f:[{n:"class-rac-selected",t:13,f:[{t:2,x:{r:["rac.value","."],s:"_0===_1"}}]}],n:50,r:"rac.valueBound"},{n:"class-rac-hover",t:13,f:[{t:2,x:{r:["rac.selected","@index"],s:"_0===_1"}}]},{t:4,f:[{n:["click"],t:70,f:{r:["@context",".","rac"],s:'[(_0).set("rac.value",_1),_2._drawDisplay()]'}},{n:["mouseover"],t:70,f:{r:["@context","@index"],s:'[(_0).set("rac.selected",_1)]'}}],n:50,r:"rac.popped"}],f:[{t:2,x:{r:["rac","."],s:"_0._display(_1)"}}]}],n:52,r:"items"}," "],n:"items"},{t:63,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rac-item rac-invalid",g:1}],f:["Load failed."]}]}],r:"rac.list"}]}]}]}],e:{2:function(){return 2},'[(_0).set("rac.pop",_1)]':function(e,t){return[e.set("rac.pop",t)]},"[_0.show(_1)]":function(e,t){return[e.show(t)]},"[_0.stash()]":function(e){return[e.stash()]},"[_0.key({which:9})]":function(e){return[e.key({which:9})]},"[_0.input(_1)]":function(e,t){return[e.input(t)]},"[_0.key(_1)]":function(e,t){return[e.key(t)]},'[_0.show((_1).find("input"))]':function(e,t){return[e.show(t.find("input"))]},'[(_0).raise("pop",{},_1)]':function(e,t){return[e.raise("pop",{},t)]},"_0===_1":function(e,t){return e===t},'[(_0).set("rac.value",_1),_2._drawDisplay()]':function(e,t,n){return[e.set("rac.value",t),n._drawDisplay()]},'[(_0).set("rac.selected",_1)]':function(e,t){return[e.set("rac.selected",t)]},"_0._display(_1)":function(e,t){return e._display(t)}}};function k(e,t){return t.reduce(function(e,t){return e?e[t]:e},e)}var T=t.macro(function(e){var n,i,o;function r(t){null==t&&(t=null==e.get("rac.value")?"":e.get("rac.display")),t===e.get("rac.tempDisplay")&&(t="");var n=e.get("rac._items");if("function"==typeof n){var i=n(t);"object"==typeof i&&"function"==typeof i.then?i.then(function(t){return e.set("rac.list",t)}):e.set("rac.list",i)}else if(Array.isArray(n)){var o,r=e.get("rac._display");try{o=new RegExp(t||"","i")}catch(e){o=new RegExp((t||"").replace(/([\{\(\[\]\)\}\?\*\^\$])/g,"\\$1"))}e.set("rac.list",n.filter(function(e){return o.test(r(e))}))}else e.set("rac.list",[])}function a(t,n){var i=e.get("rac.default");return null==(t=null!=t||n?t:e.get("rac.value"))&&i&&(t="function"==typeof i?i(e.get("rac.display")):i),t}function l(n,o,l){var s=e.get("rac.displayprop");if(e.get("rac.__display")!==s||void 0===e.get("rac._display")){var p=function(){return e.attributes["display-value"]?e.get("rac.display"):"(none)"};if("string"==typeof s){var f=t.splitKeypath(s);s=function(e){return null==e&&(e=a()),null==e?p():k(e,f)}}else if(Array.isArray(s)){var d=s;s=function(e){return null==e&&(e=a()),null==e?p():k(e,d)}}else s||(s=function(e){return null==e&&(e=a()),null==e?p():""+e});e.set("rac._display",s),e.set("rac.__display",e.get("rac.displayprop")),e.set("rac.display",s(e.get("rac.value")))}if(s=e.get("rac.member"),e.get("rac.__member")!==s||void 0===e.get("rac._member")){if("string"==typeof s){var u=t.splitKeypath(s);s=function(e){return k(a(e),u)}}else if(Array.isArray(s)){var b=s;s=function(e){return k(a(e),b)}}else s||(s=function(e){return a(e)});e.set("rac._member",s),e.set("rac.__member",e.get("rac.member"))}s=e.get("rac.items"),e.get("rac.__items")===s&&void 0!==e.get("rac._items")||(Array.isArray(s)?e.set("rac._items",s):"function"==typeof s?e.set("rac._items",s):"object"==typeof s&&"function"==typeof s.then?s.then(function(t){e.set("rac._items",t),r()}):e.set("rac._items",[]),e.set("rac.__items",e.get("rac.items"))),i&&"rac.display"===l&&e.get("rac.limit")&&!i.contains(document.activeElement)&&c(),r()}function c(){var t=e.get("rac._display");if("function"==typeof t){var n=t(e.get("rac.value"));e.set("rac.display",n),e.set("rac.tempDisplay",n)}}function s(t){(t.items&&e.link(t.items,"rac.items"),t.value&&e.link(t.value,"rac._value"),e.set("rac.valueBound",!!t.value),t.selected&&e.link(t.selected,"rac.selected"),t["display-value"]&&e.link(t["display-value"],"rac.display"),"display"in t&&e.set("rac.displayprop",t.display),"member"in t&&e.set("rac.member",t.member),"offsets"in t?(e.set("rac.offsets",t.offsets),e.set("rac.fit",!("fit"in t)||t.fit)):e.set("rac.fit","fit"in t&&t.fit),e.set("rac.limit",t["limit-set"]),e.set("rac.default",t.default),e.get("rac.limit")&&e.get("input"))&&(e.get("input")!==document.activeElement&&c());l()}e.aliasLocal("rac"),e.set("rac.list",[]),e.set("rac.popped",!1),e.set("rac.stash",function(){e.set("rac.tempDisplay",e.get("rac.display")),e.set("rac.tempValue",e.get("rac.value"))}),e.set("rac.key",function(t){var n=t.which;if(27===n)e.set("rac.popped",!1),e.set("rac.display",e.get("rac.tempDisplay")),e.set("rac.value",e.get("rac.tempValue"));else if(38===n||40===n){t.preventDefault(),e.get("rac.pop").show(e.find("input"));var i=e.get("rac.selected"),o=e.get("rac.list");38===n?i<=0||null==i?e.set("rac.selected",Array.isArray(o)?o.length-1:0):e.set("rac.selected",i-1):Array.isArray(o)?e.set("rac.selected",i<o.length-1?i+1:0):e.set("rac.selected",0)}else if(10===n||13===n){var r=e.get("rac.list");Array.isArray(r)&&(e.set("rac.value",r[e.get("rac.selected")]),c())}else if(9===n){if(e.get("rac.popped")){var l=e.get("rac.list");if(Array.isArray(l)){var s=l[e.get("rac.selected")];null==s&&(s=a(s,!0)),e.set("rac.value",s)}e.get("rac.limit")||setTimeout(function(){return c()},140)}else null!=e.get("rac.value")&&~e.get("rac.selected")&&e.get("rac.display")==e.get("rac.tempDisplay")||e.set("rac.value",a(null,!0));e.set("rac.popped",!1),e.get("rac.updateDisplay")()}}),e.set("rac.input",function(t){n&&clearTimeout(n),n=setTimeout(function(){n=null,r(t.target.value);var i=e.find("input");i&&document.activeElement===i&&e.get("rac.pop").show(i)},500),e.set("rac.display",t.target.value)}),e.setTemplate(_),e.set("rac._drawDisplay",c),e.set("rac.updateDisplay",function(t){setTimeout(function(){i&&e.get("rac.limit")&&!i.contains(document.activeElement)&&c()},140)}),s(e.attributes);var p={init:!1,defer:!0},f=[e.observe("rac.displayprop",l,p),e.observe("rac.memberprop",l,p),e.observe("rac.items",l,p),e.observe("rac.list",function(t){Array.isArray(t)?e.set("rac.selected",t.indexOf(e.get("rac.value"))):e.set("rac.selected",-1)},p),e.observe("rac.value",function(t){c(),function(){if(!e.get("rac._value")||e.get("rac.value")){var t=e.get("rac._member");if("function"==typeof t){var n=t(e.get("rac.value"));e.set("rac._value",n)}e.ractive.getContext(e.find("input")).raise("selected",{},e.get("rac._value"),e.get("rac.display"))}}(),e.set("rac.popped",!1),e.set("rac.tempValue",t)}),e.observe("rac._value",function(t){var n=e.get("rac._member"),i=e.get("rac.list").find(function(e){return n(e)===t});i!==e.get("rac.value")&&e.set("rac.value",i),!i&&t&&e.get("rac.valueBound")&&(e.set("rac.display",t),l())}),e.observe("rac.selected",function(){o&&clearTimeout(n),o=setTimeout(function(){o=null;var t=e.find(".rac-hover");t&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},14)})];return{teardown:function(){e.unlink("rac.items"),e.unlink("rac._value"),e.unlink("rac.selected"),e.unlink("rac.display"),f.forEach(function(e){return e.cancel()})},update:s,render:function(){i=e.find("span")}}},{attributes:["items","selected","display","value","member","limit-set","fit","offsets","display-value","default"],css:function(e){return[function(e){var t=Object.assign({},e("raui.primary"),e("raui.autocomplete"),e("raui.autocomplete.primary")),n=Object.assign({},e("raui.autocomplete.drop"),e("raui.autocomplete.primary.drop"));return".rautocomplete {\n position: relative;\n display: inline-block;\n }\n \n .rac-drop {\n width: 2em;\n height: 100%;\n position: absolute;\n top: 0;\n right: 2px;\n cursor: pointer;\n }\n .rac-drop:after {\n font-family: "+(n.font||"sans-serif")+";\n content: "+(n.string||"'▾'")+";\n position: absolute;\n top: calc(50% - 0.5em);\n height: 1em;\n line-height: 1em;\n width: 100%;\n text-align: center;\n font-weight: "+(n.weight||"normal")+";\n color: "+(n.color||t.bc||"#ccc")+";\n }\n \n .rac-pop {\n min-width: 100%;\n }\n \n .rac-pop > .rpop {\n padding: 0;\n }\n \n .rac-list {\n display: flex;\n flex-direction: column;\n max-height: 50vh;\n min-height: 2.125em;\n max-width: 100%;\n overflow: auto;\n }\n \n .rac-item {\n color: "+(t.fg||"#222")+";\n background-color: "+(t.bg||"#fff")+";\n padding: 0.25em;\n cursor: pointer;\n }\n \n .rac-selected {\n color: "+(t.bg||"#fff")+";\n background-color: "+(t.fga||"#07e")+";\n }\n \n .rac-hover {\n color: "+(t.fg||"#222")+";\n background-color: "+(t.bc||"#ccc")+";\n }\n \n .rac-selected.rac-hover {\n background-color: "+(t.bc||"#ccc")+";\n color: "+(t.fga||"#07e")+";\n }\n \n .rac-invalid {\n cursor: not-allowed;\n }\n \n input.rac-modal {\n width: 100%;\n box-sizing: border-box;\n }"}.call(this,e)].join(" ")},cssId:"rautocomplete",noCssTransform:!0});function O(e){return void 0===e&&(e={}),function(t){var n=t.instance;n.partials[e.name||"autocomplete"]=T,n.components["rac-pop"]=u,n.decorators.autocompletefocus=x}}e.Autocomplete=T,e.FieldType=function(e){return void 0===e&&(e={}),function(t,n,i){return[{t:7,e:e.name||"autocomplete",m:t,f:n}]}},e.plugin=O,e.default=O,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],t):t(e.RMAutocomplete={},e.Ractive)}(this,function(e,t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var n="undefined"!=typeof window?window:null;function i(e,t,i){if(n&&n.Ractive&&"object"==typeof n.Ractive[t]){var o=document.currentScript;if(o||(o=(o=document.querySelectorAll("script"))[o.length-1]),o){var r=o.getAttribute("data-alias");r&&(r=(r=r.split("&")).reduce(function(e,t){var n=t.split("="),i=n[0],o=n[1];return e[i]=o,e},{})),Ractive[t][r&&r[e]||e]=i}}}function o(e,t){void 0===t&&(t={});var n=e.processParams(t,{duration:400,easing:"easeInOut"});t.dir=t.dir||!1;var i=t.distance||"20px",o=t.scale||"0.9",r="above"===t.dir?"translateY("+i+")":"left"===t.dir?"translateX("+i+")":"right"===t.dir?"translateX(-"+i+")":"translateY(-"+i+")";return e.isIntro||n.intro?(e.setStyle("opacity",0),e.setStyle("transform","scale("+o+") "+r),e.animateStyle({opacity:1,transform:"none"},n)):(e.setStyle("opacity",1),e.setStyle("transform","none"),e.animateStyle({opacity:0,transform:"scale("+o+") "+r},n))}function r(e){return void 0===e&&(e={}),function(t){t.instance.transitions[e.name||"pop"]=o}}function a(e,t){var n=!1,i=!1;function o(n){for(var i=n.target;i;){if(i===e)return;if(!i.parentNode&&i!==document)return;i=i.parentNode}t(n)}return setTimeout(function(){n=!0,i||(document.body.addEventListener("click",o,{capture:!0}),document.body.addEventListener("touchstop",o,{capture:!0}))}),{teardown:function(){i=!0,n&&(document.body.removeEventListener("click",o,{capture:!0}),document.body.removeEventListener("touchstop",o,{capture:!0}))}}}function l(e,t){var n=e.processParams(t,{duration:200,easing:"easeInOut"});return e.isIntro||n.intro?(e.setStyle("opacity",0),e.animateStyle("opacity",1,n)):(e.setStyle("opacity",1),e.animateStyle("opacity",0,n))}function c(e){return void 0===e&&(e={}),function(t){t.instance.transitions[e.name||"fade"]=l}}i("pop","transitions",o),i("fade","transitions",l);var s,p,f,d={v:4,t:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-wrapper",g:1},{n:"class-rpop-with-tail",t:13,f:[{t:2,r:"position.tail"}]},{n:"class",f:["rpop-",{t:2,x:{r:["where"],s:'_0||"below"'}}," rpop-align-",{t:2,x:{r:["align"],s:'_0||"middle"'}}],t:13},{t:4,f:[{n:"style-top",f:[{t:2,r:"position.popTop"},"px"],t:13},{n:"style-left",f:[{t:2,r:"position.popLeft"},"px"],t:13}],n:50,r:"position"},{t:4,f:[{t:4,f:[{n:"style-top",f:[{t:2,r:"top"}],t:13}],n:50,r:"top"},{t:4,f:[{n:"style-left",f:[{t:2,r:"left"}],t:13}],n:50,r:"left"}],n:51,l:1},{n:"pop",t:72,f:{r:["where"],s:'[{dir:_0||"below"}]'},v:"t2"},{n:"cleanup",t:71},{t:4,f:[{n:["click"],t:70,f:{r:["@this"],s:'[_0.set("popped",false)]'}}],n:50,r:"clickClose"},{t:4,f:[{n:["clickout"],t:70,f:{r:["@this"],s:'[_0.set("popped",false)]'}}],n:51,r:"noClickout"},{t:16,r:"extra-attributes"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-tail",g:1},{t:4,f:[{n:"style-top",f:[{t:2,x:{r:["position.tailTop","position.vert"],s:"_0+(_1?1:0)"}},"px"],t:13}],n:50,r:"position.tailTop"},{t:4,f:[{n:"style-bottom",f:[{t:2,x:{r:["position.tailBottom","position.vert"],s:"_0+(_1?1:0)"}},"px"],t:13}],n:50,r:"position.tailBottom"},{t:4,f:[{n:"style-left",f:[{t:2,x:{r:["position.tailLeft","position.vert"],s:"_0+(_1?0:1)"}},"px"],t:13}],n:50,r:"position.tailLeft"},{t:4,f:[{n:"style-right",f:[{t:2,x:{r:["position.tailRight","position.vert"],s:"_0+(_1?0:1)"}},"px"],t:13}],n:50,r:"position.tailRight"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-tail-outer",g:1},{t:4,f:[{n:"style-top",f:[{t:2,x:{r:["position.tailTop"],s:"_0-2"}},"px"],t:13}],n:50,r:"position.tailTop"},{t:4,f:[{n:"style-bottom",f:[{t:2,x:{r:["position.tailBottom"],s:"_0-2"}},"px"],t:13}],n:50,r:"position.tailBottom"},{t:4,f:[{n:"style-left",f:[{t:2,x:{r:["position.tailLeft"],s:"_0-2"}},"px"],t:13}],n:50,r:"position.tailLeft"},{t:4,f:[{n:"style-right",f:[{t:2,x:{r:["position.tailRight"],s:"_0-2"}},"px"],t:13}],n:50,r:"position.tailRight"}]}],n:50,r:"~/tail"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rpop",g:1}],f:[{t:16,r:"content"}]}]}],n:50,r:"__popped"}],e:{'_0||"below"':function(e){return e||"below"},'_0||"middle"':function(e){return e||"middle"},'[{dir:_0||"below"}]':function(e){return[{dir:e||"below"}]},'[_0.set("popped",false)]':function(e){return[e.set("popped",!1)]},"_0+(_1?1:0)":function(e,t){return e+(t?1:0)},"_0+(_1?0:1)":function(e,t){return e+(t?0:1)},"_0-2":function(e){return e-2},"[{delay:200}]":function(){return[{delay:200}]},"[_0===_1&&_2.done(),true]":function(e,t,n){return[e===t&&n.done(),!0]},"[_0.done()]":function(e){return[e.done()]},true:function(){return!0}},p:{modal:[{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop-modal",g:1},{n:"fade",t:72,v:"t1"},{n:"fade",t:72,f:{r:[],s:"[{delay:200}]"},v:"t2"},{t:4,f:[{n:["click"],t:70,f:{r:["@node","@event.target","."],s:"[_0===_1&&_2.done(),true]"}}],n:51,r:".noClickout"}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rpop",g:1},{n:"pop",t:72,f:{r:[],s:"[{delay:200}]"},v:"t1"},{n:"pop",t:72,v:"t2"},{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.done()]"}}],n:50,r:".clickClose"},{t:8,r:".attrs",c:{r:".context"},z:[{n:"inModal",x:{x:{r:[],s:"true"}}}]}],f:[{t:8,r:".content",c:{r:".context"},z:[{n:"inModal",x:{x:{r:[],s:"true"}}}]}]}]}],n:54,r:"contents.0"}],n:50,r:"contents.length"}]}},u=function(e){function t(t){e.call(this,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.position=function(e){var t=e||this.source,n=this.get("popped");if(t&&n){var i=this.find("div");if(t&&i&&i.offsetParent){var o=i.offsetParent,r=o.getBoundingClientRect(),a=i.getBoundingClientRect(),l=t.getBoundingClientRect(),c=this.get("where")||"below",s=this.get("align")||"middle",p=this.get("tail"),f="above"===c||"below"===c,d=this.get("fit"),u=this.get("gap"),b="above"===c||"below"===c?0:"left"===c?-a.width-u:l.width+u,m="left"===c||"right"===c?-l.height:"above"===c?-l.height-a.height-u:u;"middle"===s?"below"===c||"above"===c?b-=(a.width-l.width)/2:"left"!==c&&"right"!==c||(m-=(a.height-l.height)/2):"end"===s&&("below"===c||"above"===c?b+=l.width-a.width:"left"!==c&&"right"!==c||(m+=l.height-a.height));var h={popTop:l.bottom-r.top+m,popLeft:l.left-r.left+b,tail:p,vert:"above"===c||"below"===c};if(o.scrollTop&&(h.popTop+=o.scrollTop),o.scrollLeft&&(h.popLeft+=o.scrollLeft),p){"above"===c?h.tailBottom=-10:"below"===c?h.tailTop=-10:"left"===c?h.tailRight=-10:"right"===c&&(h.tailLeft=-10);var g=this.tailSource?this.tailSource.getBoundingClientRect():l;"start"===s?f?h.tailLeft=Math.floor(g.width/2)-10:h.tailTop=Math.floor(g.height/2)-10:"end"===s?f?h.tailRight=Math.floor(g.width/2)-10:h.tailBottom=Math.floor(g.height/2)-10:"middle"===s&&(f?h.tailLeft=Math.floor(g.width/2)-10:h.tailTop=Math.floor(g.height/2)-10),g!==l?f?(null!=h.tailLeft&&(h.tailLeft+=g.left-l.left),null!=h.tailRight&&(h.tailRight+=l.right-g.right)):(null!=h.tailTop&&(h.tailTop+=g.top-l.top),null!=h.tailBottom&&(h.tailBottom+=l.bottom-g.bottom)):"middle"===s&&(f?(null!=h.tailLeft&&(h.tailLeft+=g.left-(h.popLeft+r.left)),null!=h.tailRight&&(h.tailRight+=h.popLeft+r.left+a.width-g.right)):(null!=h.tailTop&&(h.tailTop+=g.top-(h.popTop+r.top)),null!=h.tailBottom&&(h.tailBottom+=h.popTop+r.top+a.height-g.bottom)))}if(d){var v=o;if(this.get("offsets"))for(var y=this.get("offsets");y--;)v=v.offsetParent;var w=o.scrollWidth,x=o.scrollHeight;if(h.popLeft+a.width>w){var _=h.popLeft-(w-a.width);h.popLeft-=_,f&&h.tailLeft&&(h.tailLeft+=_),f&&h.tailRight&&(h.tailRight-=_),p&&!f&&(h.tail=!1)}if(h.popLeft<0){var k=-1*h.popLeft;h.popLeft+=k,f&&h.tailLeft&&(h.tailLeft-=k),f&&h.tailRight&&(h.tailRight+=k),p&&!f&&(h.tail=!1)}if(h.popTop+a.height>x){var T=h.popTop-(x-a.height);h.popTop-=T,!f&&h.tailTop&&(h.tailTop+=T),!f&&h.tailBottom&&(h.tailBottom-=T),p&&f&&(h.tail=!1)}if(h.popTop<0){var O=-1*h.popTop;h.popTop+=O,!f&&h.tailTop&&(h.tailTop-=O),!f&&h.tailBottom&&(h.tailBottom+=O),p&&f&&(h.tail=!1)}}if(r.left+h.popLeft<0){var L=0-(r.left+h.popLeft);h.popLeft+=L,f&&h.tailLeft&&(h.tailLeft-=L),f&&h.tailRight&&(h.tailRight+=L),p&&!f&&(h.tail=!1)}if(r.top+h.popTop<0){var S=0-(r.top+h.popTop);h.popTop+=S,!f&&h.tailTop&&(h.tailTop-=S),!f&&h.tailBottom&&(h.tailBottom+=S),p&&f&&(h.tail=!1)}this.set("position",h)}else this.set("position",null)}},t.prototype.show=function(e){this.source=e,this.set("popped",!0)},t.prototype.hide=function(){this.set("popped",!1)},t}(t);t.extendWith(u,{attributes:["popped","tail","where","align","top","left","fit","clickClose","noClickout","gap","offsets"],use:[r(),(void 0===f&&(f={}),function(e){e.instance.events[f.name||"clickout"]=a}),c()],template:d,css:function(e){return[function(e){var t=Object.assign({},e("raui.primary"),e("raui.pop.primary")),n=(e("raui.themes")||[]).slice();return(e("raui.pop.themes")||[]).forEach(function(e){~n.indexOf(e)||n.push(e)}),"\n .rpop-wrapper {\n position: absolute;\n display: inline-block;\n z-index: 21;\n transition-property: top, left, padding;\n transition-timing-function: ease-in-out;\n transition-duration: 0.3s;\n }\n .rpop-with-tail.rpop-above {\n padding-bottom: 10px;\n }\n .rpop-with-tail.rpop-below {\n padding-top: 10px;\n }\n .rpop-with-tail.rpop-left {\n padding-right: 10px;\n }\n .rpop-with-tail.rpop-right {\n padding-left: 10px;\n }\n \n .rpop {\n position: relative;\n box-shadow: 0 1px 4px 0 rgba(0,0,0,0.24);\n border: 1px solid #ccc;\n border-radius: 0.2em;\n background-color: "+(t.bg||"#fff")+";\n color: "+(t.fg||"#222")+";\n padding: 0.5em;\n z-index: 2;\n }\n \n .rpop-modal {\n position: fixed;\n display: flex;\n z-index: 20;\n background-color: rgba(0, 0, 0, 0.2);\n align-items: center;\n justify-content: center;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n padding: 1em;\n overflow: auto;\n }\n \n .rpop-tail, .rpop-tail-outer {\n z-index: 3;\n width: 0;\n height: 0;\n position: absolute;\n border-style: solid;\n border-width: 10px;\n border-color: transparent;\n transition-property: top, left, bottom, right, border-color;\n transition-timing-function: ease-in-out;\n transition-duration: 0.3s;\n }\n .rpop-tail-outer {\n z-index: 1;\n border-width: 12px;\n border-color: transparent;\n }\n \n .rpop-below .rpop-tail {\n border-bottom-color: "+(t.bg||"#fff")+";\n }\n .rpop-below .rpop-tail-outer {\n border-bottom-color: "+(t.bc||"#ccc")+";\n }\n \n .rpop-above .rpop-tail {\n border-top-color: "+(t.bg||"#fff")+";\n }\n .rpop-above .rpop-tail-outer {\n border-top-color: "+(t.bc||"#ccc")+";\n }\n \n .rpop-left .rpop-tail {\n border-left-color: "+(t.bg||"#fff")+";\n }\n .rpop-left .rpop-tail-outer {\n border-left-color: "+(t.bc||"#ccc")+";\n }\n \n .rpop-right .rpop-tail {\n border-right-color: "+(t.bg||"#fff")+";\n }\n .rpop-right .rpop-tail-outer {\n border-right-color: "+(t.bc||"#ccc")+";\n }\n "+n.map(function(t){var n=Object.assign({},e("raui.primary"),e("raui.pop.primary"),e("raui."+t),e("raui.pop."+t));return"\n ."+t+" .rpop {\n background-color: "+(n.bg||"#fff")+";\n color: "+(n.fg||"#222")+";\n }\n \n ."+t+".rpop-below .rpop-tail {\n border-bottom-color: "+(n.bg||"#fff")+";\n }\n ."+t+".rpop-below .rpop-tail-outer {\n border-bottom-color: "+(n.bc||"#ccc")+";\n }\n \n ."+t+".rpop-above .rpop-tail {\n border-top-color: "+(n.bg||"#fff")+";\n }\n ."+t+".rpop-above .rpop-tail-outer {\n border-top-color: "+(n.bc||"#ccc")+";\n }\n \n ."+t+".rpop-left .rpop-tail {\n border-left-color: "+(n.bg||"#fff")+";\n }\n ."+t+".rpop-left .rpop-tail-outer {\n border-left-color: "+(n.bc||"#ccc")+";\n }\n \n ."+t+".rpop-right .rpop-tail {\n border-right-color: "+(n.bg||"#fff")+";\n }\n ."+t+".rpop-right .rpop-tail-outer {\n border-right-color: "+(n.bc||"#ccc")+";\n }\n "})}.call(this,e)].join(" ")},cssId:"rpop",noCssTransform:!0,observe:{popped:function(e){var t=this;setTimeout(function(){t.get("popped")===e&&t.set("_popped",e)},1)},_popped:{handler:function(e){var t=this;if(e){var n=this.get("@style.raui.pop.mobile");if(n&&window.matchMedia("(max-width: "+n+")").matches){p||(p=new b({target:document.body,append:!0}));var i=this.getContext().getParent(!0);i.isContext=1,this.set("__popped",!1),p.unshift("contents",{content:this.partials.content,context:i,attrs:this.partials["extra-attributes"]||[],clickClose:this.get("clickClose"),noClickout:this.get("noClickout"),done:function(){t.set("popped",!1)}})}else this.set("__popped",!0)}else s?p.shift("contents"):this.set("__popped",!1)},defer:!0,init:!1},__popped:{handler:function(e){if(e){var t=this.find("div"),n=t,i=n.offsetHeight+n.offsetTop,o=n.offsetWidth+n.offsetLeft,r=n.offsetParent;if(!this.overflows)for(var a=this.overflows={e:[],v:[]};t&&t.style;){if(t===r){if(t.offsetWidth>=o&&t.offsetHeight>=i)break;o+=t.offsetLeft,i+=t.offsetTop,r=t.offsetParent}var l=getComputedStyle(t);if("auto"===l.overflow)break;"hidden"===l.overflow&&(a.e.push(t),a.v.push(t.style.overflow),t.style.overflow="visible"),t=t.parentNode}this.position(),this.transition("pop",n,{intro:!0,dir:this.get("where")||"below"})}else this.source=null,this.tailSource=null},defer:!0,init:!1},"align where tail fit":{handler:function(){this.position()},defer:!0}},decorators:{cleanup:function(e){var t=this;return{teardown:function(){var e=t.overflows;if(e){t.overflows=null;for(var n=0;n<e.e.length;n++)e.e[n].style.overflow=e.v[n]}}}}},data:function(){return{gap:4}}});var b=function(e){function t(t){e.call(this,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(t);function m(){}function h(e){~this.className.indexOf("focus")||(this.className+=" focus")}function g(e){this.className=this.className.replace(/\bfocus\b/g,"").trim()}function v(e){var t,n,i,o,r,a,l,c,s,p,f,d,u,b=this.getContext(e);function v(){var b=y().split(/\s+/).filter(function(e){return!!e});(t=!!~b.indexOf("field"))||(b.push("field"),t=!0),(n=e.querySelector("input[type=checkbox]"))&&!~b.indexOf("check")&&b.push("check"),(i=e.querySelector("input[type=radio]"))&&!~b.indexOf("radio")&&b.push("radio");var m=n||i;m&&m.checked&&!~b.indexOf("checked")&&b.push("checked"),m&&m.disabled&&!~b.indexOf("disabled")&&b.push("disabled"),!m&&p?(p.cancel(),p=0,f&&(f.disconnect(),f=0),delete m._form_callback,u&&(delete u.checked,d=u=void 0)):m&&(m._form_callback=function(t,n){if(void 0===n&&(n=!0),n&&"radio"===m.type&&m.name){var i=[];i.push.apply(i,document.querySelectorAll("input[type=radio][name="+m.name+"]")),(i=i.filter(function(e){return e!==m})).forEach(function(e){return e._form_callback&&e._form_callback(t,!1)})}var o=m.checked;o&&!~e.className.indexOf("checked")?e.className+=" checked":!o&&~e.className.indexOf("checked")&&(e.className=e.className.replace(/\bchecked\b/g,"").replace(/ +/g," ").trim())},MutationObserver&&(f=new MutationObserver(function(){var t;(t=m.disabled)&&!~e.className.indexOf("disabled")?e.className+=" disabled":!t&&~e.className.indexOf("disabled")&&(e.className=e.className.replace(/\bdisabled\b/g,"").replace(/ +/g," ").trim())})).observe(m,{attributes:!0}),p=this.getContext(m).listen("change",m._form_callback),(d=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(m),"checked"))&&d.configurable&&(u=m,Object.defineProperty(m,"checked",{get:d.get,set:function(e){d.set.call(u,e),m._form_callback()},enumerable:!0,configurable:!0}))),(o=!!e.querySelector("textarea"))&&!~b.indexOf("textarea")&&b.push("textarea"),(r=!!e.querySelector("select"))&&!~b.indexOf("select")&&b.push("select"),(a=!!e.querySelector("input[type=file]"))&&!~b.indexOf("file")&&b.push("file"),(l=!!(l=e.querySelector("button"))&&l.parentNode===e)&&!~b.indexOf("button")&&b.push("button"),(c=!!e.querySelector("div"))&&!~b.indexOf("plain")&&b.push("plain"),(s=!(n||i||a||!e.querySelector("input")))&&!~b.indexOf("input")&&b.push("input"),e.className=b.join(" ")}function y(){var p=e.className;return t||(p=p.replace(/\bfield\b/g,"").trim()),n||(p=p.replace(/\bcheck(ed)?\b/g,"").trim()),i||(p=p.replace(/\bradio\b/g,"").trim()),o||(p=p.replace(/\btextarea\b/g,"").trim()),r||(p=p.replace(/\bselect\b/g,"").trim()),a||(p=p.replace(/\bfile\b/g,"").trim()),l||(p=p.replace(/\bbutton\b/g,"").trim()),c||(p=p.replace(/\bplain\b/g,"").trim()),s||(p=p.replace(/\binput\b/g,"").trim()),p=p.replace(/ +/g," ")}var w=b.listen("focusin",h),x=b.listen("focusout",g);return v.call(this),{update:m,invalidate:v.bind(this),teardown:function(){var t=y();t=t.replace(/\bfocus\b/g,"").trim(),w.cancel(),x.cancel(),p&&p.cancel(),f&&f.disconnect(),u&&(delete u.checked,d=u=void 0),e.className=t}}}function y(e,t){if(!e)return!1;for(var n=0;n<e.length;n++){if(e[n].e===t)return!0;if(e[n].f&&y(e[n].f,t))return!0}return!1}t.extendWith(b,{template:{v:d.v,t:d.p.modal},data:function(){return{contents:[]}},use:[r(),c()],observe:{contents:function(e){s=(e||[]).length>0}},on:{init:function(){p?console.warn("More than one PopOver mobile host created."):p=this}}}),v.style=function(e){var t=Object.assign({},e("raui.primary"),e("raui.form.primary")),n=Object.assign({},e("raui.primary.active"),e("raui.form.primary.active")),i=e("raui.form.boxy");return"\n label.field {\n display: inline-block;\n font-size: 0.9em;\n font-weight: 500;\n color: "+(t.fg||"#222")+";\n transition: 0.2s ease-in-out;\n transition-property: color;\n vertical-align: top;\n box-sizing: border-box;\n padding: 0.25em 0.5em;\n line-height: 1.5em;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: inherit;\n }\n\n label.field.textarea {\n display: block;\n border: 0.0625em solid "+(t.bc||"#ccc")+";\n padding: 0.5em 0.8em 0.8em 0.8em;\n border-radius: "+(t.radius||"0.2em")+";\n box-shadow: none;\n transition-property: color, border-color, box-shadow;\n margin: 0.8em 0.2em;\n min-height: auto;\n background-color: "+(i?t.bg||"#fff":"transparent")+";\n }\n\n label.field.focus {\n color: "+(n.fg||t.fga||"#07e")+";\n }\n\n label.field.textarea.focus {\n border-color: "+(n.fg||t.fga||"#07e")+";\n "+(i?"":"box-shadow: 0.0625em 0.0625em "+(n.fg||t.fga||"#07e")+",\n -0.0625em 0.0625em "+(n.fg||t.fga||"#07e")+",\n 0.0625em -0.0625em "+(n.fg||t.fga||"#07e")+",\n -0.0625em -0.0625em "+(n.fg||t.fga||"#07e")+";")+"\n }\n\n label.field input,\n label.field select,\n label.field textarea\n {\n display: block;\n border-width: "+(i?"0.0625em":"0 0 0.0625em 0")+";\n border-color: "+(t.bc||"#ccc")+";\n border-style: solid;\n box-sizing: border-box;\n background-color: "+(i?t.bg||"#fff":"transparent")+";\n transition: 0.2s ease-in-out;\n transition-property: box-shadow, color;\n outline: none;\n box-shadow: none;\n width: 100%;\n margin-bottom: 0.8em;\n font-size: 1.1em;"+(i?"\n border-radius: "+(t.radius||"0.2em")+";":"")+"\n font-weight: 400;\n font-family: inherit;\n }\n\n label.field input"+(i?"":":disabled")+",\n label.field select"+(i?"":":disabled")+" {\n padding: 0 0.75em;\n }\n label.field select"+(i?"":":disabled")+" {\n padding-right: 2em;\n }\n\n label.field input:disabled,\n label.field select:disabled,\n label.field textarea:disabled {\n background: #f4f4f4;\n }\n\n label.field textarea {\n line-height: 1.2em;\n }\n label.field .field-wrapper {\n display: block;\n }\n label.field > select, label.field > input,\n label.field > .field-wrapper > input, label.field > .field-wrapper > select {\n height: 2.5em;\n }\n\n "+(i?"":"label.field:hover > input,\n label.field:hover select,\n label.field.file:hover:after {\n box-shadow: 0 0.0625em 0 0 "+(t.bc||"#ccc")+";\n }\n\n label.field.textarea:hover {\n box-shadow: 0.0625em 0.0625em "+(t.bc||"#ccc")+",\n -0.0625em 0.0625em "+(t.bc||"#ccc")+",\n 0.0625em -0.0625em "+(t.bc||"#ccc")+",\n -0.0625em -0.0625em "+(t.bc||"#ccc")+";\n }\n\n label.field.textarea.focus:hover {\n box-shadow: 0.0625em 0.0625em "+(n.fg||t.fga||"#07e")+",\n -0.0625em 0.0625em "+(n.fg||t.fga||"#07e")+",\n 0.0625em -0.0625em "+(n.fg||t.fga||"#07e")+",\n -0.0625em -0.0625em "+(n.fg||t.fga||"#07e")+";\n }")+"\n\n /**** CHECK BOXES ****/\n\n label.field.check {\n position:relative;\n z-index: 0;\n overflow: visible;\n cursor: pointer;\n padding-top: 2.2em;\n white-space: normal;\n }\n label.field.check.inline {\n padding-top: 0.7em;\n }\n\n label.field.check input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: -0.5em;\n top: 1em;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 3.2em;\n height: 3.2em;\n background-color: "+(t.bc||"#ccc")+";\n box-shadow: none;\n outline: none;\n opacity: 0;\n transform: scale(1);\n pointer-events: none;\n transition: opacity 0.3s, transform 0.2s;\n }\n label.field.inline.check input {\n top: -0.45em;\n left: -0.55em;\n }\n\n label.field.check input:checked {\n background-color: "+(t.fga||"#07e")+';\n }\n\n label.field.check:hover > input {\n opacity: 0.04;\n }\n\n label.field.check input:focus {\n opacity: 0.12;\n }\n\n label.field.check:hover > input:focus {\n opacity: 0.16;\n }\n\n label.field.check input:active {\n opacity: 0.6;\n transform: scale(0);\n transition: transform 0s, opacity 0s;\n }\n\n label.field.check:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n margin: 0 0.5em 0.2em 0.1em;\n border: solid 0.125em; /* Safari */\n border-color: '+(t.fg||"#222")+';\n border-radius: 0.125em;\n width: 1.2em;\n height: 1.2em;\n vertical-align: bottom;\n transition: border-color 0.2s, background-color 0.2s;\n }\n\n label.field.check:after {\n content: "";\n display: block;\n position: absolute;\n top: -0.15em;\n left: -0.05em;\n width: 0.7em;\n height: 0.3em;\n border: solid 0.125em transparent;\n border-right: none;\n border-top: none;\n transform: translate(0.8em, 2.65em) rotate(-45deg);\n }\n\n label.field.check.inline:after {\n transform: translate(0.8em, 1.2em) rotate(-45deg);\n }\n\n label.field.check.checked:before {\n border-color: '+(t.fga||"#07e")+";\n background-color: "+(t.fga||"#07e")+";\n }\n label.field.check.focus:before {\n border-color: "+(t.fga||"#07e")+";\n }\n\n label.field.check.checked:after {\n border-color: "+(t.bg||"#fff")+";\n }\n\n label.field.check input:disabled {\n opacity: 0;\n }\n\n label.field.check.disabled {\n color: "+(t.bc||"#ccc")+";\n cursor: initial;\n }\n\n label.field.check.disabled:before {\n border-color: "+(t.bc||"#ccc")+";\n }\n\n label.field.check.checked.disabled:before {\n border-color: transparent;\n background-color: "+(t.bc||"#ccc")+";\n }\n\n\n /**** RADIO BUTTONS ****/\n \n label.field.radio {\n z-index: 0;\n position: relative;\n display: inline-block;\n overflow: visible;\n padding-top: 2.2em;\n white-space: normal;\n }\n label.field.radio.inline {\n padding-top: 0.8em;\n }\n\n label.field.radio input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: 0;\n top: 0;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 3.2em;\n height: 3.2em;\n background-color: "+(t.bc||"#ccc")+';\n outline: none;\n opacity: 0;\n pointer-events: none;\n transform: translate(-0.2em, 1.5em) scale(1);\n transition: opacity 0.3s, transform 0.3s;\n }\n label.field.inline.radio input {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio {\n cursor: pointer;\n position: relative;\n }\n\n label.field.radio:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n margin: 0 0.5em 0.2em 0.1em;\n border: solid 0.125em; /* Safari */\n border-color: '+(t.fg||"#222")+';\n border-radius: 0.125em;\n width: 1.2em;\n height: 1.2em;\n vertical-align: middle;\n transition: border-color 0.2s;\n }\n\n label.field.radio:after {\n content: "";\n display: block;\n position: absolute;\n border-radius: 50%;\n width: 0.625em;\n height: 0.625em;\n background-color: '+(t.fga||"#07e")+";\n transform: translate(5px, -17px) scale(0);\n transition: transform 0.2s;\n }\n\n label.field.radio input:checked {\n background-color: "+(t.fga||"#07e")+";\n }\n\n label.field.radio.checked:before {\n border-color: "+(t.fga||"#07e")+";\n }\n\n label.field.radio.checked:after {\n transform: translate(5px, -17px) scale(1);\n }\n\n label.field.radio:hover input {\n opacity: 0.04;\n }\n\n label.field.radio input:focus {\n opacity: 0.12;\n transform: translate(-0.2em, 24px) scale(1);\n transition: transform 0.2s, opacity 0.2s;\n }\n label.field.inline.radio input:focus {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio:hover input:focus {\n opacity: 0.16;\n }\n\n label.field.radio input:active {\n opacity: 1;\n transform: translate(-0.2em, 24px) scale(0);\n transition: transform 0s, opacity 0s;\n }\n label.field.inline.radio input:active {\n transform: translate(-0.2em, 3px) scale(0);\n }\n\n label.field.radio.checked:before {\n border-color: "+(t.fga||"#07e")+";\n }\n\n label.field.radio.focus:before {\n border-color: "+(t.fga||"#07e")+";\n }\n\n label.field.radio input:disabled {\n opacity: 0;\n }\n\n label.field.radio.disabled {\n color: "+(t.bc||"#ccc")+";\n cursor: initial;\n }\n\n label.field.radio.disabled:before {\n border-color: "+(t.bc||"#ccc")+";\n }\n\n label.field.radio.disabled:after {\n background-color: "+(t.bc||"#ccc")+";\n }\n\n\n\n label.field select {\n padding-right: 2em;\n }\n\n label.field.select {\n cursor: pointer;\n position: relative;\n }\n\n label.field.select:after {\n content: ' ';\n position: absolute;\n display: block;\n width: 0.6em;\n right: 19px;\n height: 0.6em;\n top: 2.6em;\n border-bottom: 0.125em solid;\n border-right: 0.125em solid;\n transform: rotate(45deg);\n pointer-events: none;\n color: "+(t.bc||"#ccc")+";\n }\n\n label.field textarea {\n border: none;"+(i?"\n padding: 0;":"")+"\n }\n\n label.field > select {\n -moz-appearance: none;\n -webkit-appearance: none;\n }\n\n label.field input:focus,\n label.field select:focus,\n label.field.file.focus:after\n {\n border-color: "+(n.fg||t.fga||"#07e")+";\n "+(i?"":"box-shadow: 0 0.0625em 0 0 "+(n.fg||t.fga||"#07e")+";")+"\n }\n\n label.field input[type=checkbox]:focus,\n label.field input[type=radio]:focus {\n box-shadow: none;\n }\n\n label.field.file.focus:after {\n color: "+(n.fg||t.fga||"#07e")+";\n }\n label.field.file [type=file] {\n position: absolute;\n width: 0;\n height: 0;\n opacity: 0;\n z-index: -1;\n }\n label.field.file {\n position: relative;\n min-width: 9em;\n height: 5em;\n }\n label.field.file:after {\n position: absolute;\n content: 'Choose a file';\n box-sizing: border-box;\n width: calc(100% - 0.3em);\n height: 2.5em;\n font-size: 1.1em;\n line-height: 1.5em;\n color: "+(t.fg||"#222")+";\n text-align: "+(i?"center":"left")+";\n padding: 0.5em "+(i?"0.5em":"0")+";\n cursor: pointer;\n font-style: oblique;\n left: 0.25em;\n top: 1.6em;\n transition: 0.2s ease-in-out;\n transition-property: color, border-bolor, box-shadow;"+(i?"\n border-radius: "+(t.radius||"0.2em")+";\n border-color: "+(t.bc||"#ccc")+";\n border-style: solid;\n border-width: 0.0625em;":"\n border-bottom-color: "+(t.bc||"#ccc")+";\n border-bottom-width: 0.0625em;\n border-bottom-style: solid;\n ")+"\n }\n label.field.file.inline:after {\n top: 0.2em;\n }\n\n label.field.button {\n vertical-align: top;\n padding-top: "+(i?"1.7":"1.958")+"em;\n }\n label.field .with-buttons button, label.field.button button {\n font-size: 1.1em;\n margin-top: "+(i?"0.15em":"0")+";\n }\n\n label.field .field-wrapper.with-buttons {\n display: flex;\n }\n label.field .with-buttons button {\n flex-shrink: 0;\n padding-left: 0.5em;\n padding-right: 0.5em;\n margin-top: 0;\n margin-right: 0;\n "+(i?"height: 2.5em;\n box-shadow: none;\n border-radius: 0;\n border-left: 1px solid "+(t.bg||"#fff")+";\n margin-left: 0;":"height: 2.25em;")+"\n }"+(i?"\n label.field .with-buttons button:first-of-type {\n margin-left: -0.05em;\n border-left: none;\n }\n label.field .with-buttons button:last-of-type {\n border-radius: 0 "+(t.radius||"0.2em")+" "+(t.radius||"0.2em")+" 0;\n }\n label.field .with-buttons input {\n border-radius: "+(t.radius||"0.2em")+" 0 0 "+(t.radius||"0.2em")+";\n min-width: 0;\n }\n ":"")+"\n\n label.field.plain > div {\n position: absolute;\n font-size: 1.1em;\n top: 2.4em;\n font-weight: normal;\n }\n\n /* inline fields (no labels) */\n label.field.inline {\n height: 3.3em;\n }\n\n label.field.button.inline {\n margin-top: 0.2em;\n padding-top: 0.12em;\n }\n\n label.field.button.inline button {\n margin-top: 0;\n }\n\n label.field.inline.select:after {\n top: 1."+(i?"15":"1")+"em;\n }\n\n label.field .field-tip {\n display: inline-block;\n width: 1em;\n height: 1em;\n background-color: "+(t.fga||"#07e")+";\n color: "+(t.bg||"#fff;")+";\n cursor: default;\n user-select: none;\n border-radius: 1em;\n margin-left: 0.5em;\n line-height: 1.2em;\n text-align: center;\n margin-top: -0.2em;\n }\n\n label.field .field-solo-tip {\n margin-left: -0.1em;\n }\n "};var w=t.macro(function(e){var t=[],n=(e.template.m||[]).slice(),i=e.template.f||[],o=n.find(function(e){return"value"===e.n}),r=n.find(function(e){return"type"===e.n}),a=n.find(function(e){return"tip"===e.n}),l=n.find(function(e){return"disabled"===e.n});if(a&&n.splice(n.indexOf(a),1),r&&"function"==typeof w.types[r.f])t.push.apply(t,w.types[r.f](n,i,e));else if(o){var c={t:7,e:"input",m:[o]};if(l&&c.m.push(l),y(i,"option")&&(c.e="select",c.f=i),r&&(c.m.push(r),"checkbox"===r.f||"radio"===r.f)){var s=n.find(function(e){return"target"===e.n});s?c.m.push(Object.assign({},s,{n:"name"})):c.m.splice(c.m.indexOf(o),1,Object.assign({},o,{n:"checked"}))}c.m=c.m.concat(n.filter(function(e){return 73===e.t||73===e.t||"placeholder"===e.n})),t.push(c);var p=i.filter(function(e){return"button"===e.e||y(e.f,"button")});p.length&&(t.push.apply(t,p),t=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:t}])}else{var f=i.filter(function(e){return e.e});f.find(function(e){return"button"===e.e})&&f.length>1?t=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:i}]:t.push.apply(t,i)}var d=n.find(function(e){return"label"===e.n});a&&t.unshift({t:7,e:"span",m:[{t:13,n:"class",f:"field-tip"+(d?"":" field-solo-tip"),g:1},{t:13,n:"title",f:a.f},{t:70,n:["click"],f:{r:[],s:"[false]"}}],f:"?"});var u=n.find(function(e){return"inline"===e.n});d&&!u?t.unshift.apply(t,Array.isArray(d.f)?d.f:[d.f]):u||t.unshift(" ");var b={t:7,e:"label",m:[{t:71,n:"field"}].concat(n.filter(function(e){return 13!==e.t&&73!==e.t||"value"!==e.n&&"type"!==e.n&&"inline"!==e.n&&"label"!==e.n&&"placeholder"!==e.n&&"target"!==e.n&&"disabled"!==e.n})),f:t};u&&b.m.push({t:13,n:"class",f:"inline"}),e.setTemplate([b])});function x(e){return"function"==typeof e.focus&&e.focus(),{teardown:m}}w.types={},i("field","decorators",v),i("field","partials",w),i("autofocus","decorators",x);var _={v:4,t:[{t:7,e:"span",m:[{t:13,n:"class",f:"rautocomplete field-wrapper",g:1},{n:["pop"],t:70,f:{r:["@context","$1"],s:'[(_0).set("rac.pop",_1)]'}}],f:[{t:7,e:"input",m:[{t:8,r:"extra-attributes"},{n:["dblclick"],t:70,f:{r:["rac.pop","@node"],s:"[_0.show(_1)]"}},{n:["focus"],t:70,f:{r:["rac"],s:"[_0.stash()]"}},{n:["blur"],t:70,f:{r:["rac"],s:"[_0.key({which:9})]"}},{n:["input"],t:70,f:{r:["rac","@event"],s:"[_0.input(_1)]"}},{n:["keydown"],t:70,f:{r:["rac","@event"],s:"[_0.key(_1)]"}},{t:73,v:"t",f:"false"},{n:"value",f:[{t:2,r:"rac.display"}],t:13}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rac-drop",g:1},{n:["click"],t:70,f:{r:["rac.pop","@context"],s:'[_0.show((_1).find("input"))]'}}]}," ",{t:7,e:"rac-pop",m:[{t:13,n:"style",f:"padding: 0;",g:1},{t:13,n:"class",f:"rac-pop",g:1},{n:["init"],t:70,f:{r:["@context","$1"],s:'[(_0).raise("pop",{},_1)]'}},{n:"popped",t:13,f:[{t:2,r:"rac.popped"}]},{n:"where",f:"below",t:13,g:1},{n:"align",f:"end",t:13,g:1},{n:"gap",f:[{t:2,x:{r:[],s:"2"},s:1}],t:13},{n:"offsets",t:13,f:[{t:2,r:"rac.offsets"}]},{n:"fit",t:13,f:[{t:2,r:"rac.fit"}]}],f:[{t:4,f:[{t:7,e:"input",m:[{n:"class-rac-modal",t:13},{n:["input"],t:70,f:{r:["rac","@event"],s:"[_0.input(_1)]"}},{n:["keydown"],t:70,f:{r:["rac","@event"],s:"[_0.key(_1)]"}},{t:73,v:"t",f:"false"},{n:"value",f:[{t:2,r:"rac.display"}],t:13},{n:"autocompletefocus",t:71}]}],n:50,r:"inModal"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rac-list",g:1},{n:"tabindex",f:"-1",t:13,g:1}],f:[{t:55,f:[{f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rac-item rac-invalid",g:1}],f:["Loading..."]}],t:4},{t:62,f:[" ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rac-item",g:1},{n:"tabindex",f:"-1",t:13,g:1},{t:4,f:[{n:"class-rac-selected",t:13,f:[{t:2,x:{r:["rac.value","."],s:"_0===_1"}}]}],n:50,r:"rac.valueBound"},{n:"class-rac-hover",t:13,f:[{t:2,x:{r:["rac.selected","@index"],s:"_0===_1"}}]},{t:4,f:[{n:["click"],t:70,f:{r:["@context",".","rac"],s:'[(_0).set("rac.value",_1),_2._drawDisplay()]'}},{n:["mouseover"],t:70,f:{r:["@context","@index"],s:'[(_0).set("rac.selected",_1)]'}}],n:50,r:"rac.popped"}],f:[{t:2,x:{r:["rac","."],s:"_0._display(_1)"}}]}],n:52,r:"items"}," "],n:"items"},{t:63,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rac-item rac-invalid",g:1}],f:["Load failed."]}]}],r:"rac.list"}]}]}]}],e:{2:function(){return 2},'[(_0).set("rac.pop",_1)]':function(e,t){return[e.set("rac.pop",t)]},"[_0.show(_1)]":function(e,t){return[e.show(t)]},"[_0.stash()]":function(e){return[e.stash()]},"[_0.key({which:9})]":function(e){return[e.key({which:9})]},"[_0.input(_1)]":function(e,t){return[e.input(t)]},"[_0.key(_1)]":function(e,t){return[e.key(t)]},'[_0.show((_1).find("input"))]':function(e,t){return[e.show(t.find("input"))]},'[(_0).raise("pop",{},_1)]':function(e,t){return[e.raise("pop",{},t)]},"_0===_1":function(e,t){return e===t},'[(_0).set("rac.value",_1),_2._drawDisplay()]':function(e,t,n){return[e.set("rac.value",t),n._drawDisplay()]},'[(_0).set("rac.selected",_1)]':function(e,t){return[e.set("rac.selected",t)]},"_0._display(_1)":function(e,t){return e._display(t)}}};function k(e,t){return t.reduce(function(e,t){return e?e[t]:e},e)}var T=t.macro(function(e){var n,i,o;function r(t){null==t&&(t=null==e.get("rac.value")?"":e.get("rac.display")),t===e.get("rac.tempDisplay")&&(t="");var n=e.get("rac._items");if("function"==typeof n){var i=n(t);"object"==typeof i&&"function"==typeof i.then?i.then(function(t){return e.set("rac.list",t)}):e.set("rac.list",i)}else if(Array.isArray(n)){var o,r=e.get("rac._display");try{o=new RegExp(t||"","i")}catch(e){o=new RegExp((t||"").replace(/([\{\(\[\]\)\}\?\*\^\$])/g,"\\$1"))}e.set("rac.list",n.filter(function(e){return o.test(r(e))}))}else e.set("rac.list",[])}function a(t,n){var i=e.get("rac.default");return null==(t=null!=t||n?t:e.get("rac.value"))&&i&&(t="function"==typeof i?i(e.get("rac.display")):i),t}function l(n,o,l){var s=e.get("rac.displayprop");if(e.get("rac.__display")!==s||void 0===e.get("rac._display")){var p=function(){return e.attributes["display-value"]?e.get("rac.display"):"(none)"};if("string"==typeof s){var f=t.splitKeypath(s);s=function(e){return null==e&&(e=a()),null==e?p():k(e,f)}}else if(Array.isArray(s)){var d=s;s=function(e){return null==e&&(e=a()),null==e?p():k(e,d)}}else s||(s=function(e){return null==e&&(e=a()),null==e?p():""+e});e.set("rac._display",s),e.set("rac.__display",e.get("rac.displayprop")),e.set("rac.display",s(e.get("rac.value")))}if(s=e.get("rac.member"),e.get("rac.__member")!==s||void 0===e.get("rac._member")){if("string"==typeof s){var u=t.splitKeypath(s);s=function(e){return k(a(e),u)}}else if(Array.isArray(s)){var b=s;s=function(e){return k(a(e),b)}}else s||(s=function(e){return a(e)});e.set("rac._member",s),e.set("rac.__member",e.get("rac.member"))}s=e.get("rac.items"),e.get("rac.__items")===s&&void 0!==e.get("rac._items")||(Array.isArray(s)?e.set("rac._items",s):"function"==typeof s?e.set("rac._items",s):"object"==typeof s&&"function"==typeof s.then?s.then(function(t){e.set("rac._items",t),r()}):e.set("rac._items",[]),e.set("rac.__items",e.get("rac.items"))),i&&"rac.display"===l&&e.get("rac.limit")&&!i.contains(document.activeElement)&&c(),r()}function c(){var t=e.get("rac._display");if("function"==typeof t){var n=t(e.get("rac.value"));e.set("rac.display",n),e.set("rac.tempDisplay",n)}}function s(t){(t.items&&e.link(t.items,"rac.items"),t.value&&e.link(t.value,"rac._value"),e.set("rac.valueBound",!!t.value),t.selected&&e.link(t.selected,"rac.selected"),t["display-value"]&&e.link(t["display-value"],"rac.display"),"display"in t&&e.set("rac.displayprop",t.display),"member"in t&&e.set("rac.member",t.member),"offsets"in t?(e.set("rac.offsets",t.offsets),e.set("rac.fit",!("fit"in t)||t.fit)):e.set("rac.fit","fit"in t&&t.fit),e.set("rac.limit",t["limit-set"]),e.set("rac.default",t.default),e.get("rac.limit")&&e.get("input"))&&(e.get("input")!==document.activeElement&&c());l()}e.aliasLocal("rac"),e.set("rac.list",[]),e.set("rac.popped",!1),e.set("rac.stash",function(){e.set("rac.tempDisplay",e.get("rac.display")),e.set("rac.tempValue",e.get("rac.value"))}),e.set("rac.key",function(t){var n=t.which;if(27===n)e.set("rac.popped",!1),e.set("rac.display",e.get("rac.tempDisplay")),e.set("rac.value",e.get("rac.tempValue"));else if(38===n||40===n){t.preventDefault(),e.get("rac.pop").show(e.find("input"));var i=e.get("rac.selected"),o=e.get("rac.list");38===n?i<=0||null==i?e.set("rac.selected",Array.isArray(o)?o.length-1:0):e.set("rac.selected",i-1):Array.isArray(o)?e.set("rac.selected",i<o.length-1?i+1:0):e.set("rac.selected",0)}else if(10===n||13===n){var r=e.get("rac.list");Array.isArray(r)&&(e.set("rac.value",r[e.get("rac.selected")]),c())}else if(9===n){if(e.get("rac.popped")){var l=e.get("rac.list");if(Array.isArray(l)){var s=l[e.get("rac.selected")];null==s&&(s=a(s,!0)),e.set("rac.value",s)}e.get("rac.limit")||setTimeout(function(){return c()},140)}else null!=e.get("rac.value")&&~e.get("rac.selected")&&e.get("rac.display")==e.get("rac.tempDisplay")||e.set("rac.value",a(null,!0));e.set("rac.popped",!1),e.get("rac.updateDisplay")()}}),e.set("rac.input",function(t){n&&clearTimeout(n),n=setTimeout(function(){n=null,r(t.target.value);var i=e.find("input");i&&document.activeElement===i&&e.get("rac.pop").show(i)},500),e.set("rac.display",t.target.value)}),e.setTemplate(_),e.set("rac._drawDisplay",c),e.set("rac.updateDisplay",function(t){setTimeout(function(){i&&e.get("rac.limit")&&!i.contains(document.activeElement)&&c()},140)}),s(e.attributes);var p={init:!1,defer:!0},f=[e.observe("rac.displayprop",l,p),e.observe("rac.memberprop",l,p),e.observe("rac.items",l,p),e.observe("rac.list",function(t){Array.isArray(t)?e.set("rac.selected",t.indexOf(e.get("rac.value"))):e.set("rac.selected",-1)},p),e.observe("rac.value",function(t){c(),function(){if(!e.get("rac._value")||e.get("rac.value")){var t=e.get("rac._member");if("function"==typeof t){var n=t(e.get("rac.value"));e.set("rac._value",n)}e.ractive.getContext(e.find("input")).raise("selected",{},e.get("rac._value"),e.get("rac.display"))}}(),e.set("rac.popped",!1),e.set("rac.tempValue",t)}),e.observe("rac._value",function(t){var n=e.get("rac._member"),i=e.get("rac.list").find(function(e){return n(e)===t});i!==e.get("rac.value")&&e.set("rac.value",i),!i&&t&&e.get("rac.valueBound")&&(e.set("rac.display",t),l())}),e.observe("rac.selected",function(){o&&clearTimeout(n),o=setTimeout(function(){o=null;var t=e.find(".rac-hover");t&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},14)})];return{teardown:function(){e.unlink("rac.items"),e.unlink("rac._value"),e.unlink("rac.selected"),e.unlink("rac.display"),f.forEach(function(e){return e.cancel()})},update:s,render:function(){i=e.find("span")}}},{attributes:["items","selected","display","value","member","limit-set","fit","offsets","display-value","default"],css:function(e){return[function(e){var t=Object.assign({},e("raui.primary"),e("raui.autocomplete"),e("raui.autocomplete.primary")),n=Object.assign({},e("raui.autocomplete.drop"),e("raui.autocomplete.primary.drop"));return".rautocomplete {\n position: relative;\n display: inline-block;\n }\n \n .rac-drop {\n width: 2em;\n height: 100%;\n position: absolute;\n top: 0;\n right: 2px;\n cursor: pointer;\n }\n .rac-drop:after {\n font-family: "+(n.font||"sans-serif")+";\n content: "+(n.string||"'▾'")+";\n position: absolute;\n top: calc(50% - 0.5em);\n height: 1em;\n line-height: 1em;\n width: 100%;\n text-align: center;\n font-weight: "+(n.weight||"normal")+";\n color: "+(n.color||t.bc||"#ccc")+";\n }\n \n .rac-pop {\n min-width: 100%;\n }\n \n .rac-pop > .rpop {\n padding: 0;\n }\n \n .rac-list {\n display: flex;\n flex-direction: column;\n max-height: 50vh;\n min-height: 2.125em;\n max-width: 100%;\n overflow: auto;\n }\n \n .rac-item {\n color: "+(t.fg||"#222")+";\n background-color: "+(t.bg||"#fff")+";\n padding: 0.25em;\n cursor: pointer;\n }\n \n .rac-selected {\n color: "+(t.bg||"#fff")+";\n background-color: "+(t.fga||"#07e")+";\n }\n \n .rac-hover {\n color: "+(t.fg||"#222")+";\n background-color: "+(t.bc||"#ccc")+";\n }\n \n .rac-selected.rac-hover {\n background-color: "+(t.bc||"#ccc")+";\n color: "+(t.fga||"#07e")+";\n }\n \n .rac-invalid {\n cursor: not-allowed;\n }\n \n input.rac-modal {\n width: 100%;\n box-sizing: border-box;\n }"}.call(this,e)].join(" ")},cssId:"rautocomplete",noCssTransform:!0});function O(e){return void 0===e&&(e={}),function(t){var n=t.instance;n.partials[e.name||"autocomplete"]=T,n.components["rac-pop"]=u,n.decorators.autocompletefocus=x}}e.Autocomplete=T,e.FieldType=function(e){return void 0===e&&(e={}),function(t,n,i){return[{t:7,e:e.name||"autocomplete",m:t,f:n}]}},e.plugin=O,e.default=O,Object.defineProperty(e,"__esModule",{value:!0})});

@@ -281,4 +281,5 @@ (function (global, factory) {

}); }
if (label) { body.unshift.apply(body, Array.isArray(label.f) ? label.f : [label.f]); }
else { body.unshift('\xa0'); }
var inline = attrs.find(function (a) { return a.n === 'inline'; });
if (label && !inline) { body.unshift.apply(body, Array.isArray(label.f) ? label.f : [label.f]); }
else if (!inline) { body.unshift('\xa0'); }

@@ -290,3 +291,3 @@ var outer = {

if (attrs.find(function (a) { return a.n === 'inline'; })) { outer.m.push({ t: 13, n: 'class', f: 'inline' }); }
if (inline) { outer.m.push({ t: 13, n: 'class', f: 'inline' }); }

@@ -293,0 +294,0 @@ handle.setTemplate([outer]);

@@ -1,1 +0,1 @@

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],n):n(e.RMForm={},e.Ractive)}(this,function(e,n){"use strict";n=n&&n.hasOwnProperty("default")?n.default:n;var i="undefined"!=typeof window?window:null;function t(e,n,t){if(i&&i.Ractive&&"object"==typeof i.Ractive[n]){var l=document.currentScript;if(l||(l=(l=document.querySelectorAll("script"))[l.length-1]),l){var a=l.getAttribute("data-alias");a&&(a=(a=a.split("&")).reduce(function(e,n){var i=n.split("="),t=i[0],l=i[1];return e[t]=l,e},{})),Ractive[n][a&&a[e]||e]=t}}}function l(e){var n=Object.assign({},e("raui.primary"),e("raui.form.primary")),i=Object.assign({},e("raui.primary.active"),e("raui.form.primary.active")),t=e("raui.form.boxy");return"\n label.field {\n display: inline-block;\n font-size: 0.9em;\n font-weight: 500;\n color: "+(n.fg||"#222")+";\n transition: 0.2s ease-in-out;\n transition-property: color;\n vertical-align: top;\n box-sizing: border-box;\n padding: 0.25em 0.5em;\n line-height: 1.5em;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: inherit;\n }\n\n label.field.textarea {\n display: block;\n border: 0.0625em solid "+(n.bc||"#ccc")+";\n padding: 0.5em 0.8em 0.8em 0.8em;\n border-radius: "+(n.radius||"0.2em")+";\n box-shadow: none;\n transition-property: color, border-color, box-shadow;\n margin: 0.8em 0.2em;\n min-height: auto;\n background-color: "+(t?n.bg||"#fff":"transparent")+";\n }\n\n label.field.focus {\n color: "+(i.fg||n.fga||"#07e")+";\n }\n\n label.field.textarea.focus {\n border-color: "+(i.fg||n.fga||"#07e")+";\n "+(t?"":"box-shadow: 0.0625em 0.0625em "+(i.fg||n.fga||"#07e")+",\n -0.0625em 0.0625em "+(i.fg||n.fga||"#07e")+",\n 0.0625em -0.0625em "+(i.fg||n.fga||"#07e")+",\n -0.0625em -0.0625em "+(i.fg||n.fga||"#07e")+";")+"\n }\n\n label.field input,\n label.field select,\n label.field textarea\n {\n display: block;\n border-width: "+(t?"0.0625em":"0 0 0.0625em 0")+";\n border-color: "+(n.bc||"#ccc")+";\n border-style: solid;\n box-sizing: border-box;\n background-color: "+(t?n.bg||"#fff":"transparent")+";\n transition: 0.2s ease-in-out;\n transition-property: box-shadow, color;\n outline: none;\n box-shadow: none;\n width: 100%;\n margin-bottom: 0.8em;\n font-size: 1.1em;"+(t?"\n border-radius: "+(n.radius||"0.2em")+";":"")+"\n font-weight: 400;\n font-family: inherit;\n }\n\n label.field input"+(t?"":":disabled")+",\n label.field select"+(t?"":":disabled")+" {\n padding: 0 0.75em;\n }\n label.field select"+(t?"":":disabled")+" {\n padding-right: 2em;\n }\n\n label.field input:disabled,\n label.field select:disabled,\n label.field textarea:disabled {\n background: #f4f4f4;\n }\n\n label.field textarea {\n line-height: 1.2em;\n }\n label.field .field-wrapper {\n display: block;\n }\n label.field > select, label.field > input,\n label.field > .field-wrapper > input, label.field > .field-wrapper > select {\n height: 2.5em;\n }\n\n "+(t?"":"label.field:hover > input,\n label.field:hover select,\n label.field.file:hover:after {\n box-shadow: 0 0.0625em 0 0 "+(n.bc||"#ccc")+";\n }\n\n label.field.textarea:hover {\n box-shadow: 0.0625em 0.0625em "+(n.bc||"#ccc")+",\n -0.0625em 0.0625em "+(n.bc||"#ccc")+",\n 0.0625em -0.0625em "+(n.bc||"#ccc")+",\n -0.0625em -0.0625em "+(n.bc||"#ccc")+";\n }\n\n label.field.textarea.focus:hover {\n box-shadow: 0.0625em 0.0625em "+(i.fg||n.fga||"#07e")+",\n -0.0625em 0.0625em "+(i.fg||n.fga||"#07e")+",\n 0.0625em -0.0625em "+(i.fg||n.fga||"#07e")+",\n -0.0625em -0.0625em "+(i.fg||n.fga||"#07e")+";\n }")+"\n\n /**** CHECK BOXES ****/\n\n label.field.check {\n position:relative;\n z-index: 0;\n overflow: visible;\n cursor: pointer;\n padding-top: 2.2em;\n white-space: normal;\n }\n label.field.check.inline {\n padding-top: 0.7em;\n }\n\n label.field.check input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: -0.5em;\n top: 1em;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 3.2em;\n height: 3.2em;\n background-color: "+(n.bc||"#ccc")+";\n box-shadow: none;\n outline: none;\n opacity: 0;\n transform: scale(1);\n pointer-events: none;\n transition: opacity 0.3s, transform 0.2s;\n }\n label.field.inline.check input {\n top: -0.45em;\n left: -0.55em;\n }\n\n label.field.check input:checked {\n background-color: "+(n.fga||"#07e")+';\n }\n\n label.field.check:hover > input {\n opacity: 0.04;\n }\n\n label.field.check input:focus {\n opacity: 0.12;\n }\n\n label.field.check:hover > input:focus {\n opacity: 0.16;\n }\n\n label.field.check input:active {\n opacity: 0.6;\n transform: scale(0);\n transition: transform 0s, opacity 0s;\n }\n\n label.field.check:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n margin: 0 0.5em 0.2em 0.1em;\n border: solid 0.125em; /* Safari */\n border-color: '+(n.fg||"#222")+';\n border-radius: 0.125em;\n width: 1.2em;\n height: 1.2em;\n vertical-align: bottom;\n transition: border-color 0.2s, background-color 0.2s;\n }\n\n label.field.check:after {\n content: "";\n display: block;\n position: absolute;\n top: -0.15em;\n left: -0.05em;\n width: 0.7em;\n height: 0.3em;\n border: solid 0.125em transparent;\n border-right: none;\n border-top: none;\n transform: translate(0.8em, 2.65em) rotate(-45deg);\n }\n\n label.field.check.inline:after {\n transform: translate(0.8em, 1.2em) rotate(-45deg);\n }\n\n label.field.check.checked:before {\n border-color: '+(n.fga||"#07e")+";\n background-color: "+(n.fga||"#07e")+";\n }\n label.field.check.focus:before {\n border-color: "+(n.fga||"#07e")+";\n }\n\n label.field.check.checked:after {\n border-color: "+(n.bg||"#fff")+";\n }\n\n label.field.check input:disabled {\n opacity: 0;\n }\n\n label.field.check.disabled {\n color: "+(n.bc||"#ccc")+";\n cursor: initial;\n }\n\n label.field.check.disabled:before {\n border-color: "+(n.bc||"#ccc")+";\n }\n\n label.field.check.checked.disabled:before {\n border-color: transparent;\n background-color: "+(n.bc||"#ccc")+";\n }\n\n\n /**** RADIO BUTTONS ****/\n \n label.field.radio {\n z-index: 0;\n position: relative;\n display: inline-block;\n overflow: visible;\n padding-top: 2.2em;\n white-space: normal;\n }\n label.field.radio.inline {\n padding-top: 0.8em;\n }\n\n label.field.radio input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: 0;\n top: 0;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 3.2em;\n height: 3.2em;\n background-color: "+(n.bc||"#ccc")+';\n outline: none;\n opacity: 0;\n pointer-events: none;\n transform: translate(-0.2em, 1.5em) scale(1);\n transition: opacity 0.3s, transform 0.3s;\n }\n label.field.inline.radio input {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio {\n cursor: pointer;\n position: relative;\n }\n\n label.field.radio:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n margin: 0 0.5em 0.2em 0.1em;\n border: solid 0.125em; /* Safari */\n border-color: '+(n.fg||"#222")+';\n border-radius: 0.125em;\n width: 1.2em;\n height: 1.2em;\n vertical-align: middle;\n transition: border-color 0.2s;\n }\n\n label.field.radio:after {\n content: "";\n display: block;\n position: absolute;\n border-radius: 50%;\n width: 0.625em;\n height: 0.625em;\n background-color: '+(n.fga||"#07e")+";\n transform: translate(5px, -17px) scale(0);\n transition: transform 0.2s;\n }\n\n label.field.radio input:checked {\n background-color: "+(n.fga||"#07e")+";\n }\n\n label.field.radio.checked:before {\n border-color: "+(n.fga||"#07e")+";\n }\n\n label.field.radio.checked:after {\n transform: translate(5px, -17px) scale(1);\n }\n\n label.field.radio:hover input {\n opacity: 0.04;\n }\n\n label.field.radio input:focus {\n opacity: 0.12;\n transform: translate(-0.2em, 24px) scale(1);\n transition: transform 0.2s, opacity 0.2s;\n }\n label.field.inline.radio input:focus {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio:hover input:focus {\n opacity: 0.16;\n }\n\n label.field.radio input:active {\n opacity: 1;\n transform: translate(-0.2em, 24px) scale(0);\n transition: transform 0s, opacity 0s;\n }\n label.field.inline.radio input:active {\n transform: translate(-0.2em, 3px) scale(0);\n }\n\n label.field.radio.checked:before {\n border-color: "+(n.fga||"#07e")+";\n }\n\n label.field.radio.focus:before {\n border-color: "+(n.fga||"#07e")+";\n }\n\n label.field.radio input:disabled {\n opacity: 0;\n }\n\n label.field.radio.disabled {\n color: "+(n.bc||"#ccc")+";\n cursor: initial;\n }\n\n label.field.radio.disabled:before {\n border-color: "+(n.bc||"#ccc")+";\n }\n\n label.field.radio.disabled:after {\n background-color: "+(n.bc||"#ccc")+";\n }\n\n\n\n label.field select {\n padding-right: 2em;\n }\n\n label.field.select {\n cursor: pointer;\n position: relative;\n }\n\n label.field.select:after {\n content: ' ';\n position: absolute;\n display: block;\n width: 0.6em;\n right: 19px;\n height: 0.6em;\n top: 2.6em;\n border-bottom: 0.125em solid;\n border-right: 0.125em solid;\n transform: rotate(45deg);\n pointer-events: none;\n color: "+(n.bc||"#ccc")+";\n }\n\n label.field textarea {\n border: none;"+(t?"\n padding: 0;":"")+"\n }\n\n label.field > select {\n -moz-appearance: none;\n -webkit-appearance: none;\n }\n\n label.field input:focus,\n label.field select:focus,\n label.field.file.focus:after\n {\n border-color: "+(i.fg||n.fga||"#07e")+";\n "+(t?"":"box-shadow: 0 0.0625em 0 0 "+(i.fg||n.fga||"#07e")+";")+"\n }\n\n label.field input[type=checkbox]:focus,\n label.field input[type=radio]:focus {\n box-shadow: none;\n }\n\n label.field.file.focus:after {\n color: "+(i.fg||n.fga||"#07e")+";\n }\n label.field.file [type=file] {\n position: absolute;\n width: 0;\n height: 0;\n opacity: 0;\n z-index: -1;\n }\n label.field.file {\n position: relative;\n min-width: 9em;\n height: 5em;\n }\n label.field.file:after {\n position: absolute;\n content: 'Choose a file';\n box-sizing: border-box;\n width: calc(100% - 0.3em);\n height: 2.5em;\n font-size: 1.1em;\n line-height: 1.5em;\n color: "+(n.fg||"#222")+";\n text-align: "+(t?"center":"left")+";\n padding: 0.5em "+(t?"0.5em":"0")+";\n cursor: pointer;\n font-style: oblique;\n left: 0.25em;\n top: 1.6em;\n transition: 0.2s ease-in-out;\n transition-property: color, border-bolor, box-shadow;"+(t?"\n border-radius: "+(n.radius||"0.2em")+";\n border-color: "+(n.bc||"#ccc")+";\n border-style: solid;\n border-width: 0.0625em;":"\n border-bottom-color: "+(n.bc||"#ccc")+";\n border-bottom-width: 0.0625em;\n border-bottom-style: solid;\n ")+"\n }\n label.field.file.inline:after {\n top: 0.2em;\n }\n\n label.field.button {\n vertical-align: top;\n padding-top: "+(t?"1.7":"1.958")+"em;\n }\n label.field .with-buttons button, label.field.button button {\n font-size: 1.1em;\n margin-top: "+(t?"0.15em":"0")+";\n }\n\n label.field .field-wrapper.with-buttons {\n display: flex;\n }\n label.field .with-buttons button {\n flex-shrink: 0;\n padding-left: 0.5em;\n padding-right: 0.5em;\n margin-top: 0;\n margin-right: 0;\n "+(t?"height: 2.5em;\n box-shadow: none;\n border-radius: 0;\n border-left: 1px solid "+(n.bg||"#fff")+";\n margin-left: 0;":"height: 2.25em;")+"\n }"+(t?"\n label.field .with-buttons button:first-of-type {\n margin-left: -0.05em;\n border-left: none;\n }\n label.field .with-buttons button:last-of-type {\n border-radius: 0 "+(n.radius||"0.2em")+" "+(n.radius||"0.2em")+" 0;\n }\n label.field .with-buttons input {\n border-radius: "+(n.radius||"0.2em")+" 0 0 "+(n.radius||"0.2em")+";\n min-width: 0;\n }\n ":"")+"\n\n label.field.plain > div {\n position: absolute;\n font-size: 1.1em;\n top: 2.4em;\n font-weight: normal;\n }\n\n /* inline fields (no labels) */\n label.field.inline {\n height: 3.3em;\n }\n\n label.field.button.inline {\n margin-top: 0.2em;\n padding-top: 0.12em;\n }\n\n label.field.button.inline button {\n margin-top: 0;\n }\n\n label.field.inline.select:after {\n top: 1."+(t?"15":"1")+"em;\n }\n\n label.field .field-tip {\n display: inline-block;\n width: 1em;\n height: 1em;\n background-color: "+(n.fga||"#07e")+";\n color: "+(n.bg||"#fff;")+";\n cursor: default;\n user-select: none;\n border-radius: 1em;\n margin-left: 0.5em;\n line-height: 1.2em;\n text-align: center;\n margin-top: -0.2em;\n }\n\n label.field .field-solo-tip {\n margin-left: -0.1em;\n }\n "}function a(){}function o(e){~this.className.indexOf("focus")||(this.className+=" focus")}function r(e){this.className=this.className.replace(/\bfocus\b/g,"").trim()}function c(e){var n,i,t,l,c,d,f,s,b,p,u,m,h,g=this.getContext(e);function y(){var a=k().split(/\s+/).filter(function(e){return!!e});(n=!!~a.indexOf("field"))||(a.push("field"),n=!0),(i=e.querySelector("input[type=checkbox]"))&&!~a.indexOf("check")&&a.push("check"),(t=e.querySelector("input[type=radio]"))&&!~a.indexOf("radio")&&a.push("radio");var o=i||t;o&&o.checked&&!~a.indexOf("checked")&&a.push("checked"),o&&o.disabled&&!~a.indexOf("disabled")&&a.push("disabled"),!o&&p?(p.cancel(),p=0,u&&(u.disconnect(),u=0),delete o._form_callback,h&&(delete h.checked,m=h=void 0)):o&&(o._form_callback=function(n,i){if(void 0===i&&(i=!0),i&&"radio"===o.type&&o.name){var t=[];t.push.apply(t,document.querySelectorAll("input[type=radio][name="+o.name+"]")),(t=t.filter(function(e){return e!==o})).forEach(function(e){return e._form_callback&&e._form_callback(n,!1)})}var l=o.checked;l&&!~e.className.indexOf("checked")?e.className+=" checked":!l&&~e.className.indexOf("checked")&&(e.className=e.className.replace(/\bchecked\b/g,"").replace(/ +/g," ").trim())},MutationObserver&&(u=new MutationObserver(function(){var n;(n=o.disabled)&&!~e.className.indexOf("disabled")?e.className+=" disabled":!n&&~e.className.indexOf("disabled")&&(e.className=e.className.replace(/\bdisabled\b/g,"").replace(/ +/g," ").trim())})).observe(o,{attributes:!0}),p=this.getContext(o).listen("change",o._form_callback),(m=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(o),"checked"))&&m.configurable&&(h=o,Object.defineProperty(o,"checked",{get:m.get,set:function(e){m.set.call(h,e),o._form_callback()},enumerable:!0,configurable:!0}))),(l=!!e.querySelector("textarea"))&&!~a.indexOf("textarea")&&a.push("textarea"),(c=!!e.querySelector("select"))&&!~a.indexOf("select")&&a.push("select"),(d=!!e.querySelector("input[type=file]"))&&!~a.indexOf("file")&&a.push("file"),(f=!!(f=e.querySelector("button"))&&f.parentNode===e)&&!~a.indexOf("button")&&a.push("button"),(s=!!e.querySelector("div"))&&!~a.indexOf("plain")&&a.push("plain"),(b=!(i||t||d||!e.querySelector("input")))&&!~a.indexOf("input")&&a.push("input"),e.className=a.join(" ")}function k(){var a=e.className;return n||(a=a.replace(/\bfield\b/g,"").trim()),i||(a=a.replace(/\bcheck(ed)?\b/g,"").trim()),t||(a=a.replace(/\bradio\b/g,"").trim()),l||(a=a.replace(/\btextarea\b/g,"").trim()),c||(a=a.replace(/\bselect\b/g,"").trim()),d||(a=a.replace(/\bfile\b/g,"").trim()),f||(a=a.replace(/\bbutton\b/g,"").trim()),s||(a=a.replace(/\bplain\b/g,"").trim()),b||(a=a.replace(/\binput\b/g,"").trim()),a=a.replace(/ +/g," ")}var x=g.listen("focusin",o),v=g.listen("focusout",r);return y.call(this),{update:a,invalidate:y.bind(this),teardown:function(){var n=k();n=n.replace(/\bfocus\b/g,"").trim(),x.cancel(),v.cancel(),p&&p.cancel(),u&&u.disconnect(),h&&(delete h.checked,m=h=void 0),e.className=n}}}function d(e,n){if(!e)return!1;for(var i=0;i<e.length;i++){if(e[i].e===n)return!0;if(e[i].f&&d(e[i].f,n))return!0}return!1}c.style=l;var f=n.macro(function(e){var n=[],i=(e.template.m||[]).slice(),t=e.template.f||[],l=i.find(function(e){return"value"===e.n}),a=i.find(function(e){return"type"===e.n}),o=i.find(function(e){return"tip"===e.n}),r=i.find(function(e){return"disabled"===e.n});if(o&&i.splice(i.indexOf(o),1),a&&"function"==typeof f.types[a.f])n.push.apply(n,f.types[a.f](i,t,e));else if(l){var c={t:7,e:"input",m:[l]};if(r&&c.m.push(r),d(t,"option")&&(c.e="select",c.f=t),a&&(c.m.push(a),"checkbox"===a.f||"radio"===a.f)){var s=i.find(function(e){return"target"===e.n});s?c.m.push(Object.assign({},s,{n:"name"})):c.m.splice(c.m.indexOf(l),1,Object.assign({},l,{n:"checked"}))}c.m=c.m.concat(i.filter(function(e){return 73===e.t||73===e.t||"placeholder"===e.n})),n.push(c);var b=t.filter(function(e){return"button"===e.e||d(e.f,"button")});b.length&&(n.push.apply(n,b),n=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:n}])}else{var p=t.filter(function(e){return e.e});p.find(function(e){return"button"===e.e})&&p.length>1?n=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:t}]:n.push.apply(n,t)}var u=i.find(function(e){return"label"===e.n});o&&n.unshift({t:7,e:"span",m:[{t:13,n:"class",f:"field-tip"+(u?"":" field-solo-tip"),g:1},{t:13,n:"title",f:o.f},{t:70,n:["click"],f:{r:[],s:"[false]"}}],f:"?"}),u?n.unshift.apply(n,Array.isArray(u.f)?u.f:[u.f]):n.unshift(" ");var m={t:7,e:"label",m:[{t:71,n:"field"}].concat(i.filter(function(e){return 13!==e.t&&73!==e.t||"value"!==e.n&&"type"!==e.n&&"inline"!==e.n&&"label"!==e.n&&"placeholder"!==e.n&&"target"!==e.n&&"disabled"!==e.n})),f:n};i.find(function(e){return"inline"===e.n})&&m.m.push({t:13,n:"class",f:"inline"}),e.setTemplate([m])});function s(e){return"function"==typeof e.focus&&e.focus(),{teardown:a}}function b(e){return void 0===e&&(e={}),function(n){var i=n.Ractive,t=n.instance;if(!i.isInstance(t)&&e.includeStyle)if(t===i)i.addCSS("form-decorator",l);else{var a=t.css;t.css=function(e){return("function"!=typeof a?a||"":a(e))+l(e)}}t.partials[e.name||"field"]=f,t.decorators[e.name||"field"]=c,t.decorators[e.autofocusName||"autofocus"]=s}}f.types={},t("field","decorators",c),t("field","partials",f),t("autofocus","decorators",s),e.style=l,e.field=c,e.macro=f,e.autofocus=s,e.plugin=b,e.default=b,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],n):n(e.RMForm={},e.Ractive)}(this,function(e,n){"use strict";n=n&&n.hasOwnProperty("default")?n.default:n;var i="undefined"!=typeof window?window:null;function t(e,n,t){if(i&&i.Ractive&&"object"==typeof i.Ractive[n]){var l=document.currentScript;if(l||(l=(l=document.querySelectorAll("script"))[l.length-1]),l){var a=l.getAttribute("data-alias");a&&(a=(a=a.split("&")).reduce(function(e,n){var i=n.split("="),t=i[0],l=i[1];return e[t]=l,e},{})),Ractive[n][a&&a[e]||e]=t}}}function l(e){var n=Object.assign({},e("raui.primary"),e("raui.form.primary")),i=Object.assign({},e("raui.primary.active"),e("raui.form.primary.active")),t=e("raui.form.boxy");return"\n label.field {\n display: inline-block;\n font-size: 0.9em;\n font-weight: 500;\n color: "+(n.fg||"#222")+";\n transition: 0.2s ease-in-out;\n transition-property: color;\n vertical-align: top;\n box-sizing: border-box;\n padding: 0.25em 0.5em;\n line-height: 1.5em;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: inherit;\n }\n\n label.field.textarea {\n display: block;\n border: 0.0625em solid "+(n.bc||"#ccc")+";\n padding: 0.5em 0.8em 0.8em 0.8em;\n border-radius: "+(n.radius||"0.2em")+";\n box-shadow: none;\n transition-property: color, border-color, box-shadow;\n margin: 0.8em 0.2em;\n min-height: auto;\n background-color: "+(t?n.bg||"#fff":"transparent")+";\n }\n\n label.field.focus {\n color: "+(i.fg||n.fga||"#07e")+";\n }\n\n label.field.textarea.focus {\n border-color: "+(i.fg||n.fga||"#07e")+";\n "+(t?"":"box-shadow: 0.0625em 0.0625em "+(i.fg||n.fga||"#07e")+",\n -0.0625em 0.0625em "+(i.fg||n.fga||"#07e")+",\n 0.0625em -0.0625em "+(i.fg||n.fga||"#07e")+",\n -0.0625em -0.0625em "+(i.fg||n.fga||"#07e")+";")+"\n }\n\n label.field input,\n label.field select,\n label.field textarea\n {\n display: block;\n border-width: "+(t?"0.0625em":"0 0 0.0625em 0")+";\n border-color: "+(n.bc||"#ccc")+";\n border-style: solid;\n box-sizing: border-box;\n background-color: "+(t?n.bg||"#fff":"transparent")+";\n transition: 0.2s ease-in-out;\n transition-property: box-shadow, color;\n outline: none;\n box-shadow: none;\n width: 100%;\n margin-bottom: 0.8em;\n font-size: 1.1em;"+(t?"\n border-radius: "+(n.radius||"0.2em")+";":"")+"\n font-weight: 400;\n font-family: inherit;\n }\n\n label.field input"+(t?"":":disabled")+",\n label.field select"+(t?"":":disabled")+" {\n padding: 0 0.75em;\n }\n label.field select"+(t?"":":disabled")+" {\n padding-right: 2em;\n }\n\n label.field input:disabled,\n label.field select:disabled,\n label.field textarea:disabled {\n background: #f4f4f4;\n }\n\n label.field textarea {\n line-height: 1.2em;\n }\n label.field .field-wrapper {\n display: block;\n }\n label.field > select, label.field > input,\n label.field > .field-wrapper > input, label.field > .field-wrapper > select {\n height: 2.5em;\n }\n\n "+(t?"":"label.field:hover > input,\n label.field:hover select,\n label.field.file:hover:after {\n box-shadow: 0 0.0625em 0 0 "+(n.bc||"#ccc")+";\n }\n\n label.field.textarea:hover {\n box-shadow: 0.0625em 0.0625em "+(n.bc||"#ccc")+",\n -0.0625em 0.0625em "+(n.bc||"#ccc")+",\n 0.0625em -0.0625em "+(n.bc||"#ccc")+",\n -0.0625em -0.0625em "+(n.bc||"#ccc")+";\n }\n\n label.field.textarea.focus:hover {\n box-shadow: 0.0625em 0.0625em "+(i.fg||n.fga||"#07e")+",\n -0.0625em 0.0625em "+(i.fg||n.fga||"#07e")+",\n 0.0625em -0.0625em "+(i.fg||n.fga||"#07e")+",\n -0.0625em -0.0625em "+(i.fg||n.fga||"#07e")+";\n }")+"\n\n /**** CHECK BOXES ****/\n\n label.field.check {\n position:relative;\n z-index: 0;\n overflow: visible;\n cursor: pointer;\n padding-top: 2.2em;\n white-space: normal;\n }\n label.field.check.inline {\n padding-top: 0.7em;\n }\n\n label.field.check input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: -0.5em;\n top: 1em;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 3.2em;\n height: 3.2em;\n background-color: "+(n.bc||"#ccc")+";\n box-shadow: none;\n outline: none;\n opacity: 0;\n transform: scale(1);\n pointer-events: none;\n transition: opacity 0.3s, transform 0.2s;\n }\n label.field.inline.check input {\n top: -0.45em;\n left: -0.55em;\n }\n\n label.field.check input:checked {\n background-color: "+(n.fga||"#07e")+';\n }\n\n label.field.check:hover > input {\n opacity: 0.04;\n }\n\n label.field.check input:focus {\n opacity: 0.12;\n }\n\n label.field.check:hover > input:focus {\n opacity: 0.16;\n }\n\n label.field.check input:active {\n opacity: 0.6;\n transform: scale(0);\n transition: transform 0s, opacity 0s;\n }\n\n label.field.check:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n margin: 0 0.5em 0.2em 0.1em;\n border: solid 0.125em; /* Safari */\n border-color: '+(n.fg||"#222")+';\n border-radius: 0.125em;\n width: 1.2em;\n height: 1.2em;\n vertical-align: bottom;\n transition: border-color 0.2s, background-color 0.2s;\n }\n\n label.field.check:after {\n content: "";\n display: block;\n position: absolute;\n top: -0.15em;\n left: -0.05em;\n width: 0.7em;\n height: 0.3em;\n border: solid 0.125em transparent;\n border-right: none;\n border-top: none;\n transform: translate(0.8em, 2.65em) rotate(-45deg);\n }\n\n label.field.check.inline:after {\n transform: translate(0.8em, 1.2em) rotate(-45deg);\n }\n\n label.field.check.checked:before {\n border-color: '+(n.fga||"#07e")+";\n background-color: "+(n.fga||"#07e")+";\n }\n label.field.check.focus:before {\n border-color: "+(n.fga||"#07e")+";\n }\n\n label.field.check.checked:after {\n border-color: "+(n.bg||"#fff")+";\n }\n\n label.field.check input:disabled {\n opacity: 0;\n }\n\n label.field.check.disabled {\n color: "+(n.bc||"#ccc")+";\n cursor: initial;\n }\n\n label.field.check.disabled:before {\n border-color: "+(n.bc||"#ccc")+";\n }\n\n label.field.check.checked.disabled:before {\n border-color: transparent;\n background-color: "+(n.bc||"#ccc")+";\n }\n\n\n /**** RADIO BUTTONS ****/\n \n label.field.radio {\n z-index: 0;\n position: relative;\n display: inline-block;\n overflow: visible;\n padding-top: 2.2em;\n white-space: normal;\n }\n label.field.radio.inline {\n padding-top: 0.8em;\n }\n\n label.field.radio input {\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n z-index: -1;\n position: absolute;\n left: 0;\n top: 0;\n display: block;\n margin: 0;\n border-radius: 50%;\n width: 3.2em;\n height: 3.2em;\n background-color: "+(n.bc||"#ccc")+';\n outline: none;\n opacity: 0;\n pointer-events: none;\n transform: translate(-0.2em, 1.5em) scale(1);\n transition: opacity 0.3s, transform 0.3s;\n }\n label.field.inline.radio input {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio {\n cursor: pointer;\n position: relative;\n }\n\n label.field.radio:before {\n content: "";\n display: inline-block;\n box-sizing: border-box;\n margin: 0 0.5em 0.2em 0.1em;\n border: solid 0.125em; /* Safari */\n border-color: '+(n.fg||"#222")+';\n border-radius: 0.125em;\n width: 1.2em;\n height: 1.2em;\n vertical-align: middle;\n transition: border-color 0.2s;\n }\n\n label.field.radio:after {\n content: "";\n display: block;\n position: absolute;\n border-radius: 50%;\n width: 0.625em;\n height: 0.625em;\n background-color: '+(n.fga||"#07e")+";\n transform: translate(5px, -17px) scale(0);\n transition: transform 0.2s;\n }\n\n label.field.radio input:checked {\n background-color: "+(n.fga||"#07e")+";\n }\n\n label.field.radio.checked:before {\n border-color: "+(n.fga||"#07e")+";\n }\n\n label.field.radio.checked:after {\n transform: translate(5px, -17px) scale(1);\n }\n\n label.field.radio:hover input {\n opacity: 0.04;\n }\n\n label.field.radio input:focus {\n opacity: 0.12;\n transform: translate(-0.2em, 24px) scale(1);\n transition: transform 0.2s, opacity 0.2s;\n }\n label.field.inline.radio input:focus {\n transform: translate(-0.2em, 3px) scale(1);\n }\n\n label.field.radio:hover input:focus {\n opacity: 0.16;\n }\n\n label.field.radio input:active {\n opacity: 1;\n transform: translate(-0.2em, 24px) scale(0);\n transition: transform 0s, opacity 0s;\n }\n label.field.inline.radio input:active {\n transform: translate(-0.2em, 3px) scale(0);\n }\n\n label.field.radio.checked:before {\n border-color: "+(n.fga||"#07e")+";\n }\n\n label.field.radio.focus:before {\n border-color: "+(n.fga||"#07e")+";\n }\n\n label.field.radio input:disabled {\n opacity: 0;\n }\n\n label.field.radio.disabled {\n color: "+(n.bc||"#ccc")+";\n cursor: initial;\n }\n\n label.field.radio.disabled:before {\n border-color: "+(n.bc||"#ccc")+";\n }\n\n label.field.radio.disabled:after {\n background-color: "+(n.bc||"#ccc")+";\n }\n\n\n\n label.field select {\n padding-right: 2em;\n }\n\n label.field.select {\n cursor: pointer;\n position: relative;\n }\n\n label.field.select:after {\n content: ' ';\n position: absolute;\n display: block;\n width: 0.6em;\n right: 19px;\n height: 0.6em;\n top: 2.6em;\n border-bottom: 0.125em solid;\n border-right: 0.125em solid;\n transform: rotate(45deg);\n pointer-events: none;\n color: "+(n.bc||"#ccc")+";\n }\n\n label.field textarea {\n border: none;"+(t?"\n padding: 0;":"")+"\n }\n\n label.field > select {\n -moz-appearance: none;\n -webkit-appearance: none;\n }\n\n label.field input:focus,\n label.field select:focus,\n label.field.file.focus:after\n {\n border-color: "+(i.fg||n.fga||"#07e")+";\n "+(t?"":"box-shadow: 0 0.0625em 0 0 "+(i.fg||n.fga||"#07e")+";")+"\n }\n\n label.field input[type=checkbox]:focus,\n label.field input[type=radio]:focus {\n box-shadow: none;\n }\n\n label.field.file.focus:after {\n color: "+(i.fg||n.fga||"#07e")+";\n }\n label.field.file [type=file] {\n position: absolute;\n width: 0;\n height: 0;\n opacity: 0;\n z-index: -1;\n }\n label.field.file {\n position: relative;\n min-width: 9em;\n height: 5em;\n }\n label.field.file:after {\n position: absolute;\n content: 'Choose a file';\n box-sizing: border-box;\n width: calc(100% - 0.3em);\n height: 2.5em;\n font-size: 1.1em;\n line-height: 1.5em;\n color: "+(n.fg||"#222")+";\n text-align: "+(t?"center":"left")+";\n padding: 0.5em "+(t?"0.5em":"0")+";\n cursor: pointer;\n font-style: oblique;\n left: 0.25em;\n top: 1.6em;\n transition: 0.2s ease-in-out;\n transition-property: color, border-bolor, box-shadow;"+(t?"\n border-radius: "+(n.radius||"0.2em")+";\n border-color: "+(n.bc||"#ccc")+";\n border-style: solid;\n border-width: 0.0625em;":"\n border-bottom-color: "+(n.bc||"#ccc")+";\n border-bottom-width: 0.0625em;\n border-bottom-style: solid;\n ")+"\n }\n label.field.file.inline:after {\n top: 0.2em;\n }\n\n label.field.button {\n vertical-align: top;\n padding-top: "+(t?"1.7":"1.958")+"em;\n }\n label.field .with-buttons button, label.field.button button {\n font-size: 1.1em;\n margin-top: "+(t?"0.15em":"0")+";\n }\n\n label.field .field-wrapper.with-buttons {\n display: flex;\n }\n label.field .with-buttons button {\n flex-shrink: 0;\n padding-left: 0.5em;\n padding-right: 0.5em;\n margin-top: 0;\n margin-right: 0;\n "+(t?"height: 2.5em;\n box-shadow: none;\n border-radius: 0;\n border-left: 1px solid "+(n.bg||"#fff")+";\n margin-left: 0;":"height: 2.25em;")+"\n }"+(t?"\n label.field .with-buttons button:first-of-type {\n margin-left: -0.05em;\n border-left: none;\n }\n label.field .with-buttons button:last-of-type {\n border-radius: 0 "+(n.radius||"0.2em")+" "+(n.radius||"0.2em")+" 0;\n }\n label.field .with-buttons input {\n border-radius: "+(n.radius||"0.2em")+" 0 0 "+(n.radius||"0.2em")+";\n min-width: 0;\n }\n ":"")+"\n\n label.field.plain > div {\n position: absolute;\n font-size: 1.1em;\n top: 2.4em;\n font-weight: normal;\n }\n\n /* inline fields (no labels) */\n label.field.inline {\n height: 3.3em;\n }\n\n label.field.button.inline {\n margin-top: 0.2em;\n padding-top: 0.12em;\n }\n\n label.field.button.inline button {\n margin-top: 0;\n }\n\n label.field.inline.select:after {\n top: 1."+(t?"15":"1")+"em;\n }\n\n label.field .field-tip {\n display: inline-block;\n width: 1em;\n height: 1em;\n background-color: "+(n.fga||"#07e")+";\n color: "+(n.bg||"#fff;")+";\n cursor: default;\n user-select: none;\n border-radius: 1em;\n margin-left: 0.5em;\n line-height: 1.2em;\n text-align: center;\n margin-top: -0.2em;\n }\n\n label.field .field-solo-tip {\n margin-left: -0.1em;\n }\n "}function a(){}function o(e){~this.className.indexOf("focus")||(this.className+=" focus")}function r(e){this.className=this.className.replace(/\bfocus\b/g,"").trim()}function c(e){var n,i,t,l,c,d,f,s,b,p,u,m,h,g=this.getContext(e);function y(){var a=k().split(/\s+/).filter(function(e){return!!e});(n=!!~a.indexOf("field"))||(a.push("field"),n=!0),(i=e.querySelector("input[type=checkbox]"))&&!~a.indexOf("check")&&a.push("check"),(t=e.querySelector("input[type=radio]"))&&!~a.indexOf("radio")&&a.push("radio");var o=i||t;o&&o.checked&&!~a.indexOf("checked")&&a.push("checked"),o&&o.disabled&&!~a.indexOf("disabled")&&a.push("disabled"),!o&&p?(p.cancel(),p=0,u&&(u.disconnect(),u=0),delete o._form_callback,h&&(delete h.checked,m=h=void 0)):o&&(o._form_callback=function(n,i){if(void 0===i&&(i=!0),i&&"radio"===o.type&&o.name){var t=[];t.push.apply(t,document.querySelectorAll("input[type=radio][name="+o.name+"]")),(t=t.filter(function(e){return e!==o})).forEach(function(e){return e._form_callback&&e._form_callback(n,!1)})}var l=o.checked;l&&!~e.className.indexOf("checked")?e.className+=" checked":!l&&~e.className.indexOf("checked")&&(e.className=e.className.replace(/\bchecked\b/g,"").replace(/ +/g," ").trim())},MutationObserver&&(u=new MutationObserver(function(){var n;(n=o.disabled)&&!~e.className.indexOf("disabled")?e.className+=" disabled":!n&&~e.className.indexOf("disabled")&&(e.className=e.className.replace(/\bdisabled\b/g,"").replace(/ +/g," ").trim())})).observe(o,{attributes:!0}),p=this.getContext(o).listen("change",o._form_callback),(m=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(o),"checked"))&&m.configurable&&(h=o,Object.defineProperty(o,"checked",{get:m.get,set:function(e){m.set.call(h,e),o._form_callback()},enumerable:!0,configurable:!0}))),(l=!!e.querySelector("textarea"))&&!~a.indexOf("textarea")&&a.push("textarea"),(c=!!e.querySelector("select"))&&!~a.indexOf("select")&&a.push("select"),(d=!!e.querySelector("input[type=file]"))&&!~a.indexOf("file")&&a.push("file"),(f=!!(f=e.querySelector("button"))&&f.parentNode===e)&&!~a.indexOf("button")&&a.push("button"),(s=!!e.querySelector("div"))&&!~a.indexOf("plain")&&a.push("plain"),(b=!(i||t||d||!e.querySelector("input")))&&!~a.indexOf("input")&&a.push("input"),e.className=a.join(" ")}function k(){var a=e.className;return n||(a=a.replace(/\bfield\b/g,"").trim()),i||(a=a.replace(/\bcheck(ed)?\b/g,"").trim()),t||(a=a.replace(/\bradio\b/g,"").trim()),l||(a=a.replace(/\btextarea\b/g,"").trim()),c||(a=a.replace(/\bselect\b/g,"").trim()),d||(a=a.replace(/\bfile\b/g,"").trim()),f||(a=a.replace(/\bbutton\b/g,"").trim()),s||(a=a.replace(/\bplain\b/g,"").trim()),b||(a=a.replace(/\binput\b/g,"").trim()),a=a.replace(/ +/g," ")}var x=g.listen("focusin",o),v=g.listen("focusout",r);return y.call(this),{update:a,invalidate:y.bind(this),teardown:function(){var n=k();n=n.replace(/\bfocus\b/g,"").trim(),x.cancel(),v.cancel(),p&&p.cancel(),u&&u.disconnect(),h&&(delete h.checked,m=h=void 0),e.className=n}}}function d(e,n){if(!e)return!1;for(var i=0;i<e.length;i++){if(e[i].e===n)return!0;if(e[i].f&&d(e[i].f,n))return!0}return!1}c.style=l;var f=n.macro(function(e){var n=[],i=(e.template.m||[]).slice(),t=e.template.f||[],l=i.find(function(e){return"value"===e.n}),a=i.find(function(e){return"type"===e.n}),o=i.find(function(e){return"tip"===e.n}),r=i.find(function(e){return"disabled"===e.n});if(o&&i.splice(i.indexOf(o),1),a&&"function"==typeof f.types[a.f])n.push.apply(n,f.types[a.f](i,t,e));else if(l){var c={t:7,e:"input",m:[l]};if(r&&c.m.push(r),d(t,"option")&&(c.e="select",c.f=t),a&&(c.m.push(a),"checkbox"===a.f||"radio"===a.f)){var s=i.find(function(e){return"target"===e.n});s?c.m.push(Object.assign({},s,{n:"name"})):c.m.splice(c.m.indexOf(l),1,Object.assign({},l,{n:"checked"}))}c.m=c.m.concat(i.filter(function(e){return 73===e.t||73===e.t||"placeholder"===e.n})),n.push(c);var b=t.filter(function(e){return"button"===e.e||d(e.f,"button")});b.length&&(n.push.apply(n,b),n=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:n}])}else{var p=t.filter(function(e){return e.e});p.find(function(e){return"button"===e.e})&&p.length>1?n=[{t:7,e:"span",m:[{t:13,n:"class",f:"field-wrapper with-buttons",g:1}],f:t}]:n.push.apply(n,t)}var u=i.find(function(e){return"label"===e.n});o&&n.unshift({t:7,e:"span",m:[{t:13,n:"class",f:"field-tip"+(u?"":" field-solo-tip"),g:1},{t:13,n:"title",f:o.f},{t:70,n:["click"],f:{r:[],s:"[false]"}}],f:"?"});var m=i.find(function(e){return"inline"===e.n});u&&!m?n.unshift.apply(n,Array.isArray(u.f)?u.f:[u.f]):m||n.unshift(" ");var h={t:7,e:"label",m:[{t:71,n:"field"}].concat(i.filter(function(e){return 13!==e.t&&73!==e.t||"value"!==e.n&&"type"!==e.n&&"inline"!==e.n&&"label"!==e.n&&"placeholder"!==e.n&&"target"!==e.n&&"disabled"!==e.n})),f:n};m&&h.m.push({t:13,n:"class",f:"inline"}),e.setTemplate([h])});function s(e){return"function"==typeof e.focus&&e.focus(),{teardown:a}}function b(e){return void 0===e&&(e={}),function(n){var i=n.Ractive,t=n.instance;if(!i.isInstance(t)&&e.includeStyle)if(t===i)i.addCSS("form-decorator",l);else{var a=t.css;t.css=function(e){return("function"!=typeof a?a||"":a(e))+l(e)}}t.partials[e.name||"field"]=f,t.decorators[e.name||"field"]=c,t.decorators[e.autofocusName||"autofocus"]=s}}f.types={},t("field","decorators",c),t("field","partials",f),t("autofocus","decorators",s),e.style=l,e.field=c,e.macro=f,e.autofocus=s,e.plugin=b,e.default=b,Object.defineProperty(e,"__esModule",{value:!0})});

@@ -130,12 +130,20 @@ (function (global, factory) {

SideBar.prototype.select = function select (idx) {
SideBar.prototype.select = function select (idx, open) {
if (idx < 0 || idx > (this.get('tabs.length') || 0) - 1) { return; }
if (open !== false) { this.open(); }
return this.set('selected', idx);
};
SideBar.prototype.blur = function blur () {
if (this.get('size') !== 'wide' && this.get('open')) { return this.close().then(function () { return true; }); }
else { return Promise.resolve(false); }
};
SideBar.prototype.open = function open () { return this.set('open', true); };
SideBar.prototype.close = function close () { return this.set('open', false); };
SideBar.prototype.toggle = function toggle (key) {
var this$1 = this;
if (key === undefined) {
return Ractive.prototype.toggle.call(this, 'open');
return Ractive.prototype.toggle.call(this, 'open').then(function () { return this$1.get('open'); });
} else {

@@ -150,3 +158,3 @@ return Ractive.prototype.toggle.call(this, key);

Ractive$1.extendWith(SideBar, {
template: {v:4,t:[{t:7,e:"div",m:[{t:16,r:"extra-attributes",z:[{n:"sidebar",x:{r:"@this"}}]},{n:"class",f:["rsidebar rsb-",{t:2,r:"~/size"}],t:13},{n:"class-rsb-open",t:13,f:[{t:2,r:"~/open"}]},{n:"class-rsb-closed",t:13,f:[{t:2,x:{r:["~/open"],s:"!_0"}}]},{n:"class-rsb-right",t:13,f:[{t:2,r:"~/right"}]},{n:"class-rsb-left",t:13,f:[{t:2,x:{r:["~/right"],s:"!_0"}}]},{n:"class-rsb-has-tabs",t:13,f:[{t:2,r:"~/tabs.length"}]},{n:"class-rsb-no-tabs",t:13,f:[{t:2,x:{r:["~/tabs.length"],s:"!_0"}}]},{n:"sized",t:71,f:{r:[],s:"[{clientWidth:\"~/clientWidth\"}]"}}],f:[{t:4,f:[{t:4,f:[{t:16,r:"~/tabs.mobile",z:[{n:"sidebar",x:{r:"@this"}}]}],n:50,r:"~/tabs.mobile"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-mobile",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.toggle(\"open\")]"}}],f:[{t:7,e:"svg",m:[{n:"viewBox",f:"4 7 16 10",t:13,g:1}],f:[{t:7,e:"path",m:[{n:"d",f:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z",t:13,g:1}]}]}]}],n:51,l:1}],n:50,x:{r:["~/size","~/open","~/"],s:"_0===\"narrow\"&&!_1&&!_2[\"no-mobile\"]"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-bar",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tabs",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab rsb-indicator",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.toggle(\"open\")]"}}],f:[{t:7,e:"svg",m:[{n:"viewBox",f:"4 7 16 10",t:13,g:1}],f:[{t:7,e:"path",m:[{n:"d",f:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z",t:13,g:1}]}]}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab",g:1},{n:"class-rsb-selected",t:13,f:[{t:2,x:{r:["@index","~/selected"],s:"_0===_1"}}]},{t:4,f:[{n:"label",f:[{t:16,r:".label"}],t:13}],n:50,r:".label"},{t:4,f:[{t:16,r:".tabattrs"}],n:50,r:".tabattrs"},{n:["click"],t:70,f:{r:["@this","@index"],s:"[_0.set({selected:_1,open:true})]"}}],f:[{t:16,r:".tab",z:[{n:"sidebar",x:{r:"@this"}}]}]}],n:52,r:"~/tabs"}]}],n:50,r:"~/tabs.length"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab-contents",g:1},{t:4,f:[{n:"style-min-width",f:[{t:2,r:"~/width"}],t:13}],n:50,r:"~/width"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab-content",g:1},{n:"class-rsb-selected",t:13,f:[{t:2,x:{r:["@index","~/selected"],s:"_0===_1"}}]},{t:16,r:".attrs"}],f:[{t:16,r:".content",z:[{n:"sidebar",x:{r:"@this"}}]}]}],n:52,r:"~/tabs"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-contents",g:1},{t:16,r:"~/tabs.sideattrs"}],f:[{t:16,r:"~/tabs.side",z:[{n:"sidebar",x:{r:"@this"}}]}]}],n:50,r:"~/tabs.side"}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-main",g:1}],f:[{t:16,r:"~/tabs.main",z:[{n:"sidebar",x:{r:"@this"}}]}]}]}],e:{"!_0":function (_0){return(!_0);},"[{clientWidth:\"~/clientWidth\"}]":function (){return([{clientWidth:"~/clientWidth"}]);},"[_0.toggle(\"open\")]":function (_0){return([_0.toggle("open")]);},"_0===\"narrow\"&&!_1&&!_2[\"no-mobile\"]":function (_0,_1,_2){return(_0==="narrow"&&!_1&&!_2["no-mobile"]);},"_0===_1":function (_0,_1){return(_0===_1);},"[_0.set({selected:_1,open:true})]":function (_0,_1){return([_0.set({selected:_1,open:true})]);}}},
template: {v:4,t:[{t:7,e:"div",m:[{t:16,r:"extra-attributes",z:[{n:"sidebar",x:{r:"@this"}}]},{n:"class",f:["rsidebar rsb-",{t:2,r:"~/size"}],t:13},{n:"class-rsb-open",t:13,f:[{t:2,r:"~/open"}]},{n:"class-rsb-closed",t:13,f:[{t:2,x:{r:["~/open"],s:"!_0"}}]},{n:"class-rsb-right",t:13,f:[{t:2,r:"~/right"}]},{n:"class-rsb-left",t:13,f:[{t:2,x:{r:["~/right"],s:"!_0"}}]},{n:"class-rsb-has-tabs",t:13,f:[{t:2,r:"~/tabs.length"}]},{n:"class-rsb-no-tabs",t:13,f:[{t:2,x:{r:["~/tabs.length"],s:"!_0"}}]},{n:"sized",t:71,f:{r:[],s:"[{clientWidth:\"~/clientWidth\"}]"}}],f:[{t:4,f:[{t:4,f:[{t:16,r:"~/tabs.mobile",z:[{n:"sidebar",x:{r:"@this"}}]}],n:50,r:"~/tabs.mobile"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-mobile",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.toggle(\"open\")]"}}],f:[{t:7,e:"svg",m:[{n:"viewBox",f:"4 7 16 10",t:13,g:1}],f:[{t:7,e:"path",m:[{n:"d",f:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z",t:13,g:1}]}]}]}],n:51,l:1}],n:50,x:{r:["~/size","~/open","~/"],s:"_0===\"narrow\"&&!_1&&!_2[\"no-mobile\"]"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-bar",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tabs",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab rsb-indicator",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.toggle(\"open\")]"}}],f:[{t:7,e:"svg",m:[{n:"viewBox",f:"4 7 16 10",t:13,g:1}],f:[{t:7,e:"path",m:[{n:"d",f:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z",t:13,g:1}]}]}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab",g:1},{n:"class-rsb-selected",t:13,f:[{t:2,x:{r:["@index","~/selected"],s:"_0===_1"}}]},{t:4,f:[{n:"label",f:[{t:16,r:".label"}],t:13}],n:50,r:".label"},{t:4,f:[{t:16,r:".tabattrs"}],n:50,r:".tabattrs"},{n:["click"],t:70,f:{r:["@this","@index"],s:"[_0.set({selected:_1,open:true})]"}}],f:[{t:16,r:".tab",z:[{n:"sidebar",x:{r:"@this"}}]}]}],n:52,r:"~/tabs"}]}],n:50,r:"~/tabs.length"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab-contents",g:1},{t:4,f:[{n:"style-min-width",f:[{t:2,r:"~/width"},"em"],t:13}],n:50,r:"~/width"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab-content",g:1},{n:"class-rsb-selected",t:13,f:[{t:2,x:{r:["@index","~/selected"],s:"_0===_1"}}]},{t:16,r:".attrs"}],f:[{t:16,r:".content",z:[{n:"sidebar",x:{r:"@this"}}]}]}],n:52,r:"~/tabs"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-contents",g:1},{t:16,r:"~/tabs.sideattrs"}],f:[{t:16,r:"~/tabs.side",z:[{n:"sidebar",x:{r:"@this"}}]}]}],n:50,r:"~/tabs.side"}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-main",g:1}],f:[{t:16,r:"~/tabs.main",z:[{n:"sidebar",x:{r:"@this"}}]}]}]}],e:{"!_0":function (_0){return(!_0);},"[{clientWidth:\"~/clientWidth\"}]":function (){return([{clientWidth:"~/clientWidth"}]);},"[_0.toggle(\"open\")]":function (_0){return([_0.toggle("open")]);},"_0===\"narrow\"&&!_1&&!_2[\"no-mobile\"]":function (_0,_1,_2){return(_0==="narrow"&&!_1&&!_2["no-mobile"]);},"_0===_1":function (_0,_1){return(_0===_1);},"[_0.set({selected:_1,open:true})]":function (_0,_1){return([_0.set({selected:_1,open:true})]);}}},
css: function(data) { return [(function(data) {

@@ -153,0 +161,0 @@ var primary = Object.assign({}, data('raui.primary'), data('raui.sidebar.primary'));

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],e):e(t.RMSideBar={},t.Ractive)}(this,function(t,e){"use strict";function n(t,e){var n=document.createElement("object");return n.setAttribute("style","display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;"),n.setAttribute("tabindex","-1"),n.type="text/html",n.onload=function(){n.contentDocument.defaultView.addEventListener("resize",e),e()},/Trident/.test(navigator.userAgent)?(t.appendChild(n),n.data="about:blank"):(n.data="about:blank",t.appendChild(n)),n}e=e&&e.hasOwnProperty("default")?e.default:e;var r,s=16;function i(t){s=t}function o(t){return r||function t(){!r&&window&&"document"in window&&"function"==typeof document.createElement&&((r=document.createElement("div")).setAttribute("style","position: absolute; left: -2em; width: 1em; height: 1em;"),n(r,function(){return i(r.clientWidth)}),window.addEventListener("resize",function(){t(),i(r.clientWidth)})),r&&!r.parent&&document.body.appendChild(r)}(),"string"==typeof t&&(t=t.replace(/[^-.\d]/g,"")),+t/s}var b="undefined"!=typeof window?window:null;var a=function(t){function e(e){t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.select=function(t){if(!(t<0||t>(this.get("tabs.length")||0)-1))return this.set("selected",t)},e.prototype.open=function(){return this.set("open",!0)},e.prototype.close=function(){return this.set("open",!1)},e.prototype.toggle=function(e){return void 0===e?t.prototype.toggle.call(this,"open"):t.prototype.toggle.call(this,e)},e}(e);function d(t){return void 0===t&&(t={}),function(e){e.instance.components[t.name||"sidebar"]=a}}e.extendWith(a,{template:{v:4,t:[{t:7,e:"div",m:[{t:16,r:"extra-attributes",z:[{n:"sidebar",x:{r:"@this"}}]},{n:"class",f:["rsidebar rsb-",{t:2,r:"~/size"}],t:13},{n:"class-rsb-open",t:13,f:[{t:2,r:"~/open"}]},{n:"class-rsb-closed",t:13,f:[{t:2,x:{r:["~/open"],s:"!_0"}}]},{n:"class-rsb-right",t:13,f:[{t:2,r:"~/right"}]},{n:"class-rsb-left",t:13,f:[{t:2,x:{r:["~/right"],s:"!_0"}}]},{n:"class-rsb-has-tabs",t:13,f:[{t:2,r:"~/tabs.length"}]},{n:"class-rsb-no-tabs",t:13,f:[{t:2,x:{r:["~/tabs.length"],s:"!_0"}}]},{n:"sized",t:71,f:{r:[],s:'[{clientWidth:"~/clientWidth"}]'}}],f:[{t:4,f:[{t:4,f:[{t:16,r:"~/tabs.mobile",z:[{n:"sidebar",x:{r:"@this"}}]}],n:50,r:"~/tabs.mobile"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-mobile",g:1},{n:["click"],t:70,f:{r:["@this"],s:'[_0.toggle("open")]'}}],f:[{t:7,e:"svg",m:[{n:"viewBox",f:"4 7 16 10",t:13,g:1}],f:[{t:7,e:"path",m:[{n:"d",f:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z",t:13,g:1}]}]}]}],n:51,l:1}],n:50,x:{r:["~/size","~/open","~/"],s:'_0==="narrow"&&!_1&&!_2["no-mobile"]'}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-bar",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tabs",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab rsb-indicator",g:1},{n:["click"],t:70,f:{r:["@this"],s:'[_0.toggle("open")]'}}],f:[{t:7,e:"svg",m:[{n:"viewBox",f:"4 7 16 10",t:13,g:1}],f:[{t:7,e:"path",m:[{n:"d",f:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z",t:13,g:1}]}]}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab",g:1},{n:"class-rsb-selected",t:13,f:[{t:2,x:{r:["@index","~/selected"],s:"_0===_1"}}]},{t:4,f:[{n:"label",f:[{t:16,r:".label"}],t:13}],n:50,r:".label"},{t:4,f:[{t:16,r:".tabattrs"}],n:50,r:".tabattrs"},{n:["click"],t:70,f:{r:["@this","@index"],s:"[_0.set({selected:_1,open:true})]"}}],f:[{t:16,r:".tab",z:[{n:"sidebar",x:{r:"@this"}}]}]}],n:52,r:"~/tabs"}]}],n:50,r:"~/tabs.length"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab-contents",g:1},{t:4,f:[{n:"style-min-width",f:[{t:2,r:"~/width"}],t:13}],n:50,r:"~/width"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab-content",g:1},{n:"class-rsb-selected",t:13,f:[{t:2,x:{r:["@index","~/selected"],s:"_0===_1"}}]},{t:16,r:".attrs"}],f:[{t:16,r:".content",z:[{n:"sidebar",x:{r:"@this"}}]}]}],n:52,r:"~/tabs"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-contents",g:1},{t:16,r:"~/tabs.sideattrs"}],f:[{t:16,r:"~/tabs.side",z:[{n:"sidebar",x:{r:"@this"}}]}]}],n:50,r:"~/tabs.side"}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-main",g:1}],f:[{t:16,r:"~/tabs.main",z:[{n:"sidebar",x:{r:"@this"}}]}]}]}],e:{"!_0":function(t){return!t},'[{clientWidth:"~/clientWidth"}]':function(){return[{clientWidth:"~/clientWidth"}]},'[_0.toggle("open")]':function(t){return[t.toggle("open")]},'_0==="narrow"&&!_1&&!_2["no-mobile"]':function(t,e,n){return"narrow"===t&&!e&&!n["no-mobile"]},"_0===_1":function(t,e){return t===e},"[_0.set({selected:_1,open:true})]":function(t,e){return[t.set({selected:e,open:!0})]}}},css:function(t){return[function(t){var e=Object.assign({},t("raui.primary"),t("raui.sidebar.primary")),n=(t("raui.themes")||[]).slice();return(t("raui.sidebar.themes")||[]).forEach(function(t){~n.indexOf(t)||n.push(t)}),"\n .rsidebar {\n display: flex;\n flex-grow: 1;\n overflow: hidden;\n }\n \n .rsidebar.rsb-right {\n flex-direction: row-reverse;\n }\n \n .rsb-left.rsb-narrow.rsb-closed .rsb-bar,\n .rsb-left.rsb-medium.rsb-closed.rsb-no-tabs .rsb-bar,\n .rsb-left.rsb-wide.rsb-closed.rsb-no-tabs .rsb-bar {\n transform: translateX(-100%);\n }\n .rsb-right.rsb-narrow.rsb-closed .rsb-bar,\n .rsb-right.rsb-medium.rsb-closed.rsb-no-tabs .rsb-bar,\n .rsb-right.rsb-wide.rsb-closed.rsb-no-tabs .rsb-bar {\n transform: translateX(100%);\n }\n .rsb-left.rsb-wide.rsb-closed .rsb-bar,\n .rsb-left.rsb-medium.rsb-closed .rsb-bar {\n transform: translateX(calc(-100% + "+(e.tabsize||"3em")+" + "+(e.border||1)+"px));\n }\n .rsb-right.rsb-wide.rsb-closed .rsb-bar,\n .rsb-right.rsb-medium.rsb-closed .rsb-bar {\n transform: translateX(calc(100% - "+(e.tabsize||"3em")+" - "+(e.border||1)+"px));\n }\n .rsb-narrow.rsb-open .rsb-bar,\n .rsb-narrow.rsb-open .rsb-bar {\n transform: translateX(0);\n }\n \n .rsb-bar {\n flex-shrink: 0;\n display: flex;\n border-color: "+(e.bc||"#ccc")+";\n border-style: solid;\n border-width: 0;\n transition: transform 0.2s ease-in-out;\n transform: translateX(0);\n z-index: 2;\n background-color: "+(e.bg||"#fff")+";\n }\n .rsb-narrow .rsb-bar,\n .rsb-medium .rsb-bar {\n position: absolute;\n height: 100%;\n }\n .rsb-narrow.rsb-open .rsb-bar,\n .rsb-medium.rsb-open .rsb-bar {\n box-shadow: 0em 0em 0.5em 0.25em rgba(0, 0, 0, 0.25);\n }\n .rsb-right .rsb-bar {\n border-left-width: 1px;\n }\n .rsb-left .rsb-bar {\n flex-direction: row-reverse;\n border-right-width: 1px;\n }\n \n .rsb-indicator svg, .rsb-mobile svg {\n transition: transform 0.2s ease-in-out;\n width: 1.2em;\n height: 1.2em;\n }\n .rsb-open.rsb-left .rsb-indicator svg,\n .rsb-closed.rsb-right .rsb-indicator svg,\n .rsb-closed.rsb-right .rsb-mobile svg,\n .rsb-closed.rsb-right .rsb-moble svg {\n transform: rotate(90deg);\n }\n .rsb-closed.rsb-left .rsb-indicator svg,\n .rsb-open.rsb-right .rsb-indicator svg,\n .rsb-closed.rsb-left .rsb-mobile svg,\n .rsb-open.rsb-right .rsb-mobile svg {\n transform: rotate(-90deg);\n }\n \n .rsb-tabs {\n display: flex;\n flex-direction: column;\n border-color: "+(e.bc||"#ccc")+";\n border-style: solid;\n border-width: 0;\n }\n .rsb-right .rsb-tabs {\n border-right-width: 1px;\n }\n .rsb-left .rsb-tabs {\n border-left-width: 1px;\n }\n \n .rsb-tab {\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n width: "+(e.tabsize||"3em")+";\n height: "+(e.tabsize||"3em")+";\n border-style: solid;\n border-color: transparent;\n border-width: "+(e.border||1)+"px 0 "+(e.border||1)+"px 0;\n background-color: "+(e.bg||"#fff")+";\n color: "+(e.fg||"#222")+";\n cursor: pointer;\n }\n .rsb-tab.rsb-selected {\n border-color: "+(e.bc||"#ccc")+";\n background-color: "+(e.bg||"#fff")+";\n color: "+(e.fga||"#07e")+";\n width: calc("+(e.tabsize||"3em")+" + "+(e.border||1)+"px);\n }\n .rsb-right .rsb-tab.rsb-selected {\n margin-right: -"+(e.border||1)+"px;\n }\n .rsb-left .rsb-tab.rsb-selected {\n margin-left: -"+(e.border||1)+"px;\n }\n .rsb-tab[label]:hover:after {\n position: absolute;\n content: attr(label);\n top: 50%;\n display: block;\n padding: 0.4em;\n background: #333;\n color: #fff;\n font-family: Arial, Helvetica, sans-serif;\n font-size: 1em;\n font-weight: 400;\n border-radius: 0.4em;\n pointer-events: none;\n white-space: nowrap;\n transform: translateY(-50%);\n }\n .rsb-left .rsb-tab[label]:after {\n left: 110%;\n }\n .rsb-right .rsb-tab[label]:after {\n right: 110%;\n }\n \n .rsb-tab-contents {\n position: relative;\n flex-grow: 1;\n overflow: hidden;\n box-sizing: border-box;\n transition: transform 0.2s ease-in-out;\n background-color: "+(e.bg||"#fff")+";\n min-width: 16em;\n }\n \n .rsb-open .rsb-content {\n padding: "+(e.padding||"0.5em")+";\n }\n \n .rsb-contents, .rsb-tab-content {\n position: absolute;\n padding: "+(e.padding||"0.5em")+";\n top: 0;\n left: 0;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n overflow: auto;\n opacity: 0;\n z-index: 0;\n transition: opacity 0.2s ease-in-out;\n }\n .rsb-tab-content.rsb-selected {\n z-index: 1;\n opacity: 1;\n }\n \n .rsb-contents {\n z-index: 1;\n opacity: 1;\n }\n \n .rsb-main {\n flex-grow: 1;\n background-color: "+(e.bg||"#fff")+";\n padding: "+(e.padding||"0.5em")+";\n overflow: auto;\n box-sizing: border-box;\n z-index: 1;\n }\n \n .rsb-closed.rsb-wide .rsb-main,\n .rsb-medium .rsb-main {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n .rsb-closed.rsb-wide.rsb-has-tabs .rsb-main,\n .rsb-medium.rsb-has-tabs .rsb-main {\n width: calc(100% - "+(e.tabsize||"3em")+" - 1px);\n }\n .rsb-left.rsb-closed.rsb-wide.rsb-has-tabs .rsb-main,\n .rsb-left.rsb-medium.rsb-has-tabs .rsb-main {\n left: calc("+(e.tabsize||"3em")+" + 1px);\n }\n .rsb-right.rsb-closed.rsb-wide.rsb-has-tabs .rsb-main,\n .rsb-right.rsb-medium.rsb-has-tabs .rsb-main {\n right: calc("+(e.tabsize||"3em")+" + 1px);\n }\n \n .rsb-mobile {\n position: absolute;\n top: 1em;\n width: 3em;\n height: 3em;\n border-style: solid;\n border-color: "+(e.bc||"#ccc")+";\n background-color: "+(e.bg||"#fff")+";\n box-shadow: 0 0 0.25em rgba(0, 0, 0, 0.25);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 2;\n }\n .rsb-left .rsb-mobile {\n border-width: 1px 1px 1px 0;\n border-radius: 0 0.5em 0.5em 0;\n }\n .rsb-right .rsb-mobile {\n border-width: 1px 0 1px 1px;\n border-radius: 0.5em 0 0 0.5em;\n }\n "}.call(this,t)].join(" ")},cssId:"rsidebar",attributes:["right","open","no-mobile","width"],decorators:{sized:function(t,e){var r=e.context||this.getContext(t),s={position:t.style.position,overflowY:t.style.overflowY};""!==t.style.position&&"static"!==t.style.position||(t.style.position="relative");var i=function(){e.offsetWidth&&r.set(e.offsetWidth,t.offsetWidth),e.offsetHeight&&r.set(e.offsetHeight,t.offsetHeight),e.clientWidth&&r.set(e.clientWidth,t.clientWidth),e.clientHeight&&r.set(e.clientHeight,t.clientHeight),e.diffWidth&&r.set(e.diffWidth,t.offsetWidth-t.clientWidth),e.diffHeight&&r.set(e.diffHeight,t.offsetHeight-t.clientHeight)},o=n(t,i);return{refresh:i,teardown:function(){t.removeChild(o),t.style.position=s.position,t.style.overflowY=s.overflowY}}}},data:function(){return{selected:0,open:!0}},computed:{size:function(){var t=o(this.get("~/clientWidth")||1280);return t>(this.get("@style.raui.sidebar.wide.break")||76)?"wide":t>(this.get("@style.raui.sidebar.medium.break")||40)?"medium":"narrow"}},on:{construct:function(){var t=this.component;if(!t)return;var e=t.template.f||[],n=t.template.m?t.template.m.slice():[],r=t.template,s=e.filter(function(t){return"tab"!==t.e&&"side"!==t.e});t.template={e:r.e,f:s,t:r.t,m:n,p:Object.assign({},r.p,{main:s})};var i=e.filter(function(t){return"tab"===t.e}).map(function(t){var e={content:(t.f||[]).filter(function(t){return"tab"!==t.e}),attrs:(t.m||[]).filter(function(t){return"label"!==t.n&&"tab"!==t.n})};return e.label=(t.m&&t.m.find(function(t){return"label"===t.n})||{}).f,"string"==typeof e.label&&(e.label=[e.label]),e.tab=(t.f||[]).find(function(t){return"tab"===t.e}),e.tab&&(e.tabattrs=e.tab.m||[]),e.tab||(e.tab=t.m.find(function(t){return"tab"===t.n})),e.tab&&(e.tab="string"==typeof e.tab.f?[e.tab.f]:e.tab.f),e});i.side=e.find(function(t){return"side"===t.e}),i.side&&(i.sideattrs=i.side.m||[],i.side=i.side.f);i.main=s,i.side&&i.length&&console.warn("Raui SideBar should not have both side and tabs elements");this._tabs=i},config:function(){if(this._tabs){var t=this.get("tabs");Array.isArray(t)&&this._tabs.unshit.apply(this._tabs,t),this.set("tabs",this._tabs,{shuffle:!0})}this._tabs=0}},observe:{size:function(t){this.set("open","wide"===t)}}}),function(t,e,n){if(b&&b.Ractive&&"object"==typeof b.Ractive[e]){var r=document.currentScript;if(r||(r=(r=document.querySelectorAll("script"))[r.length-1]),r){var s=r.getAttribute("data-alias");s&&(s=(s=s.split("&")).reduce(function(t,e){var n=e.split("="),r=n[0],s=n[1];return t[r]=s,t},{})),Ractive[e][s&&s[t]||t]=n}}}("RMSideBar","components",a),t.SideBar=a,t.plugin=d,t.default=d,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],e):e(t.RMSideBar={},t.Ractive)}(this,function(t,e){"use strict";function n(t,e){var n=document.createElement("object");return n.setAttribute("style","display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;"),n.setAttribute("tabindex","-1"),n.type="text/html",n.onload=function(){n.contentDocument.defaultView.addEventListener("resize",e),e()},/Trident/.test(navigator.userAgent)?(t.appendChild(n),n.data="about:blank"):(n.data="about:blank",t.appendChild(n)),n}e=e&&e.hasOwnProperty("default")?e.default:e;var r,s=16;function i(t){s=t}function o(t){return r||function t(){!r&&window&&"document"in window&&"function"==typeof document.createElement&&((r=document.createElement("div")).setAttribute("style","position: absolute; left: -2em; width: 1em; height: 1em;"),n(r,function(){return i(r.clientWidth)}),window.addEventListener("resize",function(){t(),i(r.clientWidth)})),r&&!r.parent&&document.body.appendChild(r)}(),"string"==typeof t&&(t=t.replace(/[^-.\d]/g,"")),+t/s}var b="undefined"!=typeof window?window:null;var a=function(t){function e(e){t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.select=function(t,e){if(!(t<0||t>(this.get("tabs.length")||0)-1))return!1!==e&&this.open(),this.set("selected",t)},e.prototype.blur=function(){return"wide"!==this.get("size")&&this.get("open")?this.close().then(function(){return!0}):Promise.resolve(!1)},e.prototype.open=function(){return this.set("open",!0)},e.prototype.close=function(){return this.set("open",!1)},e.prototype.toggle=function(e){var n=this;return void 0===e?t.prototype.toggle.call(this,"open").then(function(){return n.get("open")}):t.prototype.toggle.call(this,e)},e}(e);function d(t){return void 0===t&&(t={}),function(e){e.instance.components[t.name||"sidebar"]=a}}e.extendWith(a,{template:{v:4,t:[{t:7,e:"div",m:[{t:16,r:"extra-attributes",z:[{n:"sidebar",x:{r:"@this"}}]},{n:"class",f:["rsidebar rsb-",{t:2,r:"~/size"}],t:13},{n:"class-rsb-open",t:13,f:[{t:2,r:"~/open"}]},{n:"class-rsb-closed",t:13,f:[{t:2,x:{r:["~/open"],s:"!_0"}}]},{n:"class-rsb-right",t:13,f:[{t:2,r:"~/right"}]},{n:"class-rsb-left",t:13,f:[{t:2,x:{r:["~/right"],s:"!_0"}}]},{n:"class-rsb-has-tabs",t:13,f:[{t:2,r:"~/tabs.length"}]},{n:"class-rsb-no-tabs",t:13,f:[{t:2,x:{r:["~/tabs.length"],s:"!_0"}}]},{n:"sized",t:71,f:{r:[],s:'[{clientWidth:"~/clientWidth"}]'}}],f:[{t:4,f:[{t:4,f:[{t:16,r:"~/tabs.mobile",z:[{n:"sidebar",x:{r:"@this"}}]}],n:50,r:"~/tabs.mobile"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-mobile",g:1},{n:["click"],t:70,f:{r:["@this"],s:'[_0.toggle("open")]'}}],f:[{t:7,e:"svg",m:[{n:"viewBox",f:"4 7 16 10",t:13,g:1}],f:[{t:7,e:"path",m:[{n:"d",f:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z",t:13,g:1}]}]}]}],n:51,l:1}],n:50,x:{r:["~/size","~/open","~/"],s:'_0==="narrow"&&!_1&&!_2["no-mobile"]'}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-bar",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tabs",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab rsb-indicator",g:1},{n:["click"],t:70,f:{r:["@this"],s:'[_0.toggle("open")]'}}],f:[{t:7,e:"svg",m:[{n:"viewBox",f:"4 7 16 10",t:13,g:1}],f:[{t:7,e:"path",m:[{n:"d",f:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z",t:13,g:1}]}]}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab",g:1},{n:"class-rsb-selected",t:13,f:[{t:2,x:{r:["@index","~/selected"],s:"_0===_1"}}]},{t:4,f:[{n:"label",f:[{t:16,r:".label"}],t:13}],n:50,r:".label"},{t:4,f:[{t:16,r:".tabattrs"}],n:50,r:".tabattrs"},{n:["click"],t:70,f:{r:["@this","@index"],s:"[_0.set({selected:_1,open:true})]"}}],f:[{t:16,r:".tab",z:[{n:"sidebar",x:{r:"@this"}}]}]}],n:52,r:"~/tabs"}]}],n:50,r:"~/tabs.length"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab-contents",g:1},{t:4,f:[{n:"style-min-width",f:[{t:2,r:"~/width"},"em"],t:13}],n:50,r:"~/width"}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-tab-content",g:1},{n:"class-rsb-selected",t:13,f:[{t:2,x:{r:["@index","~/selected"],s:"_0===_1"}}]},{t:16,r:".attrs"}],f:[{t:16,r:".content",z:[{n:"sidebar",x:{r:"@this"}}]}]}],n:52,r:"~/tabs"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-contents",g:1},{t:16,r:"~/tabs.sideattrs"}],f:[{t:16,r:"~/tabs.side",z:[{n:"sidebar",x:{r:"@this"}}]}]}],n:50,r:"~/tabs.side"}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rsb-main",g:1}],f:[{t:16,r:"~/tabs.main",z:[{n:"sidebar",x:{r:"@this"}}]}]}]}],e:{"!_0":function(t){return!t},'[{clientWidth:"~/clientWidth"}]':function(){return[{clientWidth:"~/clientWidth"}]},'[_0.toggle("open")]':function(t){return[t.toggle("open")]},'_0==="narrow"&&!_1&&!_2["no-mobile"]':function(t,e,n){return"narrow"===t&&!e&&!n["no-mobile"]},"_0===_1":function(t,e){return t===e},"[_0.set({selected:_1,open:true})]":function(t,e){return[t.set({selected:e,open:!0})]}}},css:function(t){return[function(t){var e=Object.assign({},t("raui.primary"),t("raui.sidebar.primary")),n=(t("raui.themes")||[]).slice();return(t("raui.sidebar.themes")||[]).forEach(function(t){~n.indexOf(t)||n.push(t)}),"\n .rsidebar {\n display: flex;\n flex-grow: 1;\n overflow: hidden;\n }\n \n .rsidebar.rsb-right {\n flex-direction: row-reverse;\n }\n \n .rsb-left.rsb-narrow.rsb-closed .rsb-bar,\n .rsb-left.rsb-medium.rsb-closed.rsb-no-tabs .rsb-bar,\n .rsb-left.rsb-wide.rsb-closed.rsb-no-tabs .rsb-bar {\n transform: translateX(-100%);\n }\n .rsb-right.rsb-narrow.rsb-closed .rsb-bar,\n .rsb-right.rsb-medium.rsb-closed.rsb-no-tabs .rsb-bar,\n .rsb-right.rsb-wide.rsb-closed.rsb-no-tabs .rsb-bar {\n transform: translateX(100%);\n }\n .rsb-left.rsb-wide.rsb-closed .rsb-bar,\n .rsb-left.rsb-medium.rsb-closed .rsb-bar {\n transform: translateX(calc(-100% + "+(e.tabsize||"3em")+" + "+(e.border||1)+"px));\n }\n .rsb-right.rsb-wide.rsb-closed .rsb-bar,\n .rsb-right.rsb-medium.rsb-closed .rsb-bar {\n transform: translateX(calc(100% - "+(e.tabsize||"3em")+" - "+(e.border||1)+"px));\n }\n .rsb-narrow.rsb-open .rsb-bar,\n .rsb-narrow.rsb-open .rsb-bar {\n transform: translateX(0);\n }\n \n .rsb-bar {\n flex-shrink: 0;\n display: flex;\n border-color: "+(e.bc||"#ccc")+";\n border-style: solid;\n border-width: 0;\n transition: transform 0.2s ease-in-out;\n transform: translateX(0);\n z-index: 2;\n background-color: "+(e.bg||"#fff")+";\n }\n .rsb-narrow .rsb-bar,\n .rsb-medium .rsb-bar {\n position: absolute;\n height: 100%;\n }\n .rsb-narrow.rsb-open .rsb-bar,\n .rsb-medium.rsb-open .rsb-bar {\n box-shadow: 0em 0em 0.5em 0.25em rgba(0, 0, 0, 0.25);\n }\n .rsb-right .rsb-bar {\n border-left-width: 1px;\n }\n .rsb-left .rsb-bar {\n flex-direction: row-reverse;\n border-right-width: 1px;\n }\n \n .rsb-indicator svg, .rsb-mobile svg {\n transition: transform 0.2s ease-in-out;\n width: 1.2em;\n height: 1.2em;\n }\n .rsb-open.rsb-left .rsb-indicator svg,\n .rsb-closed.rsb-right .rsb-indicator svg,\n .rsb-closed.rsb-right .rsb-mobile svg,\n .rsb-closed.rsb-right .rsb-moble svg {\n transform: rotate(90deg);\n }\n .rsb-closed.rsb-left .rsb-indicator svg,\n .rsb-open.rsb-right .rsb-indicator svg,\n .rsb-closed.rsb-left .rsb-mobile svg,\n .rsb-open.rsb-right .rsb-mobile svg {\n transform: rotate(-90deg);\n }\n \n .rsb-tabs {\n display: flex;\n flex-direction: column;\n border-color: "+(e.bc||"#ccc")+";\n border-style: solid;\n border-width: 0;\n }\n .rsb-right .rsb-tabs {\n border-right-width: 1px;\n }\n .rsb-left .rsb-tabs {\n border-left-width: 1px;\n }\n \n .rsb-tab {\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n width: "+(e.tabsize||"3em")+";\n height: "+(e.tabsize||"3em")+";\n border-style: solid;\n border-color: transparent;\n border-width: "+(e.border||1)+"px 0 "+(e.border||1)+"px 0;\n background-color: "+(e.bg||"#fff")+";\n color: "+(e.fg||"#222")+";\n cursor: pointer;\n }\n .rsb-tab.rsb-selected {\n border-color: "+(e.bc||"#ccc")+";\n background-color: "+(e.bg||"#fff")+";\n color: "+(e.fga||"#07e")+";\n width: calc("+(e.tabsize||"3em")+" + "+(e.border||1)+"px);\n }\n .rsb-right .rsb-tab.rsb-selected {\n margin-right: -"+(e.border||1)+"px;\n }\n .rsb-left .rsb-tab.rsb-selected {\n margin-left: -"+(e.border||1)+"px;\n }\n .rsb-tab[label]:hover:after {\n position: absolute;\n content: attr(label);\n top: 50%;\n display: block;\n padding: 0.4em;\n background: #333;\n color: #fff;\n font-family: Arial, Helvetica, sans-serif;\n font-size: 1em;\n font-weight: 400;\n border-radius: 0.4em;\n pointer-events: none;\n white-space: nowrap;\n transform: translateY(-50%);\n }\n .rsb-left .rsb-tab[label]:after {\n left: 110%;\n }\n .rsb-right .rsb-tab[label]:after {\n right: 110%;\n }\n \n .rsb-tab-contents {\n position: relative;\n flex-grow: 1;\n overflow: hidden;\n box-sizing: border-box;\n transition: transform 0.2s ease-in-out;\n background-color: "+(e.bg||"#fff")+";\n min-width: 16em;\n }\n \n .rsb-open .rsb-content {\n padding: "+(e.padding||"0.5em")+";\n }\n \n .rsb-contents, .rsb-tab-content {\n position: absolute;\n padding: "+(e.padding||"0.5em")+";\n top: 0;\n left: 0;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n overflow: auto;\n opacity: 0;\n z-index: 0;\n transition: opacity 0.2s ease-in-out;\n }\n .rsb-tab-content.rsb-selected {\n z-index: 1;\n opacity: 1;\n }\n \n .rsb-contents {\n z-index: 1;\n opacity: 1;\n }\n \n .rsb-main {\n flex-grow: 1;\n background-color: "+(e.bg||"#fff")+";\n padding: "+(e.padding||"0.5em")+";\n overflow: auto;\n box-sizing: border-box;\n z-index: 1;\n }\n \n .rsb-closed.rsb-wide .rsb-main,\n .rsb-medium .rsb-main {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n .rsb-closed.rsb-wide.rsb-has-tabs .rsb-main,\n .rsb-medium.rsb-has-tabs .rsb-main {\n width: calc(100% - "+(e.tabsize||"3em")+" - 1px);\n }\n .rsb-left.rsb-closed.rsb-wide.rsb-has-tabs .rsb-main,\n .rsb-left.rsb-medium.rsb-has-tabs .rsb-main {\n left: calc("+(e.tabsize||"3em")+" + 1px);\n }\n .rsb-right.rsb-closed.rsb-wide.rsb-has-tabs .rsb-main,\n .rsb-right.rsb-medium.rsb-has-tabs .rsb-main {\n right: calc("+(e.tabsize||"3em")+" + 1px);\n }\n \n .rsb-mobile {\n position: absolute;\n top: 1em;\n width: 3em;\n height: 3em;\n border-style: solid;\n border-color: "+(e.bc||"#ccc")+";\n background-color: "+(e.bg||"#fff")+";\n box-shadow: 0 0 0.25em rgba(0, 0, 0, 0.25);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 2;\n }\n .rsb-left .rsb-mobile {\n border-width: 1px 1px 1px 0;\n border-radius: 0 0.5em 0.5em 0;\n }\n .rsb-right .rsb-mobile {\n border-width: 1px 0 1px 1px;\n border-radius: 0.5em 0 0 0.5em;\n }\n "}.call(this,t)].join(" ")},cssId:"rsidebar",attributes:["right","open","no-mobile","width"],decorators:{sized:function(t,e){var r=e.context||this.getContext(t),s={position:t.style.position,overflowY:t.style.overflowY};""!==t.style.position&&"static"!==t.style.position||(t.style.position="relative");var i=function(){e.offsetWidth&&r.set(e.offsetWidth,t.offsetWidth),e.offsetHeight&&r.set(e.offsetHeight,t.offsetHeight),e.clientWidth&&r.set(e.clientWidth,t.clientWidth),e.clientHeight&&r.set(e.clientHeight,t.clientHeight),e.diffWidth&&r.set(e.diffWidth,t.offsetWidth-t.clientWidth),e.diffHeight&&r.set(e.diffHeight,t.offsetHeight-t.clientHeight)},o=n(t,i);return{refresh:i,teardown:function(){t.removeChild(o),t.style.position=s.position,t.style.overflowY=s.overflowY}}}},data:function(){return{selected:0,open:!0}},computed:{size:function(){var t=o(this.get("~/clientWidth")||1280);return t>(this.get("@style.raui.sidebar.wide.break")||76)?"wide":t>(this.get("@style.raui.sidebar.medium.break")||40)?"medium":"narrow"}},on:{construct:function(){var t=this.component;if(!t)return;var e=t.template.f||[],n=t.template.m?t.template.m.slice():[],r=t.template,s=e.filter(function(t){return"tab"!==t.e&&"side"!==t.e});t.template={e:r.e,f:s,t:r.t,m:n,p:Object.assign({},r.p,{main:s})};var i=e.filter(function(t){return"tab"===t.e}).map(function(t){var e={content:(t.f||[]).filter(function(t){return"tab"!==t.e}),attrs:(t.m||[]).filter(function(t){return"label"!==t.n&&"tab"!==t.n})};return e.label=(t.m&&t.m.find(function(t){return"label"===t.n})||{}).f,"string"==typeof e.label&&(e.label=[e.label]),e.tab=(t.f||[]).find(function(t){return"tab"===t.e}),e.tab&&(e.tabattrs=e.tab.m||[]),e.tab||(e.tab=t.m.find(function(t){return"tab"===t.n})),e.tab&&(e.tab="string"==typeof e.tab.f?[e.tab.f]:e.tab.f),e});i.side=e.find(function(t){return"side"===t.e}),i.side&&(i.sideattrs=i.side.m||[],i.side=i.side.f);i.main=s,i.side&&i.length&&console.warn("Raui SideBar should not have both side and tabs elements");this._tabs=i},config:function(){if(this._tabs){var t=this.get("tabs");Array.isArray(t)&&this._tabs.unshit.apply(this._tabs,t),this.set("tabs",this._tabs,{shuffle:!0})}this._tabs=0}},observe:{size:function(t){this.set("open","wide"===t)}}}),function(t,e,n){if(b&&b.Ractive&&"object"==typeof b.Ractive[e]){var r=document.currentScript;if(r||(r=(r=document.querySelectorAll("script"))[r.length-1]),r){var s=r.getAttribute("data-alias");s&&(s=(s=s.split("&")).reduce(function(t,e){var n=e.split("="),r=n[0],s=n[1];return t[r]=s,t},{})),Ractive[e][s&&s[t]||t]=n}}}("RMSideBar","components",a),t.SideBar=a,t.plugin=d,t.default=d,Object.defineProperty(t,"__esModule",{value:!0})});

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc