forked from riotgear2/rg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
halvalla-components.orig.min.js
1 lines (1 loc) · 57 KB
/
halvalla-components.orig.min.js
1
function RGVersion(){return RG2_VERSION}function loadCSS(t,e,a){var i=t,o=document.querySelector('link[href="'+t+'"]');if(o)return o.onload=e,void(o.onreadystatechange=e);var n=document.createElement("script");n.type="text/css",n.rel="stylesheet",n.href=t,script.onload=e,o.onreadystatechange=e,n.onerror=a||function(t){console.error("CSS File '"+i+"' not found :-(")},document.head.appendChild(n)}function loadJS(t,e,a,i){var o=t,n=document.querySelector('script[src="'+t+'"]');if(n)return n.onload=e,void(n.onreadystatechange=e);var s=document.createElement("script");s.type="string"==typeof i?i:"application/javascript",s.src=t,s.async=!1,s.defer=!1,s.onload=e,s.onerror=a||function(t){console.error("Script File '"+o+"' not found :-(")},s.onreadystatechange=e,document.body.appendChild(s)}function isBoolean(t){if(!t)return!1;if("number"==typeof t)return 1===(t=Number(t));if("string"==typeof t){if("true"===(t=t.toLowerCase())||"false"===t)return"true"===t;if("yes"===t||"no"===t)return"yes"===t;if("on"===t||"off"===t)return"on"===t}else if("boolean"==typeof t)return!0}function toBoolean(t){return t?isBoolean(t):void 0}function toNumber(t){return t?"number"==typeof t||"string"==typeof t?Number(t):void 0:NaN}function stripParas(t){return t&&(t=t.replace(/<\/?p[^>]*>/g,"")),t}function toMarkdown(t,e){var a=!("undefined"==typeof markdownit);RG2_MKDN_RENDER=a?markdownit({html:!0,linkify:!0,typographer:!0}):void 0;var i=t;if(a)return rendered=RG2_MKDN_RENDER.render(i),e&&e(rendered),stripParas(rendered);loadJS(RG_MARKDOWN_CDN_MARKDOWN,function(){if(a=!("undefined"==typeof markdownit),!RG2_MKDN_RENDER&&a&&i&&(RG2_MKDN_RENDER=markdownit({html:!0,linkify:!0,typographer:!0}),a))return rendered=RG2_MKDN_RENDER.render(i),rendered=stripParas(rendered),e&&e(rendered),rendered})}function RiotGearInit(){if(!0!==RG2_INIT){toMarkdown("**RG2** ["+RG2_VERSION+"] started",function(t){console.log(t),RG2_INIT=!0})}}var RG2_VERSION="3.6.2",RG2_INIT=!1,RG2_BASE=Date.now(),RG2_CONFETTI="rg-confetti",RG2_CONFETTI_MSG,RG2_MKDN_RENDER,RG_DATE_CDN_MOMENTJS="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment.min.js",RG_CODE_CDN_ACEJS="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.0/ace.js",RG_CHART_CDN_CHARTJS="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.min.js",RG_CREDIT_CARD_PAYMENT_FONTS="https://cdnjs.cloudflare.com/ajax/libs/paymentfont/1.1.2/css/paymentfont.min.css",RG_MARKDOWN_CDN_MARKDOWN="https://cdnjs.cloudflare.com/ajax/libs/markdown-it/8.3.0/markdown-it.min.js";document.addEventListener("DOMContentLoaded",function(t){RiotGearInit()}),riot.tag("rg-html","<span></span>","","",function(t){t.html||(t.html={}),t.html.content||(t.html.content=this.root._innerHTML),!t.content&&this.root._innerHTML&&(t.html.content=this.root._innerHTML),t.content&&(t.html.content=t.content),this.root.innerHTML=void 0===t.html.content?"":t.html.content}),riot.tag("rg-accordion",'<div class="c-card c-card--accordion u-high"> <virtual each="{item, index in opts.accordion.panels}"> <input type="checkbox" id="accordion-{index+RG2_BASE}" {checked: item.open} onclick="{notify}"> <label class="c-card__item" for="accordion-{index+RG2_BASE}">{item.title}</label> <div id="accordion-content-{index+RG2_BASE}" class="c-accordion-content c-card__item">{item.content}</div> </virtual></div>',".c-accordion-content {padding-left: 2em;}",function(){var t=this;t.notify=function(e){var a=e.item;notice={index:a.index,title:a.item.title,open:e.target.checked},notice.open&&(div=t.root.querySelector("#accordion-content-"+(a.index+RG2_BASE)),div&&(div.innerHTML=toMarkdown(a.item.content)),t.update()),t.trigger("notify",notice)}}),riot.tag("rg-address",'<address class="c-address"> <span class="c-address__heading">{opts.address.recipient}</span> <div each="{addr in opts.address.lines}">'+" <span class=\"{'c-address--road':addr.road} {'c-address--district':addr.district} {'c-address--town':addr.town} {'c-address--code':addr.code} {'c-address--state':addr.state} {'c-address--country':addr.country}\">{addr.line}<br></span> </div></address>","",function(){}),riot.tag("rg-alert",'<div class="c-alert {\'c-alert--\' + opts.alert.style}"> <button ref="closeButton" class="c-button c-button--close" onclick="{dismiss}" if={opts.alert.dismissable===true}>×</button> <rg-html content="{opts.alert.text}"></rg-html></div>',"","",function(t){var e=this;e.dismiss=function(t){e.opts.alert.timeout&&clearTimeout(e.startTimer),e.unmount()},t.alert||(t.alert={}),!t.text&&e.root._innerHTML&&(t.text=e.root._innerHTML),t.text&&(t.alert.text=t.text),t.alert.text&&(rndr=toMarkdown(t.alert.text),rndr&&(e.root._innerHTML=rndr,t.alert.text=rndr)),e.on("before-mount",function(){t.alert||(t.alert={dismissable:!0}),t.style&&(t.alert.style=t.style),t.dismissable&&(t.alert.dismissable=toBoolean(t.dismissable)),t.timeout&&(t.alert.timeout=Number(t.timeout)),t.alert.timeout<=0&&(console.log("Alert timeout negative value of ["+t.alert.timeout+"] adjusted to "+abs(t.alert.timeout)),t.alert.timeout=abs(t.alert.timeout)),t.alert.timeout>=1&&t.alert.timeout<=100&&(t.alert.timeout=1e3*t.alert.timeout),t.alert.timeout>=5e5&&(console.log("Alert timeout value reduced from ["+t.alert.timeout+"] to 5secs."),t.alert.timeout=5e3),"number"==typeof t.alert.timeout&&t.alert.timeout>0&&(e.startTimer=function(){e.timer=setTimeout(function(){e.dismiss()},t.alert.timeout)},e.startTimer())}),e.on("mount",function(){})}),riot.tag("rg-alerts",'<virtual each="{opts.alerts}"> <rg-alert text="{text}" style="{style}" dismissable={dismissable} timeout={timeout}></rg-alert></virtual>',"","",function(){}),riot.tag("rg-avatar",'<div class="c-avatar c-avatar {\'u-\' + opts.avatar.size}" data-text={opts.avatar.text} onclick={clicked} riot-style="cursor: pointer;"> <img class="c-avatar__img" show="{opts.avatar.image}" src="{opts.avatar.image}"> <img class="c-avatar__img" show="{opts.avatar.image2}" src="{opts.avatar.image2}"></div>',"","",function(){var t=this;updateOpts=function(){t.opts.size&&(t.opts.avatar.size=t.opts.size),t.opts.text&&(t.opts.avatar.text=t.opts.text),t.opts.image&&(this.opts.avatar.image=t.opts.image),t.opts.image2&&(this.opts.avatar.image2=t.opts.image2)},clicked=function(e){e.preventUpdate=!0,av={avatar:t.root.localName+"-"+t._riot_id,size:t.opts.size?t.opts.size:t.opts.avatar.size,text:t.opts.text?t.opts.text:t.opts.avatar.text,image:t.opts.image?t.opts.image:t.opts.avatar.image},t.trigger("clicked",av)},t.on("before-mount",function(){t.opts.avatar||(t.opts.avatar={}),updateOpts()})}),riot.tag("rg-text","<span >{opts.text}<yield /></span>","","",function(){}),riot.tag("rg-badge","<span class=\"c-badge {'c-badge--' + opts.badge.style} {'c-badge--rounded':opts.badge.rounded} {'c-badge--ghost':opts.badge.ghost}\" onclick={clicked}>{opts.badge.text}<yield /></span>","","",function(){var t=this;updateOpts=function(){t.opts.text&&(t.opts.badge.text=t.opts.text),t.opts.style&&(t.opts.badge.style=t.opts.style),t.opts.rounded&&(t.opts.badge.rounded=t.opts.rounded),t.opts.ghost&&(t.opts.badge.ghost=t.opts.ghost)},clicked=function(e){badge={text:t.opts.badge.text,style:t.opts.badge.style,rounded:t.opts.badge.rounded,ghost:t.opts.badge.ghost},t.trigger("badge-clicked",badge)},t.on("before-mount",function(){t.opts.badge||(t.opts.badge={}),updateOpts()})}),riot.tag("rg-bubble",'<div class="context"> <div class="c-bubble c-bubble--top" if="{isvisible}"> {opts.bubble.text} </div> <div class="content" onmouseover="{showBubble}" onmouseout="{hideBubble}" onclick="{toggleBubble}"> <yield></yield> </div> </div>','rg-bubble .context,[riot-tag="rg-bubble"] .context,[data-is="rg-bubble"] .context,rg-bubble .content,[riot-tag="rg-bubble"] .content,[data-is="rg-bubble"] .content{ display: inline-block; position: relative; } rg-bubble .c-bubble,[riot-tag="rg-bubble"] .c-bubble,[data-is="rg-bubble"] .c-bubble{ position: absolute; top: -70px; left: 50%; transform: translate3d(-50%, 0, 0); }',"",function(t){var e=this;this.showBubble=function(){clearTimeout(e._timer),e.isvisible=!0},this.hideBubble=function(){e._timer=setTimeout(function(){e.isvisible=!1,e.update()},1e3)},this.toggleBubble=function(){e.isvisible=!e.isvisible}}),riot.tag("rg-button","<button class=\"c-button {'c-button--' + opts.button.style} {'c-button--rounded':opts.button.rounded} {'c-button--active':opts.button.active} {'c-button--block':opts.button.full} {'c-button--ghost': opts.button.ghost}{opts.button.style ? '-'+ opts.button.style : ''} {'u-' + opts.button.size}\""+' disabled="{opts.button.disabled}" onclick="{localClick}"> <rg-html content="{opts.button.text}"><rg-html></button>',"","",function(t){var e=this;localClick=function(a){btn={text:e.opts.button.text,style:t.button.style,size:t.button.size,disabled:t.button.disabled,event:a},e.trigger("button-clicked",btn)},t.button||(t.button={}),t.button.style=t.style?t.style:void 0,t.button.size=t.size?t.size:"small",t.button.rounded=!!t.rounded&&toBoolean(t.rounded),t.button.ghost=!!t.ghost&&toBoolean(t.ghost),t.button.full=!!t.full&&toBoolean(t.full),t.button.active=!!t.active&&toBoolean(t.active),t.button.disabled=!!t.disabled&&toBoolean(t.disabled),!t.text&&e.root._innerHTML&&(t.text=toMarkdown(e.root._innerHTML)),!t.button.text&&e.root._innerHTML&&(t.button.text=toMarkdown(e.root._innerHTML)),t.button.text&&(t.button.text=toMarkdown(t.button.text)),t.text&&(t.button.text=toMarkdown(t.text))}),riot.tag("rg-button-group","<span class=\"c-input-group {'c-input-group--rounded': opts.group.rounded}\"><virtual each=\"{button, index in opts.group.buttons}\"> <button class=\"c-button {'c-button--' + button.style} {'c-button--ghost': button.ghost}{button.style ? '-'+ button.style : ''} {'c-button--active':button.active} {'u-' + button.size}\" disabled=\"{button.disabled}\" onclick=\"{localClick}\"><rg-html content=\"{button.text}\"<</rg-html></button></virtual></span>","","",function(t){var e=this;t.group||(t.group={size:"medium",ghost:!1,rounded:!1,buttons:[]}),t.ghost&&(t.group.ghost=toBoolean(t.ghost)),t.rounded&&(t.group.rounded=toBoolean(t.rounded)),t.size&&(t.group.size=t.size),t.style&&(t.group.style=t.style);for(btn in t.group.buttons)t.group.buttons[btn].ghost=!!t.group.ghost&&toBoolean(t.group.ghost),t.group.buttons[btn].size=t.group.size?t.group.size:void 0,t.group.buttons[btn].style=t.group.style&&!t.group.buttons[btn].style?t.group.style:t.group.buttons[btn].style,t.group.buttons[btn].text=toMarkdown(t.group.buttons[btn].text),t.group.buttons[btn].disabled=!!t.group.buttons[btn].disabled&&toBoolean(t.group.buttons[btn].disabled);localClick=function(t){selbtn=t.item,btn={index:selbtn.index,text:selbtn.button.text,style:selbtn.button.style,size:selbtn.button.size,disabled:selbtn.button.disabled,event:t},e.trigger("button-clicked",btn)}}),riot.tag("rg-breadcrumbs",'<ol class="c-breadcrumbs" > <virtual each="{link, index in opts.breadcrumbs.links}"> <li class="c-breadcrumbs__crumb" hide="{link.istext}"><a class="c-link" href="{link.url}" onclick="{linkclicked}">{link.text}</a> <rg-badge style="{link.badge.style}" ghost="{link.badge.ghost}" rounded="{link.badge.rounded}" text="{link.badge.text}" if="{link.badge.text}"></rg-badge></li> <li class="c-breadcrumbs__crumb c-text--loud" show="{link.istext}">{link.text}</li> </virtual><yield /></ol>',"","",function(){var t=this;updateOpts=function(){t.opts.style&&(t.opts.badge.style=t.opts.style),t.opts.rounded&&(t.opts.badge.rounded=t.opts.rounded),t.opts.ghost&&(t.opts.badge.ghost=t.opts.ghost)},linkclicked=function(e){sellink=e.item.link,link={text:sellink.text,badge:sellink.badge.text,url:sellink.url},t.trigger("link-clicked",link)},t.on("before-mount",function(){t.opts.breadcrumbs||(t.opts.breadcrumbs={links:[]});for(index in t.opts.breadcrumbs.links)t.opts.breadcrumbs.links[index].badge||(t.opts.breadcrumbs.links[index].badge={});updateOpts()}),t.on("badge-clicked",function(e){t.trigger("badge-clicked",e)})}),riot.tag("rg-card",'<div class="c-card {\'u-\' + opts.card.shadow}"> <img class="o-image" riot-src="{opts.card.header.image}" if="{opts.card.header.image && (opts.card.header.text || opts.card.header.subhead)}"> <header class="c-card__header" if="{opts.card.header.text || opts.card.header.subhead}"><h2 class="c-heading c-heading--small"><rg-html content="{opts.card.header.text}"></rg-html><div class="c-heading__sub"><rg-html content="{opts.card.header.subhead}"></rg-html></div></h2></header><div class="c-card__item c-card__item{\'--\'+opts.card.header.style}" if="{opts.card.header.divider && opts.card.header.text}"></div> <div class"c-card__body"><div class="rg-card-content"> <rg-html content="<p class=\'c-paragraph\'>{opts.card.text}</p>" if="{opts.card.text}"></rg-html> <yield></div></div><div class="c-card__item c-card__item{\'--\'+opts.card.footer.style}" if="{opts.card.footer.divider && (opts.card.footer.text || (opts.card.footer.items.length > 0))}"></div><footer class="c-card__footer {\'c-card__footer--block\':opts.card.footer.block}" if="{(opts.card.footer.items.length > 0) || opts.card.footer.text}"><p class="c-text--quiet"><rg-html content="{opts.card.footer.text}" if="{opts.card.footer.text}"></rg-html></p><div class="c-input-group"> <button each="{button in opts.card.footer.items}" class="c-button c-button--block {\'c-button--active\':button.active} {\'c-button--\'+button.style}" disabled="{button.disabled}" onclick="{btnclicked}">{button.text}</button> </div></footer></div>',".rg-card-content {margin: 0.8em}","",function(t){var e=this;t.card||(t.card={header:{},footer:{items:[]}}),this.root._innerHTML&&(t.card.contents=toMarkdown(this.root._innerHTML)),t.card.header.text&&(t.card.header.text=toMarkdown(t.card.header.text)),t.card.header.subhead&&(t.card.header.subhead=toMarkdown(t.card.header.subhead)),t.card.footer.text&&(t.card.footer.text=toMarkdown(t.card.footer.text)),t.card.text&&(t.card.text=toMarkdown(t.card.text)),t.header&&(t.card.header.text=toMarkdown(t.header)),t.subhead&&(t.card.header.subhead=toMarkdown(t.subhead)),t.image&&(t.card.header.image=t.image),t.footer&&(t.card.footer.text=toMarkdown(t.footer)),t.block&&(t.card.footer.block=toBoolean(t.block)),t.divider&&(t.card.footer.divider=toBoolean(t.divider)),t.divider&&(t.card.header.divider=toBoolean(t.divider)),t.text&&(t.card.text=toMarkdown(t.text)),t.shadow&&(t.card.shadow=t.shadow),t.buttons&&(t.card.footer.items=t.buttons),btnclicked=function(t){selbtn=t.item.button,btn={text:selbtn.text},e.trigger("button-clicked",btn)}}),riot.tag("rg-chart","<canvas></canvas>",'rg-chart,[riot-tag="rg-chart"],[data-is="rg-chart"]{ display: inline-block; width: 100%; }',"",function(t){var e=this,a=!1;"undefined"==typeof Chart?loadJS(RG_CHART_CDN_CHARTJS,function(){a=!0,e.update()}):a=!0,this.on("mount",function(){a&&i()}),this.on("update",function(){a&&i()}),this.on("loaded",function(t){e.on("unmount",function(){t.destroy()})});var i=function(){Chart.defaults.global.responsive||(Chart.defaults.global.responsive=!0),t.chart||(t.chart={});var a=e.root.querySelector("canvas").getContext("2d"),i=new Chart(a,{type:e.opts.chart.type,data:e.opts.chart.data,options:e.opts.chart.options});e.trigger("loaded",i)}}),riot.tag2("rg-code",'<div class="editor"></div>','rg-code .editor,[riot-tag="rg-code"] .editor,[data-is="rg-code"] .editor{ position: absolute; top: 0; right: 0; bottom: 0; left: 0; }',"",function(t){var e=this;t.editor||(t.editor={code:""});var a=void 0,i=function(){a.setTheme("ace/theme/"+(t.editor.theme||"monokai")),a.getSession().setMode("ace/mode/"+(t.editor.mode||"html")),a.getSession().setTabSize(t.editor.tabsize||2),a.getSession().setUseSoftTabs(t.editor.softtabs),a.getSession().setUseWrapMode(t.editor.wordwrap),a.setReadOnly(t.editor.readonly)};this.on("mount",function(){if(a=ace.edit(e.root.querySelector(".editor")),a.$blockScrolling=1/0,e.on("update",function(e){i(),t.editor.code!=a.getValue()&&a.setValue(t.editor.code,1)}),t.url){var o=new XMLHttpRequest;o.onload=function(a){t.editor.code=a,e.update()},o.open("get",t.url,!0),o.send()}a.setValue(t.editor.code,1),a.getSession().on("change",function(i){t.editor.code=a.getValue(),e.trigger("onchange",a.getValue())}),i(),e.update()})}),riot.tag("rg-confetti","","","",function(t){function e(){cnv=document.getElementById(RG2_CONFETTI),cnv&&document.body.removeChild(cnv)}function a(){(i=document.createElement("canvas")).id=RG2_CONFETTI,i.width=1,i.height=1,i.style.left=0,i.style.top=0,i.style.width="100%",i.style.height="100%",i.style.position="absolute",t.confetti.message&&(RG2_CONFETTI_MSG=t.confetti.message),i.onclick=function(){n=!n,t.confetti.state=n,n?a():e(),confettistate={id:RG2_CONFETTI,state:n,message:t.confetti.message},o.trigger("confetti-clicked",confettistate)},document.body.appendChild(i),loadJS(t.confetti.url,s)}var i,o=this,n=!t.state||toBoolean(t.state);t.confetti||(t.confetti={state:n}),!t.confetti.url&&t.url&&(t.confetti.url=t.url),!t.confetti.message&&t.message&&(t.confetti.message=t.message);var s=function(){};"undefined"==typeof confetti&&!(i=this.root.querySelector("#"+RG2_CONFETTI))&&n&&a()}),riot.tag("rg-credit-card-number",'<input type="text" ref="cardinput" class="c-field card-no {icon} {\'c-field--success\': opts.valid}" oninput="{validate}" placeholder="{opts.placeholder}">','rg-credit-card-number .card-no,[riot-tag="rg-credit-card-number"] .card-no,[data-is="rg-credit-card-number"] .card-no{ padding-right: 60px; background-repeat: no-repeat; background-position: right center; background-size: 60px; } rg-credit-card-number .amex,[riot-tag="rg-credit-card-number"] .amex,[data-is="rg-credit-card-number"] .amex{ background-image: url(img/amex.png); } rg-credit-card-number .diners_club,[riot-tag="rg-credit-card-number"] .diners_club,[data-is="rg-credit-card-number"] .diners_club{ background-image: url(img/diners_club.png); } rg-credit-card-number .discover,[riot-tag="rg-credit-card-number"] .discover,[data-is="rg-credit-card-number"] .discover{ background-image: url(img/discover.png); } rg-credit-card-number .jcb,[riot-tag="rg-credit-card-number"] .jcb,[data-is="rg-credit-card-number"] .jcb{ background-image: url(img/jcb.png); } rg-credit-card-number .mastercard,[riot-tag="rg-credit-card-number"] .mastercard,[data-is="rg-credit-card-number"] .mastercard{ background-image: url(img/mastercard.png); } rg-credit-card-number .visa,[riot-tag="rg-credit-card-number"] .visa,[data-is="rg-credit-card-number"] .visa{ background-image: url(img/visa.png); }',"",function(t){function e(t){var e,a,i,o,n,s,r,d,l,c,u,p=[].indexOf||function(t){for(var e=0,a=this.length;e<a;e++)if(e in this&&this[e]===t)return e;return-1};i=[{name:"amex",icon:"images/amex.png",pattern:/^3[47]/,valid_length:[15]},{name:"diners_club",icon:"images/diners_club.png",pattern:/^30[0-5]/,valid_length:[14]},{name:"diners_club",icon:"images/diners_club.png",pattern:/^36/,valid_length:[14]},{name:"jcb",icon:"images/jcb.png",pattern:/^35(2[89]|[3-8][0-9])/,valid_length:[16]},{name:"laser",pattern:/^(6304|670[69]|6771)/,valid_length:[16,17,18,19]},{name:"visa_electron",pattern:/^(4026|417500|4508|4844|491(3|7))/,valid_length:[16]},{name:"visa",icon:"images/visa.png",pattern:/^4/,valid_length:[16]},{name:"mastercard",icon:"images/mastercard.png",pattern:/^5[1-5]/,valid_length:[16]},{name:"maestro",pattern:/^(5018|5020|5038|6304|6759|676[1-3])/,valid_length:[12,13,14,15,16,17,18,19]},{name:"discover",icon:"images/discover.png",pattern:/^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)/,valid_length:[16]}];var g={};for(null==g.accept&&(g.accept=function(){var t,a,o;for(o=[],t=0,a=i.length;t<a;t++)e=i[t],o.push(e.name);return o}()),l=0,c=(u=g.accept).length;l<c;l++)if(a=u[l],p.call(function(){var t,a,o;for(o=[],t=0,a=i.length;t<a;t++)e=i[t],o.push(e.name);return o}(),a)<0)throw"Credit card type '"+a+"' is not supported";return o=function(t){var o,n,s;for(s=function(){var t,a,o,n;for(n=[],t=0,a=i.length;t<a;t++)o=(e=i[t]).name,p.call(g.accept,o)>=0&&n.push(e);return n}(),o=0,n=s.length;o<n;o++)if(a=s[o],t.match(a.pattern))return a;return null},s=function(t){var e,a,i,o,n,s;for(i=0,a=o=0,n=(s=t.split("").reverse()).length;o<n;a=++o)e=+(e=s[a]),i+=a%2?(e*=2)<10?e:e-9:e;return i%10==0},n=function(t,e){var a;return a=t.length,p.call(e.valid_length,a)>=0},d=function(t){var e,i;return a=o(t),i=!1,e=!1,null!=a&&(i=s(t),e=n(t,a)),{card_type:a,valid:i&&e,luhn_valid:i,length_valid:e}},r=function(t){return t.replace(/[ -]/g,"")},function(){return d(r(t))}(t)}var a=this;this.on("update",function(){a.refs.cardinput.value!=t.cardnumber&&(a.refs.cardinput.value=t.cardnumber),a.validate()}),this.validate=function(){t.cardnumber=this.refs.cardinput.value;var i=e(t.cardnumber);t.valid=i.valid,a.icon=t.valid?i.card_type.name:""}}),riot.tag("rg-date",'<div class="container"> <input type="text" class="c-field" onclick="{open}" value="{opts.date.date.format(format)}" readonly> <div class="c-calendar c-calendar--high" if="{opts.date.isvisible}"> <button class="c-calendar__control" __disabled="{opts.date.min.isSame(opts.date.date, \'year\')}" onclick="{prevYear}">‹</button> <div class="c-calendar__header">{opts.date.date.format(yearFormat)}</div> <button class="c-calendar__control" __disabled="{opts.date.max.isSame(opts.date.date, \'year\')}" onclick="{nextYear}">›</button> <button class="c-calendar__control" __disabled="{opts.date.min.isSame(opts.date.date, \'month\')}" onclick="{prevMonth}">‹</button> <div class="c-calendar__header">{opts.date.date.format(monthFormat)}</div> <button class="c-calendar__control" __disabled="{opts.date.max.isSame(opts.date.date, \'month\')}" onclick="{nextMonth}">›</button> <div class="c-calendar__day">Mo</div> <div class="c-calendar__day">Tu</div> <div class="c-calendar__day">We</div> <div class="c-calendar__day">Th</div> <div class="c-calendar__day">Fr</div> <div class="c-calendar__day">Sa</div> <div class="c-calendar__day">Su</div> <button class="c-calendar__date {\'c-calendar__date--selected\': day.selected, \'c-calendar__date--today\': day.today}" __disabled="{day.disabled}" each="{day in startBuffer}" onclick="{select}">{day.date.format(dayFormat)}</button> <button class="c-calendar__date c-calendar__date--in-month {\'c-calendar__date--selected\': day.selected, \'c-calendar__date--today\': day.today}" __disabled="{day.disabled}" each="{day in days}" onclick="{select}">{day.date.format(dayFormat)}</button> <button class="c-calendar__date {\'c-calendar__date--selected\': day.selected, \'c-calendar__date--today\': day.today}" __disabled="{day.disabled}" each="{day in endBuffer}" onclick="{select}">{day.date.format(dayFormat)}</button> <button class="c-button c-button--block c-button--primary" __disabled="{opts.date.min.isAfter(moment(), \'day\') || opts.date.max.isBefore(moment(), \'day\')}" onclick="{setToday}">Today</button> </div> </div>','rg-date .container,[riot-tag="rg-date"] .container,[data-is="rg-date"] .container{ position: relative; display: inline-block; cursor: pointer; } rg-date .c-calendar,[riot-tag="rg-date"] .c-calendar,[data-is="rg-date"] .c-calendar{ position: absolute; min-width: 300px; margin-top: .5em; left: 0; }',"",function(t){function e(){var t=window,e=document,a=e.documentElement,i=e.getElementsByTagName("body")[0];return{width:t.innerWidth||a.clientWidth||i.clientWidth,height:t.innerHeight||a.clientHeight||i.clientHeight}}var a=this,i=!1,o=function(t){return moment.isMoment(t)||(t=moment(t)),t.isValid()?t:moment()},n=function(t){a.root.contains(t.target)||a.close(),a.update()},s=function(e){return{date:e||moment(),selected:t.date.date.isSame(e,"day"),today:moment().isSame(e,"day"),disabled:t.date.min&&t.date.min.isAfter(e)||t.date.max&&t.date.max.isBefore(e)}},r=function(){a.format="ddd D MMM YYYY",a.yearFormat="YYYY",a.monthFormat="MMMM",a.dayFormat="D",a.days=[],a.startBuffer=[],a.endBuffer=[];for(var e=moment(t.date.date).startOf("month"),i=moment(t.date.date).daysInMonth(),o=moment(t.date.date).endOf("month"),n=e.isoWeekday()-1;n>0;n-=1){d=moment(e).subtract(n,"days");a.startBuffer.push(s(d))}for(n=0;n<i;n++){var r=moment(e).add(n,"days");a.days.push(s(r))}for(n=o.isoWeekday()+1;n<=7;n++){var d=moment(o).add(n-o.isoWeekday(),"days");a.endBuffer.push(s(d))}},d=function(){t.date||(t.date={date:moment(),min:moment().subtract(1,"year"),max:moment().add(10,"year")}),t.date.date||(t.date.date=moment()),t.date.date=o(t.date.date),t.date.min&&(t.date.min=o(t.date.min),t.date.min.isAfter(moment(),"day")&&(t.date.date=moment(t.date.min))),t.date.max&&(t.date.max=o(t.date.max),t.date.max.isBefore(moment(),"day")&&(t.date.date=moment(t.date.max)))};this.on("before-mount",function(){try{t.date||(t.date={date:moment(),min:moment().subtract(1,"year"),max:moment().add(10,"year")}),t.date.date=o(t.date.date),t.date.min&&(t.date.min=o(t.date.min),t.date.min.isAfter(moment(),"day")&&(t.date.date=moment(t.date.min))),t.date.max&&(t.date.max=o(t.date.max),t.date.max.isBefore(moment(),"day")&&(t.date.date=moment(t.date.max)))}catch(t){i=!0,loadJS(RG_DATE_CDN_MOMENTJS,d)}d?t.date||(t.date={date:new Date,min:new Date,max:new Date}):t.date||(t.date={date:moment(),min:moment().subtract(1,"year"),max:moment().add(10,"year")})}),this.on("mount",function(){}),a.on("update",function(){t.date.date=o(t.date.date),r(),l()}),this.on("unmount",function(){document.removeEventListener("click",n)}),this.open=function(){t.date.isvisible=!0,a.trigger("open")},this.close=function(){t.date.isvisible&&(t.date.isvisible=!1,a.trigger("close"))},this.select=function(e){t.date.date=e.item.day.date,a.trigger("select",t.date.date)},this.setToday=function(){t.date.date=moment(),a.trigger("select",t.date.date)},this.prevYear=function(){t.date.date=t.date.date.subtract(1,"year")},this.nextYear=function(){t.date.date=t.date.date.add(1,"year")},this.prevMonth=function(){t.date.date=t.date.date.subtract(1,"month")},this.nextMonth=function(){t.date.date=t.date.date.add(1,"month")};var l=function(){var i=e(),o=a.root.querySelector(".c-calendar");if(o){if(!t.date.isvisible)return o.style.marginTop="",void(o.style.marginLeft="");var n=o.getBoundingClientRect();i.width<n.left+n.width&&(o.style.marginLeft=i.width-(n.left+n.width)-20+"px"),n.left<0&&(o.style.marginLeft="20px"),i.height<n.top+n.height&&(o.style.marginTop=i.height-(n.top+n.height)-20+"px")}};document.addEventListener("click",n)}),riot.tag("rg-drawer",'<div class="c-overlay c-overlay--dismissable" if="{opts.drawer.isvisible}" onclick="{close}"></div> <div class="o-drawer u-highest {\'o-drawer--\' + opts.drawer.position || \'c-drawer--top\'} {\'o-drawer--visible\': opts.drawer.isvisible}"> <div class="c-card"> <header class="c-card__header"><h2 class="c-heading c-heading--xsmall">{opts.drawer.header}<div class="c-heading__sub">{opts.drawer.subheading}</div></h2></header> <ul class="c-card--menu"> <li class="c-card__item {\'c-card__item--active\': active}" each="{opts.drawer.items}" onclick="{parent.select}"> {text} </li> </ul> <div class="c-card__body"> <yield></yield> </div></div><div class="c-card__footer"><div class="c-input-group"> <button class="c-button c-button--block" each="{opts.drawer.footer.items}" onclick="{parent.select}"> {text} </button> </div></div></div>',"","",function(t){var e=this;this.on("before-mount",function(){t.drawer||(t.drawer={header:"Notice",subheading:void 0,position:"top",isvisible:!0,footer:[]}),t.drawer.footer,t.header&&(t.drawer.header=t.header),t.subheading&&(t.drawer.subheading=t.subheading),t.position&&(t.drawer.position=t.position)}),this.close=function(){t.drawer.isvisible=!1,e.trigger("close")},this.select=function(a){t.drawer.items.forEach(function(t){return t.active=!1}),a.item.active=!0,e.trigger("select",a.item)}}),riot.tag("rg-ga","","","",function(t){!function(t,e,a,i,o,n,s){t.GoogleAnalyticsObject=o,t[o]=t[o]||function(){(t[o].q=t[o].q||[]).push(arguments)},t[o].l=1*new Date,n=e.createElement(a),s=e.getElementsByTagName(a)[0],n.async=1,n.src="//www.google-analytics.com/analytics.js",s.parentNode.insertBefore(n,s)}(window,document,"script",0,"ga"),ga("create",t.property,"auto"),ga("send","pageview")}),riot.tag2("rg-iframify",'<div class="iframify"> <div class="frame"> <yield></yield> </div> </div>','rg-iframify .iframify,[riot-tag="rg-iframify"] .iframify,[data-is="rg-iframify"] .iframify{ margin: 0; padding: 0; } rg-iframify iframe,[riot-tag="rg-iframify"] iframe,[data-is="rg-iframify"] iframe{ position: relative; width: 100%; border: 0; }',"",function(t){var e=this;this.on("mount",function(){iframify(e.root.querySelector(".frame"),e.opts)})}),riot.tag("rg-include","<div> {responseText} </div>","","",function(t){var e=this,a=function(){var a=new XMLHttpRequest;a.onload=function(i){t.unsafe?e.root.innerHTML=a.responseText:e.responseText=a.responseText,e.update(),e.trigger("loaded")},a.open("get",t.url,!0),a.send(),e.trigger("loading")};this.on("mount",function(){a()})}),riot.tag("rg-input",'<input type="{opts.input.type}" class="c-field {\'c-field--\'+opts.input.style}" required="{opts.input.required}" disabled="{opts.input.disabled}"riot-value="{opts.input.value}" placeholder="{opts.input.placeholder}" size="{opts.input.size}" min="{opts.input.min}" max="{opts.input.max}" step="{opts.input.step}"></input>',"","",function(t){var e=this;t.input||(t.input={type:"text",style:void 0,disabled:!1}),t.value&&(t.input.value=t.value),t.placeholder&&(t.input.placeholder=t.placeholder),t.type&&(t.input.type=t.type),t.style&&(t.input.style=t.style),t.disabled&&(t.input.disabled=toBoolean(t.disabled)),t.required&&(t.input.required=toBoolean(t.required)),t.min&&(t.input.min=toNumber(t.min)),t.max&&(t.input.max=toNumber(t.max)),t.step&&(t.input.step=toNumber(t.step)),t.size&&(t.input.size=toNumber(t.size)),t.input.type&&"posnum"===t.input.type.toLowerCase()&&(t.input.type="number",t.input.min=0),"number"!==t.input.type&&"range"!==t.input.type||(t.input.min&&!t.input.value&&(t.input.value=t.input.min),t.input.min&&t.input.value&&t.input.value<t.input.min&&(t.input.value=t.input.min),t.input.max&&t.input.value&&t.input.value>t.input.max&&(t.input.value=t.input.max)),e.on("update",function(t){e.trigger("change",t)}),e.on("updated",function(t){e.trigger("changed",t)})}),riot.tag("rg-textarea",'<textarea type="{opts.input.type}" class="c-field {\'c-field--\'+opts.input.style}" required="{opts.input.required}" disabled="{opts.input.disabled}"riot-value="{opts.input.value}" placeholder="{opts.input.placeholder}" size="{opts.input.size}"></textarea>',"","",function(t){var e=this;t.input||(t.input={type:"text",style:void 0,disabled:!1}),t.value&&(t.input.value=t.value),t.placeholder&&(t.input.placeholder=t.placeholder),t.type&&(t.input.type=t.type),t.style&&(t.input.style=t.style),t.disabled&&(t.input.disabled=toBoolean(t.disabled)),t.required&&(t.input.required=toBoolean(t.required)),t.size&&(t.input.size=toNumber(t.size)),e.on("update",function(t){e.trigger("change",t)}),e.on("updated",function(t){e.trigger("changed",t)})}),riot.tag("rg-list",'<div if="{opts.list.ordered}"><ol class="c-list c-list--ordered {\'c-list__item--unstyled\': opts.list.unstyled} {\'c-list--inline\': opts.list.inline}"><virtual each="{list in opts.list.items}"><li class="c-list__item {\'c-list__item--unstyled\': list.unstyled}"><rg-html content="{list.text}"></rg-html> <ol class="c-list c-list--ordered" each="{sub in list.items}"> <li class="c-list__item {\'c-list__item--unstyled\': sub.unstyled}"><rg-html content="{sub.text}"></rg-html><ol class="c-list c-list--ordered" each="{sub2 in sub.items}"> <li class="c-list__item {\'c-list__item--unstyled\': sub2.unstyled}"><rg-html content="{sub2.text}"></rg-html><ol class="c-list c-list--ordered" each="{sub3 in sub2.items}"> <li class="c-list__item {\'c-list__item--unstyled\': sub3.unstyled}"><rg-html content="{sub3.text}"></rg-html></ol></li> </ol></li></ol></li></li></virtual></ol"></div><div if="{!opts.list.ordered}"><ul class="c-list {\'c-list__item--unstyled\': opts.list.unstyled} {\'c-list--inline\': opts.list.inline}"><virtual each="{list in opts.list.items}"><li class="c-list__item {\'c-list__item--unstyled\': list.unstyled}"><rg-html content="{list.text}"></rg-html><ul class="c-list" each="{sub in list.items}"> <li class="c-list__item {\'c-list__item--unstyled\': sub.unstyled}"><rg-html content="{sub.text}"></rg-html><ul class="c-list" each="{sub2 in sub.items}"> <li class="c-list__item {\'c-list__item--unstyled\': sub2.unstyled}"><rg-html content="{sub2.text}"></rg-html><ul class="c-list" each="{sub3 in sub2.items}"> <li class="c-list__item {\'c-list__item--unstyled\': sub3.unstyled}"><rg-html content="{sub3.text}"></rg-html></ul></li> </ul></li></ul></li></li></virtual></ul"></div>',"",function(t){function e(t){for(i in t)t[i].text&&(t[i].text=toMarkdown(t[i].text)),t[i].items&&e(t[i].items)}t.list||(t.list={ordered:!1,unstyled:!1,inline:!1,items:[]}),t.list.ordered||(t.list.ordered=!1),t.list.unstyled||(t.list.unstyled=!1),t.list.inline||(t.list.inline=!1),t.list.items||(t.list.items=[]),t.ordered&&(t.list.ordered=toBoolean(t.ordered)),t.unstyled&&(t.list.unstyled=toBoolean(t.unstyled)),t.inline&&(t.list.inline=toBoolean(t.inline)),t.list.items&&e(t.list.items)}),riot.tag("rg-map",'<div ref="{opts.id}" class="rg-map" riot-style="width: 100%; min-height: 10vh; height: 85vh;"></div>','rg-map .rg-map,[riot-tag="rg-map"] .rg-map,[data-is="rg-map"] .rg-map{ margin: 0; padding: 0; width: 100%; height: 100%; } rg-map .rg-map img,[riot-tag="rg-map"] .rg-map img,[data-is="rg-map"] .rg-map img{ max-width: inherit; }',"",function(t){var e=this;window.rg=window.rg||{},window.rg.gmap=riot.observable({initialize:function(){window.rg.gmap.trigger("initialize")}}),this.on("before-mount",function(){t.map||(t.map={center:{lat:t.lat?Number(t.lat):-34.397,lng:t.lng?Number(t.lng):50.644},zoom:7}),t.id||(t.id="rg_map_id_"+Date.now()),t.apikey&&!t.map.apikey&&(t.map.apikey=t.apikey),t.lat&&t.map&&t.map.center.lat&&(t.map.center.lat=t.lat?Number(t.lat):t.map.center.lat),t.lng&&t.map&&t.map.center.lng&&(t.map.center.lng=t.lng?Number(t.lng):t.map.center.lng),t.zoom&&t.map&&(t.map.zoom=t.zoom?Number(t.zoom):t.map.zoom?t.map.zoom:8),t.type&&t.map&&(t.map.mapTypeId=t.type?t.type:t.map.mapTypeId?t.map.mapTypeId:"roadmap"),t.tilt&&t.map&&(t.map.tilt=t.tilt?Number(t.tilt):t.map.tilt?t.map.tilt:45),t.heading&&t.map&&(t.map.heading=t.heading?Number(t.heading):t.map.heading?t.map.heading:90)}),this.on("mount",function(){if(rg.gmap.on("initialize",function(){e1=e.root.querySelector(".rg-map"),e2=e.refs[0],t.map.mapObj=new google.maps.Map(e1,t.map),e.trigger("loaded",t.map.mapObj)}),!document.getElementById("rg_map_script_unqiue")){var a=document.createElement("script");a.setAttribute("id","rg_map_script_unqiue"),a.type="text/javascript",a.src="https://maps.googleapis.com/maps/api/js?key="+t.apikey+"&callback=window.rg.gmap.initialize",document.body.appendChild(a)}})}),riot.tag("rg-markdown","","","",function(t){var e=this,a=function(t){e.root.innerHTML=t},i=function(t){toMarkdown(t,a)};this.on("before-mount",function(){t.markdown||(t.markdown={content:t.content?t.content:e.root._innerHTML?e.root._innerHTML:void 0}),t.content&&(t.markdown.content=t.content),this.root._innerHTML&&(t.markdown.content=this.root._innerHTML),i(e.opts.markdown.content)}),this.on("update",function(){i(e.opts.markdown.content)})}),riot.tag("rg-modal",'<div class="c-overlay {c-overlay--dismissable: opts.modal.dismissable}" if="{opts.modal.isvisible}" onclick="{close}"><div class="c-overlay"><div class="o-modal {o-modal--ghost: opts.modal.ghost} {o-modal--full: opts.modal.full}" if="{opts.modal.isvisible}"><div class="c-card"><header class="c-card__header"><button if="{opts.modal.dismissable}" type="button" class="c-button c-button--close" onclick="{close}">×</button><h2 class="c-heading">{opts.modal.heading}</h2></header><div class="c-card__body o-panel"><yield></yield></div><footer class="c-card__footer" {\'c-card__footer--block\': !opts.modal.ghost}"><div class="c-input-group"><button each="{opts.modal.buttons}" type="button" class="c-button {c-button--block: blockbuttons} {\'c-button--\' + style}" onclick="{action}" riot-style="{style}"> {text} </button></div></footer></div></div>','rg-modal .o-modal--ghost .o-modal__footer .c-button,[riot-tag="rg-modal"] .o-modal--ghost .c-card__footer .c-button,[data-is="rg-modal"] .o-modal--ghost .c-card__footer .c-button{ margin: 0 .5em 0 0; }',"",function(t){var e=this;this.on("before-mount",function(){t.modal||(t.modal={isvisible:!0,dismissable:!0,full:!1,ghost:!1,heading:t.heading?t.heading:"Note",buttons:[{text:"Close",style:"brand",action:function(){this.close()}}],blockbuttons:!0})}),this.close=function(){t.modal.dismissable&&(t.modal.isvisible=!1,e.trigger("close"))}}),riot.tag("rg-pagination",'<div class="c-pagination"> <div class="c-pagination__controls c-pagination__controls--backward"> <button class="c-pagination__control" disabled="{opts.pagination.page <= 1}" onclick="{first}">«</button> <button class="c-pagination__control" disabled="{opts.pagination.page <= 1}" onclick="{back}">‹</button> </div> <div class="c-pagination__controls"> <span class="c-pagination__ellipsis" if="{opts.pagination.page > 2}">…</span> <button class="c-pagination__page" onclick="{back}" if="{opts.pagination.page > 1}">{opts.pagination.page - 1}</button> <button class="c-pagination__page c-pagination__page--current">{opts.pagination.page}</button> <button class="c-pagination__page" onclick="{forward}" if="{opts.pagination.page < opts.pagination.pages}">{opts.pagination.page + 1}</button> <span class="c-pagination__ellipsis" if="{opts.pagination.page < opts.pagination.pages - 1}">… </span> </div> <div class="c-pagination__controls pagination__controls--forward"> <button class="c-pagination__control" disabled="{opts.pagination.page >= opts.pagination.pages}" onclick="{forward}">›</button> <button class="c-pagination__control" disabled="{opts.pagination.page >= opts.pagination.pages}" onclick="{last}">»</button> </div></div>',"","",function(t){var e=this;this.on("before-mount",function(){t.pagination||(pagination={pages:10,page:1}),t.page&&t.pages&&(t.page=Number(t.page),t.pages=Number(t.pages),t.page>t.pages&&(t.page=t.pages)),t.page&&(t.pagination.page=Number(t.page)),t.pages&&(t.pagination.pages=Number(t.pages))}),this.on("page",function(){for(var t=e.root.querySelectorAll("button"),a=0;a<t.length;a++)t[a].blur()}),this.forward=function(){t.pagination.page++,e.trigger("page",t.pagination.page)},this.back=function(){t.pagination.page--,e.trigger("page",t.pagination.page)},this.first=function(){t.pagination.page=1,e.trigger("page",t.pagination.page)},this.last=function(){t.pagination.page=t.pagination.pages,e.trigger("page",t.pagination.page)}}),riot.tag("rg-phone-sim",'<div class="emulator"> <iframe class="screen" riot-src="{opts.phonesim.url}"><yield /></iframe> </div>','rg-phone-sim .emulator,[riot-tag="rg-phone-sim"] .emulator,[data-is="rg-phone-sim"] .emulator{ position: relative; width: 365px; height: 792px; background-image:url(\'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAW0AAAMYCAMAAAA3r0ZLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAwBQTFRFMDk6+vr6KTM0lJucMz4/PklKJS8wLTg5Qk1OxsjILzo7gomJ2NvbdH5/ho2O9fb2KzY3ztHRPEdIOkVGZWxtjJSVOEJDkpeYWGRluL2+KTQ1vcHBoaWlPUZHcnp6nKKjOkRF1NfXqa2tp62tZnBxanV2VmFiZ29wVl1eaXJzbXR04uTktbq7QElK1tnZipKTi5CRTlZXpKioo6mqXmlqUVlaOEFCSVFSUFxdISssT1tcTlpbJC4vIiwtTVlaJjAxIy0uTFhZS1dYJzEyKDIzSlZXPUhJOURFO0ZHSVVWKzU2P0pLKjQ1OENEND0+QEtMLDY3SFRVN0JDQ05PLTc4ND9ANUBBQUxNNkFCR1NUMTo7RE9QLjg5N0BBR1JTRlJTLzk6RVFSMjs8RVBRRlFSNj9AMzw9SFNUMj0+IissMTs8MDo7SVRVRFBRMDs8MTw9IiwsMz0+Mjw9SlVWQ09QLjk6NT4/S1ZXND4/JC4uQU1OIy0tQk5PTFdYTVhZQExNTllaJS8vJzIyP0tMLzg5LDc4KDMzNT9AKjU1N0FCNkBBJjAwIywtMDs7Mj09NkFBJjExLjk5LDc3N0JCNUBAKjU2MTw8LDU2Ljc4OUNEKDEyQU1NPEhIPEhJO0dHOkZGND8/Qk5ORFBQQ09PLTY3OUREPkpKPkpLPUlJT1pbP0tLJTAwPUlKJzAxKjM07u/vKTIzsbW2YGprtLm50tXWPkhJo6endn+A3d/f6uvreoOEg4yN2tvc/Pz8n6am8/T0VFtcm6CgJS4v4OLi5ufnYGdncnt8dHp7gYaHJC0uu8DAjJGRQkxNxMfHKzQ1YGtsS1NUaXN0bnh5yMzMyszMy83Oy8/PdoCAKDIy7O3tT1dYuLu70NTUbXd46Onq6erreoCA2dzc8PHx8vPz5OXlnaSkn6Wmqq6ucHZ2t7y8o6eoeoSEkJaWm5+gW2ZnZG5vqa+wOEFB09bWtru7qrCwcXd4t7u83eDgzM7O7/DwNT4+7e7uwMPDwcPEeH5/////70wnUQAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAA+NSURBVHja7N13nBTlGcDxEQI5AmJQBAkcnqhEDIhoWMt5iogmQbOaYNrqYrJh16gplmTVkILJpYCmF+DSE1JIcjRR7L333ntPYjQxvTl55tnr7N7t7uw+vDP3+/0x3G3hs5+vr++8M7s7eH75Xb5x+rOjN017aeq+tO++U1+atmn0s9M3Xl6BoFfm466ZOPROhIt259CJ19RS++7LdgW133a97O7aaI/a+VE0y+jRnUeF1p6wqfvvaz6+YVjT0jMyJ3rkeSdmzljaNKzh+OZuoE0TQmmvv67zLzrwmMY8wkXLNx5zYCfTdeur1p6wdeegblgKar8tbegc4lv/rirtjTMLT99/UVMKzgFLNS3avwA2c2Pl2n8tPHV1QxLJMks2rC6g/alC7ScvKozrhhyIFZRrKIzvi56sRHt94b/RIsZ1xeN7UYFuffna4/UJB68Er4rGHax648vUfmqkPnxBBrmqyixQv5FPlaP9Dz2eWdIEW9U1LdFjnQsG1n5ETz4dyowdavY+VE9XPTKQ9phddPfICjvk6lt3lruM6V97j132l26BK3S3BJAv79Gf9jN3BY85HKsadHhAedebSmtf+ofgEcOQqknDAsyLLi2pPTq4/0icatSRAefoUto7Bvc2oFSzGgLQHYtr3xTct5DVSA1XJgsD0puKaa99s9wzlwPImh5WzhXTl/5TRHt7uaN5GUI1bVmzqL64ufZfgkF/GD417rCA9e99tf8VzCPHoVPzjhPXaVv10d5bblzCyZE6nDIJ5pKde2u/Egz487Cp1zHlHr20h8otp50ETT2WgaeL7dCe2vcF/uOQqUsrA9z7emgHQ3thdEZLLpeL0kHYwq7BrdqjAv2ofEAnlU0EZaPjvTTgHdWlvXeEhnYu0VkuUoN7707tbW6X35oiciyc6C4yZxmaxPf2bTq0z5VfTo/IC8/20M5GZnAHy5JzO7Tvj85bCKlEzyIzdQdvLNxf0L4wmMQjMgnmemlHZubOBcQXqvb0CO0jk720o3OmIdhPTlft4FTrth5ju55tK8bbq/YG+emUiLzqTC/t6Lz1cYoYbwi0r47QisTz0j2w0xE6ngxWJVeLdrD+WxCZVx3J9ba0QNeAnj9T/twuOi87GcF9pLSdKM8U7Q2rV6+O0jcQMoXJJB2t96tzorzB99Y2NzfPjdQL9zLJZDJynw2YK85rvZ1ku9Cjuq+4xXknb4Js+XxU/WsQ5wnec7LlDcn6d544P+ddLFu+zlT/Vorzxd5k2fIJqfq3TJwney/Lls+RGBwniPPL3g6y5aOWBstWcd7BmypbLjhS/1LiPNWTTTMWBik02mijTWijTWijjTbFVTuZTqSTRW8OUzqJdpGyxT89mU2ELYv25kO4+LvnyUT4kmj3LV38YzjpGmin3dReIm2pF9BlU+LmMDmnrdBbUntQje0trj2o5m2FPlBiTWKQQm9R7cG03nZAexCFNtpoE9poE9poo01oo01oo01oo4021VT7MxIUBik02mijTeG1D5agMEih0UYbbUIbbUIbbbQJbbQJbbQJbbTRplppf1qCwiCFRhtttCm89lwJCoMUGm200Sa00Sa00Uab0Eab0Eab0EY73tqnS1AYpNBoo402hdc+VILCIIVGG220CW20CW200Sa00Sa00aYC9GkSFAYpNNpoo01oR0v7bRIUBik02mijTWijTWijjTahjTah7bL2hyUoDFJotNFGm9BGm0ppv0OCwiCFRhtttAlttAlttNEmtOOhfbwEhUEKjTbaaBPaaBPaLmi/T4LCIIVGG220CW20CW200ab6aS+UoDBIodFGG21CG21C2wXt4yQoDFJotNFGm9BGm9BGe7BpL5KgMEih0UYbbUIbbULbBe0PSFAYpNBoo402oY02oY32YNP+oASFQQqNNtpoE9poE9poDzbtj0hQGKTQaKONNqGNNpXS/qkEhUEKfYwEhUEKjTbaaBPaaBPaaA827Y9LUBik0GijjTahHS3tn0lQGKTQCyQoDFJotNFGm9BGm9BGG22qn/anJCgMUmi00Uabwmv/RILCIIVukKAwSKHRRhttQhttQhtttKl+2p+UoDBIodFGG20Kr/09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\'); background-repeat: no-repeat; background-position: center; background-size: cover; } rg-phone-sim .screen,[riot-tag="rg-phone-sim"] .screen,[data-is="rg-phone-sim"] .screen{ position: absolute; top: 105px; left: 22px; background-color: white; width: 320px; height: 568px; border: 0; }',"",function(t){this.on("before-mount",function(){t.phonesim||(t.phonesim={url:void 0}),t.url&&(t.phonesim.url=t.url)})}),riot.tag("rg-placeholdit",'<img riot-src="https://placeholdit.imgix.net/~text?bg={opts.placeholdit.background}&txtclr={opts.placeholdit.color}&txt={opts.placeholdit.text}&txtsize={opts.placeholdit.textsize}&w={opts.placeholdit.width}&h={opts.placeholdit.height}&fm={opts.placeholdit.format}">',"","",function(t){this.on("before-mount",function(){t.placeholdit||(t.placeholdit={}),t.placeholdit.width=t.placeholdit.width||450,t.placeholdit.height=t.placeholdit.height||250,t.placeholdit.background=t.placeholdit.background||"000",t.placeholdit.color=t.placeholdit.color||"fff",t.placeholdit.text=t.placeholdit.text||t.placeholdit.width+" x "+t.placeholdit.height,t.placeholdit.textsize=t.placeholdit.textsize||30,t.placeholdit.format=t.placeholdit.format||"png",t.width&&(t.placeholdit.width=Number(t.width)),t.height&&(t.placeholdit.height=Number(t.height)),t.background&&(t.placeholdit.background=t.background),t.color&&(t.placeholdit.color=t.color),t.text&&(t.placeholdit.text=t.text),t.textsize&&(t.placeholdit.textsize=Number(t.textsize)),t.format&&(t.placeholdit.text=t.format)})}),riot.tag2("rg-raw","<span></span>","","",function(t){this.on("mount update",function(){this.root.innerHTML=t.content||""})}),riot.tag("rg-select",'<input type="{opts.select.filter ? \'search\' : \'text\'}" ref="selectfield" class="c-field" placeholder="{opts.select.placeholder}" onkeydown="{navigate}" oninput="{filterOptions}" onfocus="{open}" __readonly="{!opts.select.filter}"> <ul class="c-card c-card--menu u-high" if="{opts.select.isvisible}"> <li each="{options}" no-reorder onclick="{parent.select}" class="c-card__item {\'c-card__item--active\': selected, \'c-card__item--disabled\': disabled, \'c-card--menu__item--hover\': active}"> {text} </li> </ul>','rg-select .c-card--menu,[riot-tag="rg-select"] .c-card--menu,[data-is="rg-select"] .c-card--menu{ position: relative; }',"",function(t){function e(){var t=window,e=document,a=e.documentElement,i=e.getElementsByTagName("body")[0];return{width:t.innerWidth||a.clientWidth||i.clientWidth,height:t.innerHeight||a.clientHeight||i.clientHeight}}var a=this;t.select||(t.select={options:[]});var i=function(t){a.root.contains(t.target)||a.close(),a.update()},o=function(){for(var e=0;e<t.select.options.length;e++){var i=t.select.options[e];if(i.selected){a.refs.selectfield.value=i.text;break}}};this.filterOptions=function(){a.options=t.select.options,t.select.filter&&(a.options=a.options.filter(function(e){var i=e[t.select.filter];return i&&i.toLowerCase().indexOf(a.refs.selectfield.value.toLowerCase())>-1})),a.trigger("filter",a.refs.selectfield.value)};var n=function(){var i=e(),o=a.root.querySelector(".c-card--menu");if(o){if(!t.select.isvisible)return o.style.marginTop="",void(o.style.marginLeft="");var n=o.getBoundingClientRect();i.width<n.left+n.width&&(o.style.marginLeft=i.width-(n.left+n.width)-20+"px"),n.left<0&&(o.style.marginLeft="20px"),i.height<n.top+n.height&&(o.style.marginTop=i.height-(n.top+n.height)-20+"px")}};this.navigate=function(e){if([13,38,40].indexOf(e.keyCode)>-1&&!t.select.isvisible)return e.preventDefault(),a.open(),!0;var i=a.options.length;if(i>0&&[13,38,40].indexOf(e.keyCode)>-1){e.preventDefault();for(var o=null,n=0;n<i;n++)if(a.options[n].active){o=n;break}null!=o&&(a.options[o].active=!1),38==e.keyCode?null==o||0==o?a.options[i-1].active=!0:a.options[o-1].active=!0:40==e.keyCode?null==o||o==i-1?a.options[0].active=!0:a.options[o+1].active=!0:13==e.keyCode&&null!=o&&a.select({item:a.options[o]})}return!0},this.open=function(){t.select.isvisible=!0,a.trigger("open")},this.close=function(){t.select.isvisible&&(t.select.isvisible=!1,a.trigger("close"))},this.select=function(e){t.select.options.forEach(function(t){return t.selected=!1}),e.item.selected=!0,o(),a.filterOptions(),t.select.isvisible=!1,a.trigger("select",e.item)},this.on("before-mount",function(){t.filter&&(filter=toBoolean(t.filter),filter?t.select.filter="text":t.select.filter=void 0),t.placeholder&&(t.select.placeholder=t.placeholder)}),this.on("mount",function(){o(),a.filterOptions(),document.addEventListener("click",i),a.update()}),this.on("update",function(){t.select.filter||o(),n()}),this.on("unmount",function(){document.removeEventListener("click",i)})}),riot.tag("rg-tabs",'<div class="c-tabs {\'c-tabs--\' + opts.tabs.style}"> <div class="c-tabs__headings"> <div each="{opts.tabs.tabs}" class="c-tab-heading {\'c-tab-heading--active\': active, \'c-tab-heading--disabled\': disabled}" onclick="{parent.open}"> {heading} </div> </div> <div each="{opts.tabs.tabs}" class="c-tabs__tab {\'c-tabs__tab--active\': active}"> <div if="{text}"> {text} </div> <div if="{include}"> {include.responseText} </div> </div></div>',"","",function(t){var e=this,a=function(t){var a=new XMLHttpRequest;a.onload=function(i){var o=e.root.querySelector(".c-tabs__tab--active");o&&(o.innerHTML=a.responseText),e.trigger("loaded",t)},a.open("get",t.include,!0),a.send(),e.trigger("loading",t)};this.open=function(a){var i=a.item;i.disabled||i.active||(t.tabs.tabs.forEach(function(t){t.active=!1}),e.trigger("open",i),i.active=!0)},this.on("before-mount",function(){t.tabs||(t.tabs={style:"default",tabs:[]}),t.style&&(t.tabs.style=t.style)}),this.on("update",function(){t.tabs||(t.tabs={}),Array.isArray(t.tabs.tabs)&&t.tabs.tabs.forEach(function(t){!t.disabled&&t.active&&t.include&&a(t)})})}),riot.tag("rg-tags",'<div class="c-tags"> <span class="c-tags__container"> <button each="{opts.tags.tags}" onclick="{removeTag}" type="c-button" class="c-button c-button--{style} c-tag"> {text} <span class="c-tag__close">×</span> </button> </span> <div class="c-tags__field-container"> <input type="{opts.tags.filter ? \'search\' : \'text\'}" ref="selectfield" class="c-field" placeholder="{opts.tags.placeholder}" onkeydown="{navigate}" oninput="{filterOptions}" onfocus="{open}" __readonly="{!opts.tags.filter}"> <ul class="c-card c-card--menu u-higher" if="{opts.tags.isvisible}"> <li each="{options}" no-reorder onclick="{parent.select}" class="c-card__item '+" {'c-card__item--active': selected, 'c-card__item--disabled': disabled, 'c-menu__item--hover': active}\"> {text} </li> </ul> </div></div>",'rg-tags .c-card--menu,[riot-tag="rg-tags"] .c-card--menu,[data-is="rg-tags"] .c-card--menu{ position: relative; }',"",function(t){function e(){var t=window,e=document,a=e.documentElement,i=e.getElementsByTagName("body")[0];return{width:t.innerWidth||a.clientWidth||i.clientWidth,height:t.innerHeight||a.clientHeight||i.clientHeight}}var a=this;t.tags?t.tags.style||(t.tags.style="default"):t.tags={options:[],tags:[]},t.tags.options||(t.tags.options=[]),t.tags.tags||(t.tags.tags=[]),t.style&&(t.tags.style=t.style),t.placeholder&&(t.tags.placeholder=t.placeholder),t.filter&&(filter=toBoolean(t.filter),filter?t.tags.filter="text":t.tags.filter=void 0);var o=t.tags.style;for(i=0;i<t.tags.options.length;i++)t.tags.options[i].style||(t.tags.options[i].style=o);for(i=0;i<t.tags.tags.length;i++)t.tags.tags[i].style||(t.tags.tags[i].style=o);var n=function(t){a.root.contains(t.target)||a.close(),a.update()},s=function(){a.refs.selectfield.value="";for(var e=0;e<t.tags.options.length;e++)t.tags.options[e].selected=!1};this.filterOptions=function(){a.options=t.tags.options,t.tags.filter&&(a.options=a.options.filter(function(e){var i=e[t.tags.filter];return i&&i.toLowerCase().indexOf(a.refs.selectfield.value.toLowerCase())>-1})),a.trigger("filter",a.refs.selectfield.value)};var r=function(){var i=e(),o=a.root.querySelector(".c-card--menu");if(o){if(!t.tags.isvisible)return o.style.marginTop="",void(o.style.marginLeft="");var n=o.getBoundingClientRect();i.width<n.left+n.width&&(o.style.marginLeft=i.width-(n.left+n.width)-20+"px"),n.left<0&&(o.style.marginLeft="20px"),i.height<n.top+n.height&&(o.style.marginTop=i.height-(n.top+n.height)-20+"px")}};this.navigate=function(e){if([13,38,40].indexOf(e.keyCode)>-1&&!t.tags.isvisible)return e.preventDefault(),a.open(),!0;var i=a.options.length;if(i>0&&[13,38,40].indexOf(e.keyCode)>-1){e.preventDefault();for(var o=null,n=0;n<i;n++)if(a.options[n].active){o=n;break}null!=o&&(a.options[o].active=!1),38==e.keyCode?null==o||0==o?a.options[i-1].active=!0:a.options[o-1].active=!0:40==e.keyCode?null==o||o==i-1?a.options[0].active=!0:a.options[o+1].active=!0:13==e.keyCode&&null!=o&&a.select({item:a.options[o]})}return!0},this.open=function(){t.tags.isvisible=!0,a.trigger("open")},this.close=function(){t.tags.isvisible&&(t.tags.isvisible=!1,a.trigger("close"))},this.select=function(e){t.tags.options.forEach(function(t){return t.selected=!1}),e.item.selected=!0,a.addTag(e.item),s(),a.filterOptions(),a.trigger("select",e.item)},this.addTag=function(e){-1==t.tags.tags.indexOf(e)&&t.tags.tags.push(e)},this.removeTag=function(e){t.tags.tags=t.tags.tags.filter(function(t){if(t._id!=e.item._id)return t})},this.on("mount",function(){s(),a.filterOptions(),document.addEventListener("click",n),a.update()}),this.on("update",function(){t.tags.options.forEach(function(t){t._id=t._id||(Math.floor(60466175*Math.random())+1679615).toString(36)}),t.tags.tags.forEach(function(t){t._id=t._id||(Math.floor(60466175*Math.random())+1679615).toString(36)}),t.tags.filter||s(),r()}),this.on("unmount",function(){document.removeEventListener("click",n)})}),riot.tag("rg-toasts",'<div if="{opts.toasts.isvisible}" class="c-alerts {\'c-alerts--\' + opts.toasts.position}"> <div each="{opts.toasts.toasts}" class="c-alert {\'c-alert--\' + style}" if="{isvisible}" onclick="{parent.toastClicked}"> {text} </div> </div>',"","",function(t){var e=this;this.toastClicked=function(t){var a=t.item;window.clearTimeout(a.timer),a.isvisible=!1,e.trigger("select",a)};var a=1,i=function(){return a++};this.on("mount",function(){t.toasts&&Array.isArray(t.toasts.toasts)&&(t.toasts.position=t.toasts.position||"bottomright",t.toasts.toasts.forEach(function(t){void 0===t.isvisible&&(t.isvisible=!0),t.id=t.id||i(),t.timer||t.sticky||(t.startTimer=function(){t.timer=window.setTimeout(function(){t.isvisible=!1,e.trigger("close",t),e.update()},t.timeout||6e3)},t.startTimer())}),t.toasts.isvisible=t.toasts.toasts.filter(function(t){return t.isvisible}).length>0)})}),riot.tag("rg-toggle",'<div class="c-toggle {\'c-toggle--\' + opts.toggle.style}"> <label class="c-toggle__wrapper"> <input type="checkbox" checked="{opts.toggle.checked}" onclick="{toggle}"> <div class="c-toggle__track"> <div class="c-toggle__handle"></div> </div> </label> <rg-html content="{opts.toggle.text}"><rg-html></div>',".c-toggle{padding-top: 0.5vh;}","",function(t){var e=this;t.toggle||(t.toggle={style:"default"}),t.toggle.text&&(t.toggle.text=toMarkdown(t.toggle.text)),t.text&&(t.toggle.text=toMarkdown(t.text)),t.style&&(t.toggle.style=t.style),t.checked&&(t.toggle.checked=toBoolean(t.checked)),this.on("mount",function(){t.toggle||(t.toggle={checked:!1})}),this.toggle=function(){t.toggle.checked=!t.toggle.checked,e.trigger("toggle",t.toggle.checked)}}),riot.tag2("rg-unsplash",'<img class="o-image" riot-src="https://unsplash.it/{opts.unsplash.greyscale}{opts.unsplash.width}/{opts.unsplash.height}/?{options}">',"","",function(t){var e=this;this.on("before-mount",function(){e.options="",t.unsplash||(t.unsplash={}),t.unsplash.width=t.unsplash.width||450,t.unsplash.height=t.unsplash.height||250,t.unsplash.greyscale&&(t.unsplash.greyscale="g/"),t.unsplash.random&&(e.options+="random&"),t.unsplash.blur&&(e.options+="blur&"),t.unsplash.image&&(e.options+="image="+t.unsplash.image+"&"),void 0!==t.unsplash.gravity&&(e.options+="gravity="+t.unsplash.gravity),t.width&&(t.unsplash.width=Number(t.width)),t.height&&(t.unsplash.height=Number(t.height)),t.image&&(t.unsplash.image="image="+Number(t.image)+"&")})});