diff --git a/dist/css/grapes.min.css b/dist/css/grapes.min.css index 20514e2c6..3f321c97d 100644 --- a/dist/css/grapes.min.css +++ b/dist/css/grapes.min.css @@ -3,4 +3,4 @@ @charset "UTF-8";.sp-alpha-handle,.sp-slider{opacity:.8;background-color:#ccc}.fa,.wte-fonts:before{-moz-osx-font-smoothing:grayscale}.fa-fw,.fa-li,.sp-container button,.wte-pn-panel{text-align:center}.sp-container{position:absolute;top:0;left:0;display:inline-block;z-index:9999994;overflow:hidden}.sp-container.sp-flat,.sp-top{position:relative}.sp-container,.sp-container *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.sp-top{width:100%;display:inline-block}.sp-alpha-handle,.sp-color,.sp-dragger,.sp-hue,.sp-sat,.sp-slider,.sp-top-inner,.sp-val{position:absolute}.sp-top-inner{top:0;left:0;bottom:0;right:0}.sp-color{top:0;left:0;bottom:0}.sp-hue{top:0;right:0;bottom:0;height:100%}.sp-clear-enabled .sp-hue{top:33px;height:77.5%}.sp-fill{padding-top:80%}.sp-sat,.sp-val{top:0;left:0;right:0;bottom:0}.sp-alpha-enabled .sp-top{margin-bottom:18px}.sp-alpha-enabled .sp-alpha{display:block}.sp-alpha,.sp-clear{display:none}.sp-alpha-handle{top:-4px;bottom:-4px;left:50%;background:#fff;opacity:.8}.sp-alpha{bottom:-14px;right:0;left:0;height:8px}.sp-alpha-inner{border:1px solid #333}.sp-clear.sp-clear-display{background-position:center}.sp-clear-enabled .sp-clear{display:block;position:absolute;top:0;right:0;bottom:0;left:84%;height:28px}.sp-alpha,.sp-alpha-handle,.sp-clear,.sp-container,.sp-container button,.sp-container.sp-dragging .sp-input,.sp-dragger,.sp-preview,.sp-replacer,.sp-slider{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.sp-container.sp-buttons-disabled .sp-button-container,.sp-container.sp-input-disabled .sp-input-container,.sp-container.sp-palette-buttons-disabled .sp-palette-button-container,.sp-initial-disabled .sp-initial,.sp-palette-disabled .sp-palette-container,.sp-palette-only .sp-picker-container{display:none}.sp-sat{background-image:-webkit-gradient(linear,0 0,100% 0,from(#FFF),to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(left,#FFF,rgba(204,154,129,0));background-image:-moz-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:-o-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:-ms-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:linear-gradient(to right,#fff,rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";filter:progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81')}.sp-val{background-image:-webkit-gradient(linear,0 100%,0 0,from(#000),to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-moz-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-o-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-ms-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:linear-gradient(to top,#000,rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000')}.sp-hue{background:-moz-linear-gradient(top,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%);background:-ms-linear-gradient(top,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%);background:-o-linear-gradient(top,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%);background:-webkit-gradient(linear,left top,left bottom,from(red),color-stop(.17,#ff0),color-stop(.33,#0f0),color-stop(.5,#0ff),color-stop(.67,#00f),color-stop(.83,#f0f),to(red));background:-webkit-linear-gradient(top,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%);background:linear-gradient(to bottom,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}.sp-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00')}.sp-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00')}.sp-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff')}.sp-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff')}.sp-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff')}.sp-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000')}.sp-hidden{display:none!important}.sp-cf:after,.sp-cf:before{content:"";display:table}.sp-cf:after{clear:both}@media (max-device-width:480px){.sp-color{right:40%}.sp-hue{left:63%}.sp-fill{padding-top:60%}}.sp-dragger{border-radius:5px;height:5px;width:5px;border:1px solid #fff;top:0;left:0}.sp-slider{top:0;right:-1px;background:#fff;opacity:.8}.sp-container{border:1px solid #f0c49B;padding:0}.sp-clear,.sp-color,.sp-container,.sp-container button,.sp-container input,.sp-hue{font:400 12px "Lucida Grande","Lucida Sans Unicode","Lucida Sans",Geneva,Verdana,sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.sp-top{margin-bottom:3px}.sp-clear,.sp-color,.sp-hue{border:1px solid #666}.sp-input-container{float:right;width:100px;margin-bottom:4px}.sp-initial-disabled .sp-input-container,.sp-input{width:100%}.sp-input{font-size:12px!important;border:1px inset;padding:4px 5px;margin:0;background:0 0;border-radius:3px;color:#222}.sp-input:focus{border:1px solid orange}.sp-input.sp-validation-error{border:1px solid red;background:#fdd}.sp-palette-container,.sp-picker-container{float:left;position:relative;padding:10px 10px 300px;margin-bottom:-290px}.sp-picker-container{width:172px}.sp-palette-only .sp-palette-container{border:0}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;cursor:pointer}.sp-palette .sp-thumb-el.sp-thumb-active,.sp-palette .sp-thumb-el:hover{border-color:orange}.sp-thumb-el{position:relative}.sp-initial{float:left;border:1px solid #333}.sp-initial span{width:30px;height:25px;border:none;display:block;float:left;margin:0}.sp-initial .sp-clear-display{background-position:center}.sp-button-container,.sp-palette-button-container{float:right}.sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:4px;display:inline-block;border:1px solid #91765d;background:#eee;color:#333;vertical-align:middle}.sp-replacer.sp-active,.sp-replacer:hover{border-color:#F0C49B;color:#111}.sp-replacer.sp-disabled{cursor:default;border-color:silver;color:silver}.sp-dd{padding:2px 0;height:16px;line-height:16px;float:left;font-size:10px}.sp-preview{width:25px;height:20px;border:1px solid #222;margin-right:5px;float:left;z-index:0}.sp-palette{max-width:220px}.sp-palette .sp-thumb-el{width:16px;height:16px;margin:2px 1px;border:1px solid #d0d0d0}.sp-container{padding-bottom:0}.sp-container button{background-color:#eee;background-image:-webkit-linear-gradient(top,#eee,#ccc);background-image:-moz-linear-gradient(top,#eee,#ccc);background-image:-ms-linear-gradient(top,#eee,#ccc);background-image:-o-linear-gradient(top,#eee,#ccc);background-image:linear-gradient(to bottom,#eee,#ccc);border:1px solid #ccc;border-bottom:1px solid #bbb;border-radius:3px;font-size:14px;line-height:1;vertical-align:middle}.sp-container button:hover{background-color:#ddd;background-image:-webkit-linear-gradient(top,#ddd,#bbb);background-image:-moz-linear-gradient(top,#ddd,#bbb);background-image:-ms-linear-gradient(top,#ddd,#bbb);background-image:-o-linear-gradient(top,#ddd,#bbb);background-image:linear-gradient(to bottom,#ddd,#bbb);border:1px solid #bbb;border-bottom:1px solid #999;cursor:pointer}.sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-moz-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-ms-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-o-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee}.sp-cancel{margin:0 5px 0 0;padding:2px;vertical-align:middle}.fa.fa-pull-left,.fa.pull-left{margin-right:.3em}.sp-palette span.sp-thumb-active,.sp-palette span:hover{border-color:#000}.sp-alpha,.sp-preview,.sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-alpha-inner,.sp-preview-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.fa,.fa-stack{display:inline-block}.sp-palette .sp-thumb-inner{background-position:50% 50%;background-repeat:no-repeat}.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=)}.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=)}.sp-clear-display{background-repeat:no-repeat;background-position:center;background-image:url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==)}/*! * Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot?v=4.5.0);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0) format("embedded-opentype"),url(../fonts/fontawesome-webfont.woff2?v=4.5.0) format("woff2"),url(../fonts/fontawesome-webfont.woff?v=4.5.0) format("woff"),url(../fonts/fontawesome-webfont.ttf?v=4.5.0) format("truetype"),url(../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased}.fa-lg{font-size:1.3333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857em}.fa-ul{padding-left:0;margin-left:2.1428571429em;list-style-type:none}.fa.fa-pull-right,.fa.pull-right{margin-left:.3em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.1428571429em;width:2.1428571429em;top:.1428571429em}.fa-li.fa-lg{left:-1.8571428571em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right,.pull-right{float:right}.pull-left{float:left}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{filter:none}.opac50,.wte-clm-tags #wte-clm-close,.wte-freezed{opacity:.5;filter:alpha(opacity=50)}.fa-stack{position:relative;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}@font-face{font-family:font3336;src:url(../fonts/main-fonts.eot?v=5);src:url(../fonts/main-fonts.woff?v=5) format("woff"),url(../fonts/main-fonts.ttf?v=5) format("truetype"),url(../fonts/main-fonts.svg?v=5) format("svg"),url(../fonts/main-fonts.eot?v=5) format("embedded-opentype");font-weight:400;font-style:normal}.wte-fonts:before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;font-size:5em}.wte-editor,.wte-mdl-container{font-family:Helvetica,sans-serif}.wte-f-b1:before{content:'q'}.wte-f-b2:before{content:'w'}.wte-f-b3:before{content:'e'}.wte-f-b37:before{content:'r'}.wte-f-hero:before{content:'t'}.wte-f-h1p:before{content:'y'}.wte-f-3ba:before{content:'u'}.wte-f-image:before{content:'i'}.wte-f-text:before{content:'o'}.wte-f-quo:before{content:'p'}.wte-clm-tags #wte-clm-new,.wte-invis-invis,.wte-no-app{background-color:transparent;border:none;color:inherit}#wte-rte-toolbar,.sp-container,.wte-bg-main,.wte-clm-tags .wte-sm-colorp-c,.wte-editor,.wte-mdl-dialog,.wte-nv-item .wte-nv-title-c,.wte-pn-panel,.wte-sm-sector .wte-sm-colorp-c{background-color:#444}.wte-no-app{height:10px}.wte-test::btn{color:'#fff'}.checker-bg,.wte-checker-bg,.wte-clm-tags .wte-sm-property .wte-sm-layer>#wte-sm-preview-box,.wte-sm-sector .wte-sm-property .wte-sm-layer>#wte-sm-preview-box{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}#wte-rte-toolbar .wte-rte-btn,.wte-btn-prim,.wte-btnt,.wte-clm-tags .wte-sm-composite.wte-clm-field,.wte-clm-tags .wte-sm-field.wte-sm-composite,.wte-clm-tags .wte-sm-stack #wte-sm-add,.wte-color-main,.wte-mdl-dialog,.wte-pn-btn,.wte-pn-panel,.wte-sm-sector .wte-sm-composite.wte-clm-field,.wte-sm-sector .wte-sm-field.wte-sm-composite,.wte-sm-sector .wte-sm-stack #wte-sm-add{color:#ddd}.wte-btnt.wte-pn-active,.wte-color-active,.wte-pn-btn.wte-pn-active{color:#f8f8f8}.wte-bdrag{position:absolute;z-index:10;width:auto}.clear{clear:both}.no-select,.wte-clm-tags #wte-clm-close,.wte-clm-tags #wte-clm-tag-label,.wte-com-no-select,.wte-com-no-select img{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.wte-editor{position:relative;box-sizing:border-box;height:100%;min-width:1250px}.wte-btn-prim,.wte-btn-prim:active{background-color:rgba(255,255,255,.1)}.wte-freezed{pointer-events:none}.wte-btn-prim{border-radius:2px;cursor:pointer;padding:.5em;border:none}.wte-input{background-color:rgba(0,0,0,.3);border:1px solid rgba(0,0,0,.1);border-radius:2px;box-shadow:1px 1px 0 rgba(255,255,255,.1);box-sizing:border-box;color:#ddd;padding:.5em 1em}.wte-cv-canvas{background-color:rgba(0,0,0,.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.wte-cv-canvas>iframe{background-color:#fff;height:100%;outline:0;width:100%;border:none;margin:0 auto;display:block}.wte-cv-canvas .wte-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.wte-cv-canvas .wte-highlighter,.wte-cv-canvas .wte-highlighter-sel{position:absolute;outline:#3b97e3 solid 1px;pointer-events:none}.wte-cv-canvas .wte-highlighter-warning{outline:#ffca6f solid 3px}.wte-cv-canvas .wte-highlighter-sel{outline:#3b97e3 solid 3px}.wte-cv-canvas #wte-tools{width:100%;position:absolute;top:0;left:0;outline:0}.wte-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.wte-cv-canvas *{box-sizing:border-box}.wte-frame{transition:width .35s ease}.btn-cl,.wte-am-assets-cont #wte-am-close,.wte-mdl-dialog .wte-mdl-btn-close{font-size:25px;opacity:.3;filter:alpha(opacity=30);cursor:pointer}.btn-cl:hover,.wte-am-assets-cont #wte-am-close:hover,.wte-mdl-dialog .wte-mdl-btn-close:hover{opacity:.7;filter:alpha(opacity=70)}.dragged,.wte-nv-opac50{opacity:.5;filter:alpha(opacity=50)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move!important}.dragged{position:absolute;z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none!important;margin:0!important;outline:0!important}.wte-com-dashed *{outline:#888 dashed 1px;outline-offset:-2px;box-sizing:border-box}.wte-cv-canvas .wte-comp-selected{outline:#3b97e3 solid 3px!important}.wte-com-hover,div.wte-com-hover{outline:#3b97e3 solid 1px}.wte-com-hover-delete,div.wte-com-hover-delete{outline:#DD3636 solid 2px;opacity:.5;filter:alpha(opacity=50)}.wte-com-hover-move,div.wte-com-hover-move{outline:#ffca6f solid 3px}.wte-badge,.wte-com-badge,.wte-com-badge-red{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:0;display:none}.wte-com-badge-red{background-color:#DD3636}.wte-badge-warning{background-color:#ffca6f}.wte-com-placeholder,.wte-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.wte-placeholder{border-style:solid!important;border-color:#62c462;outline:0}.wte-com-placeholder-int,.wte-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,.2);height:100%;width:100%;pointer-events:'none';padding:1.5px;outline:0}.wte-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;z-index:3}.wte-pn-panel#wte-pn-commands,.wte-pn-panel#wte-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,.3)}.wte-pn-panel#wte-pn-options{right:15%;top:0}.wte-pn-panel#wte-pn-options2{bottom:150px;height:auto}.wte-pn-panel .icon-redo,.wte-pn-panel .icon-undo{font-size:20px;height:30px;width:25px}.wte-pn-panel#wte-pn-views{border-bottom:2px solid rgba(0,0,0,.3);right:0;width:15%;z-index:4}.wte-pn-panel#wte-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,.3)}.wte-pn-buttons{align-items:center;display:flex;justify-content:center}.wte-btnt,.wte-pn-btn{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.wte-btnt.wte-pn-active,.wte-pn-btn.wte-pn-active{background-color:rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.25) inset}.wte-btnt>.wte-pn-arrow-rd,.wte-pn-btn>.wte-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.wte-btnt>.wte-pn-buttons,.wte-pn-btn>.wte-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.wte-btnt>.wte-pn-buttons.wte-pn-visible,.wte-pn-btn>.wte-pn-buttons.wte-pn-visible{display:block}.wte-btnt>.wte-pn-buttons>.wte-pn-arrow-l,.wte-pn-btn>.wte-pn-buttons>.wte-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.wte-nv-navigator{position:relative;height:100%}.wte-nv-navigator #wte-nv-placeholder{width:100%;position:absolute}.wte-nv-navigator #wte-nv-placeholder #wte-nv-plh-int{height:100%;padding:1px}.wte-nv-navigator #wte-nv-placeholder #wte-nv-plh-int.wte-nv-insert{background-color:#62c462}.wte-nv-navigator .wte-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,.2)}.wte-nv-navigator .wte-nv-item.wte-nv-hide{opacity:.55;filter:alpha(opacity=55)}.wte-nv-navigator .wte-nv-item #wte-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.wte-nv-navigator .wte-nv-item #wte-nv-btn-eye{height:auto!important;width:auto!important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;color:#aaa;cursor:pointer;z-index:1}.wte-nv-navigator .wte-nv-item .wte-nv-title{font-size:11px;padding:7px 10px 7px 30px}.wte-nv-navigator .wte-nv-item #wte-nv-caret{font-size:7px;width:8px}.wte-nv-item .wte-nv-title{background-color:rgba(0,0,0,.1);font-size:13px;letter-spacing:1px;padding:7px 10px 7px 25px;border-bottom:1px solid rgba(0,0,0,.3);border-top:1px solid rgba(255,255,255,.1);cursor:pointer}.wte-nv-item .wte-nv-children .wte-nv-title{border-left:1px solid rgba(5,5,5,.3)}.wte-nv-item>.wte-nv-children{margin-left:15px;display:none}.wte-clm-tags .wte-clm-select option,.wte-clm-tags .wte-sm-field.wte-sm-select option,.wte-clm-tags .wte-sm-select.wte-clm-field option,.wte-field option,.wte-sm-sector .wte-clm-select option,.wte-sm-sector .wte-sm-field.wte-sm-select option,.wte-sm-sector .wte-sm-select.wte-clm-field option{margin:5px 0}.wte-nv-item.open>.wte-nv-children{display:block}.wte-clm-tags .wte-sm-field.wte-sm-list input,.wte-clm-tags .wte-sm-list.wte-clm-field input,.wte-nv-no-chld>#wte-nv-caret,.wte-sm-sector .wte-sm-field.wte-sm-list input,.wte-sm-sector .wte-sm-list.wte-clm-field input{display:none}.wte-nv-item>.wte-nv-no-chld>#wte-nv-caret::before{content:''}.wte-nv-item>#wte-nv-move{color:#aaa;position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.wte-nv-item.wte-nv-selected{border:2px solid #3b97e3}.btn.expand,.wte-nv-navigator .wte-nv-item .expand#wte-nv-btn-eye{background-image:none}.wte-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:#ffca6f solid 3px;outline-offset:-3px;text-align:center;font-size:16.67px;cursor:pointer}.wte-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.wte-field{background-color:rgba(0,0,0,.3);border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 0 rgba(255,255,255,.1);border-radius:2px;box-sizing:border-box;padding:0 5px;position:relative}.wte-field input,.wte-field select{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:rgba(255,255,255,.7);border:none;background-color:transparent;width:100%;position:relative;z-index:1}.wte-field select{color:transparent;text-shadow:0 0 0 rgba(255,255,255,.7);height:20px}.wte-field .wte-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.wte-field .wte-d-s-arrow{bottom:7px;border-top:4px solid rgba(255,255,255,.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.wte-add-trasp{background:0 0;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.wte-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.wte-add-trasp:active{background-color:rgba(0,0,0,.2)}.wte-devices-c{display:flex;align-items:center;padding:4px}.wte-devices-c .wte-device-label{flex-grow:2;font-size:.7em;text-align:left;margin-right:10px}.wte-devices-c .wte-select{flex-grow:20}.wte-devices-c .wte-add-trasp{flex-grow:1;margin-left:5px}.wte-clm-tags .wte-sm-property.wte-sm-file #wte-sm-preview-box #wte-sm-close,.wte-sm-close-btn,.wte-sm-sector .wte-sm-property.wte-sm-file #wte-sm-preview-box #wte-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.wte-clm-tags .wte-sm-property.wte-sm-file #wte-sm-preview-box #wte-sm-close:hover,.wte-sm-close-btn:hover,.wte-sm-sector .wte-sm-property.wte-sm-file #wte-sm-preview-box #wte-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.wte-sm-header{font-size:11px;font-weight:lighter;padding:10px}.wte-clm-tags,.wte-sm-sector{clear:both;border-bottom:1px solid rgba(0,0,0,.3);font-weight:lighter;text-align:left}.wte-clm-tags #wte-sm-caret,.wte-sm-sector #wte-sm-caret{padding-right:5px;font-size:11px}.wte-clm-tags .wte-sm-title,.wte-sm-sector .wte-sm-title{background-color:rgba(0,0,0,.1);font-size:13px;letter-spacing:1px;padding:12px 10px 12px 20px;border-top:1px solid rgba(255,255,255,.1);cursor:pointer}.wte-clm-tags .wte-sm-label,.wte-sm-sector .wte-sm-label{margin:5px 5px 2px 0}.wte-clm-tags .wte-clm-field,.wte-clm-tags .wte-sm-field,.wte-sm-sector .wte-clm-field,.wte-sm-sector .wte-sm-field{width:100%;position:relative}.wte-clm-tags .wte-clm-field input,.wte-clm-tags .wte-sm-field input,.wte-sm-sector .wte-clm-field input,.wte-sm-sector .wte-sm-field input{box-sizing:border-box;color:rgba(255,255,255,.7);background:0 0;border:none;padding:3px 21px 3px 0;width:100%}.wte-clm-tags .wte-clm-field select,.wte-clm-tags .wte-sm-field select,.wte-sm-sector .wte-clm-field select,.wte-sm-sector .wte-sm-field select{background:0 0;border:none;color:transparent;width:100%;padding:2px 10px 2px 0;text-shadow:0 0 0 rgba(255,255,255,.7);position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wte-clm-tags .wte-clm-field select::-ms-expand,.wte-clm-tags .wte-sm-field select::-ms-expand,.wte-sm-sector .wte-clm-field select::-ms-expand,.wte-sm-sector .wte-sm-field select::-ms-expand{display:none}.wte-clm-tags .wte-clm-field .wte-sm-unit,.wte-clm-tags .wte-sm-field .wte-sm-unit,.wte-sm-sector .wte-clm-field .wte-sm-unit,.wte-sm-sector .wte-sm-field .wte-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,.7);cursor:pointer}.wte-clm-tags .wte-clm-field .wte-clm-sel-arrow,.wte-clm-tags .wte-clm-field .wte-sm-int-arrows,.wte-clm-tags .wte-clm-field .wte-sm-sel-arrow,.wte-clm-tags .wte-sm-field .wte-clm-sel-arrow,.wte-clm-tags .wte-sm-field .wte-sm-int-arrows,.wte-clm-tags .wte-sm-field .wte-sm-sel-arrow,.wte-sm-sector .wte-clm-field .wte-clm-sel-arrow,.wte-sm-sector .wte-clm-field .wte-sm-int-arrows,.wte-sm-sector .wte-clm-field .wte-sm-sel-arrow,.wte-sm-sector .wte-sm-field .wte-clm-sel-arrow,.wte-sm-sector .wte-sm-field .wte-sm-int-arrows,.wte-sm-sector .wte-sm-field .wte-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.wte-clm-tags .wte-clm-field .wte-sm-sel-arrow,.wte-clm-tags .wte-sm-field .wte-sm-sel-arrow,.wte-sm-sector .wte-clm-field .wte-sm-sel-arrow,.wte-sm-sector .wte-sm-field .wte-sm-sel-arrow{cursor:pointer}.wte-clm-tags .wte-clm-field .wte-clm-d-s-arrow,.wte-clm-tags .wte-clm-field .wte-sm-d-arrow,.wte-clm-tags .wte-clm-field .wte-sm-d-s-arrow,.wte-clm-tags .wte-clm-field .wte-sm-u-arrow,.wte-clm-tags .wte-sm-field .wte-clm-d-s-arrow,.wte-clm-tags .wte-sm-field .wte-sm-d-arrow,.wte-clm-tags .wte-sm-field .wte-sm-d-s-arrow,.wte-clm-tags .wte-sm-field .wte-sm-u-arrow,.wte-sm-sector .wte-clm-field .wte-clm-d-s-arrow,.wte-sm-sector .wte-clm-field .wte-sm-d-arrow,.wte-sm-sector .wte-clm-field .wte-sm-d-s-arrow,.wte-sm-sector .wte-clm-field .wte-sm-u-arrow,.wte-sm-sector .wte-sm-field .wte-clm-d-s-arrow,.wte-sm-sector .wte-sm-field .wte-sm-d-arrow,.wte-sm-sector .wte-sm-field .wte-sm-d-s-arrow,.wte-sm-sector .wte-sm-field .wte-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.wte-clm-tags .wte-clm-field .wte-sm-u-arrow,.wte-clm-tags .wte-sm-field .wte-sm-u-arrow,.wte-sm-sector .wte-clm-field .wte-sm-u-arrow,.wte-sm-sector .wte-sm-field .wte-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,.7);top:4px}.wte-clm-tags .wte-clm-field .wte-clm-d-s-arrow,.wte-clm-tags .wte-clm-field .wte-sm-d-arrow,.wte-clm-tags .wte-clm-field .wte-sm-d-s-arrow,.wte-clm-tags .wte-sm-field .wte-clm-d-s-arrow,.wte-clm-tags .wte-sm-field .wte-sm-d-arrow,.wte-clm-tags .wte-sm-field .wte-sm-d-s-arrow,.wte-sm-sector .wte-clm-field .wte-clm-d-s-arrow,.wte-sm-sector .wte-clm-field .wte-sm-d-arrow,.wte-sm-sector .wte-clm-field .wte-sm-d-s-arrow,.wte-sm-sector .wte-sm-field .wte-clm-d-s-arrow,.wte-sm-sector .wte-sm-field .wte-sm-d-arrow,.wte-sm-sector .wte-sm-field .wte-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,.7);bottom:4px}.wte-clm-tags .wte-clm-field .wte-clm-d-s-arrow,.wte-clm-tags .wte-clm-field .wte-sm-d-s-arrow,.wte-clm-tags .wte-sm-field .wte-clm-d-s-arrow,.wte-clm-tags .wte-sm-field .wte-sm-d-s-arrow,.wte-sm-sector .wte-clm-field .wte-clm-d-s-arrow,.wte-sm-sector .wte-clm-field .wte-sm-d-s-arrow,.wte-sm-sector .wte-sm-field .wte-clm-d-s-arrow,.wte-sm-sector .wte-sm-field .wte-sm-d-s-arrow{bottom:7px}.wte-clm-tags #wte-clm-tags-field,.wte-clm-tags .wte-clm-select,.wte-clm-tags .wte-sm-color.wte-clm-field,.wte-clm-tags .wte-sm-field.wte-sm-color,.wte-clm-tags .wte-sm-field.wte-sm-input,.wte-clm-tags .wte-sm-field.wte-sm-integer,.wte-clm-tags .wte-sm-field.wte-sm-list,.wte-clm-tags .wte-sm-field.wte-sm-select,.wte-clm-tags .wte-sm-input.wte-clm-field,.wte-clm-tags .wte-sm-integer.wte-clm-field,.wte-clm-tags .wte-sm-list.wte-clm-field,.wte-clm-tags .wte-sm-select.wte-clm-field,.wte-sm-sector .wte-clm-select,.wte-sm-sector .wte-sm-color.wte-clm-field,.wte-sm-sector .wte-sm-field.wte-sm-color,.wte-sm-sector .wte-sm-field.wte-sm-input,.wte-sm-sector .wte-sm-field.wte-sm-integer,.wte-sm-sector .wte-sm-field.wte-sm-list,.wte-sm-sector .wte-sm-field.wte-sm-select,.wte-sm-sector .wte-sm-input.wte-clm-field,.wte-sm-sector .wte-sm-integer.wte-clm-field,.wte-sm-sector .wte-sm-list.wte-clm-field,.wte-sm-sector .wte-sm-select.wte-clm-field{background-color:rgba(0,0,0,.3);border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 0 rgba(255,255,255,.1);color:rgba(255,255,255,.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.wte-clm-tags .wte-sm-composite.wte-clm-field,.wte-clm-tags .wte-sm-field.wte-sm-composite,.wte-sm-sector .wte-sm-composite.wte-clm-field,.wte-sm-sector .wte-sm-field.wte-sm-composite{border-radius:2px;background-color:rgba(0,0,0,.1);border:1px solid rgba(0,0,0,.25)}.wte-clm-tags .wte-clm-select,.wte-clm-tags .wte-sm-field.wte-sm-select,.wte-clm-tags .wte-sm-select.wte-clm-field,.wte-sm-sector .wte-clm-select,.wte-sm-sector .wte-sm-field.wte-sm-select,.wte-sm-sector .wte-sm-select.wte-clm-field{padding:0}.wte-clm-tags .wte-clm-select select,.wte-clm-tags .wte-sm-field.wte-sm-select select,.wte-clm-tags .wte-sm-select.wte-clm-field select,.wte-sm-sector .wte-clm-select select,.wte-sm-sector .wte-sm-field.wte-sm-select select,.wte-sm-sector .wte-sm-select.wte-clm-field select{height:20px}.wte-clm-tags .wte-sm-field.wte-sm-list,.wte-clm-tags .wte-sm-list.wte-clm-field,.wte-sm-sector .wte-sm-field.wte-sm-list,.wte-sm-sector .wte-sm-list.wte-clm-field{width:auto;padding:0;overflow:hidden;float:left}.wte-clm-tags .wte-sm-field.wte-sm-list label,.wte-clm-tags .wte-sm-list.wte-clm-field label,.wte-sm-sector .wte-sm-field.wte-sm-list label,.wte-sm-sector .wte-sm-list.wte-clm-field label{cursor:pointer;padding:5px;display:block}.wte-clm-tags .wte-sm-field.wte-sm-list .wte-sm-radio:checked+label,.wte-clm-tags .wte-sm-list.wte-clm-field .wte-sm-radio:checked+label,.wte-sm-sector .wte-sm-field.wte-sm-list .wte-sm-radio:checked+label,.wte-sm-sector .wte-sm-list.wte-clm-field .wte-sm-radio:checked+label{background-color:rgba(255,255,255,.2)}.wte-clm-tags .wte-sm-field.wte-sm-list .wte-sm-icon,.wte-clm-tags .wte-sm-list.wte-clm-field .wte-sm-icon,.wte-sm-sector .wte-sm-field.wte-sm-list .wte-sm-icon,.wte-sm-sector .wte-sm-list.wte-clm-field .wte-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.wte-clm-tags #wte-clm-tags-field select,.wte-clm-tags .wte-sm-field.wte-sm-integer select,.wte-clm-tags .wte-sm-integer.wte-clm-field select,.wte-sm-sector .wte-sm-field.wte-sm-integer select,.wte-sm-sector .wte-sm-integer.wte-clm-field select{width:auto;padding:0;color:transparent}.wte-clm-tags .wte-sm-list .wte-sm-el,.wte-sm-sector .wte-sm-list .wte-sm-el{float:left;border-left:1px solid rgba(0,0,0,.3)}.wte-clm-tags .wte-sm-list .wte-sm-el:first-child,.wte-sm-sector .wte-sm-list .wte-sm-el:first-child{border:none}.wte-clm-tags .wte-sm-list .wte-sm-el:hover,.wte-sm-sector .wte-sm-list .wte-sm-el:hover{background:rgba(0,0,0,.3)}.wte-clm-tags .wte-sm-properties,.wte-sm-sector .wte-sm-properties{font-size:11px;padding:10px 5px}.wte-clm-tags .wte-sm-property,.wte-sm-sector .wte-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.wte-clm-tags .wte-sm-property.wte-sm-composite,.wte-clm-tags .wte-sm-property.wte-sm-file,.wte-clm-tags .wte-sm-property.wte-sm-list,.wte-clm-tags .wte-sm-property.wte-sm-stack,.wte-sm-sector .wte-sm-property.wte-sm-composite,.wte-sm-sector .wte-sm-property.wte-sm-file,.wte-sm-sector .wte-sm-property.wte-sm-list,.wte-sm-sector .wte-sm-property.wte-sm-stack{width:100%}.wte-clm-tags .wte-sm-property .wte-sm-btn,.wte-sm-sector .wte-sm-property .wte-sm-btn{background-color:rgba(33,33,33,.3);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,.3),1px 1px 0 rgba(43,43,43,.3) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,.3);border:none;opacity:.85;filter:alpha(opacity=85)}.wte-clm-tags .wte-sm-property .wte-sm-btn-c,.wte-sm-sector .wte-sm-property .wte-sm-btn-c{box-sizing:border-box;float:left;width:100%;padding:0 5px}.wte-clm-tags .wte-sm-property.wte-sm-file #wte-sm-preview-box,.wte-sm-sector .wte-sm-property.wte-sm-file #wte-sm-preview-box{background-color:rgba(255,255,255,.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.wte-clm-tags .wte-sm-property.wte-sm-file #wte-sm-preview-box.wte-sm-show,.wte-sm-sector .wte-sm-property.wte-sm-file #wte-sm-preview-box.wte-sm-show{border:1px solid rgba(252,252,252,.05);padding:3px 5px}.wte-clm-tags .wte-sm-property.wte-sm-file #wte-sm-preview-box #wte-sm-close,.wte-sm-sector .wte-sm-property.wte-sm-file #wte-sm-preview-box #wte-sm-close{display:block}.wte-clm-tags .wte-sm-property.wte-sm-file .wte-sm-show #wte-sm-preview-file,.wte-sm-sector .wte-sm-property.wte-sm-file .wte-sm-show #wte-sm-preview-file{height:50px}.wte-clm-tags .wte-sm-property.wte-sm-file #wte-sm-preview-file,.wte-sm-sector .wte-sm-property.wte-sm-file #wte-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.wte-clm-tags .wte-sm-property .wte-sm-layers,.wte-sm-sector .wte-sm-property .wte-sm-layers{background-color:rgba(0,0,0,.13);border:1px solid rgba(0,0,0,.13);box-shadow:1px 1px 0 rgba(255,255,255,.1);border-radius:2px;margin-top:5px;min-height:30px}.wte-clm-tags .wte-sm-property .wte-sm-layer,.wte-sm-sector .wte-sm-property .wte-sm-layer{background-color:rgba(255,255,255,.055);border-radius:2px;box-shadow:1px 1px 0 rgba(0,0,0,.2),1px 1px 0 rgba(255,255,255,.055) inset;margin:2px;padding:7px;position:relative;cursor:pointer}.wte-clm-tags .wte-sm-property .wte-sm-layer>#wte-sm-preview-box,.wte-sm-sector .wte-sm-property .wte-sm-layer>#wte-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.wte-clm-tags .wte-sm-property .wte-sm-layer #wte-sm-preview,.wte-clm-tags .wte-sm-property .wte-sm-layer #wte-sm-preview-box,.wte-sm-sector .wte-sm-property .wte-sm-layer #wte-sm-preview,.wte-sm-sector .wte-sm-property .wte-sm-layer #wte-sm-preview-box{border-radius:2px}.wte-clm-tags .wte-sm-property .wte-sm-layer #wte-sm-close-layer,.wte-sm-sector .wte-sm-property .wte-sm-layer #wte-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.wte-clm-tags .wte-sm-property .wte-sm-layer #wte-sm-close-layer:hover,.wte-sm-sector .wte-sm-property .wte-sm-layer #wte-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.wte-clm-tags .wte-sm-property .wte-sm-layer>#wte-sm-preview-box #wte-sm-preview,.wte-sm-sector .wte-sm-property .wte-sm-layer>#wte-sm-preview-box #wte-sm-preview{background-color:#fff;height:100%;width:100%;background-size:cover!important}.wte-clm-tags .wte-sm-property .wte-sm-layer.wte-sm-active,.wte-sm-sector .wte-sm-property .wte-sm-layer.wte-sm-active{background-color:rgba(255,255,255,.12)}.wte-clm-tags .wte-sm-property .wte-sm-layer.wte-sm-no-preview #wte-sm-preview-box,.wte-sm-sector .wte-sm-property .wte-sm-layer.wte-sm-no-preview #wte-sm-preview-box{display:none}.wte-clm-tags #wte-sm-text-shadow #wte-sm-preview::after,.wte-sm-sector #wte-sm-text-shadow #wte-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.wte-clm-tags .wte-sm-stack .wte-sm-properties,.wte-sm-sector .wte-sm-stack .wte-sm-properties{padding-top:5px}.wte-clm-tags .wte-sm-stack #wte-sm-add,.wte-sm-sector .wte-sm-stack #wte-sm-add{background:0 0;border:none;cursor:pointer;font-size:22px;line-height:10px;position:absolute;right:0;top:-20px;opacity:.75}.wte-clm-tags .wte-sm-stack #wte-sm-add:hover,.wte-sm-sector .wte-sm-stack #wte-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.wte-clm-tags .wte-sm-colorp-c,.wte-sm-sector .wte-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.wte-clm-tags .wte-sm-colorp-c .wte-checker-bg,.wte-sm-sector .wte-sm-colorp-c .wte-checker-bg{height:100%;width:100%;border-radius:1px}.wte-clm-tags .wte-sm-color-picker,.wte-sm-sector .wte-sm-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,.3);border-radius:1px}.wte-clm-tags .wte-sm-btn-upload #wte-sm-upload,.wte-sm-sector .wte-sm-btn-upload #wte-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.wte-clm-tags .wte-sm-btn-upload #wte-sm-label,.wte-sm-sector .wte-sm-btn-upload #wte-sm-label{padding:2px 0}.wte-sm-layer>#wte-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.wte-sm-layer>#wte-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.wte-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.wte-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;margin:2.5%;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end}.wte-block.wte-bdrag{width:auto;padding:0}.wte-mdl-backlayer,.wte-mdl-container{position:absolute;top:0;width:100%;height:100%}.wte-clm-tags{font-size:11px;padding:10px 5px}.wte-clm-tags #wte-clm-label,.wte-clm-tags #wte-clm-sel{padding:7px 0;float:left}.wte-clm-tags #wte-clm-sel{font-style:italic;margin-left:5px}.wte-clm-tags #wte-clm-status-c{float:right}.wte-clm-tags #wte-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.wte-clm-tags #wte-clm-tags-c{display:inline-block;vertical-align:top}.wte-clm-tags #wte-clm-add-tag{background-color:rgba(255,255,255,.2);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,.2) inset;border:1px solid rgba(0,0,0,.15);cursor:pointer}.wte-clm-tags #wte-clm-new{color:#ddd;padding:5px 6px;display:none}.wte-clm-tags .wte-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.wte-clm-tags #wte-clm-close{font-size:20px;line-height:0;cursor:pointer}.wte-clm-tags #wte-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.wte-clm-tags #wte-clm-checkbox{vertical-align:middle;cursor:pointer;font-size:9px}.wte-clm-tags #wte-clm-tag-label{cursor:text}.wte-mdl-backlayer{background-color:#000;z-index:1;opacity:.5;filter:alpha(opacity=50)}.wte-mdl-container{z-index:10}.wte-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,.05);margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.wte-mdl-dialog .wte-mdl-btn-close{position:absolute;right:15px;top:5px}.wte-mdl-content,.wte-mdl-header{padding:10px 15px;clear:both}.wte-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,.3);padding:15px 15px 7px}.wte-mdl-content{border-top:1px solid rgba(255,255,255,.1)}.wte-am-assets{height:290px;overflow:auto;clear:both}.wte-am-assets-header{padding:5px}.wte-am-add-asset input{width:70%}.wte-am-add-asset button{width:25%;float:right}.wte-am-assets-cont{background-color:rgba(0,0,0,.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.wte-am-assets-cont #wte-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.wte-am-assets-cont #wte-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.wte-am-assets-cont #wte-am-preview-bg{position:absolute;height:100%;width:100%;opacity:.5;filter:alpha(opacity=50);z-index:0}.wte-am-assets-cont .wte-am-highlight{background-color:rgba(255,255,255,.1)}.wte-am-assets-cont .wte-am-asset{border-bottom:1px solid rgba(0,0,0,.3);padding:5px;cursor:pointer;position:relative}.wte-am-assets-cont .wte-am-asset:hover #wte-am-close{display:block}.wte-am-assets-cont #wte-am-close{position:absolute;right:5px;top:0;display:none}.wte-am-assets-cont #wte-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.wte-am-assets-cont #wte-am-meta>div{margin-bottom:5px}.wte-am-assets-cont #wte-am-meta #wte-am-dimensions{font-size:10px;opacity:.5;filter:alpha(opacity=50)}.wte-am-file-uploader{width:55%;float:left}.wte-am-file-uploader>form{background-color:rgba(0,0,0,.1);border:2px dashed #999;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}#wte-rte-toolbar .wte-rte-btn.btn-info,.wte-cm-editor #wte-cm-title{background-color:rgba(0,0,0,.3)}.wte-am-file-uploader>form.wte-am-hover{border:2px solid #62c462;color:#75cb75}.wte-am-file-uploader>form.wte-am-disabled{border-color:red}.wte-am-file-uploader>form #wte-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.wte-am-file-uploader #wte-am-title{position:absolute;padding:150px 10px;width:100%}.wte-cm-editor-c{float:left;box-sizing:border-box;width:50%}.wte-cm-editor-c .CodeMirror{height:450px}.wte-cm-editor{font-size:12px}.wte-cm-editor#wte-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,.3)}.wte-cm-editor#wte-cm-htmlmixed #wte-cm-title{color:#a97d44}.wte-cm-editor#wte-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,.1)}.wte-cm-editor#wte-cm-css #wte-cm-title{color:#ddca7e}.wte-cm-editor #wte-cm-title{font-size:12px;padding:5px 10px 3px;text-align:right}#wte-rte-toolbar{border:1px solid rgba(0,0,0,.3);position:absolute;border-radius:3px;overflow:hidden;display:none;z-index:5}#wte-rte-toolbar .wte-rte-btn{padding:5px;width:25px;border-right:1px solid rgba(0,0,0,.3);text-align:center;cursor:pointer;outline:0}#wte-rte-toolbar .wte-rte-btn:last-child{border-right:none}#wte-rte-toolbar .wte-rte-btn:hover{background-color:rgba(255,255,255,.1)}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-handle,.sp-alpha-inner{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,.3);box-shadow:0 0 7px rgba(0,0,0,.3);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:rgba(0,0,0,.3) solid 1px}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777!important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333}.sp-slider{border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:0 0;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:active,.sp-container button:hover{background:rgba(0,0,0,.3);border-color:rgba(0,0,0,.3);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,.8)} \ No newline at end of file + */@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot?v=4.5.0);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0) format("embedded-opentype"),url(../fonts/fontawesome-webfont.woff2?v=4.5.0) format("woff2"),url(../fonts/fontawesome-webfont.woff?v=4.5.0) format("woff"),url(../fonts/fontawesome-webfont.ttf?v=4.5.0) format("truetype"),url(../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased}.fa-lg{font-size:1.3333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857em}.fa-ul{padding-left:0;margin-left:2.1428571429em;list-style-type:none}.fa.fa-pull-right,.fa.pull-right{margin-left:.3em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.1428571429em;width:2.1428571429em;top:.1428571429em}.fa-li.fa-lg{left:-1.8571428571em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right,.pull-right{float:right}.pull-left{float:left}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{filter:none}.opac50,.wte-clm-tags #wte-clm-close,.wte-freezed{opacity:.5;filter:alpha(opacity=50)}.fa-stack{position:relative;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}@font-face{font-family:font3336;src:url(../fonts/main-fonts.eot?v=5);src:url(../fonts/main-fonts.woff?v=5) format("woff"),url(../fonts/main-fonts.ttf?v=5) format("truetype"),url(../fonts/main-fonts.svg?v=5) format("svg"),url(../fonts/main-fonts.eot?v=5) format("embedded-opentype");font-weight:400;font-style:normal}.wte-fonts:before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;font-size:5em}.wte-editor,.wte-mdl-container{font-family:Helvetica,sans-serif}.wte-f-b1:before{content:'q'}.wte-f-b2:before{content:'w'}.wte-f-b3:before{content:'e'}.wte-f-b37:before{content:'r'}.wte-f-hero:before{content:'t'}.wte-f-h1p:before{content:'y'}.wte-f-3ba:before{content:'u'}.wte-f-image:before{content:'i'}.wte-f-text:before{content:'o'}.wte-f-quo:before{content:'p'}.wte-clm-tags #wte-clm-new,.wte-invis-invis,.wte-no-app{background-color:transparent;border:none;color:inherit}#wte-rte-toolbar,.sp-container,.wte-bg-main,.wte-clm-tags .wte-sm-colorp-c,.wte-editor,.wte-mdl-dialog,.wte-nv-item .wte-nv-title-c,.wte-pn-panel,.wte-sm-sector .wte-sm-colorp-c{background-color:#444}.wte-no-app{height:10px}.wte-test::btn{color:'#fff'}.checker-bg,.wte-checker-bg,.wte-clm-tags .wte-sm-property .wte-sm-layer>#wte-sm-preview-box,.wte-sm-sector .wte-sm-property .wte-sm-layer>#wte-sm-preview-box{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}#wte-rte-toolbar .wte-rte-btn,.wte-btn-prim,.wte-btnt,.wte-clm-tags .wte-sm-composite.wte-clm-field,.wte-clm-tags .wte-sm-field.wte-sm-composite,.wte-clm-tags .wte-sm-stack #wte-sm-add,.wte-color-main,.wte-mdl-dialog,.wte-pn-btn,.wte-pn-panel,.wte-sm-sector .wte-sm-composite.wte-clm-field,.wte-sm-sector .wte-sm-field.wte-sm-composite,.wte-sm-sector .wte-sm-stack #wte-sm-add{color:#ddd}.wte-btnt.wte-pn-active,.wte-color-active,.wte-pn-btn.wte-pn-active{color:#f8f8f8}.wte-bdrag{position:absolute;z-index:10;width:auto}.clear{clear:both}.no-select,.wte-clm-tags #wte-clm-close,.wte-clm-tags #wte-clm-tag-label,.wte-com-no-select,.wte-com-no-select img{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.wte-editor{position:relative;box-sizing:border-box;height:100%;min-width:1250px}.wte-btn-prim,.wte-btn-prim:active{background-color:rgba(255,255,255,.1)}.wte-freezed{pointer-events:none}.wte-btn-prim{border-radius:2px;cursor:pointer;padding:.5em;border:none}.wte-input{background-color:rgba(0,0,0,.3);border:1px solid rgba(0,0,0,.1);border-radius:2px;box-shadow:1px 1px 0 rgba(255,255,255,.1);box-sizing:border-box;color:#ddd;padding:.5em 1em}.wte-cv-canvas{background-color:rgba(0,0,0,.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.wte-cv-canvas>iframe{background-color:#fff;height:100%;outline:0;width:100%;border:none;margin:0 auto;display:block}.wte-cv-canvas .wte-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.wte-cv-canvas .wte-highlighter,.wte-cv-canvas .wte-highlighter-sel{position:absolute;outline:#3b97e3 solid 1px;pointer-events:none}.wte-cv-canvas .wte-highlighter-warning{outline:#ffca6f solid 3px}.wte-cv-canvas .wte-highlighter-sel{outline:#3b97e3 solid 3px}.wte-cv-canvas #wte-tools{width:100%;position:absolute;top:0;left:0;outline:0}.wte-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.wte-cv-canvas *{box-sizing:border-box}.wte-frame{transition:width .35s ease}.btn-cl,.wte-am-assets-cont #wte-am-close,.wte-mdl-dialog .wte-mdl-btn-close{font-size:25px;opacity:.3;filter:alpha(opacity=30);cursor:pointer}.btn-cl:hover,.wte-am-assets-cont #wte-am-close:hover,.wte-mdl-dialog .wte-mdl-btn-close:hover{opacity:.7;filter:alpha(opacity=70)}.dragged,.wte-nv-opac50{opacity:.5;filter:alpha(opacity=50)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move!important}.dragged{position:absolute;z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none!important;margin:0!important;outline:0!important}.wte-com-dashed *{outline:#888 dashed 1px;outline-offset:-2px;box-sizing:border-box}.wte-cv-canvas .wte-comp-selected{outline:#3b97e3 solid 3px!important}.wte-com-hover,div.wte-com-hover{outline:#3b97e3 solid 1px}.wte-com-hover-delete,div.wte-com-hover-delete{outline:#DD3636 solid 2px;opacity:.5;filter:alpha(opacity=50)}.wte-com-hover-move,div.wte-com-hover-move{outline:#ffca6f solid 3px}.wte-badge,.wte-com-badge,.wte-com-badge-red{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:0;display:none}.wte-com-badge-red{background-color:#DD3636}.wte-badge-warning{background-color:#ffca6f}.wte-com-placeholder,.wte-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.wte-placeholder{border-style:solid!important;border-color:#62c462;outline:0}.wte-com-placeholder-int,.wte-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,.2);height:100%;width:100%;pointer-events:'none';padding:1.5px;outline:0}.wte-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;z-index:3}.wte-pn-panel#wte-pn-commands,.wte-pn-panel#wte-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,.3)}.wte-pn-panel#wte-pn-options{right:15%;top:0}.wte-pn-panel#wte-pn-options2{bottom:150px;height:auto}.wte-pn-panel .icon-redo,.wte-pn-panel .icon-undo{font-size:20px;height:30px;width:25px}.wte-pn-panel#wte-pn-views{border-bottom:2px solid rgba(0,0,0,.3);right:0;width:15%;z-index:4}.wte-pn-panel#wte-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,.3)}.wte-pn-buttons{align-items:center;display:flex;justify-content:center}.wte-btnt,.wte-pn-btn{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.wte-btnt.wte-pn-active,.wte-pn-btn.wte-pn-active{background-color:rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.25) inset}.wte-btnt>.wte-pn-arrow-rd,.wte-pn-btn>.wte-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.wte-btnt>.wte-pn-buttons,.wte-pn-btn>.wte-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.wte-btnt>.wte-pn-buttons.wte-pn-visible,.wte-pn-btn>.wte-pn-buttons.wte-pn-visible{display:block}.wte-btnt>.wte-pn-buttons>.wte-pn-arrow-l,.wte-pn-btn>.wte-pn-buttons>.wte-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.wte-nv-navigator{position:relative;height:100%}.wte-nv-navigator #wte-nv-placeholder{width:100%;position:absolute}.wte-nv-navigator #wte-nv-placeholder #wte-nv-plh-int{height:100%;padding:1px}.wte-nv-navigator #wte-nv-placeholder #wte-nv-plh-int.wte-nv-insert{background-color:#62c462}.wte-nv-navigator .wte-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,.2)}.wte-nv-navigator .wte-nv-item.wte-nv-hide{opacity:.55;filter:alpha(opacity=55)}.wte-nv-navigator .wte-nv-item #wte-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.wte-nv-navigator .wte-nv-item #wte-nv-btn-eye{height:auto!important;width:auto!important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;color:#aaa;cursor:pointer;z-index:1}.wte-nv-navigator .wte-nv-item .wte-nv-title{font-size:11px;padding:7px 10px 7px 30px}.wte-nv-navigator .wte-nv-item #wte-nv-caret{font-size:7px;width:8px}.wte-nv-item .wte-nv-title{background-color:rgba(0,0,0,.1);font-size:13px;letter-spacing:1px;padding:7px 10px 7px 25px;border-bottom:1px solid rgba(0,0,0,.3);border-top:1px solid rgba(255,255,255,.1);cursor:pointer}.wte-nv-item .wte-nv-children .wte-nv-title{border-left:1px solid rgba(5,5,5,.3)}.wte-nv-item>.wte-nv-children{margin-left:15px;display:none}.wte-clm-tags .wte-clm-select option,.wte-clm-tags .wte-sm-field.wte-sm-select option,.wte-clm-tags .wte-sm-select.wte-clm-field option,.wte-field option,.wte-sm-sector .wte-clm-select option,.wte-sm-sector .wte-sm-field.wte-sm-select option,.wte-sm-sector .wte-sm-select.wte-clm-field option{margin:5px 0}.wte-nv-item.open>.wte-nv-children{display:block}.wte-clm-tags .wte-sm-field.wte-sm-list input,.wte-clm-tags .wte-sm-list.wte-clm-field input,.wte-nv-no-chld>#wte-nv-caret,.wte-sm-sector .wte-sm-field.wte-sm-list input,.wte-sm-sector .wte-sm-list.wte-clm-field input{display:none}.wte-nv-item>.wte-nv-no-chld>#wte-nv-caret::before{content:''}.wte-nv-item>#wte-nv-move{color:#aaa;position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.wte-nv-item.wte-nv-selected{border:2px solid #3b97e3}.btn.expand,.wte-nv-navigator .wte-nv-item .expand#wte-nv-btn-eye{background-image:none}.wte-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:#ffca6f solid 3px;outline-offset:-3px;text-align:center;font-size:16.67px;cursor:pointer}.wte-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.wte-field{background-color:rgba(0,0,0,.3);border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 0 rgba(255,255,255,.1);border-radius:2px;box-sizing:border-box;padding:0 5px;position:relative}.wte-field input,.wte-field select{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:rgba(255,255,255,.7);border:none;background-color:transparent;width:100%;position:relative;z-index:1}.wte-field select{color:transparent;text-shadow:0 0 0 rgba(255,255,255,.7);height:20px}.wte-field .wte-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.wte-field .wte-d-s-arrow{bottom:7px;border-top:4px solid rgba(255,255,255,.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.wte-add-trasp{background:0 0;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.wte-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.wte-add-trasp:active{background-color:rgba(0,0,0,.2)}.wte-devices-c{display:flex;align-items:center;padding:4px}.wte-devices-c .wte-device-label{flex-grow:2;font-size:.7em;text-align:left;margin-right:10px}.wte-devices-c .wte-select{flex-grow:20}.wte-devices-c .wte-add-trasp{flex-grow:1;margin-left:5px}.wte-clm-tags .wte-sm-property.wte-sm-file #wte-sm-preview-box #wte-sm-close,.wte-sm-close-btn,.wte-sm-sector .wte-sm-property.wte-sm-file #wte-sm-preview-box #wte-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.wte-clm-tags .wte-sm-property.wte-sm-file #wte-sm-preview-box #wte-sm-close:hover,.wte-sm-close-btn:hover,.wte-sm-sector .wte-sm-property.wte-sm-file #wte-sm-preview-box #wte-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.wte-sm-header{font-size:11px;font-weight:lighter;padding:10px}.wte-clm-tags,.wte-sm-sector{clear:both;border-bottom:1px solid rgba(0,0,0,.3);font-weight:lighter;text-align:left}.wte-clm-tags #wte-sm-caret,.wte-sm-sector #wte-sm-caret{padding-right:5px;font-size:11px}.wte-clm-tags .wte-sm-title,.wte-sm-sector .wte-sm-title{background-color:rgba(0,0,0,.1);font-size:13px;letter-spacing:1px;padding:12px 10px 12px 20px;border-top:1px solid rgba(255,255,255,.1);cursor:pointer}.wte-clm-tags .wte-sm-label,.wte-sm-sector .wte-sm-label{margin:5px 5px 2px 0}.wte-clm-tags .wte-clm-field,.wte-clm-tags .wte-sm-field,.wte-sm-sector .wte-clm-field,.wte-sm-sector .wte-sm-field{width:100%;position:relative}.wte-clm-tags .wte-clm-field input,.wte-clm-tags .wte-sm-field input,.wte-sm-sector .wte-clm-field input,.wte-sm-sector .wte-sm-field input{box-sizing:border-box;color:rgba(255,255,255,.7);background:0 0;border:none;padding:3px 21px 3px 0;width:100%}.wte-clm-tags .wte-clm-field select,.wte-clm-tags .wte-sm-field select,.wte-sm-sector .wte-clm-field select,.wte-sm-sector .wte-sm-field select{background:0 0;border:none;color:transparent;width:100%;padding:2px 10px 2px 0;text-shadow:0 0 0 rgba(255,255,255,.7);position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wte-clm-tags .wte-clm-field select::-ms-expand,.wte-clm-tags .wte-sm-field select::-ms-expand,.wte-sm-sector .wte-clm-field select::-ms-expand,.wte-sm-sector .wte-sm-field select::-ms-expand{display:none}.wte-clm-tags .wte-clm-field .wte-sm-unit,.wte-clm-tags .wte-sm-field .wte-sm-unit,.wte-sm-sector .wte-clm-field .wte-sm-unit,.wte-sm-sector .wte-sm-field .wte-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,.7);cursor:pointer}.wte-clm-tags .wte-clm-field .wte-clm-sel-arrow,.wte-clm-tags .wte-clm-field .wte-sm-int-arrows,.wte-clm-tags .wte-clm-field .wte-sm-sel-arrow,.wte-clm-tags .wte-sm-field .wte-clm-sel-arrow,.wte-clm-tags .wte-sm-field .wte-sm-int-arrows,.wte-clm-tags .wte-sm-field .wte-sm-sel-arrow,.wte-sm-sector .wte-clm-field .wte-clm-sel-arrow,.wte-sm-sector .wte-clm-field .wte-sm-int-arrows,.wte-sm-sector .wte-clm-field .wte-sm-sel-arrow,.wte-sm-sector .wte-sm-field .wte-clm-sel-arrow,.wte-sm-sector .wte-sm-field .wte-sm-int-arrows,.wte-sm-sector .wte-sm-field .wte-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.wte-clm-tags .wte-clm-field .wte-sm-sel-arrow,.wte-clm-tags .wte-sm-field .wte-sm-sel-arrow,.wte-sm-sector .wte-clm-field .wte-sm-sel-arrow,.wte-sm-sector .wte-sm-field .wte-sm-sel-arrow{cursor:pointer}.wte-clm-tags .wte-clm-field .wte-clm-d-s-arrow,.wte-clm-tags .wte-clm-field .wte-sm-d-arrow,.wte-clm-tags .wte-clm-field .wte-sm-d-s-arrow,.wte-clm-tags .wte-clm-field .wte-sm-u-arrow,.wte-clm-tags .wte-sm-field .wte-clm-d-s-arrow,.wte-clm-tags .wte-sm-field .wte-sm-d-arrow,.wte-clm-tags .wte-sm-field .wte-sm-d-s-arrow,.wte-clm-tags .wte-sm-field .wte-sm-u-arrow,.wte-sm-sector .wte-clm-field .wte-clm-d-s-arrow,.wte-sm-sector .wte-clm-field .wte-sm-d-arrow,.wte-sm-sector .wte-clm-field .wte-sm-d-s-arrow,.wte-sm-sector .wte-clm-field .wte-sm-u-arrow,.wte-sm-sector .wte-sm-field .wte-clm-d-s-arrow,.wte-sm-sector .wte-sm-field .wte-sm-d-arrow,.wte-sm-sector .wte-sm-field .wte-sm-d-s-arrow,.wte-sm-sector .wte-sm-field .wte-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.wte-clm-tags .wte-clm-field .wte-sm-u-arrow,.wte-clm-tags .wte-sm-field .wte-sm-u-arrow,.wte-sm-sector .wte-clm-field .wte-sm-u-arrow,.wte-sm-sector .wte-sm-field .wte-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,.7);top:4px}.wte-clm-tags .wte-clm-field .wte-clm-d-s-arrow,.wte-clm-tags .wte-clm-field .wte-sm-d-arrow,.wte-clm-tags .wte-clm-field .wte-sm-d-s-arrow,.wte-clm-tags .wte-sm-field .wte-clm-d-s-arrow,.wte-clm-tags .wte-sm-field .wte-sm-d-arrow,.wte-clm-tags .wte-sm-field .wte-sm-d-s-arrow,.wte-sm-sector .wte-clm-field .wte-clm-d-s-arrow,.wte-sm-sector .wte-clm-field .wte-sm-d-arrow,.wte-sm-sector .wte-clm-field .wte-sm-d-s-arrow,.wte-sm-sector .wte-sm-field .wte-clm-d-s-arrow,.wte-sm-sector .wte-sm-field .wte-sm-d-arrow,.wte-sm-sector .wte-sm-field .wte-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,.7);bottom:4px}.wte-clm-tags .wte-clm-field .wte-clm-d-s-arrow,.wte-clm-tags .wte-clm-field .wte-sm-d-s-arrow,.wte-clm-tags .wte-sm-field .wte-clm-d-s-arrow,.wte-clm-tags .wte-sm-field .wte-sm-d-s-arrow,.wte-sm-sector .wte-clm-field .wte-clm-d-s-arrow,.wte-sm-sector .wte-clm-field .wte-sm-d-s-arrow,.wte-sm-sector .wte-sm-field .wte-clm-d-s-arrow,.wte-sm-sector .wte-sm-field .wte-sm-d-s-arrow{bottom:7px}.wte-clm-tags #wte-clm-tags-field,.wte-clm-tags .wte-clm-select,.wte-clm-tags .wte-sm-color.wte-clm-field,.wte-clm-tags .wte-sm-field.wte-sm-color,.wte-clm-tags .wte-sm-field.wte-sm-input,.wte-clm-tags .wte-sm-field.wte-sm-integer,.wte-clm-tags .wte-sm-field.wte-sm-list,.wte-clm-tags .wte-sm-field.wte-sm-select,.wte-clm-tags .wte-sm-input.wte-clm-field,.wte-clm-tags .wte-sm-integer.wte-clm-field,.wte-clm-tags .wte-sm-list.wte-clm-field,.wte-clm-tags .wte-sm-select.wte-clm-field,.wte-sm-sector .wte-clm-select,.wte-sm-sector .wte-sm-color.wte-clm-field,.wte-sm-sector .wte-sm-field.wte-sm-color,.wte-sm-sector .wte-sm-field.wte-sm-input,.wte-sm-sector .wte-sm-field.wte-sm-integer,.wte-sm-sector .wte-sm-field.wte-sm-list,.wte-sm-sector .wte-sm-field.wte-sm-select,.wte-sm-sector .wte-sm-input.wte-clm-field,.wte-sm-sector .wte-sm-integer.wte-clm-field,.wte-sm-sector .wte-sm-list.wte-clm-field,.wte-sm-sector .wte-sm-select.wte-clm-field{background-color:rgba(0,0,0,.3);border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 0 rgba(255,255,255,.1);color:rgba(255,255,255,.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.wte-clm-tags .wte-sm-composite.wte-clm-field,.wte-clm-tags .wte-sm-field.wte-sm-composite,.wte-sm-sector .wte-sm-composite.wte-clm-field,.wte-sm-sector .wte-sm-field.wte-sm-composite{border-radius:2px;background-color:rgba(0,0,0,.1);border:1px solid rgba(0,0,0,.25)}.wte-clm-tags .wte-clm-select,.wte-clm-tags .wte-sm-field.wte-sm-select,.wte-clm-tags .wte-sm-select.wte-clm-field,.wte-sm-sector .wte-clm-select,.wte-sm-sector .wte-sm-field.wte-sm-select,.wte-sm-sector .wte-sm-select.wte-clm-field{padding:0}.wte-clm-tags .wte-clm-select select,.wte-clm-tags .wte-sm-field.wte-sm-select select,.wte-clm-tags .wte-sm-select.wte-clm-field select,.wte-sm-sector .wte-clm-select select,.wte-sm-sector .wte-sm-field.wte-sm-select select,.wte-sm-sector .wte-sm-select.wte-clm-field select{height:20px}.wte-clm-tags .wte-sm-field.wte-sm-list,.wte-clm-tags .wte-sm-list.wte-clm-field,.wte-sm-sector .wte-sm-field.wte-sm-list,.wte-sm-sector .wte-sm-list.wte-clm-field{width:auto;padding:0;overflow:hidden;float:left}.wte-clm-tags .wte-sm-field.wte-sm-list label,.wte-clm-tags .wte-sm-list.wte-clm-field label,.wte-sm-sector .wte-sm-field.wte-sm-list label,.wte-sm-sector .wte-sm-list.wte-clm-field label{cursor:pointer;padding:5px;display:block}.wte-clm-tags .wte-sm-field.wte-sm-list .wte-sm-radio:checked+label,.wte-clm-tags .wte-sm-list.wte-clm-field .wte-sm-radio:checked+label,.wte-sm-sector .wte-sm-field.wte-sm-list .wte-sm-radio:checked+label,.wte-sm-sector .wte-sm-list.wte-clm-field .wte-sm-radio:checked+label{background-color:rgba(255,255,255,.2)}.wte-clm-tags .wte-sm-field.wte-sm-list .wte-sm-icon,.wte-clm-tags .wte-sm-list.wte-clm-field .wte-sm-icon,.wte-sm-sector .wte-sm-field.wte-sm-list .wte-sm-icon,.wte-sm-sector .wte-sm-list.wte-clm-field .wte-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.wte-clm-tags #wte-clm-tags-field select,.wte-clm-tags .wte-sm-field.wte-sm-integer select,.wte-clm-tags .wte-sm-integer.wte-clm-field select,.wte-sm-sector .wte-sm-field.wte-sm-integer select,.wte-sm-sector .wte-sm-integer.wte-clm-field select{width:auto;padding:0;color:transparent}.wte-clm-tags .wte-sm-list .wte-sm-el,.wte-sm-sector .wte-sm-list .wte-sm-el{float:left;border-left:1px solid rgba(0,0,0,.3)}.wte-clm-tags .wte-sm-list .wte-sm-el:first-child,.wte-sm-sector .wte-sm-list .wte-sm-el:first-child{border:none}.wte-clm-tags .wte-sm-list .wte-sm-el:hover,.wte-sm-sector .wte-sm-list .wte-sm-el:hover{background:rgba(0,0,0,.3)}.wte-clm-tags .wte-sm-properties,.wte-sm-sector .wte-sm-properties{font-size:11px;padding:10px 5px}.wte-clm-tags .wte-sm-property,.wte-sm-sector .wte-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.wte-clm-tags .wte-sm-property.wte-sm-composite,.wte-clm-tags .wte-sm-property.wte-sm-file,.wte-clm-tags .wte-sm-property.wte-sm-list,.wte-clm-tags .wte-sm-property.wte-sm-stack,.wte-sm-sector .wte-sm-property.wte-sm-composite,.wte-sm-sector .wte-sm-property.wte-sm-file,.wte-sm-sector .wte-sm-property.wte-sm-list,.wte-sm-sector .wte-sm-property.wte-sm-stack{width:100%}.wte-clm-tags .wte-sm-property .wte-sm-btn,.wte-sm-sector .wte-sm-property .wte-sm-btn{background-color:rgba(33,33,33,.3);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,.3),1px 1px 0 rgba(43,43,43,.3) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,.3);border:none;opacity:.85;filter:alpha(opacity=85)}.wte-clm-tags .wte-sm-property .wte-sm-btn-c,.wte-sm-sector .wte-sm-property .wte-sm-btn-c{box-sizing:border-box;float:left;width:100%;padding:0 5px}.wte-clm-tags .wte-sm-property.wte-sm-file #wte-sm-preview-box,.wte-sm-sector .wte-sm-property.wte-sm-file #wte-sm-preview-box{background-color:rgba(255,255,255,.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.wte-clm-tags .wte-sm-property.wte-sm-file #wte-sm-preview-box.wte-sm-show,.wte-sm-sector .wte-sm-property.wte-sm-file #wte-sm-preview-box.wte-sm-show{border:1px solid rgba(252,252,252,.05);padding:3px 5px}.wte-clm-tags .wte-sm-property.wte-sm-file #wte-sm-preview-box #wte-sm-close,.wte-sm-sector .wte-sm-property.wte-sm-file #wte-sm-preview-box #wte-sm-close{display:block}.wte-clm-tags .wte-sm-property.wte-sm-file .wte-sm-show #wte-sm-preview-file,.wte-sm-sector .wte-sm-property.wte-sm-file .wte-sm-show #wte-sm-preview-file{height:50px}.wte-clm-tags .wte-sm-property.wte-sm-file #wte-sm-preview-file,.wte-sm-sector .wte-sm-property.wte-sm-file #wte-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.wte-clm-tags .wte-sm-property .wte-sm-layers,.wte-sm-sector .wte-sm-property .wte-sm-layers{background-color:rgba(0,0,0,.13);border:1px solid rgba(0,0,0,.13);box-shadow:1px 1px 0 rgba(255,255,255,.1);border-radius:2px;margin-top:5px;min-height:30px}.wte-clm-tags .wte-sm-property .wte-sm-layer,.wte-sm-sector .wte-sm-property .wte-sm-layer{background-color:rgba(255,255,255,.055);border-radius:2px;box-shadow:1px 1px 0 rgba(0,0,0,.2),1px 1px 0 rgba(255,255,255,.055) inset;margin:2px;padding:7px;position:relative;cursor:pointer}.wte-clm-tags .wte-sm-property .wte-sm-layer>#wte-sm-preview-box,.wte-sm-sector .wte-sm-property .wte-sm-layer>#wte-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.wte-clm-tags .wte-sm-property .wte-sm-layer #wte-sm-preview,.wte-clm-tags .wte-sm-property .wte-sm-layer #wte-sm-preview-box,.wte-sm-sector .wte-sm-property .wte-sm-layer #wte-sm-preview,.wte-sm-sector .wte-sm-property .wte-sm-layer #wte-sm-preview-box{border-radius:2px}.wte-clm-tags .wte-sm-property .wte-sm-layer #wte-sm-close-layer,.wte-sm-sector .wte-sm-property .wte-sm-layer #wte-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.wte-clm-tags .wte-sm-property .wte-sm-layer #wte-sm-close-layer:hover,.wte-sm-sector .wte-sm-property .wte-sm-layer #wte-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.wte-clm-tags .wte-sm-property .wte-sm-layer>#wte-sm-preview-box #wte-sm-preview,.wte-sm-sector .wte-sm-property .wte-sm-layer>#wte-sm-preview-box #wte-sm-preview{background-color:#fff;height:100%;width:100%;background-size:cover!important}.wte-clm-tags .wte-sm-property .wte-sm-layer.wte-sm-active,.wte-sm-sector .wte-sm-property .wte-sm-layer.wte-sm-active{background-color:rgba(255,255,255,.12)}.wte-clm-tags .wte-sm-property .wte-sm-layer.wte-sm-no-preview #wte-sm-preview-box,.wte-sm-sector .wte-sm-property .wte-sm-layer.wte-sm-no-preview #wte-sm-preview-box{display:none}.wte-clm-tags #wte-sm-text-shadow #wte-sm-preview::after,.wte-sm-sector #wte-sm-text-shadow #wte-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.wte-clm-tags .wte-sm-stack .wte-sm-properties,.wte-sm-sector .wte-sm-stack .wte-sm-properties{padding-top:5px}.wte-clm-tags .wte-sm-stack #wte-sm-add,.wte-sm-sector .wte-sm-stack #wte-sm-add{background:0 0;border:none;cursor:pointer;font-size:22px;line-height:10px;position:absolute;right:0;top:-20px;opacity:.75}.wte-clm-tags .wte-sm-stack #wte-sm-add:hover,.wte-sm-sector .wte-sm-stack #wte-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.wte-clm-tags .wte-sm-colorp-c,.wte-sm-sector .wte-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.wte-clm-tags .wte-sm-colorp-c .wte-checker-bg,.wte-sm-sector .wte-sm-colorp-c .wte-checker-bg{height:100%;width:100%;border-radius:1px}.wte-clm-tags .wte-sm-color-picker,.wte-sm-sector .wte-sm-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,.3);border-radius:1px}.wte-clm-tags .wte-sm-btn-upload #wte-sm-upload,.wte-sm-sector .wte-sm-btn-upload #wte-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.wte-clm-tags .wte-sm-btn-upload #wte-sm-label,.wte-sm-sector .wte-sm-btn-upload #wte-sm-label{padding:2px 0}.wte-sm-layer>#wte-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.wte-sm-layer>#wte-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.wte-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.wte-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;margin:2.5%;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end}.wte-block.wte-bdrag{width:auto;padding:0}.wte-mdl-backlayer,.wte-mdl-container{position:absolute;top:0;width:100%;height:100%}.wte-clm-tags{font-size:11px;padding:10px 5px}.wte-clm-tags #wte-clm-label,.wte-clm-tags #wte-clm-sel{padding:7px 0;float:left}.wte-clm-tags #wte-clm-sel{font-style:italic;margin-left:5px}.wte-clm-tags #wte-clm-status-c{float:right}.wte-clm-tags #wte-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.wte-clm-tags #wte-clm-tags-c{display:inline-block;vertical-align:top}.wte-clm-tags #wte-clm-add-tag{background-color:rgba(255,255,255,.2);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,.2) inset;border:1px solid rgba(0,0,0,.15);cursor:pointer}.wte-clm-tags #wte-clm-new{color:#ddd;padding:5px 6px;display:none}.wte-clm-tags .wte-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.wte-clm-tags #wte-clm-close{font-size:20px;line-height:0;cursor:pointer}.wte-clm-tags #wte-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.wte-clm-tags #wte-clm-checkbox{vertical-align:middle;cursor:pointer;font-size:9px}.wte-clm-tags #wte-clm-tag-label{cursor:text}.wte-mdl-backlayer{background-color:#000;z-index:1;opacity:.5;filter:alpha(opacity=50)}.wte-mdl-container{z-index:10}.wte-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,.05);margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.wte-mdl-dialog .wte-mdl-btn-close{position:absolute;right:15px;top:5px}.wte-mdl-content,.wte-mdl-header{padding:10px 15px;clear:both}.wte-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,.3);padding:15px 15px 7px}.wte-mdl-content{border-top:1px solid rgba(255,255,255,.1)}#wte-mdl-c>div::after{content:"";clear:both;display:block;margin-bottom:10px}.wte-am-assets{height:290px;overflow:auto;clear:both}.wte-am-assets-header{padding:5px}.wte-am-add-asset input{width:70%}.wte-am-add-asset button{width:25%;float:right}.wte-am-assets-cont{background-color:rgba(0,0,0,.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.wte-am-assets-cont #wte-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.wte-am-assets-cont #wte-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.wte-am-assets-cont #wte-am-preview-bg{position:absolute;height:100%;width:100%;opacity:.5;filter:alpha(opacity=50);z-index:0}.wte-am-assets-cont .wte-am-highlight{background-color:rgba(255,255,255,.1)}.wte-am-assets-cont .wte-am-asset{border-bottom:1px solid rgba(0,0,0,.3);padding:5px;cursor:pointer;position:relative}.wte-am-assets-cont .wte-am-asset:hover #wte-am-close{display:block}.wte-am-assets-cont #wte-am-close{position:absolute;right:5px;top:0;display:none}.wte-am-assets-cont #wte-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.wte-am-assets-cont #wte-am-meta>div{margin-bottom:5px}.wte-am-assets-cont #wte-am-meta #wte-am-dimensions{font-size:10px;opacity:.5;filter:alpha(opacity=50)}.wte-am-file-uploader{width:55%;float:left}.wte-am-file-uploader>form{background-color:rgba(0,0,0,.1);border:2px dashed #999;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}#wte-rte-toolbar .wte-rte-btn.btn-info,.wte-cm-editor #wte-cm-title{background-color:rgba(0,0,0,.3)}.wte-am-file-uploader>form.wte-am-hover{border:2px solid #62c462;color:#75cb75}.wte-am-file-uploader>form.wte-am-disabled{border-color:red}.wte-am-file-uploader>form #wte-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.wte-am-file-uploader #wte-am-title{position:absolute;padding:150px 10px;width:100%}.wte-cm-editor-c{float:left;box-sizing:border-box;width:50%}.wte-cm-editor-c .CodeMirror{height:450px}.wte-cm-editor{font-size:12px}.wte-cm-editor#wte-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,.3)}.wte-cm-editor#wte-cm-htmlmixed #wte-cm-title{color:#a97d44}.wte-cm-editor#wte-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,.1)}.wte-cm-editor#wte-cm-css #wte-cm-title{color:#ddca7e}.wte-cm-editor #wte-cm-title{font-size:12px;padding:5px 10px 3px;text-align:right}#wte-rte-toolbar{border:1px solid rgba(0,0,0,.3);position:absolute;border-radius:3px;overflow:hidden;display:none;z-index:5}#wte-rte-toolbar .wte-rte-btn{padding:5px;width:25px;border-right:1px solid rgba(0,0,0,.3);text-align:center;cursor:pointer;outline:0}#wte-rte-toolbar .wte-rte-btn:last-child{border-right:none}#wte-rte-toolbar .wte-rte-btn:hover{background-color:rgba(255,255,255,.1)}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-handle,.sp-alpha-inner{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,.3);box-shadow:0 0 7px rgba(0,0,0,.3);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:rgba(0,0,0,.3) solid 1px}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777!important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333}.sp-slider{border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:0 0;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:active,.sp-container button:hover{background:rgba(0,0,0,.3);border-color:rgba(0,0,0,.3);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,.8)} \ No newline at end of file diff --git a/dist/grapes.min.js b/dist/grapes.min.js index 79008b2b5..8a36ec98d 100644 --- a/dist/grapes.min.js +++ b/dist/grapes.min.js @@ -1,5 +1,5 @@ -/*! grapesjs - v0.3.4 */ -!function(a,b){"function"==typeof define&&define.amd?define([],b):"object"==typeof exports&&"object"==typeof module?module.exports=mod():a.grapesjs=a.GrapesJS=b()}(this,function(){var a,b,c;return function(d){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,b){return function(){var c=v.call(arguments,0);return"string"!=typeof c[0]&&1===c.length&&c.push(null),n.apply(d,c.concat([a,b]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var b=r[a];delete r[a],t[a]=!0,m.apply(d,b)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,b,c,f){var h,k,l,m,n,s,u=[],v=typeof c;if(f=f||a,"undefined"===v||"function"===v){for(b=!b.length&&c.length?["require","exports","module"]:b,n=0;n
',attributes:{"class":"wte-fonts wte-f-b1"}},{id:"b2",label:"2 Blocks",content:'
',attributes:{"class":"wte-fonts wte-f-b2"}},{id:"b3",label:"3 Blocks",content:'
',attributes:{"class":"wte-fonts wte-f-b3"}},{id:"b4",label:"3/7 Block",content:'
',attributes:{"class":"wte-fonts wte-f-b37"}},{id:"hero",label:"Hero section",content:'
Build your templates without coding
Try it now
',attributes:{"class":"wte-fonts wte-f-hero"}},{id:"h1p",label:"Text section",content:'

Insert title here

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua

',attributes:{"class":"wte-fonts wte-f-h1p"}},{id:"3ba",label:"Badges",content:'
Adam Smith
CEO
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit
ftln
John Black
Software Engineer
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit
ftln
Jessica White
Web Designer
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit
ftln
',attributes:{"class":"wte-fonts wte-f-3ba"}},{id:"text",label:"Text",attributes:{"class":"wte-fonts wte-f-text"},content:{type:"text",content:"Insert your text here",style:{padding:"10px"},activeOnRender:1}},{id:"image",label:"Image",attributes:{"class":"wte-fonts wte-f-image"},content:{type:"image",activeOnRender:1}},{id:"quo",label:"Quote",content:'
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit
',attributes:{"class":"wte-fonts wte-f-quo"}}]},defaultCommand:"select-comp",showDevices:1,el:""};return a}),function(){function a(a){function b(b,c,d,e,f,g){for(;f>=0&&g>f;f+=a){var h=e?e[f]:f;d=c(d,b[h],h,b)}return d}return function(c,d,e,f){d=u(d,f,4);var g=!B(c)&&t.keys(c),h=(g||c).length,i=a>0?0:h-1;return arguments.length<3&&(e=c[g?g[i]:i],i+=a),b(c,d,e,g,i,h)}}function b(a){return function(b,c,d){c=v(c,d);for(var e=A(b),f=a>0?0:e-1;f>=0&&e>f;f+=a)if(c(b[f],f,b))return f;return-1}}function d(a,b,c){return function(d,e,f){var g=0,h=A(d);if("number"==typeof f)a>0?g=f>=0?f:Math.max(f+h,g):h=f>=0?Math.min(f+1,h):f+h+1;else if(c&&f&&h)return f=c(d,e),d[f]===e?f:-1;if(e!==e)return f=b(l.call(d,g,h),t.isNaN),f>=0?f+g:-1;for(f=a>0?g:h-1;f>=0&&h>f;f+=a)if(d[f]===e)return f;return-1}}function e(a,b){var c=G.length,d=a.constructor,e=t.isFunction(d)&&d.prototype||i,f="constructor";for(t.has(a,f)&&!t.contains(b,f)&&b.push(f);c--;)f=G[c],f in a&&a[f]!==e[f]&&!t.contains(b,f)&&b.push(f)}var f=this,g=f._,h=Array.prototype,i=Object.prototype,j=Function.prototype,k=h.push,l=h.slice,m=i.toString,n=i.hasOwnProperty,o=Array.isArray,p=Object.keys,q=j.bind,r=Object.create,s=function(){},t=function(a){return a instanceof t?a:this instanceof t?void(this._wrapped=a):new t(a)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=t),exports._=t):f._=t,t.VERSION="1.8.3";var u=function(a,b,c){if(void 0===b)return a;switch(null==c?3:c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)}}return function(){return a.apply(b,arguments)}},v=function(a,b,c){return null==a?t.identity:t.isFunction(a)?u(a,b,c):t.isObject(a)?t.matcher(a):t.property(a)};t.iteratee=function(a,b){return v(a,b,1/0)};var w=function(a,b){return function(c){var d=arguments.length;if(2>d||null==c)return c;for(var e=1;d>e;e++)for(var f=arguments[e],g=a(f),h=g.length,i=0;h>i;i++){var j=g[i];b&&void 0!==c[j]||(c[j]=f[j])}return c}},x=function(a){if(!t.isObject(a))return{};if(r)return r(a);s.prototype=a;var b=new s;return s.prototype=null,b},y=function(a){return function(b){return null==b?void 0:b[a]}},z=Math.pow(2,53)-1,A=y("length"),B=function(a){var b=A(a);return"number"==typeof b&&b>=0&&z>=b};t.each=t.forEach=function(a,b,c){b=u(b,c);var d,e;if(B(a))for(d=0,e=a.length;e>d;d++)b(a[d],d,a);else{var f=t.keys(a);for(d=0,e=f.length;e>d;d++)b(a[f[d]],f[d],a)}return a},t.map=t.collect=function(a,b,c){b=v(b,c);for(var d=!B(a)&&t.keys(a),e=(d||a).length,f=Array(e),g=0;e>g;g++){var h=d?d[g]:g;f[g]=b(a[h],h,a)}return f},t.reduce=t.foldl=t.inject=a(1),t.reduceRight=t.foldr=a(-1),t.find=t.detect=function(a,b,c){var d;return d=B(a)?t.findIndex(a,b,c):t.findKey(a,b,c),void 0!==d&&-1!==d?a[d]:void 0},t.filter=t.select=function(a,b,c){var d=[];return b=v(b,c),t.each(a,function(a,c,e){b(a,c,e)&&d.push(a)}),d},t.reject=function(a,b,c){return t.filter(a,t.negate(v(b)),c)},t.every=t.all=function(a,b,c){b=v(b,c);for(var d=!B(a)&&t.keys(a),e=(d||a).length,f=0;e>f;f++){var g=d?d[f]:f;if(!b(a[g],g,a))return!1}return!0},t.some=t.any=function(a,b,c){b=v(b,c);for(var d=!B(a)&&t.keys(a),e=(d||a).length,f=0;e>f;f++){var g=d?d[f]:f;if(b(a[g],g,a))return!0}return!1},t.contains=t.includes=t.include=function(a,b,c,d){return B(a)||(a=t.values(a)),("number"!=typeof c||d)&&(c=0),t.indexOf(a,b,c)>=0},t.invoke=function(a,b){var c=l.call(arguments,2),d=t.isFunction(b);return t.map(a,function(a){var e=d?b:a[b];return null==e?e:e.apply(a,c)})},t.pluck=function(a,b){return t.map(a,t.property(b))},t.where=function(a,b){return t.filter(a,t.matcher(b))},t.findWhere=function(a,b){return t.find(a,t.matcher(b))},t.max=function(a,b,c){var d,e,f=-1/0,g=-1/0;if(null==b&&null!=a){a=B(a)?a:t.values(a);for(var h=0,i=a.length;i>h;h++)d=a[h],d>f&&(f=d)}else b=v(b,c),t.each(a,function(a,c,d){e=b(a,c,d),(e>g||e===-1/0&&f===-1/0)&&(f=a,g=e)});return f},t.min=function(a,b,c){var d,e,f=1/0,g=1/0;if(null==b&&null!=a){a=B(a)?a:t.values(a);for(var h=0,i=a.length;i>h;h++)d=a[h],f>d&&(f=d)}else b=v(b,c),t.each(a,function(a,c,d){e=b(a,c,d),(g>e||1/0===e&&1/0===f)&&(f=a,g=e)});return f},t.shuffle=function(a){for(var b,c=B(a)?a:t.values(a),d=c.length,e=Array(d),f=0;d>f;f++)b=t.random(0,f),b!==f&&(e[f]=e[b]),e[b]=c[f];return e},t.sample=function(a,b,c){return null==b||c?(B(a)||(a=t.values(a)),a[t.random(a.length-1)]):t.shuffle(a).slice(0,Math.max(0,b))},t.sortBy=function(a,b,c){return b=v(b,c),t.pluck(t.map(a,function(a,c,d){return{value:a,index:c,criteria:b(a,c,d)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;if(c!==d){if(c>d||void 0===c)return 1;if(d>c||void 0===d)return-1}return a.index-b.index}),"value")};var C=function(a){return function(b,c,d){var e={};return c=v(c,d),t.each(b,function(d,f){var g=c(d,f,b);a(e,d,g)}),e}};t.groupBy=C(function(a,b,c){t.has(a,c)?a[c].push(b):a[c]=[b]}),t.indexBy=C(function(a,b,c){a[c]=b}),t.countBy=C(function(a,b,c){t.has(a,c)?a[c]++:a[c]=1}),t.toArray=function(a){return a?t.isArray(a)?l.call(a):B(a)?t.map(a,t.identity):t.values(a):[]},t.size=function(a){return null==a?0:B(a)?a.length:t.keys(a).length},t.partition=function(a,b,c){b=v(b,c);var d=[],e=[];return t.each(a,function(a,c,f){(b(a,c,f)?d:e).push(a)}),[d,e]},t.first=t.head=t.take=function(a,b,c){return null==a?void 0:null==b||c?a[0]:t.initial(a,a.length-b)},t.initial=function(a,b,c){return l.call(a,0,Math.max(0,a.length-(null==b||c?1:b)))},t.last=function(a,b,c){return null==a?void 0:null==b||c?a[a.length-1]:t.rest(a,Math.max(0,a.length-b))},t.rest=t.tail=t.drop=function(a,b,c){return l.call(a,null==b||c?1:b)},t.compact=function(a){return t.filter(a,t.identity)};var D=function(a,b,c,d){for(var e=[],f=0,g=d||0,h=A(a);h>g;g++){var i=a[g];if(B(i)&&(t.isArray(i)||t.isArguments(i))){b||(i=D(i,b,c));var j=0,k=i.length;for(e.length+=k;k>j;)e[f++]=i[j++]}else c||(e[f++]=i)}return e};t.flatten=function(a,b){return D(a,b,!1)},t.without=function(a){return t.difference(a,l.call(arguments,1))},t.uniq=t.unique=function(a,b,c,d){t.isBoolean(b)||(d=c,c=b,b=!1),null!=c&&(c=v(c,d));for(var e=[],f=[],g=0,h=A(a);h>g;g++){var i=a[g],j=c?c(i,g,a):i;b?(g&&f===j||e.push(i),f=j):c?t.contains(f,j)||(f.push(j),e.push(i)):t.contains(e,i)||e.push(i)}return e},t.union=function(){return t.uniq(D(arguments,!0,!0))},t.intersection=function(a){for(var b=[],c=arguments.length,d=0,e=A(a);e>d;d++){var f=a[d];if(!t.contains(b,f)){for(var g=1;c>g&&t.contains(arguments[g],f);g++);g===c&&b.push(f)}}return b},t.difference=function(a){var b=D(arguments,!0,!0,1);return t.filter(a,function(a){return!t.contains(b,a)})},t.zip=function(){return t.unzip(arguments)},t.unzip=function(a){for(var b=a&&t.max(a,A).length||0,c=Array(b),d=0;b>d;d++)c[d]=t.pluck(a,d);return c},t.object=function(a,b){for(var c={},d=0,e=A(a);e>d;d++)b?c[a[d]]=b[d]:c[a[d][0]]=a[d][1];return c},t.findIndex=b(1),t.findLastIndex=b(-1),t.sortedIndex=function(a,b,c,d){c=v(c,d,1);for(var e=c(b),f=0,g=A(a);g>f;){var h=Math.floor((f+g)/2);c(a[h])f;f++,a+=c)e[f]=a;return e};var E=function(a,b,c,d,e){if(!(d instanceof b))return a.apply(c,e);var f=x(a.prototype),g=a.apply(f,e);return t.isObject(g)?g:f};t.bind=function(a,b){if(q&&a.bind===q)return q.apply(a,l.call(arguments,1));if(!t.isFunction(a))throw new TypeError("Bind must be called on a function");var c=l.call(arguments,2),d=function(){return E(a,d,b,this,c.concat(l.call(arguments)))};return d},t.partial=function(a){var b=l.call(arguments,1),c=function(){for(var d=0,e=b.length,f=Array(e),g=0;e>g;g++)f[g]=b[g]===t?arguments[d++]:b[g];for(;d=d)throw new Error("bindAll must be passed function names");for(b=1;d>b;b++)c=arguments[b],a[c]=t.bind(a[c],a);return a},t.memoize=function(a,b){var c=function(d){var e=c.cache,f=""+(b?b.apply(this,arguments):d);return t.has(e,f)||(e[f]=a.apply(this,arguments)),e[f]};return c.cache={},c},t.delay=function(a,b){var c=l.call(arguments,2);return setTimeout(function(){return a.apply(null,c)},b)},t.defer=t.partial(t.delay,t,1),t.throttle=function(a,b,c){var d,e,f,g=null,h=0;c||(c={});var i=function(){h=c.leading===!1?0:t.now(),g=null,f=a.apply(d,e),g||(d=e=null)};return function(){var j=t.now();h||c.leading!==!1||(h=j);var k=b-(j-h);return d=this,e=arguments,0>=k||k>b?(g&&(clearTimeout(g),g=null),h=j,f=a.apply(d,e),g||(d=e=null)):g||c.trailing===!1||(g=setTimeout(i,k)),f}},t.debounce=function(a,b,c){var d,e,f,g,h,i=function(){var j=t.now()-g;b>j&&j>=0?d=setTimeout(i,b-j):(d=null,c||(h=a.apply(f,e),d||(f=e=null)))};return function(){f=this,e=arguments,g=t.now();var j=c&&!d;return d||(d=setTimeout(i,b)),j&&(h=a.apply(f,e),f=e=null),h}},t.wrap=function(a,b){return t.partial(b,a)},t.negate=function(a){return function(){return!a.apply(this,arguments)}},t.compose=function(){var a=arguments,b=a.length-1;return function(){for(var c=b,d=a[b].apply(this,arguments);c--;)d=a[c].call(this,d);return d}},t.after=function(a,b){return function(){return--a<1?b.apply(this,arguments):void 0}},t.before=function(a,b){var c;return function(){return--a>0&&(c=b.apply(this,arguments)),1>=a&&(b=null),c}},t.once=t.partial(t.before,2);var F=!{toString:null}.propertyIsEnumerable("toString"),G=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];t.keys=function(a){if(!t.isObject(a))return[];if(p)return p(a);var b=[];for(var c in a)t.has(a,c)&&b.push(c);return F&&e(a,b),b},t.allKeys=function(a){if(!t.isObject(a))return[];var b=[];for(var c in a)b.push(c);return F&&e(a,b),b},t.values=function(a){for(var b=t.keys(a),c=b.length,d=Array(c),e=0;c>e;e++)d[e]=a[b[e]];return d},t.mapObject=function(a,b,c){b=v(b,c);for(var d,e=t.keys(a),f=e.length,g={},h=0;f>h;h++)d=e[h],g[d]=b(a[d],d,a);return g},t.pairs=function(a){for(var b=t.keys(a),c=b.length,d=Array(c),e=0;c>e;e++)d[e]=[b[e],a[b[e]]];return d},t.invert=function(a){for(var b={},c=t.keys(a),d=0,e=c.length;e>d;d++)b[a[c[d]]]=c[d];return b},t.functions=t.methods=function(a){var b=[];for(var c in a)t.isFunction(a[c])&&b.push(c);return b.sort()},t.extend=w(t.allKeys),t.extendOwn=t.assign=w(t.keys),t.findKey=function(a,b,c){b=v(b,c);for(var d,e=t.keys(a),f=0,g=e.length;g>f;f++)if(d=e[f],b(a[d],d,a))return d},t.pick=function(a,b,c){var d,e,f={},g=a;if(null==g)return f;t.isFunction(b)?(e=t.allKeys(g),d=u(b,c)):(e=D(arguments,!1,!1,1),d=function(a,b,c){return b in c},g=Object(g));for(var h=0,i=e.length;i>h;h++){var j=e[h],k=g[j];d(k,j,g)&&(f[j]=k)}return f},t.omit=function(a,b,c){if(t.isFunction(b))b=t.negate(b);else{var d=t.map(D(arguments,!1,!1,1),String);b=function(a,b){return!t.contains(d,b)}}return t.pick(a,b,c)},t.defaults=w(t.allKeys,!0),t.create=function(a,b){var c=x(a);return b&&t.extendOwn(c,b),c},t.clone=function(a){return t.isObject(a)?t.isArray(a)?a.slice():t.extend({},a):a},t.tap=function(a,b){return b(a),a},t.isMatch=function(a,b){var c=t.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;d>f;f++){var g=c[f];if(b[g]!==e[g]||!(g in e))return!1}return!0};var H=function(a,b,c,d){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;a instanceof t&&(a=a._wrapped),b instanceof t&&(b=b._wrapped);var e=m.call(a);if(e!==m.call(b))return!1;switch(e){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b}var f="[object Array]"===e;if(!f){if("object"!=typeof a||"object"!=typeof b)return!1;var g=a.constructor,h=b.constructor;if(g!==h&&!(t.isFunction(g)&&g instanceof g&&t.isFunction(h)&&h instanceof h)&&"constructor"in a&&"constructor"in b)return!1}c=c||[],d=d||[];for(var i=c.length;i--;)if(c[i]===a)return d[i]===b;if(c.push(a),d.push(b),f){if(i=a.length,i!==b.length)return!1;for(;i--;)if(!H(a[i],b[i],c,d))return!1}else{var j,k=t.keys(a);if(i=k.length,t.keys(b).length!==i)return!1;for(;i--;)if(j=k[i],!t.has(b,j)||!H(a[j],b[j],c,d))return!1}return c.pop(),d.pop(),!0};t.isEqual=function(a,b){return H(a,b)},t.isEmpty=function(a){return null==a?!0:B(a)&&(t.isArray(a)||t.isString(a)||t.isArguments(a))?0===a.length:0===t.keys(a).length},t.isElement=function(a){return!(!a||1!==a.nodeType)},t.isArray=o||function(a){return"[object Array]"===m.call(a)},t.isObject=function(a){var b=typeof a;return"function"===b||"object"===b&&!!a},t.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(a){t["is"+a]=function(b){return m.call(b)==="[object "+a+"]"}}),t.isArguments(arguments)||(t.isArguments=function(a){return t.has(a,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(t.isFunction=function(a){return"function"==typeof a||!1}),t.isFinite=function(a){return isFinite(a)&&!isNaN(parseFloat(a))},t.isNaN=function(a){return t.isNumber(a)&&a!==+a},t.isBoolean=function(a){return a===!0||a===!1||"[object Boolean]"===m.call(a)},t.isNull=function(a){return null===a},t.isUndefined=function(a){return void 0===a},t.has=function(a,b){return null!=a&&n.call(a,b)},t.noConflict=function(){return f._=g,this},t.identity=function(a){return a},t.constant=function(a){return function(){return a}},t.noop=function(){},t.property=y,t.propertyOf=function(a){return null==a?function(){}:function(b){return a[b]}},t.matcher=t.matches=function(a){return a=t.extendOwn({},a),function(b){return t.isMatch(b,a)}},t.times=function(a,b,c){var d=Array(Math.max(0,a));b=u(b,c,1);for(var e=0;a>e;e++)d[e]=b(e);return d},t.random=function(a,b){return null==b&&(b=a,a=0),a+Math.floor(Math.random()*(b-a+1))},t.now=Date.now||function(){return(new Date).getTime()};var I={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},J=t.invert(I),K=function(a){var b=function(b){return a[b]},c="(?:"+t.keys(a).join("|")+")",d=RegExp(c),e=RegExp(c,"g");return function(a){return a=null==a?"":""+a,d.test(a)?a.replace(e,b):a}};t.escape=K(I),t.unescape=K(J),t.result=function(a,b,c){var d=null==a?void 0:a[b];return void 0===d&&(d=c),t.isFunction(d)?d.call(a):d};var L=0;t.uniqueId=function(a){var b=++L+"";return a?a+b:b},t.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var M=/(.)^/,N={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},O=/\\|'|\r|\n|\u2028|\u2029/g,P=function(a){return"\\"+N[a]};t.template=function(a,b,c){!b&&c&&(b=c),b=t.defaults({},b,t.templateSettings);var d=RegExp([(b.escape||M).source,(b.interpolate||M).source,(b.evaluate||M).source].join("|")+"|$","g"),e=0,f="__p+='";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(O,P),e=h+b.length,c?f+="'+\n((__t=("+c+"))==null?'':_.escape(__t))+\n'":d?f+="'+\n((__t=("+d+"))==null?'':__t)+\n'":g&&(f+="';\n"+g+"\n__p+='"),b}),f+="';\n",b.variable||(f="with(obj||{}){\n"+f+"}\n"),f="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+f+"return __p;\n";try{var g=new Function(b.variable||"obj","_",f)}catch(h){throw h.source=f,h}var i=function(a){return g.call(this,a,t)},j=b.variable||"obj";return i.source="function("+j+"){\n"+f+"}",i},t.chain=function(a){var b=t(a);return b._chain=!0,b};var Q=function(a,b){return a._chain?t(b).chain():b};t.mixin=function(a){t.each(t.functions(a),function(b){var c=t[b]=a[b];t.prototype[b]=function(){var a=[this._wrapped];return k.apply(a,arguments),Q(this,c.apply(t,a))}})},t.mixin(t),t.each(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=h[a];t.prototype[a]=function(){var c=this._wrapped;return b.apply(c,arguments),"shift"!==a&&"splice"!==a||0!==c.length||delete c[0],Q(this,c)}}),t.each(["concat","join","slice"],function(a){var b=h[a];t.prototype[a]=function(){return Q(this,b.apply(this._wrapped,arguments))}}),t.prototype.value=function(){return this._wrapped},t.prototype.valueOf=t.prototype.toJSON=t.prototype.value,t.prototype.toString=function(){return""+this._wrapped},"function"==typeof c&&c.amd&&c("underscore",[],function(){return t})}.call(this),c("jquery",[],function(){return jQuery}),function(a){var d="object"==typeof self&&self.self==self&&self||"object"==typeof global&&global.global==global&&global;if("function"==typeof c&&c.amd)c("backbone",["underscore","jquery","exports"],function(b,c,e){d.Backbone=a(d,e,b,c)});else if("undefined"!=typeof exports){var e,f=b("underscore");try{e=b("jquery")}catch(g){}a(d,exports,f,e)}else d.Backbone=a(d,{},d._,d.jQuery||d.Zepto||d.ender||d.$)}(function(a,b,c,d){var e=a.Backbone,f=Array.prototype.slice;b.VERSION="1.2.3",b.$=d,b.noConflict=function(){return a.Backbone=e,this},b.emulateHTTP=!1,b.emulateJSON=!1;var g=function(a,b,d){switch(a){case 1:return function(){return c[b](this[d])};case 2:return function(a){return c[b](this[d],a)};case 3:return function(a,e){return c[b](this[d],i(a,this),e)};case 4:return function(a,e,f){return c[b](this[d],i(a,this),e,f)};default:return function(){var a=f.call(arguments);return a.unshift(this[d]),c[b].apply(c,a)}}},h=function(a,b,d){c.each(b,function(b,e){c[e]&&(a.prototype[e]=g(b,e,d))})},i=function(a,b){return c.isFunction(a)?a:c.isObject(a)&&!b._isModel(a)?j(a):c.isString(a)?function(b){return b.get(a)}:a},j=function(a){var b=c.matches(a);return function(a){return b(a.attributes)}},k=b.Events={},l=/\s+/,m=function(a,b,d,e,f){var g,h=0;if(d&&"object"==typeof d){void 0!==e&&"context"in f&&void 0===f.context&&(f.context=e);for(g=c.keys(d);hd;d++)c[d]=arguments[d+1];return m(r,this._events,a,void 0,c),this};var r=function(a,b,c,d){if(a){var e=a[b],f=a.all;e&&f&&(f=f.slice()),e&&s(e,d),f&&s(f,[b].concat(d))}return a},s=function(a,b){var c,d=-1,e=a.length,f=b[0],g=b[1],h=b[2];switch(b.length){case 0:for(;++d0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,b){return function(){var c=v.call(arguments,0);return"string"!=typeof c[0]&&1===c.length&&c.push(null),n.apply(d,c.concat([a,b]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var b=r[a];delete r[a],t[a]=!0,m.apply(d,b)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,b,c,f){var h,k,l,m,n,s,u=[],v=typeof c;if(f=f||a,"undefined"===v||"function"===v){for(b=!b.length&&c.length?["require","exports","module"]:b,n=0;n
',attributes:{"class":"wte-fonts wte-f-b1"}},{id:"b2",label:"2 Blocks",content:'
',attributes:{"class":"wte-fonts wte-f-b2"}},{id:"b3",label:"3 Blocks",content:'
',attributes:{"class":"wte-fonts wte-f-b3"}},{id:"b4",label:"3/7 Block",content:'
',attributes:{"class":"wte-fonts wte-f-b37"}},{id:"hero",label:"Hero section",content:'
Build your templates without coding
Try it now
',attributes:{"class":"wte-fonts wte-f-hero"}},{id:"h1p",label:"Text section",content:'

Insert title here

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua

',attributes:{"class":"wte-fonts wte-f-h1p"}},{id:"3ba",label:"Badges",content:'
Adam Smith
CEO
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit
ftln
John Black
Software Engineer
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit
ftln
Jessica White
Web Designer
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit
ftln
',attributes:{"class":"wte-fonts wte-f-3ba"}},{id:"text",label:"Text",attributes:{"class":"wte-fonts wte-f-text"},content:{type:"text",content:"Insert your text here",style:{padding:"10px"},activeOnRender:1}},{id:"image",label:"Image",attributes:{"class":"wte-fonts wte-f-image"},content:{type:"image",activeOnRender:1}},{id:"quo",label:"Quote",content:'
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit
',attributes:{"class":"wte-fonts wte-f-quo"}}]},defaultCommand:"select-comp",showDevices:1,el:""};return a}),function(){function a(a){function b(b,c,d,e,f,g){for(;f>=0&&g>f;f+=a){var h=e?e[f]:f;d=c(d,b[h],h,b)}return d}return function(c,d,e,f){d=u(d,f,4);var g=!B(c)&&t.keys(c),h=(g||c).length,i=a>0?0:h-1;return arguments.length<3&&(e=c[g?g[i]:i],i+=a),b(c,d,e,g,i,h)}}function b(a){return function(b,c,d){c=v(c,d);for(var e=A(b),f=a>0?0:e-1;f>=0&&e>f;f+=a)if(c(b[f],f,b))return f;return-1}}function d(a,b,c){return function(d,e,f){var g=0,h=A(d);if("number"==typeof f)a>0?g=f>=0?f:Math.max(f+h,g):h=f>=0?Math.min(f+1,h):f+h+1;else if(c&&f&&h)return f=c(d,e),d[f]===e?f:-1;if(e!==e)return f=b(l.call(d,g,h),t.isNaN),f>=0?f+g:-1;for(f=a>0?g:h-1;f>=0&&h>f;f+=a)if(d[f]===e)return f;return-1}}function e(a,b){var c=G.length,d=a.constructor,e=t.isFunction(d)&&d.prototype||i,f="constructor";for(t.has(a,f)&&!t.contains(b,f)&&b.push(f);c--;)f=G[c],f in a&&a[f]!==e[f]&&!t.contains(b,f)&&b.push(f)}var f=this,g=f._,h=Array.prototype,i=Object.prototype,j=Function.prototype,k=h.push,l=h.slice,m=i.toString,n=i.hasOwnProperty,o=Array.isArray,p=Object.keys,q=j.bind,r=Object.create,s=function(){},t=function(a){return a instanceof t?a:this instanceof t?void(this._wrapped=a):new t(a)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=t),exports._=t):f._=t,t.VERSION="1.8.3";var u=function(a,b,c){if(void 0===b)return a;switch(null==c?3:c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)}}return function(){return a.apply(b,arguments)}},v=function(a,b,c){return null==a?t.identity:t.isFunction(a)?u(a,b,c):t.isObject(a)?t.matcher(a):t.property(a)};t.iteratee=function(a,b){return v(a,b,1/0)};var w=function(a,b){return function(c){var d=arguments.length;if(2>d||null==c)return c;for(var e=1;d>e;e++)for(var f=arguments[e],g=a(f),h=g.length,i=0;h>i;i++){var j=g[i];b&&void 0!==c[j]||(c[j]=f[j])}return c}},x=function(a){if(!t.isObject(a))return{};if(r)return r(a);s.prototype=a;var b=new s;return s.prototype=null,b},y=function(a){return function(b){return null==b?void 0:b[a]}},z=Math.pow(2,53)-1,A=y("length"),B=function(a){var b=A(a);return"number"==typeof b&&b>=0&&z>=b};t.each=t.forEach=function(a,b,c){b=u(b,c);var d,e;if(B(a))for(d=0,e=a.length;e>d;d++)b(a[d],d,a);else{var f=t.keys(a);for(d=0,e=f.length;e>d;d++)b(a[f[d]],f[d],a)}return a},t.map=t.collect=function(a,b,c){b=v(b,c);for(var d=!B(a)&&t.keys(a),e=(d||a).length,f=Array(e),g=0;e>g;g++){var h=d?d[g]:g;f[g]=b(a[h],h,a)}return f},t.reduce=t.foldl=t.inject=a(1),t.reduceRight=t.foldr=a(-1),t.find=t.detect=function(a,b,c){var d;return d=B(a)?t.findIndex(a,b,c):t.findKey(a,b,c),void 0!==d&&-1!==d?a[d]:void 0},t.filter=t.select=function(a,b,c){var d=[];return b=v(b,c),t.each(a,function(a,c,e){b(a,c,e)&&d.push(a)}),d},t.reject=function(a,b,c){return t.filter(a,t.negate(v(b)),c)},t.every=t.all=function(a,b,c){b=v(b,c);for(var d=!B(a)&&t.keys(a),e=(d||a).length,f=0;e>f;f++){var g=d?d[f]:f;if(!b(a[g],g,a))return!1}return!0},t.some=t.any=function(a,b,c){b=v(b,c);for(var d=!B(a)&&t.keys(a),e=(d||a).length,f=0;e>f;f++){var g=d?d[f]:f;if(b(a[g],g,a))return!0}return!1},t.contains=t.includes=t.include=function(a,b,c,d){return B(a)||(a=t.values(a)),("number"!=typeof c||d)&&(c=0),t.indexOf(a,b,c)>=0},t.invoke=function(a,b){var c=l.call(arguments,2),d=t.isFunction(b);return t.map(a,function(a){var e=d?b:a[b];return null==e?e:e.apply(a,c)})},t.pluck=function(a,b){return t.map(a,t.property(b))},t.where=function(a,b){return t.filter(a,t.matcher(b))},t.findWhere=function(a,b){return t.find(a,t.matcher(b))},t.max=function(a,b,c){var d,e,f=-1/0,g=-1/0;if(null==b&&null!=a){a=B(a)?a:t.values(a);for(var h=0,i=a.length;i>h;h++)d=a[h],d>f&&(f=d)}else b=v(b,c),t.each(a,function(a,c,d){e=b(a,c,d),(e>g||e===-1/0&&f===-1/0)&&(f=a,g=e)});return f},t.min=function(a,b,c){var d,e,f=1/0,g=1/0;if(null==b&&null!=a){a=B(a)?a:t.values(a);for(var h=0,i=a.length;i>h;h++)d=a[h],f>d&&(f=d)}else b=v(b,c),t.each(a,function(a,c,d){e=b(a,c,d),(g>e||1/0===e&&1/0===f)&&(f=a,g=e)});return f},t.shuffle=function(a){for(var b,c=B(a)?a:t.values(a),d=c.length,e=Array(d),f=0;d>f;f++)b=t.random(0,f),b!==f&&(e[f]=e[b]),e[b]=c[f];return e},t.sample=function(a,b,c){return null==b||c?(B(a)||(a=t.values(a)),a[t.random(a.length-1)]):t.shuffle(a).slice(0,Math.max(0,b))},t.sortBy=function(a,b,c){return b=v(b,c),t.pluck(t.map(a,function(a,c,d){return{value:a,index:c,criteria:b(a,c,d)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;if(c!==d){if(c>d||void 0===c)return 1;if(d>c||void 0===d)return-1}return a.index-b.index}),"value")};var C=function(a){return function(b,c,d){var e={};return c=v(c,d),t.each(b,function(d,f){var g=c(d,f,b);a(e,d,g)}),e}};t.groupBy=C(function(a,b,c){t.has(a,c)?a[c].push(b):a[c]=[b]}),t.indexBy=C(function(a,b,c){a[c]=b}),t.countBy=C(function(a,b,c){t.has(a,c)?a[c]++:a[c]=1}),t.toArray=function(a){return a?t.isArray(a)?l.call(a):B(a)?t.map(a,t.identity):t.values(a):[]},t.size=function(a){return null==a?0:B(a)?a.length:t.keys(a).length},t.partition=function(a,b,c){b=v(b,c);var d=[],e=[];return t.each(a,function(a,c,f){(b(a,c,f)?d:e).push(a)}),[d,e]},t.first=t.head=t.take=function(a,b,c){return null==a?void 0:null==b||c?a[0]:t.initial(a,a.length-b)},t.initial=function(a,b,c){return l.call(a,0,Math.max(0,a.length-(null==b||c?1:b)))},t.last=function(a,b,c){return null==a?void 0:null==b||c?a[a.length-1]:t.rest(a,Math.max(0,a.length-b))},t.rest=t.tail=t.drop=function(a,b,c){return l.call(a,null==b||c?1:b)},t.compact=function(a){return t.filter(a,t.identity)};var D=function(a,b,c,d){for(var e=[],f=0,g=d||0,h=A(a);h>g;g++){var i=a[g];if(B(i)&&(t.isArray(i)||t.isArguments(i))){b||(i=D(i,b,c));var j=0,k=i.length;for(e.length+=k;k>j;)e[f++]=i[j++]}else c||(e[f++]=i)}return e};t.flatten=function(a,b){return D(a,b,!1)},t.without=function(a){return t.difference(a,l.call(arguments,1))},t.uniq=t.unique=function(a,b,c,d){t.isBoolean(b)||(d=c,c=b,b=!1),null!=c&&(c=v(c,d));for(var e=[],f=[],g=0,h=A(a);h>g;g++){var i=a[g],j=c?c(i,g,a):i;b?(g&&f===j||e.push(i),f=j):c?t.contains(f,j)||(f.push(j),e.push(i)):t.contains(e,i)||e.push(i)}return e},t.union=function(){return t.uniq(D(arguments,!0,!0))},t.intersection=function(a){for(var b=[],c=arguments.length,d=0,e=A(a);e>d;d++){var f=a[d];if(!t.contains(b,f)){for(var g=1;c>g&&t.contains(arguments[g],f);g++);g===c&&b.push(f)}}return b},t.difference=function(a){var b=D(arguments,!0,!0,1);return t.filter(a,function(a){return!t.contains(b,a)})},t.zip=function(){return t.unzip(arguments)},t.unzip=function(a){for(var b=a&&t.max(a,A).length||0,c=Array(b),d=0;b>d;d++)c[d]=t.pluck(a,d);return c},t.object=function(a,b){for(var c={},d=0,e=A(a);e>d;d++)b?c[a[d]]=b[d]:c[a[d][0]]=a[d][1];return c},t.findIndex=b(1),t.findLastIndex=b(-1),t.sortedIndex=function(a,b,c,d){c=v(c,d,1);for(var e=c(b),f=0,g=A(a);g>f;){var h=Math.floor((f+g)/2);c(a[h])f;f++,a+=c)e[f]=a;return e};var E=function(a,b,c,d,e){if(!(d instanceof b))return a.apply(c,e);var f=x(a.prototype),g=a.apply(f,e);return t.isObject(g)?g:f};t.bind=function(a,b){if(q&&a.bind===q)return q.apply(a,l.call(arguments,1));if(!t.isFunction(a))throw new TypeError("Bind must be called on a function");var c=l.call(arguments,2),d=function(){return E(a,d,b,this,c.concat(l.call(arguments)))};return d},t.partial=function(a){var b=l.call(arguments,1),c=function(){for(var d=0,e=b.length,f=Array(e),g=0;e>g;g++)f[g]=b[g]===t?arguments[d++]:b[g];for(;d=d)throw new Error("bindAll must be passed function names");for(b=1;d>b;b++)c=arguments[b],a[c]=t.bind(a[c],a);return a},t.memoize=function(a,b){var c=function(d){var e=c.cache,f=""+(b?b.apply(this,arguments):d);return t.has(e,f)||(e[f]=a.apply(this,arguments)),e[f]};return c.cache={},c},t.delay=function(a,b){var c=l.call(arguments,2);return setTimeout(function(){return a.apply(null,c)},b)},t.defer=t.partial(t.delay,t,1),t.throttle=function(a,b,c){var d,e,f,g=null,h=0;c||(c={});var i=function(){h=c.leading===!1?0:t.now(),g=null,f=a.apply(d,e),g||(d=e=null)};return function(){var j=t.now();h||c.leading!==!1||(h=j);var k=b-(j-h);return d=this,e=arguments,0>=k||k>b?(g&&(clearTimeout(g),g=null),h=j,f=a.apply(d,e),g||(d=e=null)):g||c.trailing===!1||(g=setTimeout(i,k)),f}},t.debounce=function(a,b,c){var d,e,f,g,h,i=function(){var j=t.now()-g;b>j&&j>=0?d=setTimeout(i,b-j):(d=null,c||(h=a.apply(f,e),d||(f=e=null)))};return function(){f=this,e=arguments,g=t.now();var j=c&&!d;return d||(d=setTimeout(i,b)),j&&(h=a.apply(f,e),f=e=null),h}},t.wrap=function(a,b){return t.partial(b,a)},t.negate=function(a){return function(){return!a.apply(this,arguments)}},t.compose=function(){var a=arguments,b=a.length-1;return function(){for(var c=b,d=a[b].apply(this,arguments);c--;)d=a[c].call(this,d);return d}},t.after=function(a,b){return function(){return--a<1?b.apply(this,arguments):void 0}},t.before=function(a,b){var c;return function(){return--a>0&&(c=b.apply(this,arguments)),1>=a&&(b=null),c}},t.once=t.partial(t.before,2);var F=!{toString:null}.propertyIsEnumerable("toString"),G=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];t.keys=function(a){if(!t.isObject(a))return[];if(p)return p(a);var b=[];for(var c in a)t.has(a,c)&&b.push(c);return F&&e(a,b),b},t.allKeys=function(a){if(!t.isObject(a))return[];var b=[];for(var c in a)b.push(c);return F&&e(a,b),b},t.values=function(a){for(var b=t.keys(a),c=b.length,d=Array(c),e=0;c>e;e++)d[e]=a[b[e]];return d},t.mapObject=function(a,b,c){b=v(b,c);for(var d,e=t.keys(a),f=e.length,g={},h=0;f>h;h++)d=e[h],g[d]=b(a[d],d,a);return g},t.pairs=function(a){for(var b=t.keys(a),c=b.length,d=Array(c),e=0;c>e;e++)d[e]=[b[e],a[b[e]]];return d},t.invert=function(a){for(var b={},c=t.keys(a),d=0,e=c.length;e>d;d++)b[a[c[d]]]=c[d];return b},t.functions=t.methods=function(a){var b=[];for(var c in a)t.isFunction(a[c])&&b.push(c);return b.sort()},t.extend=w(t.allKeys),t.extendOwn=t.assign=w(t.keys),t.findKey=function(a,b,c){b=v(b,c);for(var d,e=t.keys(a),f=0,g=e.length;g>f;f++)if(d=e[f],b(a[d],d,a))return d},t.pick=function(a,b,c){var d,e,f={},g=a;if(null==g)return f;t.isFunction(b)?(e=t.allKeys(g),d=u(b,c)):(e=D(arguments,!1,!1,1),d=function(a,b,c){return b in c},g=Object(g));for(var h=0,i=e.length;i>h;h++){var j=e[h],k=g[j];d(k,j,g)&&(f[j]=k)}return f},t.omit=function(a,b,c){if(t.isFunction(b))b=t.negate(b);else{var d=t.map(D(arguments,!1,!1,1),String);b=function(a,b){return!t.contains(d,b)}}return t.pick(a,b,c)},t.defaults=w(t.allKeys,!0),t.create=function(a,b){var c=x(a);return b&&t.extendOwn(c,b),c},t.clone=function(a){return t.isObject(a)?t.isArray(a)?a.slice():t.extend({},a):a},t.tap=function(a,b){return b(a),a},t.isMatch=function(a,b){var c=t.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;d>f;f++){var g=c[f];if(b[g]!==e[g]||!(g in e))return!1}return!0};var H=function(a,b,c,d){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;a instanceof t&&(a=a._wrapped),b instanceof t&&(b=b._wrapped);var e=m.call(a);if(e!==m.call(b))return!1;switch(e){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b}var f="[object Array]"===e;if(!f){if("object"!=typeof a||"object"!=typeof b)return!1;var g=a.constructor,h=b.constructor;if(g!==h&&!(t.isFunction(g)&&g instanceof g&&t.isFunction(h)&&h instanceof h)&&"constructor"in a&&"constructor"in b)return!1}c=c||[],d=d||[];for(var i=c.length;i--;)if(c[i]===a)return d[i]===b;if(c.push(a),d.push(b),f){if(i=a.length,i!==b.length)return!1;for(;i--;)if(!H(a[i],b[i],c,d))return!1}else{var j,k=t.keys(a);if(i=k.length,t.keys(b).length!==i)return!1;for(;i--;)if(j=k[i],!t.has(b,j)||!H(a[j],b[j],c,d))return!1}return c.pop(),d.pop(),!0};t.isEqual=function(a,b){return H(a,b)},t.isEmpty=function(a){return null==a?!0:B(a)&&(t.isArray(a)||t.isString(a)||t.isArguments(a))?0===a.length:0===t.keys(a).length},t.isElement=function(a){return!(!a||1!==a.nodeType)},t.isArray=o||function(a){return"[object Array]"===m.call(a)},t.isObject=function(a){var b=typeof a;return"function"===b||"object"===b&&!!a},t.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(a){t["is"+a]=function(b){return m.call(b)==="[object "+a+"]"}}),t.isArguments(arguments)||(t.isArguments=function(a){return t.has(a,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(t.isFunction=function(a){return"function"==typeof a||!1}),t.isFinite=function(a){return isFinite(a)&&!isNaN(parseFloat(a))},t.isNaN=function(a){return t.isNumber(a)&&a!==+a},t.isBoolean=function(a){return a===!0||a===!1||"[object Boolean]"===m.call(a)},t.isNull=function(a){return null===a},t.isUndefined=function(a){return void 0===a},t.has=function(a,b){return null!=a&&n.call(a,b)},t.noConflict=function(){return f._=g,this},t.identity=function(a){return a},t.constant=function(a){return function(){return a}},t.noop=function(){},t.property=y,t.propertyOf=function(a){return null==a?function(){}:function(b){return a[b]}},t.matcher=t.matches=function(a){return a=t.extendOwn({},a),function(b){return t.isMatch(b,a)}},t.times=function(a,b,c){var d=Array(Math.max(0,a));b=u(b,c,1);for(var e=0;a>e;e++)d[e]=b(e);return d},t.random=function(a,b){return null==b&&(b=a,a=0),a+Math.floor(Math.random()*(b-a+1))},t.now=Date.now||function(){return(new Date).getTime()};var I={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},J=t.invert(I),K=function(a){var b=function(b){return a[b]},c="(?:"+t.keys(a).join("|")+")",d=RegExp(c),e=RegExp(c,"g");return function(a){return a=null==a?"":""+a,d.test(a)?a.replace(e,b):a}};t.escape=K(I),t.unescape=K(J),t.result=function(a,b,c){var d=null==a?void 0:a[b];return void 0===d&&(d=c),t.isFunction(d)?d.call(a):d};var L=0;t.uniqueId=function(a){var b=++L+"";return a?a+b:b},t.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var M=/(.)^/,N={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},O=/\\|'|\r|\n|\u2028|\u2029/g,P=function(a){return"\\"+N[a]};t.template=function(a,b,c){!b&&c&&(b=c),b=t.defaults({},b,t.templateSettings);var d=RegExp([(b.escape||M).source,(b.interpolate||M).source,(b.evaluate||M).source].join("|")+"|$","g"),e=0,f="__p+='";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(O,P),e=h+b.length,c?f+="'+\n((__t=("+c+"))==null?'':_.escape(__t))+\n'":d?f+="'+\n((__t=("+d+"))==null?'':__t)+\n'":g&&(f+="';\n"+g+"\n__p+='"),b}),f+="';\n",b.variable||(f="with(obj||{}){\n"+f+"}\n"),f="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+f+"return __p;\n";try{var g=new Function(b.variable||"obj","_",f)}catch(h){throw h.source=f,h}var i=function(a){return g.call(this,a,t)},j=b.variable||"obj";return i.source="function("+j+"){\n"+f+"}",i},t.chain=function(a){var b=t(a);return b._chain=!0,b};var Q=function(a,b){return a._chain?t(b).chain():b};t.mixin=function(a){t.each(t.functions(a),function(b){var c=t[b]=a[b];t.prototype[b]=function(){var a=[this._wrapped];return k.apply(a,arguments),Q(this,c.apply(t,a))}})},t.mixin(t),t.each(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=h[a];t.prototype[a]=function(){var c=this._wrapped;return b.apply(c,arguments),"shift"!==a&&"splice"!==a||0!==c.length||delete c[0],Q(this,c)}}),t.each(["concat","join","slice"],function(a){var b=h[a];t.prototype[a]=function(){return Q(this,b.apply(this._wrapped,arguments))}}),t.prototype.value=function(){return this._wrapped},t.prototype.valueOf=t.prototype.toJSON=t.prototype.value,t.prototype.toString=function(){return""+this._wrapped},"function"==typeof c&&c.amd&&c("underscore",[],function(){return t})}.call(this),c("jquery",[],function(){return jQuery}),function(a){var d="object"==typeof self&&self.self==self&&self||"object"==typeof global&&global.global==global&&global;if("function"==typeof c&&c.amd)c("backbone",["underscore","jquery","exports"],function(b,c,e){d.Backbone=a(d,e,b,c)});else if("undefined"!=typeof exports){var e,f=b("underscore");try{e=b("jquery")}catch(g){}a(d,exports,f,e)}else d.Backbone=a(d,{},d._,d.jQuery||d.Zepto||d.ender||d.$)}(function(a,b,c,d){var e=a.Backbone,f=Array.prototype.slice;b.VERSION="1.2.3",b.$=d,b.noConflict=function(){return a.Backbone=e,this},b.emulateHTTP=!1,b.emulateJSON=!1;var g=function(a,b,d){switch(a){case 1:return function(){return c[b](this[d])};case 2:return function(a){return c[b](this[d],a)};case 3:return function(a,e){return c[b](this[d],i(a,this),e)};case 4:return function(a,e,f){return c[b](this[d],i(a,this),e,f)};default:return function(){var a=f.call(arguments);return a.unshift(this[d]),c[b].apply(c,a)}}},h=function(a,b,d){c.each(b,function(b,e){c[e]&&(a.prototype[e]=g(b,e,d))})},i=function(a,b){return c.isFunction(a)?a:c.isObject(a)&&!b._isModel(a)?j(a):c.isString(a)?function(b){return b.get(a)}:a},j=function(a){var b=c.matches(a);return function(a){return b(a.attributes)}},k=b.Events={},l=/\s+/,m=function(a,b,d,e,f){var g,h=0;if(d&&"object"==typeof d){void 0!==e&&"context"in f&&void 0===f.context&&(f.context=e);for(g=c.keys(d);hd;d++)c[d]=arguments[d+1];return m(r,this._events,a,void 0,c),this};var r=function(a,b,c,d){if(a){var e=a[b],f=a.all;e&&f&&(f=f.slice()),e&&s(e,d),f&&s(f,[b].concat(d))}return a},s=function(a,b){var c,d=-1,e=a.length,f=b[0],g=b[1],h=b[2];switch(b.length){case 0:for(;++df;f++)a[f+c]=b[f];for(f=0;fe&&(e+=this.length+1);for(var f,g=[],h=[],i=[],j={},k=b.add,l=b.merge,m=b.remove,n=!1,o=this.comparator&&null==e&&b.sort!==!1,p=c.isString(this.comparator)?this.comparator:null,q=0;qa&&(a+=this.length),this.models[a]},where:function(a,b){return this[b?"find":"filter"](a)},findWhere:function(a){return this.where(a,!0)},sort:function(a){var b=this.comparator;if(!b)throw new Error("Cannot sort a set without a comparator");a||(a={});var d=b.length;return c.isFunction(b)&&(b=c.bind(b,this)),1===d||c.isString(b)?this.models=this.sortBy(b):this.models.sort(b),a.silent||this.trigger("sort",this,a),this},pluck:function(a){return c.invoke(this.models,"get",a)},fetch:function(a){a=c.extend({parse:!0},a);var b=a.success,d=this;return a.success=function(c){var e=a.reset?"reset":"set";d[e](c,a),b&&b.call(a.context,d,c,a),d.trigger("sync",d,c,a)},P(this,a),this.sync("read",this,a)},create:function(a,b){b=b?c.clone(b):{};var d=b.wait;if(a=this._prepareModel(a,b),!a)return!1;d||this.add(a,b);var e=this,f=b.success;return b.success=function(a,b,c){d&&e.add(a,c),f&&f.call(c.context,a,b,c)},a.save(null,b),a},parse:function(a,b){return a},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(a){return a[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(a,b){if(this._isModel(a))return a.collection||(a.collection=this),a;b=b?c.clone(b):{},b.collection=this;var d=new this.model(a,b);return d.validationError?(this.trigger("invalid",this,d.validationError,b),!1):d},_removeModels:function(a,b){for(var c=[],d=0;d7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(L,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var b=this.root.slice(0,-1)||"/";return this.location.replace(b+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var d=document.body,e=d.insertBefore(this.iframe,d.firstChild).contentWindow;e.document.open(),e.document.close(),e.location.hash="#"+this.fragment}var f=window.addEventListener||function(a,b){return attachEvent("on"+a,b)};return this._usePushState?f("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?f("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.options.silent?void 0:this.loadUrl()},stop:function(){var a=window.removeEventListener||function(a,b){return detachEvent("on"+a,b)};this._usePushState?a("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&a("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),J.started=!1},route:function(a,b){this.handlers.unshift({route:a,callback:b})},checkUrl:function(a){var b=this.getFragment();return b===this.fragment&&this.iframe&&(b=this.getHash(this.iframe.contentWindow)),b===this.fragment?!1:(this.iframe&&this.navigate(b),void this.loadUrl())},loadUrl:function(a){return this.matchRoot()?(a=this.fragment=this.getFragment(a),c.some(this.handlers,function(b){return b.route.test(a)?(b.callback(a),!0):void 0})):!1},navigate:function(a,b){if(!J.started)return!1;b&&b!==!0||(b={trigger:!!b}),a=this.getFragment(a||"");var c=this.root;(""===a||"?"===a.charAt(0))&&(c=c.slice(0,-1)||"/");var d=c+a;if(a=this.decodeFragment(a.replace(M,"")),this.fragment!==a){if(this.fragment=a,this._usePushState)this.history[b.replace?"replaceState":"pushState"]({},document.title,d);else{if(!this._wantsHashChange)return this.location.assign(d);if(this._updateHash(this.location,a,b.replace),this.iframe&&a!==this.getHash(this.iframe.contentWindow)){var e=this.iframe.contentWindow;b.replace||(e.document.open(),e.document.close()),this._updateHash(e.location,a,b.replace)}}return b.trigger?this.loadUrl(a):void 0}},_updateHash:function(a,b,c){if(c){var d=a.href.replace(/(javascript:|#).*$/,"");a.replace(d+"#"+b)}else a.hash="#"+b}}),b.history=new J;var N=function(a,b){var d,e=this;d=a&&c.has(a,"constructor")?a.constructor:function(){return e.apply(this,arguments)},c.extend(d,e,b);var f=function(){this.constructor=d};return f.prototype=e.prototype,d.prototype=new f,a&&c.extend(d.prototype,a),d.__super__=e.prototype,d};t.extend=v.extend=E.extend=A.extend=J.extend=N;var O=function(){throw new Error('A "url" property or function must be specified')},P=function(a,b){var c=b.error;b.error=function(d){c&&c.call(b.context,a,d,b),a.trigger("error",a,d,b)}};return b}),function(a){"function"==typeof c&&c.amd?c("backboneUndo",["underscore","backbone"],a):"undefined"!=typeof exports?module.exports=a(b("underscore"),b("backbone")):a(_,Backbone)}(function(a,b){function c(a,b,c){return c.length<=4?a.call(b,c[0],c[1],c[2],c[3]):a.apply(b,c)}function d(a,b){return n.call(a,b)}function e(b,c){return null==b?!1:(a.isArray(c)||(c=d(arguments,1)),a.all(c,function(a){return a in b}))}function f(){this.registeredObjects=[],this.cidIndexes=[]}function g(b,c,d,e){for(var f,g=0,h=c.length;h>g;g++)if(f=c[g]){if("on"===b){if(!e.objectRegistry.register(f))continue}else if(!e.objectRegistry.unregister(f))continue;a.isFunction(f[b])&&f[b]("all",d,e)}}function h(b,c){var d=c.type,e=c.undoTypes,f=!e[d]||e[d][b];a.isFunction(f)&&f(c.object,c.before,c.after,c.options)}function i(b,c,d,e,f){if(!(d.isCurrentlyUndoRedoing||"undo"===b&&-1===d.pointer||"redo"===b&&d.pointer===d.length-1)){d.isCurrentlyUndoRedoing=!0;var g,h,i="undo"===b;for(f?h=i&&d.pointer===d.length-1||!i&&-1===d.pointer?a.clone(d.models):n.apply(d.models,i?[0,d.pointer]:[d.pointer,d.length-1]):(g=d.at(i?d.pointer:d.pointer+1),h=e?d.where({magicFusionIndex:g.get("magicFusionIndex")}):[g]),d.pointer+=(i?-1:1)*h.length;g=i?h.pop():h.shift();)g[b]();d.isCurrentlyUndoRedoing=!1,c.trigger(b,c)}}function j(a,b){var d=a.condition,e=typeof d;return"function"===e?!!c(d,a,b):"boolean"===e?d:!0}function k(a,b,d,f){if(a.track&&!a.isCurrentlyUndoRedoing&&b in f&&j(f[b],d)){var g,h=c(f[b].on,f[b],d);if(e(h,"object","before","after")){if(h.type=b,h.magicFusionIndex=o(),h.undoTypes=f,a.pointera.maximumStackLength&&(a.shift(),a.pointer--)}}}function l(){}function m(b,c,d,f){if("object"==typeof c)return a.each(c,function(a,c){2===b?m(b,a,d,f):m(b,c,a,d)});switch(b){case 0:e(d,"undo","redo","on")&&a.all(a.pick(d,"undo","redo","on"),a.isFunction)&&(f[c]=d);break;case 1:f[c]&&a.isObject(d)&&(f[c]=a.extend({},f[c],d));break;case 2:delete f[c]}return this}var n=Array.prototype.slice,o=function(){function b(){d++,c=!0,a.defer(function(){c=!1})}var c=!1,d=-1;return function(){return c||b(),d}}();f.prototype={isRegistered:function(b){return b&&b.cid?this.registeredObjects[b.cid]:a.contains(this.registeredObjects,b)},register:function(a){return this.isRegistered(a)?!1:(a&&a.cid?(this.registeredObjects[a.cid]=a,this.cidIndexes.push(a.cid)):this.registeredObjects.push(a),!0)},unregister:function(b){if(this.isRegistered(b)){if(b&&b.cid)delete this.registeredObjects[b.cid],this.cidIndexes.splice(a.indexOf(this.cidIndexes,b.cid),1);else{var c=a.indexOf(this.registeredObjects,b);this.registeredObjects.splice(c,1)}return!0}return!1},get:function(){return a.map(this.cidIndexes,function(a){return this.registeredObjects[a]},this).concat(this.registeredObjects)}};var p={add:{undo:function(a,b,c,d){a.remove(c,d)},redo:function(a,b,c,d){d.index&&(d.at=d.index),a.add(c,d)},on:function(b,c,d){return{object:c,before:void 0,after:b,options:a.clone(d)}}},remove:{undo:function(a,b,c,d){"index"in d&&(d.at=d.index),a.add(b,d)},redo:function(a,b,c,d){a.remove(b,d)},on:function(b,c,d){return{object:c,before:b,after:void 0,options:a.clone(d)}}},change:{undo:function(b,c,d,e){a.isEmpty(c)?a.each(a.keys(d),b.unset,b):(b.set(c),e&&e.unsetData&&e.unsetData.before&&e.unsetData.before.length&&a.each(e.unsetData.before,b.unset,b))},redo:function(b,c,d,e){a.isEmpty(d)?a.each(a.keys(c),b.unset,b):(b.set(d),e&&e.unsetData&&e.unsetData.after&&e.unsetData.after.length&&a.each(e.unsetData.after,b.unset,b))},on:function(b,c){var d=b.changedAttributes(),e=a.keys(d),f=a.pick(b.previousAttributes(),e),g=a.keys(f),h=(c||(c={})).unsetData={after:[],before:[]};return e.length!=g.length&&(e.length>g.length?a.each(e,function(a){a in f||h.before.push(a)},this):a.each(g,function(a){a in d||h.after.push(a)})),{object:b,before:f,after:d,options:a.clone(c)}}},reset:{undo:function(a,b,c){a.reset(b)},redo:function(a,b,c){a.reset(c)},on:function(b,c){return{object:b,before:c.previousModels,after:a.clone(b.models)}}}};l.prototype=p;var q=b.Model.extend({defaults:{type:null,object:null,before:null,after:null,magicFusionIndex:null},undo:function(a){h("undo",this.attributes)},redo:function(a){h("redo",this.attributes)}}),r=b.Collection.extend({model:q,pointer:-1,track:!1,isCurrentlyUndoRedoing:!1,maximumStackLength:1/0,setMaxLength:function(a){this.maximumStackLength=a}}),s=b.Model.extend({defaults:{maximumStackLength:1/0,track:!1},initialize:function(b){this.stack=new r,this.objectRegistry=new f,this.undoTypes=new l,this.stack.setMaxLength(this.get("maximumStackLength")),this.on("change:maximumStackLength",function(a,b){this.stack.setMaxLength(b)},this),b&&b.track&&this.startTracking(),b&&b.register&&(a.isArray(b.register)||a.isArguments(b.register)?c(this.register,this,b.register):this.register(b.register))},startTracking:function(){this.set("track",!0),this.stack.track=!0},stopTracking:function(){this.set("track",!1),this.stack.track=!1},isTracking:function(){return this.get("track")},_addToStack:function(a){k(this.stack,a,d(arguments,1),this.undoTypes)},register:function(){g("on",arguments,this._addToStack,this)},unregister:function(){g("off",arguments,this._addToStack,this)},unregisterAll:function(){c(this.unregister,this,this.objectRegistry.get())},undo:function(a){i("undo",this,this.stack,a)},undoAll:function(){i("undo",this,this.stack,!1,!0)},redo:function(a){i("redo",this,this.stack,a)},redoAll:function(){i("redo",this,this.stack,!1,!0)},isAvailable:function(a){var b=this.stack,c=b.length;switch(a){case"undo":return c>0&&b.pointer>-1;case"redo":return c>0&&b.pointer0;for(f in v)(!v[f]&&b(e.mods,+f)>-1||v[f]&&-1==b(e.mods,+f))&&(i=!1);(0!=e.mods.length||v[16]||v[18]||v[17]||v[91])&&!i||e.method(a,e)===!1&&(a.preventDefault?a.preventDefault():a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.cancelBubble&&(a.cancelBubble=!0))}}function f(a){var c,d=a.keyCode,e=b(A,d);if(e>=0&&A.splice(e,1),(93==d||224==d)&&(d=91),d in v){v[d]=!1;for(c in x)x[c]==d&&(h[c]=!1)}}function g(){for(t in v)v[t]=!1;for(t in x)h[t]=!1}function h(a,b,c){var d,e;d=p(a),void 0===c&&(c=b,b="all");for(var f=0;f1&&(e=q(a),a=[a[a.length-1]]),a=a[0],a=z(a),a in u||(u[a]=[]),u[a].push({shortcut:d[f],scope:b,method:c,key:d[f],mods:e})}function i(a,b){var d,e,f,g,h,i=[];for(d=p(a),g=0;g1&&(i=q(e)),a=e[e.length-1],a=z(a),void 0===b&&(b=n()),!u[a])return;for(f=0;ft;t++)y["f"+t]=111+t;var B={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey"};for(t in x)h[t]=!1;r(document,"keydown",function(a){e(a)}),r(document,"keyup",f),r(window,"focus",g);var C=a.key;a.key=h,a.key.setScope=m,a.key.getScope=n,a.key.deleteScope=o,a.key.filter=l,a.key.isPressed=j,a.key.getPressedKeyCodes=k,a.key.noConflict=s,a.key.unbind=i,"undefined"!=typeof module&&(module.exports=h)}(this),c("keymaster",function(a){return function(){var b;return b||a.keymaster}}(this)),c("AssetManager/config/config",[],function(){return{autoload:1,stylePrefix:"am-",assets:[],storageType:"local",storageName:"assets",urlStore:"http://localhost/assets/store",urlLoad:"http://localhost/assets/load",paramsStore:{},paramsLoad:{},beforeSend:function(a,b){},onComplete:function(a,b){},urlUpload:"http://localhost/assets/upload",uploadText:"Drop files here or click to upload",disableUpload:!1,storeOnChange:!0,storeAfterUpload:!1}}),c("AssetManager/model/Asset",["backbone"],function(a){return a.Model.extend({defaults:{type:"none",src:""},initialize:function(a){this.options=a||{}},getFilename:function(){return this.get("src").split("/").pop()},getExtension:function(){return this.getFilename().split(".").pop()}})}),c("AssetManager/model/Assets",["backbone","./Asset"],function(a,b){return a.Collection.extend({model:b,addImg:function(a,b){return this.add({type:"image",src:a},b),this},add:function(b,c){var d=[];b=b instanceof Array?b:[b];for(var e=0,f=b.length;f>e;e++){var g=b[e];if(g&&g.src){var h=this.where({src:g.src});h.length||d.push(g)}}return 1==d.length&&(d=d[0]),a.Collection.prototype.add.apply(this,[d,c])}})}),c("AssetManager/view/AssetView",["backbone"],function(a){return a.View.extend({initialize:function(a){this.options=a,this.config=a.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.className=this.pfx+"asset",this.listenTo(this.model,"destroy remove",this.remove)}})}),c("text",["module"],function(a){"use strict";var c,d,e,f,g,h=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],i=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,j=/]*>\s*([\s\S]+)\s*<\/body>/im,k="undefined"!=typeof location&&location.href,l=k&&location.protocol&&location.protocol.replace(/\:/,""),m=k&&location.hostname,n=k&&(location.port||void 0),o={},p=a.config&&a.config()||{};return c={version:"2.0.14",strip:function(a){if(a){a=a.replace(i,"");var b=a.match(j);b&&(a=b[1])}else a="";return a},jsEscape:function(a){return a.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:p.createXhr||function(){var a,b,c;if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)for(b=0;3>b;b+=1){c=h[b];try{a=new ActiveXObject(c)}catch(d){}if(a){h=[c];break}}return a},parseName:function(a){var b,c,d,e=!1,f=a.lastIndexOf("."),g=0===a.indexOf("./")||0===a.indexOf("../");return-1!==f&&(!g||f>1)?(b=a.substring(0,f),c=a.substring(f+1)):b=a,d=c||b,f=d.indexOf("!"),-1!==f&&(e="strip"===d.substring(f+1),d=d.substring(0,f),c?c=d:b=d),{moduleName:b,ext:c,strip:e}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(a,b,d,e){var f,g,h,i=c.xdRegExp.exec(a);return i?(f=i[2],g=i[3],g=g.split(":"),h=g[1],g=g[0],!(f&&f!==b||g&&g.toLowerCase()!==d.toLowerCase()||(h||g)&&h!==e)):!0},finishLoad:function(a,b,d,e){d=b?c.strip(d):d,p.isBuild&&(o[a]=d),e(d)},load:function(a,b,d,e){if(e&&e.isBuild&&!e.inlineText)return void d();p.isBuild=e&&e.isBuild;var f=c.parseName(a),g=f.moduleName+(f.ext?"."+f.ext:""),h=b.toUrl(g),i=p.useXhr||c.useXhr;return 0===h.indexOf("empty:")?void d():void(!k||i(h,l,m,n)?c.get(h,function(b){c.finishLoad(a,f.strip,b,d)},function(a){d.error&&d.error(a)}):b([g],function(a){c.finishLoad(f.moduleName+"."+f.ext,f.strip,a,d)}))},write:function(a,b,d,e){if(o.hasOwnProperty(b)){var f=c.jsEscape(o[b]);d.asModule(a+"!"+b,"define(function () { return '"+f+"';});\n")}},writeFile:function(a,b,d,e,f){var g=c.parseName(b),h=g.ext?"."+g.ext:"",i=g.moduleName+h,j=d.toUrl(g.moduleName+h)+".js";c.load(i,d,function(b){var d=function(a){return e(j,a)};d.asModule=function(a,b){return e.asModule(a,j,b)},c.write(a,i,d,f)},f)}},"node"===p.env||!p.env&&"undefined"!=typeof process&&process.versions&&process.versions.node&&!process.versions["node-webkit"]&&!process.versions["atom-shell"]?(d=b.nodeRequire("fs"),c.get=function(a,b,c){try{var e=d.readFileSync(a,"utf8");"\ufeff"===e[0]&&(e=e.substring(1)),b(e)}catch(f){c&&c(f)}}):"xhr"===p.env||!p.env&&c.createXhr()?c.get=function(a,b,d,e){var f,g=c.createXhr();if(g.open("GET",a,!0),e)for(f in e)e.hasOwnProperty(f)&&g.setRequestHeader(f.toLowerCase(),e[f]);p.onXhr&&p.onXhr(g,a),g.onreadystatechange=function(c){var e,f;4===g.readyState&&(e=g.status||0,e>399&&600>e?(f=new Error(a+" HTTP status: "+e),f.xhr=g,d&&d(f)):b(g.responseText),p.onXhrComplete&&p.onXhrComplete(g,a))},g.send(null)}:"rhino"===p.env||!p.env&&"undefined"!=typeof Packages&&"undefined"!=typeof java?c.get=function(a,b){var c,d,e="utf-8",f=new java.io.File(a),g=java.lang.System.getProperty("line.separator"),h=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(f),e)),i="";try{for(c=new java.lang.StringBuffer,d=h.readLine(),d&&d.length()&&65279===d.charAt(0)&&(d=d.substring(1)),null!==d&&c.append(d);null!==(d=h.readLine());)c.append(g),c.append(d);i=String(c.toString())}finally{h.close()}b(i)}:("xpconnect"===p.env||!p.env&&"undefined"!=typeof Components&&Components.classes&&Components.interfaces)&&(e=Components.classes,f=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),g="@mozilla.org/windows-registry-key;1"in e,c.get=function(a,b){var c,d,h,i={};g&&(a=a.replace(/\//g,"\\")),h=new FileUtils.File(a);try{c=e["@mozilla.org/network/file-input-stream;1"].createInstance(f.nsIFileInputStream),c.init(h,1,0,!1),d=e["@mozilla.org/intl/converter-input-stream;1"].createInstance(f.nsIConverterInputStream),d.init(c,"utf-8",c.available(),f.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),d.readString(c.available(),i),d.close(),c.close(),b(i.value)}catch(j){throw new Error((h&&h.path||"")+": "+j)}}),c}),c("text!AssetManager/template/assetImage.html",[],function(){return'
\n
\n
\n
\n
\n
<%= name %>
\n
<%= dim %>
\n
\n
\n
'}),c("AssetManager/view/AssetImageView",["./AssetView","text!./../template/assetImage.html"],function(a,b){return a.extend({events:{click:"selected",dblclick:"chosen"},template:_.template(b),initialize:function(b){a.prototype.initialize.apply(this,arguments),this.className+=" "+this.pfx+"asset-image",this.events["click #"+this.pfx+"close"]="removeItem",this.delegateEvents()},selected:function(){this.model.collection.trigger("deselectAll"),this.$el.addClass(this.pfx+"highlight"),this.updateTarget(this.model.get("src"))},chosen:function(){this.updateTarget(this.model.get("src"));var a=this.model.collection.onSelect;a&&"function"==typeof a&&a(this.model)},updateTarget:function(a){var b=this.model.collection.target;if(b&&b.set){var c=_.clone(b.get("attributes"));b.set("attributes",c),b.set("src",a)}},removeItem:function(a){a.stopPropagation(),this.model.collection.remove(this.model)},render:function(){var a=this.model.get("name"),b=this.model.get("width")&&this.model.get("height")?this.model.get("width")+" x "+this.model.get("height"):""; return a=a?a:this.model.get("src").split("/").pop(),a=a&&a.length>30?a.substring(0,30)+"...":a,b=b?b+(this.model.get("unitDim")?this.model.get("unitDim"):" px"):"",this.$el.html(this.template({name:a,src:this.model.get("src"),dim:b,pfx:this.pfx,ppfx:this.ppfx})),this.$el.attr("class",this.className),this}})}),c("text!AssetManager/template/fileUploader.html",[],function(){return'
\n
<%= title %>
\n multiple/>\n
\n
'}),c("AssetManager/view/FileUploader",["backbone","text!./../template/fileUploader.html"],function(a,b){return a.View.extend({template:_.template(b),events:{},initialize:function(a){this.options=a||{},this.config=a.config||{},this.pfx=this.config.stylePrefix||"",this.target=this.collection||{},this.uploadId=this.pfx+"uploadFile",this.disabled=this.config.disableUpload,this.events["change #"+this.uploadId]="uploadFile",this.delegateEvents()},uploadFile:function(a){for(var b=a.dataTransfer?a.dataTransfer.files:a.target.files,c=new FormData,d=0;d\n
\n
\n \n \n
\n
\n \n
\n
\n
\n'}),c("AssetManager/view/AssetsView",["backbone","./AssetView","./AssetImageView","./FileUploader","text!./../template/assets.html"],function(a,b,c,d,e){return a.View.extend({template:_.template(e),initialize:function(a){if(this.options=a,this.config=a.config,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.listenTo(this.collection,"add",this.addToAsset),this.listenTo(this.collection,"deselectAll",this.deselectAll),this.className=this.pfx+"assets",this.config.stm&&""!==this.config.storageType){var b=this.config.storageType;if(this.provider=this.config.stm.get(b),this.storeName=this.config.storageName?this.config.storageName:this.className,this.provider&&(this.storagePrv=this.provider.clone().set(this.config),this.collection.reset(),this.collection.add(this.load()),this.config.storeOnChange)){var c="remove"+(this.config.storeAfterUpload?" add":"");this.listenTo(this.collection,c,this.store)}}this.events={},this.events.submit="addFromStr",this.delegateEvents()},addFromStr:function(a){a.preventDefault();var b=this.getInputUrl(),c=b.value.trim();return c?(this.collection.addImg(c,{at:0}),this.getAssetsEl().scrollTop=0,b.value="",this):void 0},getAssetsEl:function(){return this.assets=this.el.querySelector("."+this.pfx+"assets"),this.assets},getInputUrl:function(){return this.inputUrl&&this.inputUrl.value||(this.inputUrl=this.el.querySelector("."+this.pfx+"add-asset input")),this.inputUrl},store:function(){this.storagePrv&&this.storagePrv.store(this.storeName,JSON.stringify(this.collection.toJSON()))},load:function(){var a=null;if(this.storagePrv&&(a=this.storagePrv.load(this.storeName)),"object"!=typeof a)try{a=JSON.parse(a)}catch(b){console.warn(b)}return a},addToAsset:function(a){this.addAsset(a)},addAsset:function(a,d){var e=d||null,f=b;a.get("type").indexOf("image")>-1&&(f=c);var g=new f({model:a,config:this.config}),h=g.render().el;if(e)e.appendChild(h);else{var i=this.getAssetsEl();i.insertBefore(h,i.firstChild)}return h},deselectAll:function(){this.$el.find("."+this.pfx+"highlight").removeClass(this.pfx+"highlight")},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(b){this.addAsset(b,a)},this),this.$el.html(this.template({pfx:this.pfx,ppfx:this.ppfx})),this.$el.find("."+this.pfx+"assets").append(a),this}})}),c("AssetManager/main",["require","./config/config","./model/Assets","./view/AssetsView","./view/FileUploader"],function(a){var b=function(b){var c=b||{},d=a("./config/config"),e=a("./model/Assets"),f=a("./view/AssetsView"),g=a("./view/FileUploader");for(var h in d)h in c||(c[h]=d[h]);this.assets=new e(c.assets);var i={collection:this.assets,config:c};this.am=new f(i),this.fu=new g(i)};return b.prototype={add:function(a){return this},get:function(a){return{}},getAll:function(){return assets},remove:function(a){return this},store:function(){},load:function(){},getAssets:function(){return this.assets},setTarget:function(a){this.am.collection.target=a},onSelect:function(a){this.am.collection.onSelect=a},render:function(a){return(!this.rendered||a)&&(this.rendered=this.am.render().$el.add(this.fu.render().$el)),this.rendered}},b}),c("AssetManager",["AssetManager/main"],function(a){return a}),c("BlockManager/config/config",[],function(){return{blocks:[]}}),c("BlockManager/model/Block",["backbone"],function(a){return a.Model.extend({defaults:{label:"",content:"",attributes:{}}})}),c("BlockManager/model/Blocks",["backbone","./Block"],function(a,b){return a.Collection.extend({model:b})}),c("BlockManager/view/BlockView",["backbone"],function(a){return a.View.extend({events:{mousedown:"onDrag"},initialize:function(a,b){_.bindAll(this,"onDrop"),this.config=b||{},this.ppfx=this.config.pStylePrefix||"",this.listenTo(this.model,"destroy",this.remove),this.doc=$(document)},onDrag:function(){if(this.config.getSorter){var a=this.config.getSorter();a.startSort(this.el),a.setDropContent(this.model.get("content")),this.doc.on("mouseup",this.onDrop)}},onDrop:function(){this.doc.off("mouseup",this.onDrop),this.config.getSorter().endMove()},render:function(){return this.el.innerHTML=this.model.get("label"),this.$el.addClass(this.ppfx+"block"),this}})}),c("BlockManager/view/BlocksView",["backbone","./BlockView"],function(a,b){return a.View.extend({initialize:function(a,b){_.bindAll(this,"getSorter","onDrag","onDrop","dragHelper","moveHelper"),this.config=b||{},this.ppfx=this.config.pStylePrefix||"",this.listenTo(this.collection,"add",this.addTo),this.em=this.config.em,this.tac="test-tac",this.em&&(this.config.getSorter=this.getSorter,this.config.dragHelper=this.dragHelper,this.canvas=this.em.get("Canvas"))},getSorter:function(){if(this.em){if(!this.sorter){var a=this.em.get("Utils"),b=this.canvas;this.sorter=new a.Sorter({container:b.getBody(),placer:b.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onStart:this.onDrag,onEndMove:this.onDrop,document:b.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1,em:this.em})}return this.sorter}},onDrag:function(){this.em.stopDefault(),this.em.get("Canvas").getBody().style.cursor="grabbing",document.body.style.cursor="grabbing"},dragHelper:function(a){a.className+=" "+this.ppfx+"bdrag",this.helper=a,document.body.appendChild(a),$(this.em.get("Canvas").getBody()).on("mousemove",this.moveHelper),$(document).on("mousemove",this.moveHelper)},moveHelper:function(a){this.helper.style.left=a.pageX+"px",this.helper.style.top=a.pageY+"px"},onDrop:function(a){this.em.runDefault(),this.em.get("Canvas").getBody().style.cursor="",document.body.style.cursor="",a&&a.get("activeOnRender")&&(a.trigger("active"),a.set("activeOnRender",0))},addTo:function(a){this.add(a)},add:function(a,c){var d=c||null,e=new b({model:a,attributes:a.get("attributes")},this.config),f=e.render().el;d?d.appendChild(f):this.$el.append(f)},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(b){this.add(b,a)},this),this.$el.append(a),this.$el.addClass(this.ppfx+"blocks-c"),this}})}),c("BlockManager/main",["require","./config/config","./model/Blocks","./view/BlocksView"],function(a){return function(b){var c=b||{},d=a("./config/config"),e=a("./model/Blocks"),f=a("./view/BlocksView");for(var g in d)g in c||(c[g]=d[g]);var h=new e(c.blocks),i=new f({collection:h},c);return{add:function(a,b){var c=b||{};return c.id=a,h.add(c)},get:function(a){return h.get(a)},getAll:function(){return h},render:function(){return i.render().el}}}}),c("BlockManager",["BlockManager/main"],function(a){return a}),c("StorageManager/config/config",[],function(){return{id:"gjs-",autosave:1,autoload:1,type:"local",stepsBeforeSave:1,storeComponents:!1,storeStyles:!1,storeHtml:!0,storeCss:!0,checkLocal:!0,params:{},urlStore:"",urlLoad:"",beforeSend:function(a,b){},onComplete:function(a,b){}}}),c("StorageManager/model/LocalStorage",["backbone"],function(a){return a.Model.extend({defaults:{checkLocal:!0},store:function(a){this.checkStorageEnvironment();for(var b in a)localStorage.setItem(b,a[b])},load:function(a){this.checkStorageEnvironment();for(var b={},c=0,d=a.length;d>c;c++){var e=localStorage.getItem(a[c]);e&&(b[a[c]]=e)}return b},remove:function(a){this.checkStorageEnvironment();for(var b=0,c=a.length;c>b;b++)localStorage.removeItem(a[b])},checkStorageEnvironment:function(){this.get("checkLocal")&&!localStorage&&console.warn("Your browser doesn't support localStorage")}})}),c("StorageManager/model/RemoteStorage",["backbone"],function(a){return a.Model.extend({defaults:{urlStore:"",urlLoad:"",params:{},beforeSend:function(){},onComplete:function(){}},store:function(a){var b={},c=this.get("params");for(var d in a)b[d]=a[d];for(var e in c)b[e]=c[e];$.ajax({url:this.get("urlStore"),beforeSend:this.get("beforeSend"),complete:this.get("onComplete"),method:"POST",dataType:"json",data:b})},load:function(a){var b={},c={},d=this.get("params");for(var e in d)c[e]=d[e];return c.keys=a,$.ajax({url:this.get("urlLoad"),beforeSend:this.get("beforeSend"),complete:this.get("onComplete"),data:c,async:!1,method:"GET"}).done(function(a){b=a}),b}})}),c("StorageManager/main",["require","./config/config","./model/LocalStorage","./model/RemoteStorage"],function(a){var b=function(b){var c=b||{},d=a("./config/config"),e=a("./model/LocalStorage"),f=a("./model/RemoteStorage");for(var g in d)g in c||(c[g]=d[g]);var h={},i={};return i.remote=new f(c),i.local=new e(c),c.currentStorage=c.type,{isAutosave:function(){return!!c.autosave},setAutosave:function(a){return c.autosave=!!a,this},getStepsBeforeSave:function(){return c.stepsBeforeSave},setStepsBeforeSave:function(a){return c.stepsBeforeSave=a,this},add:function(a,b){return h[a]=b,this},get:function(a){return h[a]||null},getStorages:function(){return h},getCurrent:function(){return c.currentStorage},setCurrent:function(a){return c.currentStorage=a,this},store:function(a){var b=this.get(this.getCurrent()),d={};for(var e in a)d[c.id+e]=a[e];return b?b.store(d):null},load:function(a){var b=this.get(this.getCurrent()),d=[],e={};"string"==typeof a&&(a=[a]);for(var f=0,g=a.length;g>f;f++)d.push(c.id+a[f]);var h=b?b.load(d):{};for(var i in h){var j=new RegExp("^"+c.id),k=i.replace(j,"");e[k]=h[i]}return e},loadDefaultProviders:function(){for(var a in i)this.add(a,i[a]);return this},getConfig:function(){return c}}};return b}),c("StorageManager",["StorageManager/main"],function(a){return a}),c("DeviceManager/config/config",[],function(){return{devices:[],deviceLabel:"Device"}}),c("DeviceManager/model/Device",["backbone"],function(a){return a.Model.extend({idAttribute:"name",defaults:{name:"",width:""}})}),c("DeviceManager/model/Devices",["backbone","./Device"],function(a,b){return a.Collection.extend({model:b})}),c("text!DeviceManager/template/devices.html",[],function(){return'
<%= deviceLabel %>
\n
\n \n \n \n
\n
\n
\n
\n'}),c("DeviceManager/view/DevicesView",["backbone","text!./../template/devices.html"],function(a,b){return a.View.extend({template:_.template(b),events:{change:"updateDevice"},initialize:function(a){this.config=a.config||{},this.em=this.config.em,this.ppfx=this.config.pStylePrefix||"",this.events["click ."+this.ppfx+"add-trasp"]=this.startAdd,this.listenTo(this.em,"change:device",this.updateSelect),this.delegateEvents()},startAdd:function(){},updateDevice:function(){var a=this.em;if(a){var b=this.devicesEl,c=b?b.val():"";a.set("device",c)}},updateSelect:function(){var a=this.em,b=this.devicesEl;if(a&&a.getDeviceModel&&b){var c=a.getDeviceModel(),d=c?c.get("name"):"";b.val(d)}},getOptions:function(){var a="";return this.collection.each(function(b){var c=b.get("name");a+='"}),a},render:function(){var a=this.ppfx;return this.$el.html(this.template({ppfx:a,deviceLabel:this.config.deviceLabel})),this.devicesEl=this.$el.find("."+a+"devices"),this.devicesEl.append(this.getOptions()),this.el.className=a+"devices-c",this}})}),c("DeviceManager/main",["require","./config/config","./model/Devices","./view/DevicesView"],function(a){return function(b){var c=b||{},d=a("./config/config"),e=a("./model/Devices"),f=a("./view/DevicesView");for(var g in d)g in c||(c[g]=d[g]);var h=new e(c.devices),i=new f({collection:h,config:c});return{add:function(a,b,c){var d=c||{};return d.name=a,d.width=b,h.add(d)},get:function(a){return h.get(a)},getAll:function(){return h},render:function(){return i.render().el}}}}),c("DeviceManager",["DeviceManager/main"],function(a){return a}),c("ModalDialog/config/config",[],function(){return{stylePrefix:"mdl-",title:"",content:"",backdrop:!0}}),c("ModalDialog/model/Modal",["backbone"],function(a){return a.Model.extend({defaults:{title:"",content:"",open:!1}})}),c("text!ModalDialog/template/modal.html",[],function(){return'
\n
\n
<%= title %>
\n
\n
\n
\n
<%= content %>
\n
\n
\n
\n
'}),c("ModalDialog/view/ModalView",["backbone","text!./../template/modal.html"],function(a,b){return a.View.extend({template:_.template(b),events:{},initialize:function(a){this.config=a.config||{},this.pfx=this.config.stylePrefix,this.listenTo(this.model,"change:open",this.updateOpen),this.listenTo(this.model,"change:title",this.updateTitle),this.listenTo(this.model,"change:content",this.updateContent),this.events["click ."+this.pfx+"btn-close"]="hide",this.config.backdrop&&(this.events["click ."+this.pfx+"backlayer"]="hide"),this.delegateEvents()},getContent:function(){return this.$content||(this.$content=this.$el.find("."+this.pfx+"content #"+this.pfx+"c")),this.$content.get(0)},updateContent:function(){this.$content||(this.$content=this.$el.find("."+this.pfx+"content #"+this.pfx+"c")),this.$content.html(this.model.get("content"))},updateTitle:function(){this.$title||(this.$title=this.$el.find("."+this.pfx+"title")),this.$title.html(this.model.get("title"))},updateOpen:function(){this.model.get("open")?this.$el.show():this.$el.hide()},hide:function(){this.model.set("open",0)},show:function(){this.model.set("open",1)},setTitle:function(a){return this.model.set("title",a),this},setContent:function(a){return this.model.set("content",a),this},render:function(){var a=this.model.toJSON();return a.pfx=this.pfx,this.$el.html(this.template(a)),this.$el.attr("class",this.pfx+"container"),this.updateOpen(),this}})}),c("ModalDialog/main",["require","./config/config","./model/Modal","./view/ModalView"],function(a){function b(b){var c=b||{},d=a("./config/config"),e=a("./model/Modal"),f=a("./view/ModalView");for(var g in d)g in c||(c[g]=d[g]);this.model=new e(c);var h={model:this.model,config:c};this.modal=new f(h)}return b.prototype={getModel:function(){return this.model},render:function(){return this.modal.render().$el},show:function(){return this.modal.show()},hide:function(){return this.modal.hide()},setTitle:function(a){return this.modal.setTitle(a)},setContent:function(a){return this.modal.setContent(a)},getContentEl:function(){return this.modal.getContent()}},b}),c("ModalDialog",["ModalDialog/main"],function(a){return a}),c("CodeManager/config/config",[],function(){return{stylePrefix:"cm-"}}),c("CodeManager/model/HtmlGenerator",["backbone"],function(a){return a.Model.extend({build:function(a){var b=a.get("components")||a,c="";return b.each(function(a){var b=a.get("tagName"),d="",e="",f="",g=a.get("components"),h=a.get("attributes"),i=a.get("void"),j=a.get("classes");_.each(h,function(a,b){"onmousedown"!=b&&(d+=a&&"style"!=b?" "+b+'="'+a+'"':"")}),"image"==a.get("type")&&(b="img",i=1,d+=' src="'+a.get("src")+'"'),_.isEmpty(a.get("style"))||(e=' id="'+a.cid+'" '),j.each(function(a){f+=" "+a.get("name")}),f=""!==f?' class="'+f.trim()+'"':"",c+="<"+b+f+e+d+(i?"/":"")+">"+a.get("content"),g.length&&(c+=this.build(g)),i||(c+="")},this),c}})}),c("CodeManager/model/CssGenerator",["backbone"],function(a){return a.Model.extend({initialize:function(){this.compCls=[]},buildFromComp:function(a){var b=a.get("components")||a,c="";return b.each(function(a){var b=a.get("style"),d=a.get("classes"),e=a.get("components");if(d.each(function(a){this.compCls.push(a.get("name"))},this),b&&0!==Object.keys(b).length){c+="#"+a.cid+"{";for(var f in b)b.hasOwnProperty(f)&&(c+=f+":"+b[f]+";");c+="}"}e.length&&(c+=this.buildFromComp(e))},this),c},build:function(a,b){this.compCls=[];var c=this.buildFromComp(a);this.compCls;if(b){var d=b.getRules(),e={};d.each(function(a){var b=a.get("maxWidth");if(b){var d=e[b];return void(d?d.push(a):e[b]=[a])}c+=this.buildFromRule(a)},this);for(var f in e){for(var g=e[f],h="",i=0,j=g.length;j>i;i++)h+=this.buildFromRule(g[i]);h&&(c+="@media (max-width: "+f+"){"+h+"}")}}return c},buildFromRule:function(a){var b="",c=a.get("selectors"),d=a.get("style"),e=a.get("state"),f="",g=0,h=this.compCls;if(c.each(function(a){f+="."+a.get("name"),h.indexOf(a.get("name"))>-1&&(g=1)}),f&&g){f+=e?":"+e:"";var i="";if(d&&0!==Object.keys(d).length)for(var j in d)d.hasOwnProperty(j)&&(i+=j+":"+d[j]+";");i&&(b+=f+"{"+i+"}")}return b}})}),c("CodeManager/model/JsonGenerator",["backbone"],function(a){return a.Model.extend({build:function(b){var c=b.toJSON();return this.beforeEach(c),_.each(c,function(b,d){var e=c[d];if(e instanceof a.Model)c[d]=this.build(e);else if(e instanceof a.Collection){var f=e;c[d]=[],f.length&&f.each(function(a,b){c[d][b]=this.build(a)},this)}},this),c},beforeEach:function(a){delete a.status}})}),function(a){if("object"==typeof exports&&"object"==typeof module)module.exports=a();else{if("function"==typeof c&&c.amd)return c("codemirror/lib/codemirror",[],a);(this||window).CodeMirror=a()}}(function(){"use strict";function a(c,d){if(!(this instanceof a))return new a(c,d);this.options=d=d?Ke(d):{},Ke($f,d,!1),n(d);var e=d.value;"string"==typeof e&&(e=new wg(e,d.mode,null,d.lineSeparator)),this.doc=e;var f=new a.inputStyles[d.inputStyle](this),g=this.display=new b(c,e,f);g.wrapper.CodeMirror=this,j(this),h(this),d.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),d.autofocus&&!Cf&&g.input.focus(),r(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new De,keySeq:null,specialChars:null};var i=this;sf&&11>tf&&setTimeout(function(){i.display.input.reset(!0)},20),Qb(this),We(),ub(this),this.curOp.forceUpdate=!0,Xd(this,e),d.autofocus&&!Cf||i.hasFocus()?setTimeout(Le(qc,this),20):rc(this);for(var k in _f)_f.hasOwnProperty(k)&&_f[k](this,d[k],ag);w(this),d.finishInit&&d.finishInit(this);for(var l=0;ltf&&(d.gutters.style.zIndex=-1,d.scroller.style.paddingRight=0),uf||pf&&Cf||(d.scroller.draggable=!0),a&&(a.appendChild?a.appendChild(d.wrapper):a(d.wrapper)),d.viewFrom=d.viewTo=b.first,d.reportedViewFrom=d.reportedViewTo=b.first,d.view=[],d.renderedView=null,d.externalMeasured=null,d.viewOffset=0,d.lastWrapHeight=d.lastWrapWidth=0,d.updateLineNumbers=null,d.nativeBarWidth=d.barHeight=d.barWidth=0,d.scrollbarsClipped=!1,d.lineNumWidth=d.lineNumInnerWidth=d.lineNumChars=null,d.alignWidgets=!1,d.cachedCharWidth=d.cachedTextHeight=d.cachedPaddingH=null,d.maxLine=null,d.maxLineLength=0,d.maxLineChanged=!1,d.wheelDX=d.wheelDY=d.wheelStartX=d.wheelStartY=null,d.shift=!1,d.selForContextMenu=null,d.activeTouch=null,c.init(d)}function c(b){b.doc.mode=a.getMode(b.options,b.doc.modeOption),d(b)}function d(a){a.doc.iter(function(a){a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null)}),a.doc.frontier=a.doc.first,Na(a,100),a.state.modeGen++,a.curOp&&Jb(a)}function e(a){a.options.lineWrapping?(Yg(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(Xg(a.display.wrapper,"CodeMirror-wrap"),m(a)),g(a),Jb(a),hb(a),setTimeout(function(){s(a)},100)}function f(a){var b=sb(a.display),c=a.options.lineWrapping,d=c&&Math.max(5,a.display.scroller.clientWidth/tb(a.display)-3);return function(e){if(vd(a.doc,e))return 0;var f=0;if(e.widgets)for(var g=0;gb.maxLineLength&&(b.maxLineLength=c,b.maxLine=a)})}function n(a){var b=Ge(a.gutters,"CodeMirror-linenumbers");-1==b&&a.lineNumbers?a.gutters=a.gutters.concat(["CodeMirror-linenumbers"]):b>-1&&!a.lineNumbers&&(a.gutters=a.gutters.slice(0),a.gutters.splice(b,1))}function o(a){var b=a.display,c=b.gutters.offsetWidth,d=Math.round(a.doc.height+Sa(a.display));return{clientHeight:b.scroller.clientHeight,viewHeight:b.wrapper.clientHeight,scrollWidth:b.scroller.scrollWidth,clientWidth:b.scroller.clientWidth,viewWidth:b.wrapper.clientWidth,barLeft:a.options.fixedGutter?c:0,docHeight:d,scrollHeight:d+Ua(a)+b.barHeight,nativeBarWidth:b.nativeBarWidth,gutterWidth:c}}function p(a,b,c){this.cm=c;var d=this.vert=Pe("div",[Pe("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),e=this.horiz=Pe("div",[Pe("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");a(d),a(e),Cg(d,"scroll",function(){d.clientHeight&&b(d.scrollTop,"vertical")}),Cg(e,"scroll",function(){e.clientWidth&&b(e.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,sf&&8>tf&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function q(){}function r(b){b.display.scrollbars&&(b.display.scrollbars.clear(),b.display.scrollbars.addClass&&Xg(b.display.wrapper,b.display.scrollbars.addClass)),b.display.scrollbars=new a.scrollbarModel[b.options.scrollbarStyle](function(a){b.display.wrapper.insertBefore(a,b.display.scrollbarFiller),Cg(a,"mousedown",function(){b.state.focused&&setTimeout(function(){b.display.input.focus()},0)}),a.setAttribute("cm-not-content","true")},function(a,c){"horizontal"==c?ec(b,a):dc(b,a)},b),b.display.scrollbars.addClass&&Yg(b.display.wrapper,b.display.scrollbars.addClass)}function s(a,b){b||(b=o(a));var c=a.display.barWidth,d=a.display.barHeight;t(a,b);for(var e=0;4>e&&c!=a.display.barWidth||d!=a.display.barHeight;e++)c!=a.display.barWidth&&a.options.lineWrapping&&F(a),t(a,o(a)),c=a.display.barWidth,d=a.display.barHeight}function t(a,b){var c=a.display,d=c.scrollbars.update(b);c.sizer.style.paddingRight=(c.barWidth=d.right)+"px",c.sizer.style.paddingBottom=(c.barHeight=d.bottom)+"px",d.right&&d.bottom?(c.scrollbarFiller.style.display="block",c.scrollbarFiller.style.height=d.bottom+"px",c.scrollbarFiller.style.width=d.right+"px"):c.scrollbarFiller.style.display="",d.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(c.gutterFiller.style.display="block",c.gutterFiller.style.height=d.bottom+"px",c.gutterFiller.style.width=b.gutterWidth+"px"):c.gutterFiller.style.display=""}function u(a,b,c){var d=c&&null!=c.top?Math.max(0,c.top):a.scroller.scrollTop;d=Math.floor(d-Ra(a));var e=c&&null!=c.bottom?c.bottom:d+a.wrapper.clientHeight,f=be(b,d),g=be(b,e);if(c&&c.ensure){var h=c.ensure.from.line,i=c.ensure.to.line;f>h?(f=h,g=be(b,ce(Yd(b,h))+a.wrapper.clientHeight)):Math.min(i,b.lastLine())>=g&&(f=be(b,ce(Yd(b,i))-a.wrapper.clientHeight),g=i)}return{from:f,to:Math.max(g,f+1)}}function v(a){var b=a.display,c=b.view;if(b.alignWidgets||b.gutters.firstChild&&a.options.fixedGutter){for(var d=y(b)-b.scroller.scrollLeft+a.doc.scrollLeft,e=b.gutters.offsetWidth,f=d+"px",g=0;g=c.viewFrom&&b.visible.to<=c.viewTo&&(null==c.updateLineNumbers||c.updateLineNumbers>=c.viewTo)&&c.renderedView==c.view&&0==Pb(a))return!1;w(a)&&(Lb(a),b.dims=H(a));var e=d.first+d.size,f=Math.max(b.visible.from-a.options.viewportMargin,d.first),g=Math.min(e,b.visible.to+a.options.viewportMargin);c.viewFromg&&c.viewTo-g<20&&(g=Math.min(e,c.viewTo)),Jf&&(f=td(a.doc,f),g=ud(a.doc,g));var h=f!=c.viewFrom||g!=c.viewTo||c.lastWrapHeight!=b.wrapperHeight||c.lastWrapWidth!=b.wrapperWidth;Ob(a,f,g),c.viewOffset=ce(Yd(a.doc,c.viewFrom)),a.display.mover.style.top=c.viewOffset+"px";var i=Pb(a);if(!h&&0==i&&!b.force&&c.renderedView==c.view&&(null==c.updateLineNumbers||c.updateLineNumbers>=c.viewTo))return!1;var j=Se();return i>4&&(c.lineDiv.style.display="none"),I(a,c.updateLineNumbers,b.dims),i>4&&(c.lineDiv.style.display=""),c.renderedView=c.view,j&&Se()!=j&&j.offsetHeight&&j.focus(),Qe(c.cursorDiv),Qe(c.selectionDiv),c.gutters.style.height=c.sizer.style.minHeight=0,h&&(c.lastWrapHeight=b.wrapperHeight,c.lastWrapWidth=b.wrapperWidth,Na(a,400)),c.updateLineNumbers=null,!0}function C(a,b){for(var c=b.viewport,d=!0;(d&&a.options.lineWrapping&&b.oldDisplayWidth!=Va(a)||(c&&null!=c.top&&(c={top:Math.min(a.doc.height+Sa(a.display)-Wa(a),c.top)}),b.visible=u(a.display,a.doc,c),!(b.visible.from>=a.display.viewFrom&&b.visible.to<=a.display.viewTo)))&&B(a,b);d=!1){F(a);var e=o(a);Ia(a),E(a,e),s(a,e)}b.signal(a,"update",a),(a.display.viewFrom!=a.display.reportedViewFrom||a.display.viewTo!=a.display.reportedViewTo)&&(b.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo)}function D(a,b){var c=new z(a,b);if(B(a,c)){F(a),C(a,c);var d=o(a);Ia(a),E(a,d),s(a,d),c.finish()}}function E(a,b){a.display.sizer.style.minHeight=b.docHeight+"px";var c=b.docHeight+a.display.barHeight;a.display.heightForcer.style.top=c+"px",a.display.gutters.style.height=Math.max(c+Ua(a),b.clientHeight)+"px"}function F(a){for(var b=a.display,c=b.lineDiv.offsetTop,d=0;dtf){var g=f.node.offsetTop+f.node.offsetHeight;e=g-c,c=g}else{var h=f.node.getBoundingClientRect();e=h.bottom-h.top}var i=f.line.height-e;if(2>e&&(e=sb(b)),(i>.001||-.001>i)&&(_d(f.line,e),G(f.line),f.rest))for(var j=0;j=b&&l.lineNumber;l.changes&&(Ge(l.changes,"gutter")>-1&&(m=!1),J(a,l,j,c)),m&&(Qe(l.lineNumber),l.lineNumber.appendChild(document.createTextNode(x(a.options,j)))),h=l.node.nextSibling}else{var n=R(a,l,j,c);g.insertBefore(n,h)}j+=l.size}for(;h;)h=d(h)}function J(a,b,c,d){for(var e=0;etf&&(a.node.style.zIndex=2)),a.node}function L(a){var b=a.bgClass?a.bgClass+" "+(a.line.bgClass||""):a.line.bgClass;if(b&&(b+=" CodeMirror-linebackground"),a.background)b?a.background.className=b:(a.background.parentNode.removeChild(a.background),a.background=null);else if(b){var c=K(a);a.background=c.insertBefore(Pe("div",null,b),c.firstChild)}}function M(a,b){var c=a.display.externalMeasured;return c&&c.line==b.line?(a.display.externalMeasured=null,b.measure=c.measure,c.built):Ld(a,b)}function N(a,b){var c=b.text.className,d=M(a,b);b.text==b.node&&(b.node=d.pre),b.text.parentNode.replaceChild(d.pre,b.text),b.text=d.pre,d.bgClass!=b.bgClass||d.textClass!=b.textClass?(b.bgClass=d.bgClass,b.textClass=d.textClass,O(b)):c&&(b.text.className=c)}function O(a){L(a),a.line.wrapClass?K(a).className=a.line.wrapClass:a.node!=a.text&&(a.node.className="");var b=a.textClass?a.textClass+" "+(a.line.textClass||""):a.line.textClass;a.text.className=b||""}function P(a,b,c,d){if(b.gutter&&(b.node.removeChild(b.gutter),b.gutter=null),b.gutterBackground&&(b.node.removeChild(b.gutterBackground),b.gutterBackground=null),b.line.gutterClass){var e=K(b);b.gutterBackground=Pe("div",null,"CodeMirror-gutter-background "+b.line.gutterClass,"left: "+(a.options.fixedGutter?d.fixedPos:-d.gutterTotalWidth)+"px; width: "+d.gutterTotalWidth+"px"),e.insertBefore(b.gutterBackground,b.text)}var f=b.line.gutterMarkers;if(a.options.lineNumbers||f){var e=K(b),g=b.gutter=Pe("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?d.fixedPos:-d.gutterTotalWidth)+"px");if(a.display.input.setUneditable(g),e.insertBefore(g,b.text),b.line.gutterClass&&(g.className+=" "+b.line.gutterClass),!a.options.lineNumbers||f&&f["CodeMirror-linenumbers"]||(b.lineNumber=g.appendChild(Pe("div",x(a.options,c),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+d.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),f)for(var h=0;h1)if(Mf&&Mf.join("\n")==b){if(d.ranges.length%Mf.length==0){i=[];for(var j=0;j=0;j--){var k=d.ranges[j],l=k.from(),m=k.to();k.empty()&&(c&&c>0?l=Kf(l.line,l.ch-c):a.state.overwrite&&!g&&(m=Kf(m.line,Math.min(Yd(f,m.line).text.length,m.ch+Fe(h).length))));var n=a.curOp.updateInput,o={from:l,to:m,text:i?i[j%i.length]:h,origin:e||(g?"paste":a.state.cutIncoming?"cut":"+input")};zc(a.doc,o),xe(a,"inputRead",a,o)}b&&!g&&_(a,b),Lc(a),a.curOp.updateInput=n,a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=!1}function $(a,b){var c=a.clipboardData&&a.clipboardData.getData("text/plain");return c?(a.preventDefault(),b.isReadOnly()||b.options.disableInput||Db(b,function(){Z(b,c,0,null,"paste")}),!0):void 0}function _(a,b){if(a.options.electricChars&&a.options.smartIndent)for(var c=a.doc.sel,d=c.ranges.length-1;d>=0;d--){var e=c.ranges[d];if(!(e.head.ch>100||d&&c.ranges[d-1].head.line==e.head.line)){var f=a.getModeAt(e.head),g=!1;if(f.electricChars){for(var h=0;h-1){g=Nc(a,e.head.line,"smart");break}}else f.electricInput&&f.electricInput.test(Yd(a.doc,e.head.line).text.slice(0,e.head.ch))&&(g=Nc(a,e.head.line,"smart"));g&&xe(a,"electricInput",a,e.head.line)}}}function aa(a){for(var b=[],c=[],d=0;de?j.map:k[e],g=0;ge?a.line:a.rest[e]),l=f[g]+d;return(0>d||h!=b)&&(l=f[g+(d?1:0)]),Kf(i,l)}}}var e=a.text.firstChild,f=!1;if(!b||!Ug(e,b))return ga(Kf(ae(a.line),0),!0);if(b==e&&(f=!0,b=e.childNodes[c],c=0,!b)){var g=a.rest?Fe(a.rest):a.line;return ga(Kf(ae(g),g.text.length),f)}var h=3==b.nodeType?b:null,i=b;for(h||1!=b.childNodes.length||3!=b.firstChild.nodeType||(h=b.firstChild,c&&(c=h.nodeValue.length));i.parentNode!=e;)i=i.parentNode;var j=a.measure,k=j.maps,l=d(h,i,c);if(l)return ga(l,f);for(var m=i.nextSibling,n=h?h.nodeValue.length-c:0;m;m=m.nextSibling){if(l=d(m,m.firstChild,0))return ga(Kf(l.line,l.ch-n),f);n+=m.textContent.length}for(var o=i.previousSibling,n=c;o;o=o.previousSibling){if(l=d(o,o.firstChild,-1))return ga(Kf(l.line,l.ch+n),f);n+=m.textContent.length}}function ja(a,b,c,d,e){function f(a){return function(b){return b.id==a}}function g(b){if(1==b.nodeType){var c=b.getAttribute("cm-text");if(null!=c)return""==c&&(c=b.textContent.replace(/\u200b/g,"")),void(h+=c);var k,l=b.getAttribute("cm-marker");if(l){var m=a.findMarks(Kf(d,0),Kf(e+1,0),f(+l));return void(m.length&&(k=m[0].find())&&(h+=Zd(a.doc,k.from,k.to).join(j)))}if("false"==b.getAttribute("contenteditable"))return;for(var n=0;n=0){var g=X(f.from(),e.from()),h=W(f.to(),e.to()),i=f.empty()?e.from()==e.head:f.from()==f.head;b>=d&&--b,a.splice(--d,2,new la(i?h:g,i?g:h))}}return new ka(a,b)}function na(a,b){return new ka([new la(a,b||a)],0)}function oa(a,b){return Math.max(a.first,Math.min(b,a.first+a.size-1))}function pa(a,b){if(b.linec?Kf(c,Yd(a,c).text.length):qa(b,Yd(a,b.line).text.length)}function qa(a,b){var c=a.ch;return null==c||c>b?Kf(a.line,b):0>c?Kf(a.line,0):a}function ra(a,b){return b>=a.first&&b=b.ch:h.to>b.ch))){if(e&&(Fg(i,"beforeCursorEnter"),i.explicitlyCleared)){if(f.markedSpans){--g;continue}break}if(!i.atomic)continue;if(c){var j,k=i.find(0>d?1:-1);if((0>d?i.inclusiveRight:i.inclusiveLeft)&&(k=Ha(a,k,-d,f)),k&&k.line==b.line&&(j=Lf(k,c))&&(0>d?0>j:j>0))return Fa(a,k,b,d,e)}var l=i.find(0>d?-1:1);return(0>d?i.inclusiveLeft:i.inclusiveRight)&&(l=Ha(a,l,d,f)),l?Fa(a,l,b,d,e):null}}return b}function Ga(a,b,c,d,e){var f=d||1,g=Fa(a,b,c,f,e)||!e&&Fa(a,b,c,f,!0)||Fa(a,b,c,-f,e)||!e&&Fa(a,b,c,-f,!0);return g?g:(a.cantEdit=!0,Kf(a.first,0))}function Ha(a,b,c,d){return 0>c&&0==b.ch?b.line>a.first?pa(a,Kf(b.line-1)):null:c>0&&b.ch==(d||Yd(a,b.line)).text.length?b.lineb&&(b=0),b=Math.round(b),d=Math.round(d),h.appendChild(Pe("div",null,"CodeMirror-selected","position: absolute; left: "+a+"px; top: "+b+"px; width: "+(null==c?k-a:c)+"px; height: "+(d-b)+"px"))}function e(b,c,e){function f(c,d){return mb(a,Kf(b,c),"div",l,d)}var h,i,l=Yd(g,b),m=l.text.length;return _e(de(l),c||0,null==e?m:e,function(a,b,g){var l,n,o,p=f(a,"left");if(a==b)l=p,n=o=p.left;else{if(l=f(b-1,"right"),"rtl"==g){var q=p;p=l,l=q}n=p.left,o=l.right}null==c&&0==a&&(n=j),l.top-p.top>3&&(d(n,p.top,null,p.bottom),n=j,p.bottomi.bottom||l.bottom==i.bottom&&l.right>i.right)&&(i=l),j+1>n&&(n=j),d(n,l.top,o-n,l.bottom)}),{start:h,end:i}}var f=a.display,g=a.doc,h=document.createDocumentFragment(),i=Ta(a.display),j=i.left,k=Math.max(f.sizerWidth,Va(a)-f.sizer.offsetLeft)-i.right,l=b.from(),m=b.to();if(l.line==m.line)e(l.line,l.ch,m.ch);else{var n=Yd(g,l.line),o=Yd(g,m.line),p=rd(n)==rd(o),q=e(l.line,l.ch,p?n.text.length+1:null).end,r=e(m.line,p?0:null,m.ch).start;p&&(q.top0?b.blinker=setInterval(function(){b.cursorDiv.style.visibility=(c=!c)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(b.cursorDiv.style.visibility="hidden")}}function Na(a,b){a.doc.mode.startState&&a.doc.frontier=a.display.viewTo)){var c=+new Date+a.options.workTime,d=gg(b.mode,Qa(a,b.frontier)),e=[];b.iter(b.frontier,Math.min(b.first+b.size,a.display.viewTo+500),function(f){if(b.frontier>=a.display.viewFrom){var g=f.styles,h=f.text.length>a.options.maxHighlightLength,i=Hd(a,f,h?gg(b.mode,d):d,!0);f.styles=i.styles;var j=f.styleClasses,k=i.classes;k?f.styleClasses=k:j&&(f.styleClasses=null);for(var l=!g||g.length!=f.styles.length||j!=k&&(!j||!k||j.bgClass!=k.bgClass||j.textClass!=k.textClass),m=0;!l&&mc?(Na(a,a.options.workDelay),!0):void 0}),e.length&&Db(a,function(){for(var b=0;bg;--h){if(h<=f.first)return f.first;var i=Yd(f,h-1);if(i.stateAfter&&(!c||h<=f.frontier))return h;var j=Mg(i.text,null,a.options.tabSize);(null==e||d>j)&&(e=h-1,d=j)}return e}function Qa(a,b,c){var d=a.doc,e=a.display;if(!d.mode.startState)return!0;var f=Pa(a,b,c),g=f>d.first&&Yd(d,f-1).stateAfter;return g=g?gg(d.mode,g):hg(d.mode),d.iter(f,b,function(c){Jd(a,c.text,g);var h=f==b-1||f%5==0||f>=e.viewFrom&&f2&&f.push((i.bottom+j.top)/2-c.top)}}f.push(c.bottom-c.top)}}function Ya(a,b,c){if(a.line==b)return{map:a.measure.map,cache:a.measure.cache};for(var d=0;dc)return{map:a.measure.maps[d],cache:a.measure.caches[d],before:!0}}function Za(a,b){b=rd(b);var c=ae(b),d=a.display.externalMeasured=new Hb(a.doc,b,c);d.lineN=c;var e=d.built=Ld(a,d);return d.text=e.pre,Re(a.display.lineMeasure,e.pre),d}function $a(a,b,c,d){return bb(a,ab(a,b),c,d)}function _a(a,b){if(b>=a.display.viewFrom&&b=c.lineN&&bb?(e=0,f=1,g="left"):j>b?(e=b-i,f=e+1):(h==a.length-3||b==j&&a[h+3]>b)&&(f=j-i,e=f-1,b>=j&&(g="right")),null!=e){if(d=a[h+2],i==j&&c==(d.insertLeft?"left":"right")&&(g=c),"left"==c&&0==e)for(;h&&a[h-2]==a[h-3]&&a[h-1].insertLeft;)d=a[(h-=3)+2],g="left";if("right"==c&&e==j-i)for(;hk;k++){for(;h&&Oe(b.line.text.charAt(f.coverStart+h));)--h;for(;f.coverStart+itf&&0==h&&i==f.coverEnd-f.coverStart)e=g.parentNode.getBoundingClientRect();else if(sf&&a.options.lineWrapping){var l=Qg(g,h,i).getClientRects();e=l.length?l["right"==d?l.length-1:0]:Qf}else e=Qg(g,h,i).getBoundingClientRect()||Qf;if(e.left||e.right||0==h)break;i=h,h-=1,j="right"}sf&&11>tf&&(e=eb(a.display.measure,e))}else{h>0&&(j=d="right");var l;e=a.options.lineWrapping&&(l=g.getClientRects()).length>1?l["right"==d?l.length-1:0]:g.getBoundingClientRect()}if(sf&&9>tf&&!h&&(!e||!e.left&&!e.right)){var m=g.parentNode.getClientRects()[0];e=m?{left:m.left,right:m.left+tb(a.display),top:m.top,bottom:m.bottom}:Qf}for(var n=e.top-b.rect.top,o=e.bottom-b.rect.top,p=(n+o)/2,q=b.view.measure.heights,k=0;kc.from?g(a-1):g(a,d)}d=d||Yd(a.doc,b.line),e||(e=ab(a,d));var i=de(d),j=b.ch;if(!i)return g(j);var k=jf(i,j),l=h(j,k);return null!=eh&&(l.other=h(j,eh)),l}function ob(a,b){var c=0,b=pa(a.doc,b);a.options.lineWrapping||(c=tb(a.display)*b.ch);var d=Yd(a.doc,b.line),e=ce(d)+Ra(a.display);return{left:c,right:c,top:e,bottom:e+d.height}}function pb(a,b,c,d){var e=Kf(a,b);return e.xRel=d,c&&(e.outside=!0),e}function qb(a,b,c){var d=a.doc;if(c+=a.display.viewOffset,0>c)return pb(d.first,0,!0,-1);var e=be(d,c),f=d.first+d.size-1;if(e>f)return pb(d.first+d.size-1,Yd(d,f).text.length,!0,1);0>b&&(b=0);for(var g=Yd(d,e);;){var h=rb(a,g,e,b,c),i=pd(g),j=i&&i.find(0,!0);if(!i||!(h.ch>j.from.ch||h.ch==j.from.ch&&h.xRel>0))return h;e=ae(g=j.to.line)}}function rb(a,b,c,d,e){function f(d){var e=nb(a,Kf(c,d),"line",b,j);return h=!0,g>e.bottom?e.left-i:gq)return pb(c,n,r,1);for(;;){if(k?n==m||n==lf(b,m,1):1>=n-m){for(var s=o>d||q-d>=d-o?m:n,t=d-(s==m?o:q);Oe(b.text.charAt(s));)++s;var u=pb(c,s,s==m?p:r,-1>t?-1:t>1?1:0);return u}var v=Math.ceil(l/2),w=m+v;if(k){w=m;for(var x=0;v>x;++x)w=lf(b,w,1)}var y=f(w);y>d?(n=w,q=y,(r=h)&&(q+=1e3),l=v):(m=w,o=y,p=h,l-=v)}}function sb(a){if(null!=a.cachedTextHeight)return a.cachedTextHeight;if(null==Nf){Nf=Pe("pre");for(var b=0;49>b;++b)Nf.appendChild(document.createTextNode("x")),Nf.appendChild(Pe("br"));Nf.appendChild(document.createTextNode("x"))}Re(a.measure,Nf);var c=Nf.offsetHeight/50;return c>3&&(a.cachedTextHeight=c),Qe(a.measure),c||1}function tb(a){if(null!=a.cachedCharWidth)return a.cachedCharWidth;var b=Pe("span","xxxxxxxxxx"),c=Pe("pre",[b]);Re(a.measure,c);var d=b.getBoundingClientRect(),e=(d.right-d.left)/10;return e>2&&(a.cachedCharWidth=e),e||10}function ub(a){a.curOp={cm:a,viewChanged:!1,startHeight:a.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Sf},Rf?Rf.ops.push(a.curOp):a.curOp.ownsGroup=Rf={ops:[a.curOp],delayedCallbacks:[]}}function vb(a){var b=a.delayedCallbacks,c=0;do{for(;c=c.viewTo)||c.maxLineChanged&&b.options.lineWrapping,a.update=a.mustUpdate&&new z(b,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function zb(a){a.updatedDisplay=a.mustUpdate&&B(a.cm,a.update)}function Ab(a){var b=a.cm,c=b.display;a.updatedDisplay&&F(b),a.barMeasure=o(b),c.maxLineChanged&&!b.options.lineWrapping&&(a.adjustWidthTo=$a(b,c.maxLine,c.maxLine.text.length).left+3,b.display.sizerWidth=a.adjustWidthTo,a.barMeasure.scrollWidth=Math.max(c.scroller.clientWidth,c.sizer.offsetLeft+a.adjustWidthTo+Ua(b)+b.display.barWidth),a.maxScrollLeft=Math.max(0,c.sizer.offsetLeft+a.adjustWidthTo-Va(b))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=c.input.prepareSelection())}function Bb(a){var b=a.cm;null!=a.adjustWidthTo&&(b.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeftf;f=d){var g=new Hb(a.doc,Yd(a.doc,f),f);d=f+g.size,e.push(g)}return e}function Jb(a,b,c,d){null==b&&(b=a.doc.first),null==c&&(c=a.doc.first+a.doc.size),d||(d=0);var e=a.display;if(d&&cb)&&(e.updateLineNumbers=b),a.curOp.viewChanged=!0,b>=e.viewTo)Jf&&td(a.doc,b)e.viewFrom?Lb(a):(e.viewFrom+=d,e.viewTo+=d);else if(b<=e.viewFrom&&c>=e.viewTo)Lb(a);else if(b<=e.viewFrom){var f=Nb(a,c,c+d,1);f?(e.view=e.view.slice(f.index),e.viewFrom=f.lineN,e.viewTo+=d):Lb(a)}else if(c>=e.viewTo){var f=Nb(a,b,b,-1);f?(e.view=e.view.slice(0,f.index),e.viewTo=f.lineN):Lb(a)}else{var g=Nb(a,b,b,-1),h=Nb(a,c,c+d,1);g&&h?(e.view=e.view.slice(0,g.index).concat(Ib(a,g.lineN,h.lineN)).concat(e.view.slice(h.index)),e.viewTo+=d):Lb(a)}var i=e.externalMeasured;i&&(c=e.lineN&&b=d.viewTo)){var f=d.view[Mb(a,b)];if(null!=f.node){var g=f.changes||(f.changes=[]);-1==Ge(g,c)&&g.push(c)}}}function Lb(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function Mb(a,b){if(b>=a.display.viewTo)return null;if(b-=a.display.viewFrom,0>b)return null;for(var c=a.display.view,d=0;db)return d}function Nb(a,b,c,d){var e,f=Mb(a,b),g=a.display.view;if(!Jf||c==a.doc.first+a.doc.size)return{index:f,lineN:c};for(var h=0,i=a.display.viewFrom;f>h;h++)i+=g[h].size;if(i!=b){if(d>0){if(f==g.length-1)return null;e=i+g[f].size-b,f++}else e=i-b;b+=e,c+=e}for(;td(a.doc,c)!=c;){if(f==(0>d?0:g.length-1))return null;c+=d*g[f-(0>d?1:0)].size,f+=d}return{index:f,lineN:c}}function Ob(a,b,c){var d=a.display,e=d.view;0==e.length||b>=d.viewTo||c<=d.viewFrom?(d.view=Ib(a,b,c),d.viewFrom=b):(d.viewFrom>b?d.view=Ib(a,b,d.viewFrom).concat(d.view):d.viewFromc&&(d.view=d.view.slice(0,Mb(a,c)))),d.viewTo=c}function Pb(a){for(var b=a.display.view,c=0,d=0;d400}var e=a.display;Cg(e.scroller,"mousedown",Eb(a,Vb)),sf&&11>tf?Cg(e.scroller,"dblclick",Eb(a,function(b){if(!ze(a,b)){var c=Ub(a,b);if(c&&!$b(a,b)&&!Tb(a.display,b)){ @@ -13,4 +13,4 @@ model:b,initialize:function(){this.idx=1,this.on("add",this.onAdd),this.on("rese setTimeout(function(){e.apply(b,arguments)},0)),k=!1}c=c||function(){},d=d||function(){},e=e||function(){};var j=document,k=!1,l={},m=0,n=0,o="ontouchstart"in window,q={};q.selectstart=f,q.dragstart=f,q["touchmove mousemove"]=g,q["touchend mouseup"]=i,a(b).bind("touchstart mousedown",h)}function l(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,a.apply(e,f)};c&&clearTimeout(d),(c||!d)&&(d=setTimeout(g,b))}}function m(){return a.fn.spectrum.inputTypeColorSupport()}var n={beforeShow:h,move:h,change:h,show:h,hide:h,color:!1,flat:!1,showInput:!1,allowEmpty:!1,showButtons:!0,clickoutFiresChange:!0,showInitial:!1,showPalette:!1,showPaletteOnly:!1,hideAfterPaletteSelect:!1,togglePaletteOnly:!1,showSelectionPalette:!0,localStorageKey:!1,appendTo:"body",maxSelectionSize:7,cancelText:"cancel",chooseText:"choose",togglePaletteMoreText:"more",togglePaletteLessText:"less",clearText:"Clear Color Selection",noColorSelectedText:"No Color Selected",preferredFormat:!1,className:"",containerClassName:"",replacerClassName:"",showAlpha:!1,theme:"sp-light",palette:[["#ffffff","#000000","#ff0000","#ff8000","#ffff00","#008000","#0000ff","#4b0082","#9400d3"]],selectionPalette:[],disabled:!1,offset:null},o=[],p=!!/msie/i.exec(window.navigator.userAgent),q=function(){function a(a,b){return!!~(""+a).indexOf(b)}var b=document.createElement("div"),c=b.style;return c.cssText="background-color:rgba(0,0,0,.5)",a(c.backgroundColor,"rgba")||a(c.backgroundColor,"hsla")}(),r=["
","
","
","
"].join(""),s=function(){var a="";if(p)for(var b=1;6>=b;b++)a+="
";return["
","
","
","
","","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
",a,"
","
","
","
","
","","
","
","
","","","
","
","
"].join("")}(),t="spectrum.id";a.fn.spectrum=function(b,c){if("string"==typeof b){var d=this,e=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=o[a(this).data(t)];if(c){var f=c[b];if(!f)throw new Error("Spectrum: no such method: '"+b+"'");"get"==b?d=c.get():"container"==b?d=c.container:"option"==b?d=c.option.apply(c,e):"destroy"==b?(c.destroy(),a(this).removeData(t)):f.apply(c,e)}}),d}return this.spectrum("destroy").each(function(){var c=a.extend({},b,a(this).data()),d=f(this,c);a(this).data(t,d.id)})},a.fn.spectrum.load=!0,a.fn.spectrum.loadOpts={},a.fn.spectrum.draggable=k,a.fn.spectrum.defaults=n,a.fn.spectrum.inputTypeColorSupport=function u(){if("undefined"==typeof u._cachedResult){var b=a("")[0];u._cachedResult="color"===b.type&&""!==b.value}return u._cachedResult},a.spectrum={},a.spectrum.localization={},a.spectrum.palettes={},a.fn.spectrum.processNativeColorInputs=function(){var b=a("input[type=color]");b.length&&!m()&&b.spectrum({preferredFormat:"hex6"})},function(){function a(a){var c={r:0,g:0,b:0},e=1,g=!1,h=!1;return"string"==typeof a&&(a=G(a)),"object"==typeof a&&(a.hasOwnProperty("r")&&a.hasOwnProperty("g")&&a.hasOwnProperty("b")?(c=b(a.r,a.g,a.b),g=!0,h="%"===String(a.r).substr(-1)?"prgb":"rgb"):a.hasOwnProperty("h")&&a.hasOwnProperty("s")&&a.hasOwnProperty("v")?(a.s=D(a.s),a.v=D(a.v),c=f(a.h,a.s,a.v),g=!0,h="hsv"):a.hasOwnProperty("h")&&a.hasOwnProperty("s")&&a.hasOwnProperty("l")&&(a.s=D(a.s),a.l=D(a.l),c=d(a.h,a.s,a.l),g=!0,h="hsl"),a.hasOwnProperty("a")&&(e=a.a)),e=w(e),{ok:g,format:a.format||h,r:M(255,N(c.r,0)),g:M(255,N(c.g,0)),b:M(255,N(c.b,0)),a:e}}function b(a,b,c){return{r:255*x(a,255),g:255*x(b,255),b:255*x(c,255)}}function c(a,b,c){a=x(a,255),b=x(b,255),c=x(c,255);var d,e,f=N(a,b,c),g=M(a,b,c),h=(f+g)/2;if(f==g)d=e=0;else{var i=f-g;switch(e=h>.5?i/(2-f-g):i/(f+g),f){case a:d=(b-c)/i+(c>b?6:0);break;case b:d=(c-a)/i+2;break;case c:d=(a-b)/i+4}d/=6}return{h:d,s:e,l:h}}function d(a,b,c){function d(a,b,c){return 0>c&&(c+=1),c>1&&(c-=1),1/6>c?a+6*(b-a)*c:.5>c?b:2/3>c?a+(b-a)*(2/3-c)*6:a}var e,f,g;if(a=x(a,360),b=x(b,100),c=x(c,100),0===b)e=f=g=c;else{var h=.5>c?c*(1+b):c+b-c*b,i=2*c-h;e=d(i,h,a+1/3),f=d(i,h,a),g=d(i,h,a-1/3)}return{r:255*e,g:255*f,b:255*g}}function e(a,b,c){a=x(a,255),b=x(b,255),c=x(c,255);var d,e,f=N(a,b,c),g=M(a,b,c),h=f,i=f-g;if(e=0===f?0:i/f,f==g)d=0;else{switch(f){case a:d=(b-c)/i+(c>b?6:0);break;case b:d=(c-a)/i+2;break;case c:d=(a-b)/i+4}d/=6}return{h:d,s:e,v:h}}function f(a,b,c){a=6*x(a,360),b=x(b,100),c=x(c,100);var d=K.floor(a),e=a-d,f=c*(1-b),g=c*(1-e*b),h=c*(1-(1-e)*b),i=d%6,j=[c,g,f,f,h,c][i],k=[h,c,c,g,f,f][i],l=[f,f,h,c,c,g][i];return{r:255*j,g:255*k,b:255*l}}function g(a,b,c,d){var e=[C(L(a).toString(16)),C(L(b).toString(16)),C(L(c).toString(16))];return d&&e[0].charAt(0)==e[0].charAt(1)&&e[1].charAt(0)==e[1].charAt(1)&&e[2].charAt(0)==e[2].charAt(1)?e[0].charAt(0)+e[1].charAt(0)+e[2].charAt(0):e.join("")}function h(a,b,c,d){var e=[C(E(d)),C(L(a).toString(16)),C(L(b).toString(16)),C(L(c).toString(16))];return e.join("")}function i(a,b){b=0===b?0:b||10;var c=P(a).toHsl();return c.s-=b/100,c.s=y(c.s),P(c)}function j(a,b){b=0===b?0:b||10;var c=P(a).toHsl();return c.s+=b/100,c.s=y(c.s),P(c)}function k(a){return P(a).desaturate(100)}function l(a,b){b=0===b?0:b||10;var c=P(a).toHsl();return c.l+=b/100,c.l=y(c.l),P(c)}function m(a,b){b=0===b?0:b||10;var c=P(a).toRgb();return c.r=N(0,M(255,c.r-L(255*-(b/100)))),c.g=N(0,M(255,c.g-L(255*-(b/100)))),c.b=N(0,M(255,c.b-L(255*-(b/100)))),P(c)}function n(a,b){b=0===b?0:b||10;var c=P(a).toHsl();return c.l-=b/100,c.l=y(c.l),P(c)}function o(a,b){var c=P(a).toHsl(),d=(L(c.h)+b)%360;return c.h=0>d?360+d:d,P(c)}function p(a){var b=P(a).toHsl();return b.h=(b.h+180)%360,P(b)}function q(a){var b=P(a).toHsl(),c=b.h;return[P(a),P({h:(c+120)%360,s:b.s,l:b.l}),P({h:(c+240)%360,s:b.s,l:b.l})]}function r(a){var b=P(a).toHsl(),c=b.h;return[P(a),P({h:(c+90)%360,s:b.s,l:b.l}),P({h:(c+180)%360,s:b.s,l:b.l}),P({h:(c+270)%360,s:b.s,l:b.l})]}function s(a){var b=P(a).toHsl(),c=b.h;return[P(a),P({h:(c+72)%360,s:b.s,l:b.l}),P({h:(c+216)%360,s:b.s,l:b.l})]}function t(a,b,c){b=b||6,c=c||30;var d=P(a).toHsl(),e=360/c,f=[P(a)];for(d.h=(d.h-(e*b>>1)+720)%360;--b;)d.h=(d.h+e)%360,f.push(P(d));return f}function u(a,b){b=b||6;for(var c=P(a).toHsv(),d=c.h,e=c.s,f=c.v,g=[],h=1/b;b--;)g.push(P({h:d,s:e,v:f})),f=(f+h)%1;return g}function v(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[a[c]]=c);return b}function w(a){return a=parseFloat(a),(isNaN(a)||0>a||a>1)&&(a=1),a}function x(a,b){A(a)&&(a="100%");var c=B(a);return a=M(b,N(0,parseFloat(a))),c&&(a=parseInt(a*b,10)/100),K.abs(a-b)<1e-6?1:a%b/parseFloat(b)}function y(a){return M(1,N(0,a))}function z(a){return parseInt(a,16)}function A(a){return"string"==typeof a&&-1!=a.indexOf(".")&&1===parseFloat(a)}function B(a){return"string"==typeof a&&-1!=a.indexOf("%")}function C(a){return 1==a.length?"0"+a:""+a}function D(a){return 1>=a&&(a=100*a+"%"),a}function E(a){return Math.round(255*parseFloat(a)).toString(16)}function F(a){return z(a)/255}function G(a){a=a.replace(H,"").replace(I,"").toLowerCase();var b=!1;if(Q[a])a=Q[a],b=!0;else if("transparent"==a)return{r:0,g:0,b:0,a:0,format:"name"};var c;return(c=S.rgb.exec(a))?{r:c[1],g:c[2],b:c[3]}:(c=S.rgba.exec(a))?{r:c[1],g:c[2],b:c[3],a:c[4]}:(c=S.hsl.exec(a))?{h:c[1],s:c[2],l:c[3]}:(c=S.hsla.exec(a))?{h:c[1],s:c[2],l:c[3],a:c[4]}:(c=S.hsv.exec(a))?{h:c[1],s:c[2],v:c[3]}:(c=S.hsva.exec(a))?{h:c[1],s:c[2],v:c[3],a:c[4]}:(c=S.hex8.exec(a))?{a:F(c[1]),r:z(c[2]),g:z(c[3]),b:z(c[4]),format:b?"name":"hex8"}:(c=S.hex6.exec(a))?{r:z(c[1]),g:z(c[2]),b:z(c[3]),format:b?"name":"hex"}:(c=S.hex3.exec(a))?{r:z(c[1]+""+c[1]),g:z(c[2]+""+c[2]),b:z(c[3]+""+c[3]),format:b?"name":"hex"}:!1}var H=/^[\s,#]+/,I=/\s+$/,J=0,K=Math,L=K.round,M=K.min,N=K.max,O=K.random,P=function(b,c){if(b=b?b:"",c=c||{},b instanceof P)return b;if(!(this instanceof P))return new P(b,c);var d=a(b);this._originalInput=b,this._r=d.r,this._g=d.g,this._b=d.b,this._a=d.a,this._roundA=L(100*this._a)/100,this._format=c.format||d.format,this._gradientType=c.gradientType,this._r<1&&(this._r=L(this._r)),this._g<1&&(this._g=L(this._g)),this._b<1&&(this._b=L(this._b)),this._ok=d.ok,this._tc_id=J++};P.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var a=this.toRgb();return(299*a.r+587*a.g+114*a.b)/1e3},setAlpha:function(a){return this._a=w(a),this._roundA=L(100*this._a)/100,this},toHsv:function(){var a=e(this._r,this._g,this._b);return{h:360*a.h,s:a.s,v:a.v,a:this._a}},toHsvString:function(){var a=e(this._r,this._g,this._b),b=L(360*a.h),c=L(100*a.s),d=L(100*a.v);return 1==this._a?"hsv("+b+", "+c+"%, "+d+"%)":"hsva("+b+", "+c+"%, "+d+"%, "+this._roundA+")"},toHsl:function(){var a=c(this._r,this._g,this._b);return{h:360*a.h,s:a.s,l:a.l,a:this._a}},toHslString:function(){var a=c(this._r,this._g,this._b),b=L(360*a.h),d=L(100*a.s),e=L(100*a.l);return 1==this._a?"hsl("+b+", "+d+"%, "+e+"%)":"hsla("+b+", "+d+"%, "+e+"%, "+this._roundA+")"},toHex:function(a){return g(this._r,this._g,this._b,a)},toHexString:function(a){return"#"+this.toHex(a)},toHex8:function(){return h(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:L(this._r),g:L(this._g),b:L(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+L(this._r)+", "+L(this._g)+", "+L(this._b)+")":"rgba("+L(this._r)+", "+L(this._g)+", "+L(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:L(100*x(this._r,255))+"%",g:L(100*x(this._g,255))+"%",b:L(100*x(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+L(100*x(this._r,255))+"%, "+L(100*x(this._g,255))+"%, "+L(100*x(this._b,255))+"%)":"rgba("+L(100*x(this._r,255))+"%, "+L(100*x(this._g,255))+"%, "+L(100*x(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":this._a<1?!1:R[g(this._r,this._g,this._b,!0)]||!1},toFilter:function(a){var b="#"+h(this._r,this._g,this._b,this._a),c=b,d=this._gradientType?"GradientType = 1, ":"";if(a){var e=P(a);c=e.toHex8String()}return"progid:DXImageTransform.Microsoft.gradient("+d+"startColorstr="+b+",endColorstr="+c+")"},toString:function(a){var b=!!a;a=a||this._format;var c=!1,d=this._a<1&&this._a>=0,e=!b&&d&&("hex"===a||"hex6"===a||"hex3"===a||"name"===a);return e?"name"===a&&0===this._a?this.toName():this.toRgbString():("rgb"===a&&(c=this.toRgbString()),"prgb"===a&&(c=this.toPercentageRgbString()),("hex"===a||"hex6"===a)&&(c=this.toHexString()),"hex3"===a&&(c=this.toHexString(!0)),"hex8"===a&&(c=this.toHex8String()),"name"===a&&(c=this.toName()),"hsl"===a&&(c=this.toHslString()),"hsv"===a&&(c=this.toHsvString()),c||this.toHexString())},_applyModification:function(a,b){var c=a.apply(null,[this].concat([].slice.call(b)));return this._r=c._r,this._g=c._g,this._b=c._b,this.setAlpha(c._a),this},lighten:function(){return this._applyModification(l,arguments)},brighten:function(){return this._applyModification(m,arguments)},darken:function(){return this._applyModification(n,arguments)},desaturate:function(){return this._applyModification(i,arguments)},saturate:function(){return this._applyModification(j,arguments)},greyscale:function(){return this._applyModification(k,arguments)},spin:function(){return this._applyModification(o,arguments)},_applyCombination:function(a,b){return a.apply(null,[this].concat([].slice.call(b)))},analogous:function(){return this._applyCombination(t,arguments)},complement:function(){return this._applyCombination(p,arguments)},monochromatic:function(){return this._applyCombination(u,arguments)},splitcomplement:function(){return this._applyCombination(s,arguments)},triad:function(){return this._applyCombination(q,arguments)},tetrad:function(){return this._applyCombination(r,arguments)}},P.fromRatio=function(a,b){if("object"==typeof a){var c={};for(var d in a)a.hasOwnProperty(d)&&("a"===d?c[d]=a[d]:c[d]=D(a[d]));a=c}return P(a,b)},P.equals=function(a,b){return a&&b?P(a).toRgbString()==P(b).toRgbString():!1},P.random=function(){return P.fromRatio({r:O(),g:O(),b:O()})},P.mix=function(a,b,c){c=0===c?0:c||50;var d,e=P(a).toRgb(),f=P(b).toRgb(),g=c/100,h=2*g-1,i=f.a-e.a;d=h*i==-1?h:(h+i)/(1+h*i),d=(d+1)/2;var j=1-d,k={r:f.r*d+e.r*j,g:f.g*d+e.g*j,b:f.b*d+e.b*j,a:f.a*g+e.a*(1-g)};return P(k)},P.readability=function(a,b){var c=P(a),d=P(b),e=c.toRgb(),f=d.toRgb(),g=c.getBrightness(),h=d.getBrightness(),i=Math.max(e.r,f.r)-Math.min(e.r,f.r)+Math.max(e.g,f.g)-Math.min(e.g,f.g)+Math.max(e.b,f.b)-Math.min(e.b,f.b);return{brightness:Math.abs(g-h),color:i}},P.isReadable=function(a,b){var c=P.readability(a,b);return c.brightness>125&&c.color>500},P.mostReadable=function(a,b){for(var c=null,d=0,e=!1,f=0;f125&&g.color>500,i=3*(g.brightness/125)+g.color/500;(h&&!e||h&&e&&i>d||!h&&!e&&i>d)&&(e=h,d=i,c=P(b[f]))}return c};var Q=P.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},R=P.hexNames=v(Q),S=function(){var a="[-\\+]?\\d+%?",b="[-\\+]?\\d*\\.\\d+%?",c="(?:"+b+")|(?:"+a+")",d="[\\s|\\(]+("+c+")[,|\\s]+("+c+")[,|\\s]+("+c+")\\s*\\)?",e="[\\s|\\(]+("+c+")[,|\\s]+("+c+")[,|\\s]+("+c+")[,|\\s]+("+c+")\\s*\\)?";return{rgb:new RegExp("rgb"+d),rgba:new RegExp("rgba"+e),hsl:new RegExp("hsl"+d),hsla:new RegExp("hsla"+e),hsv:new RegExp("hsv"+d),hsva:new RegExp("hsva"+e),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();window.tinycolor=P}(),a(function(){a.fn.spectrum.load&&a.fn.spectrum.processNativeColorInputs()})}),c("text!StyleManager/templates/propertyColor.html",[],function(){return'
\n input-holder\'>\n
\n
\n
\n
\n
'}),c("StyleManager/view/PropertyColorView",["backbone","./PropertyView","Spectrum","text!./../templates/propertyColor.html"],function(a,b,c,d){return b.extend({template:_.template(d),renderInput:function(){if(this.$input||(this.$input=$("",{placeholder:this.defaultValue,type:"text"}),this.$el.find("#"+this.pfx+"input-holder").html(this.$input)),!this.$colorPicker){this.$colorPicker=$("
",{"class":this.pfx+"color-picker"}),cpStyle=this.$colorPicker.get(0).style;var a=this;this.$colorPicker.spectrum({showPalette:!0,maxSelectionSize:8,palette:[],showAlpha:!0,chooseText:"Ok",cancelText:"⨯",move:function(a){var b=1==a.getAlpha()?a.toHexString():a.toRgbString();cpStyle.backgroundColor=b},change:function(b){var c=1==b.getAlpha()?b.toHexString():b.toRgbString();c=c.replace(/ /g,""),cpStyle.backgroundColor=c,a.model.set("value",c)}}),this.$el.find("."+this.pfx+"colorp-c").append(this.$colorPicker)}this.setValue(this.componentValue,0)},setValue:function(a,c){b.prototype.setValue.apply(this,arguments);var d=this.model.get("value")||this.defaultValue;d=a||d,this.$colorPicker&&(d="none"===d?"#fff":d,this.$colorPicker.spectrum("set",d),this.$colorPicker.get(0).style.backgroundColor=d)}})}),c("text!StyleManager/templates/propertyFile.html",[],function(){return'
\n
input-holder\'>\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
'}),c("StyleManager/view/PropertyFileView",["backbone","./PropertyView","text!./../templates/propertyFile.html"],function(a,b,c){return b.extend({template:_.template(c),initialize:function(a){b.prototype.initialize.apply(this,arguments),this.assets=this.target.get("assets"),this.modal=this.target.get("Modal"),this.am=this.target.get("AssetManager"),this.className=this.className+" "+this.pfx+"file",this.events["click #"+this.pfx+"close"]="removeFile",this.events["click #"+this.pfx+"images"]="openAssetManager",this.delegateEvents()},renderInput:function(){this.$input||(this.$input=$("",{placeholder:this.defaultValue,type:"text"})),this.$preview||(this.$preview=this.$el.find("#"+this.pfx+"preview-file")),this.$previewBox||(this.$previewBox=this.$el.find("#"+this.pfx+"preview-box")),this.componentValue&&this.componentValue!=this.defaultValue?this.setPreviewView(1):this.setPreviewView(0),this.setValue(this.componentValue,0)},setPreviewView:function(a){this.$previewBox&&(a?this.$previewBox.addClass(this.pfx+"show"):this.$previewBox.removeClass(this.pfx+"show"))},spreadUrl:function(a){this.setValue('url("'+a+'")'),this.setPreviewView(1)},setPreview:function(a){this.$preview&&this.$preview.css("background-image",a)},setValue:function(a,c){b.prototype.setValue.apply(this,arguments),this.setPreview(a)},renderTemplate:function(){this.$el.append(this.template({upload:"Upload",assets:"Images",pfx:this.pfx}))},cleanValue:function(){this.setPreviewView(0),this.model.set({value:""},{silent:!0})},removeFile:function(){this.model.set("value",this.defaultValue),b.prototype.cleanValue.apply(this,arguments),this.setPreviewView(0)},openAssetManager:function(a){var b=this;this.modal&&this.am&&(this.modal.setTitle("Select image"),this.modal.setContent(this.am.render()),this.am.setTarget(null),this.modal.show(),this.am.onSelect(function(c){b.modal.hide(),b.spreadUrl(c.get("src")),b.valueChanged(a)}))}})}),c("text!StyleManager/templates/propertyComposite.html",[],function(){return'
\n input-holder\'>\n
\n
'}),c("StyleManager/view/PropertyCompositeView",["backbone","./PropertyView","text!./../templates/propertyComposite.html","require"],function(a,b,c,d){return b.extend({template:_.template(c),initialize:function(a){b.prototype.initialize.apply(this,arguments),_.bindAll(this,"build"),this.config=a.config||{},this.className=this.className+" "+this.pfx+"composite"},valueUpdated:function(){this.model.get("detached")||b.prototype.valueUpdated.apply(this,arguments)},renderInput:function(){var a=this.model.get("properties");this.model.get("detached");if(a&&a.length){if(this.$input||(this.$input=$("",{value:0,type:"hidden"})),!this.props){var b=d("./../model/Properties");this.props=new b(a),this.model.set("properties",this.props)}if(!this.$props){this.props.each(function(a,b){a&&"composite"==a.get("type")&&(this.props.remove(a),console.warn("Nested composite types not yet allowed."))},this);var c=d("./PropertiesView"),e=new c(this.getPropsConfig());this.$props=e.render().$el,this.$el.find("#"+this.pfx+"input-holder").html(this.$props)}}},getPropsConfig:function(a){var b=this;return result={config:this.config,collection:this.props,target:this.target,propTarget:this.propTarget,onChange:function(a,c,d){var e=b.build();b.model.set("value",e,d)},customValue:function(a,c){return b.valueOnIndex(c,a)}},this.model.get("detached")&&delete result.onChange,result},getDefaultValue:function(){var a="";return this.props.each(function(b,c){a+=b.get("defaults")+b.get("unit")+" "}),a.replace(/ +$/,"")},valueOnIndex:function(a,b){var c=null,d=this.getComponentValue().split(" ");if(d.length&&d[a]&&(c=d[a],b&&b.model&&b.model.get("functionName"))){var e=this.fetchFromFunction(c);e&&(c=e)}return c},build:function(a,b,c){var d="";return this.model.get("properties").each(function(a){var b=a.getValue();func=a.get("functionName"),func&&(b=func+"("+b+")"),d+=b+" "}),d.replace(/ +$/,"")}})}),c("text!StyleManager/templates/propertyStack.html",[],function(){return"
field <%= pfx %>stack\">\n \n \n
\n
"}),c("text!StyleManager/templates/layer.html",[],function(){return'
\n \n
\n
<%= label %>
\n
\n
\n
\n
\n
\n
'}),c("StyleManager/view/LayerView",["backbone","text!./../templates/layer.html"],function(a,b){return a.View.extend({events:{click:"updateIndex"},template:_.template(b),initialize:function(a){this.stackModel=a.stackModel||{},this.config=a.config||{},this.pfx=this.config.stylePrefix||"",this.className=this.pfx+"layer",this.sorter=a.sorter||null,this.listenTo(this.model,"destroy remove",this.remove),this.listenTo(this.model,"change:value",this.valueChanged),this.listenTo(this.model,"change:props",this.showProps),this.events["click #"+this.pfx+"close-layer"]="remove",this.events["mousedown > #"+this.pfx+"move"]="initSorter",this.model.get("preview")||this.$el.addClass(this.pfx+"no-preview"),this.$el.data("model",this.model),this.delegateEvents()},initSorter:function(a){this.sorter&&this.sorter.startSort(this.el)},getProps:function(){return this.stackModel.get?this.stackModel.get("properties"):null},valueChanged:function(){var a=this.model.get("preview");if(a){this.$preview||(this.$preview=this.$el.find("#"+this.pfx+"preview"));"function"==typeof a?a(this.getProps(),this.$preview):this.onPreview(this.getProps(),this.$preview)}},onPreview:function(a,b){var c=this.model.get("value").split(" "),d=3,e="";if(a.each(function(a,b){var f=c[b]||"";if(f&&"integer"==a.get("type")){var g=parseInt(f,10),h=f.replace(g,"");g=isNaN(g)?0:g,g>d&&(g=d),-d>g&&(g=-d),f=g+h}e+=f+" "}),this.stackModel.get){var f=this.stackModel.get("property");f&&(this.$preview.get(0).style[f]=e)}},showProps:function(){this.$props=this.model.get("props"),this.$el.find("#"+this.pfx+"inputs").html(this.$props.show()),this.model.set({props:null},{silent:!0})},remove:function(b){this.$props&&this.$props.detach(),b&&b.stopPropagation&&b.stopPropagation(),a.View.prototype.remove.apply(this,arguments),this.model.collection.contains(this.model)&&this.model.collection.remove(this.model),this.stackModel&&this.stackModel.set&&(this.stackModel.set({stackIndex:null},{silent:!0}),this.stackModel.trigger("updateValue"))},updateIndex:function(a){var b=this.getIndex();this.stackModel.set("stackIndex",b),this.model.collection&&this.model.collection.trigger("deselectAll"),this.$el.addClass(this.pfx+"active")},getIndex:function(){var a=0;return this.model.collection&&(a=this.model.collection.indexOf(this.model)),a},render:function(){return this.$el.html(this.template({label:"Layer "+this.model.get("index"),pfx:this.pfx})),this.$el.attr("class",this.className),this.valueChanged(),this}})}),c("StyleManager/view/LayersView",["backbone","./LayerView"],function(a,b){return a.View.extend({initialize:function(a){this.config=a.config||{},this.stackModel=a.stackModel,this.preview=a.preview,this.pfx=this.config.stylePrefix||"",this.className=this.pfx+"layers",this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"deselectAll",this.deselectAll),this.listenTo(this.collection,"reset",this.render);var b=this.config.target||"",c=b?b.get("Utils"):"";this.sorter=c?new c.Sorter({container:this.el,containerSel:"."+this.pfx+"layers",itemSel:"."+this.pfx+"layer",pfx:"wte-"}):"",this.$el.data("collection",this.collection)},addTo:function(a){var b=this.collection.indexOf(a);this.addToCollection(a,null,b)},addToCollection:function(a,c,d){var e=c||null,f=b;"undefined"!=typeof this.preview&&a.set("preview",this.preview);var g=new f({model:a,stackModel:this.stackModel,config:this.config,sorter:this.sorter}),h=g.render().el;if(e)e.appendChild(h);else if("undefined"!=typeof d){var i="before";this.$el.children().length==d&&(d--,i="after"),0>d?this.$el.append(h):this.$el.children().eq(d)[i](h)}else this.$el.append(h);return h},deselectAll:function(){this.$el.find("."+this.pfx+"layer").removeClass(this.pfx+"active")},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(b){this.addToCollection(b,a)},this),this.$el.append(a),this.$el.attr("class",this.className),this.sorter&&(this.sorter.plh=null),this}})}),c("StyleManager/view/PropertyStackView",["backbone","./PropertyCompositeView","text!./../templates/propertyStack.html","./../model/Layers","./LayersView"],function(a,b,c,d,e){return b.extend({template:_.template(c),initialize:function(a){b.prototype.initialize.apply(this,arguments),this.model.set("stackIndex",null),this.className=this.pfx+"property "+this.pfx+"stack",this.events["click #"+this.pfx+"add"]="addLayer",this.listenTo(this.model,"change:stackIndex",this.indexChanged),this.listenTo(this.model,"updateValue",this.valueUpdated),this.delegateEvents()},targetUpdated:function(){this.model.get("detached")?this.refreshLayers():b.prototype.targetUpdated.apply(this,arguments)},getLayers:function(){return this.model.get("layers")},indexChanged:function(a){var b=this.getLayers().at(this.model.get("stackIndex"));b.set("props",this.$props),this.model.get("properties").each(function(a){a.trigger("targetUpdated")})},getStackValues:function(){return this.getLayers().pluck("value")},getPropsConfig:function(a){var c=this,d=b.prototype.getPropsConfig.apply(this,arguments);return d.onChange=function(a,b,d){var e=b.model,f=c.build();if(c.model.get("detached")){var g="";e.collection.indexOf(e);c.getLayers().each(function(a){var b=a.get("values")[e.get("property")];b&&(g+=(g?",":"")+b)}),b.updateTargetStyle(g,null,d)}else c.model.set("value",f,d)},d},valueOnIndex:function(a,b){var c=null;if(this.model.get("detached")){var d=b.componentValue.split(",");c=d[this.model.get("stackIndex")],c=c?c.trim():c}else{var e=this.getStackValues(),f=e[this.model.get("stackIndex")];if(!f)return;var g=f.split(" ");g.length&&g[a]&&(c=g[a])}return c},build:function(){var a=this.model.get("stackIndex");if(null!==a){var c=b.prototype.build.apply(this,arguments),d=this.getLayers().at(a);if(d){var e={};return this.model.get("properties").each(function(a){var b=a.getValue(),c=a.get("functionName");c&&(b=c+"("+b+")"),e[a.get("property")]=b}),d.set("values",e),d.set("value",c),this.createValue()}}},addLayer:function(a){if(this.getTarget()){var b=this.getLayers(),c=b.add({name:"test"}),d=b.indexOf(c);return c.set("value",this.getDefaultValue()),this.valueUpdated(),this.model.set("stackIndex",d),c}},valueUpdated:function(){this.model.get("detached")?this.model.get("properties").each(function(a){a.trigger("change:value")}):this.model.set("value",this.createValue())},createValue:function(){return this.getStackValues().join(", ")},renderLayers:function(){return this.$field||(this.$field=this.$el.find("> ."+this.pfx+"field")),this.$layers||(this.$layers=new e({collection:this.getLayers(),stackModel:this.model,preview:this.model.get("preview"),config:this.config})),this.$field.append(this.$layers.render().el),this.$props.hide(),this},renderInput:function(){b.prototype.renderInput.apply(this,arguments),this.refreshLayers()},getLayersFromTarget:function(){var a=[],b=this.getTarget();if(!b)return a;var c=b.get("style");return this.model.get("properties").each(function(b){var d=c[b.get("property")];if(d)for(var e=d.split(","),f=0,g=e.length;g>f;f++){var h=e[f].trim();if(a[f])a[f][b.get("property")]=h;else{var i={};i[b.get("property")]=h,a[f]=i}}}),a},refreshLayers:function(){var a=[],b=[],c="value";if(this.model.get("detached"))c="values",b=this.getLayersFromTarget();else{var d=this.getComponentValue();d&&(d.replace(/\(([\w\s,.]*)\)/g,function(a){var b=a.replace(/,\s*/g,",");d=d.replace(a,b)}),b=d.split(", "))}_.each(b,function(b){var d={};d[c]=b,a.push(d)},this),this.$props.detach();var e=this.getLayers();e.reset(),e.add(a),this.model.get("detached")||this.valueUpdated(),this.model.set({stackIndex:null},{silent:!0})},render:function(){return this.renderLabel(),this.renderField(),this.renderLayers(),this.$el.attr("class",this.className),this}})}),c("StyleManager/view/PropertiesView",["backbone","./PropertyView","./PropertyIntegerView","./PropertyRadioView","./PropertySelectView","./PropertyColorView","./PropertyFileView","./PropertyCompositeView","./PropertyStackView"],function(a,b,c,d,e,f,g,h,i){ return a.View.extend({initialize:function(a){this.config=a.config||{},this.pfx=this.config.stylePrefix||"",this.target=a.target||{},this.propTarget=a.propTarget||{},this.onChange=a.onChange||{},this.onInputRender=a.onInputRender||{},this.customValue=a.customValue||{}},render:function(){var a=document.createDocumentFragment();return this.collection.each(function(j){var k=b;switch(j.get("type")){case"integer":k=c;break;case"radio":k=d;break;case"select":k=e;break;case"color":k=f;break;case"file":k=g;break;case"composite":k=h;break;case"stack":k=i}var l=new k({model:j,name:j.get("name"),id:this.pfx+j.get("property"),target:this.target,propTarget:this.propTarget,onChange:this.onChange,onInputRender:this.onInputRender,config:this.config});"composite"!=j.get("type")&&(l.customValue=this.customValue),a.appendChild(l.render().el)},this),this.$el.append(a),this.$el.append($("
",{"class":"clear"})),this.$el.attr("class",this.pfx+"properties"),this}})}),c("text!StyleManager/templates/sector.html",[],function(){return'
\n \n <%= label %>\n
'}),c("StyleManager/view/SectorView",["backbone","./PropertiesView","text!./../templates/sector.html"],function(a,b,c){return a.View.extend({template:_.template(c),events:{},initialize:function(a){this.config=a.config||{},this.pfx=this.config.stylePrefix||"",this.target=a.target||{},this.propTarget=a.propTarget||{},this.open=this.model.get("open"),this.caretR="fa-caret-right",this.caretD="fa-caret-down",this.listenTo(this.model,"change:open",this.updateOpen),this.events["click ."+this.pfx+"title"]="toggle",this.delegateEvents()},updateOpen:function(){this.model.get("open")?this.show():this.hide()},show:function(){this.$el.addClass(this.pfx+"open"),this.$el.find("."+this.pfx+"properties").show(),this.$caret.removeClass(this.caretR).addClass(this.caretD)},hide:function(){this.$el.removeClass(this.pfx+"open"),this.$el.find("."+this.pfx+"properties").hide(),this.$caret.removeClass(this.caretD).addClass(this.caretR)},toggle:function(){var a=this.model.get("open")?0:1;this.model.set("open",a)},render:function(){return this.$el.html(this.template({pfx:this.pfx,label:this.model.get("name")})),this.$caret=this.$el.find("#"+this.pfx+"caret"),this.renderProperties(),this.$el.attr("class",this.pfx+"sector no-select"),this.updateOpen(),this},renderProperties:function(){var a=this.model.get("properties");if(a){var c=new b({collection:a,target:this.target,propTarget:this.propTarget,config:this.config});this.$el.append(c.render().el)}}})}),c("StyleManager/view/SectorsView",["backbone","./SectorView"],function(a,b){return a.View.extend({initialize:function(b){this.config=b.config||{},this.pfx=this.config.stylePrefix||"",this.target=b.target||{},this.propTarget={},_.extend(this.propTarget,a.Events),this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.listenTo(this.target,"change:selectedComponent targetClassAdded targetClassRemoved targetClassUpdated targetStateUpdated change:device",this.targetUpdated)},addTo:function(a){this.addToCollection(a)},targetUpdated:function(){var a=this.target.get("selectedComponent");if(a){var b=a.get("classes"),c=a.get("state"),d=this.propTarget,e=this.target.getDeviceModel(),f=e?e.get("width"):"";if(d.helper=null,b.length){var g=this.target.get("CssComposer"),h=_.filter(b.models,function(a){return a.get("active")}),i=g.getRule(h,c,f);if(i?1==b.length&&a.set("style",{}):(i=g.newRule(h,c,f),i.set("style",a.get("style")),g.addRule(i),a.set("style",{})),c){var j=this.target.get("ClassManager"),k=j.addClass("hc-state"),l=g.getRule([k],"","");l?(l=g.getRules().remove(l),g.getRules().add(l)):(l=g.newRule([k],"",""),g.addRule(l)),l.set("style",i.get("style")),d.helper=l}return d.model=i,void d.trigger("update")}d.model=a,d.trigger("update")}},addToCollection:function(a,c){var d=c||null,e=b,f=new e({model:a,id:this.pfx+a.get("name").replace(" ","_").toLowerCase(),name:a.get("name"),properties:a.get("properties"),target:this.target,propTarget:this.propTarget,config:this.config}),g=f.render().el;return d?d.appendChild(g):this.$el.append(g),g},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(b){this.addToCollection(b,a)},this),this.$el.attr("id",this.pfx+"sectors"),this.$el.append(a),this}})}),c("StyleManager/main",["require","./config/config","./model/Sectors","./view/SectorsView"],function(a){var b=function(b){var c=b||{},d=a("./config/config"),e=a("./model/Sectors"),f=a("./view/SectorsView");for(var g in d)g in c||(c[g]=d[g]);var h=new e(c.sectors),i={collection:h,target:c.target,config:c},j=new f(i);return{addSector:function(a,b){var c=this.getSector(a);return c||(b.id=a,c=h.add(b)),c},getSector:function(a){var b=h.where({id:a});return b.length?b[0]:null},getSectors:function(){return h},addProperty:function(a,b){var c=null,d=this.getSector(a);return d&&(c=d.get("properties").add(b)),c},getProperty:function(a,b){var c=null,d=this.getSector(a);return d&&(c=d.get("properties").where({property:b}),c=1==c.length?c[0]:c),c},getProperties:function(a){var b=null,c=this.getSector(a);return c&&(b=c.get("properties")),b},render:function(){return j.render().el}}};return b}),c("StyleManager",["StyleManager/main"],function(a){return a}),c("Commands/view/OpenStyleManager",["StyleManager"],function(a){return{run:function(a,b){if(this.sender=b,!this.$cn){var c=a.getConfig(),d=a.Panels;this.$cn=$("
"),this.$cn2=$("
"),this.$cn.append(this.$cn2);var e=a.DeviceManager;if(e&&c.showDevices){var f=d.addPanel({id:"devices-c"});f.set("appendContent",e.render()).trigger("change:appendContent")}var g=a.ClassManager;if(g){var h=new g.ClassTagsView({collection:new g.ClassTags([]),config:g.config}).render().el;this.$cn2.append(h)}this.$cn2.append(a.StyleManager.render()),this.$header=$("
",{"class":c.styleManager.stylePrefix+"header",text:c.styleManager.textNoElement}),this.$cn.append(this.$header),d.getPanel("views-container")?this.panel=d.getPanel("views-container"):this.panel=d.addPanel({id:"views-container"}),this.panel.set("appendContent",this.$cn).trigger("change:appendContent"),this.target=a.editor,this.listenTo(this.target,"change:selectedComponent",this.toggleSm)}this.toggleSm()},toggleSm:function(){this.sender.get("active")&&(this.target.get("selectedComponent")?(this.$cn2.show(),this.$header.hide()):(this.$cn2.hide(),this.$header.show()))},stop:function(){this.$cn2&&this.$cn2.hide(),this.$header&&this.$header.hide()}}}),c("Commands/view/OpenBlocks",[],function(){return{run:function(a,b){var c=a.Config,d=(c.stylePrefix,a.BlockManager);if(!this.blocks){this.blocks=$("
").get(0),this.blocks.appendChild(d.render());var e=a.Panels;e.getPanel("views-container")?panelC=e.getPanel("views-container"):panelC=e.addPanel({id:"views-container"}),panelC.set("appendContent",this.blocks).trigger("change:appendContent")}this.blocks.style.display="block"},stop:function(){this.blocks&&(this.blocks.style.display="none")}}}),c("Commands/main",["require","./config/config","./view/CommandAbstract","./view/SelectComponent","./view/CreateComponent","./view/DeleteComponent","./view/ImageComponent","./view/MoveComponent","./view/TextComponent","./view/InsertCustom","./view/ExportTemplate","./view/SwitchVisibility","./view/OpenLayers","./view/OpenStyleManager","./view/OpenBlocks"],function(a){var b=function(b){var c=b||{},d=a("./config/config"),e=a("./view/CommandAbstract");for(var f in d)f in c||(c[f]=d[f]);var g=function(a,b){return delete b.initialize,h[a]=j.extend(b),this},h={},i=c,j=e;for(var k in c.defaults){var l=c.defaults[k];l.id&&g(l.id,l)}var m={};return m["select-comp"]=a("./view/SelectComponent"),m["create-comp"]=a("./view/CreateComponent"),m["delete-comp"]=a("./view/DeleteComponent"),m["image-comp"]=a("./view/ImageComponent"),m["move-comp"]=a("./view/MoveComponent"),m["text-comp"]=a("./view/TextComponent"),m["insert-custom"]=a("./view/InsertCustom"),m["export-template"]=a("./view/ExportTemplate"),m["sw-visibility"]=a("./view/SwitchVisibility"),m["open-layers"]=a("./view/OpenLayers"),m["open-sm"]=a("./view/OpenStyleManager"),m["open-blocks"]=a("./view/OpenBlocks"),i.em&&(i.model=i.em.get("Canvas")),{add:g,get:function(a){var b=h[a];return"function"==typeof b&&(b=new b(i),h[a]=b),b},loadDefaultCommands:function(){for(var a in m)this.add(a,m[a]);return this}}};return b}),c("Commands",["Commands/main"],function(a){return a}),c("Canvas/config/config",[],function(){return{stylePrefix:"cv-",rulers:!1}}),c("Canvas/model/Frame",["backbone"],function(a){return a.Model.extend({defaults:{wrapper:"",width:"",height:"",attributes:{}}})}),c("Canvas/model/Canvas",["backbone","./Frame"],function(a,b){return a.Model.extend({defaults:{frame:"",wrapper:"",rulers:!1},initialize:function(a){var c=this.conf||{};this.set("frame",new b(c.frame))}})}),c("Canvas/view/FrameView",["backbone"],function(a){return a.View.extend({tagName:"iframe",attributes:{src:"about:blank"},initialize:function(a){_.bindAll(this,"udpateOffset"),this.config=a.config||{},this.ppfx=this.config.pStylePrefix||"",this.em=this.config.em,this.motionsEv="transitionend oTransitionEnd transitionend webkitTransitionEnd",this.listenTo(this.em,"change:device",this.updateWidth)},updateWidth:function(a){var b=this.em.getDeviceModel();this.el.style.width=b?b.get("width"):"",this.udpateOffset(),this.$el.on(this.motionsEv,this.udpateOffset)},udpateOffset:function(){var a=this.em.get("Canvas").getOffset();this.em.set("canvasOffset",a),this.$el.off(this.motionsEv,this.udpateOffset)},getBody:function(){this.$el.contents().find("body")},getWrapper:function(){return this.$el.contents().find("body > div")},render:function(){return this.$el.attr({"class":this.ppfx+"frame"}),this}})}),c("Canvas/view/CanvasView",["backbone","./FrameView"],function(a,b){return a.View.extend({initialize:function(a){_.bindAll(this,"renderBody","onFrameScroll"),this.config=a.config||{},this.em=this.config.em||{},this.ppfx=this.config.pStylePrefix||"",this.className=this.config.stylePrefix+"canvas",this.frame=new b({model:this.model.get("frame"),config:this.config})},onFrameScroll:function(){var a="px",b=this.frame.el.contentDocument.body;this.toolsEl.style.top="-"+b.scrollTop+a,this.toolsEl.style.left="-"+b.scrollLeft+a},renderBody:function(){var a=this.model.get("frame").get("wrapper");if(a){var b=this.frame.$el.contents().find("body"),c=this.config.em.get("CssComposer"),d=this.config.em.get("Config");b.append(a.render()).append(c.render());var e=d.protectedCss,f="."+this.ppfx+"dashed *{outline: 1px dashed rgba(170,170,170,0.7); outline-offset: -2px}."+this.ppfx+"comp-selected{outline: 3px solid #3b97e3 !important}."+this.ppfx+"no-select{user-select: none; -webkit-user-select:none; -moz-user-select: none}."+this.ppfx+"freezed{opacity: 0.5; pointer-events: none}."+this.ppfx+"plh-image{background:#f5f5f5; border:none; height:50px; width:50px; display:block; outline:3px solid #ffca6f; cursor:pointer}";e&&b.append(""),this.config.em.trigger("loaded"),this.frame.el.contentWindow.onscroll=this.onFrameScroll,this.frame.udpateOffset();var g=document,h=this.frame.el.contentDocument;h.addEventListener("keydown",function(a){g.dispatchEvent(new KeyboardEvent(a.type,a))}),h.addEventListener("keyup",function(a){g.dispatchEvent(new KeyboardEvent(a.type,a))})}},offset:function(a){var b=a.getBoundingClientRect(),c=a.ownerDocument.body;return{top:b.top+c.scrollTop,left:b.left+c.scrollLeft}},getElementPos:function(a){this.frmOff||(this.frmOff=this.offset(this.frame.el)),this.cvsOff||(this.cvsOff=this.offset(this.el));var b=this.offset(a),c=b.top+this.frmOff.top-this.cvsOff.top,d=b.left+this.frmOff.left-this.cvsOff.left;return{top:c,left:d,height:a.offsetHeight,width:a.offsetWidth}},render:function(){if(this.wrapper=this.model.get("wrapper"),this.wrapper&&"function"==typeof this.wrapper.render){this.model.get("frame").set("wrapper",this.wrapper),this.$el.append(this.frame.render().el);var a=this.frame;a.el.onload=this.renderBody}this.toolsEl=$("
",{id:this.ppfx+"tools"}).get(0),this.hlEl=$("
",{"class":this.ppfx+"highlighter"}).get(0),this.badgeEl=$("
",{"class":this.ppfx+"badge"}).get(0),this.placerEl=$("
",{"class":this.ppfx+"placeholder"}).get(0),this.placerIntEl=$("
",{"class":this.ppfx+"placeholder-int"}).get(0),this.ghostEl=$("
",{"class":this.ppfx+"ghost"}).get(0),this.placerEl.appendChild(this.placerIntEl),this.toolsEl.appendChild(this.hlEl),this.toolsEl.appendChild(this.badgeEl),this.toolsEl.appendChild(this.placerEl),this.toolsEl.appendChild(this.ghostEl),this.$el.append(this.toolsEl);var b=this.em.get("RichTextEditor");return b&&this.toolsEl.appendChild(b.render()),this.$el.attr({"class":this.className,id:this.config.canvasId}),this}})}),c("Canvas/main",["require","./config/config","./model/Canvas","./view/CanvasView"],function(a){var b=function(b){var c=b||{},d=a("./config/config"),e=a("./model/Canvas"),f=a("./view/CanvasView");for(var g in d)g in c||(c[g]=d[g]);this.canvas=new e(b);var h={model:this.canvas,config:c};this.CanvasView=new f(h)};return b.prototype={setWrapper:function(a){this.canvas.set("wrapper",a)},getElement:function(){return this.CanvasView.el},getFrameEl:function(){return this.CanvasView.frame.el},getBody:function(){return this.CanvasView.frame.el.contentDocument.body},getWrapperEl:function(){return this.getBody().querySelector("#wrapper")},getToolsEl:function(){return this.CanvasView.toolsEl},getHighlighter:function(){return this.CanvasView.hlEl},getBadgeEl:function(){return this.CanvasView.badgeEl},getPlacerEl:function(){return this.CanvasView.placerEl},getGhostEl:function(){return this.CanvasView.ghostEl},render:function(){return this.CanvasView.render().el},getOffset:function(){var a=this.offset(this.getFrameEl()),b=this.offset(this.getElement());return{top:a.top-b.top,left:a.left-b.left}},offset:function(a){var b=a.getBoundingClientRect();return{top:b.top+document.body.scrollTop,left:b.left+document.body.scrollLeft}},getFrameWrapperEl:function(){return this.CanvasView.frame.getWrapper()}},b}),c("Canvas",["Canvas/main"],function(a){return a}),c("RichTextEditor/config/config",[],function(){return{stylePrefix:"rte-",toolbarId:"toolbar",containerId:"wrapper",commands:[{command:"bold",title:"Bold","class":"fa fa-bold",group:"format"},{command:"italic",title:"Italic","class":"fa fa-italic",group:"format"},{command:"underline",title:"Underline","class":"fa fa-underline",group:"format"}]}}),c("RichTextEditor/view/TextEditorView",["jquery"],function(a){var b=function(b){var c=a.Deferred(),d=new FileReader;return d.onload=function(a){c.resolve(a.target.result)},d.onerror=c.reject,d.onprogress=c.notify,d.readAsDataURL(b),c.promise()};return a.fn.cleanHtml=function(){var b=a(this).html();return b&&b.replace(/(
|\s|

<\/div>| )*$/,"")},a.fn.wysiwyg=function(c){var d,e,f,g=this,h=function(){e.activeToolbarClass&&a(e.toolbarSelector).find(f).each(function(){var b=a(this).data(e.commandRole);document.queryCommandState(b)?a(this).addClass(e.activeToolbarClass):a(this).removeClass(e.activeToolbarClass)})},i=function(a,b){var c=a.split(" "),d=c.shift(),e=c.join(" ")+(b||"");document.execCommand(d,0,e),h()},j=function(){var a=window.getSelection();return a.getRangeAt&&a.rangeCount?a.getRangeAt(0):void 0},k=function(){d=j()},l=function(){var a=window.getSelection();if(d){try{a.removeAllRanges()}catch(b){document.body.createTextRange().select(),document.selection.empty()}a.addRange(d)}},m=function(c){g.focus(),a.each(c,function(c,d){/^image\//.test(d.type)?a.when(b(d)).done(function(a){i("insertimage",a)}).fail(function(a){e.fileUploadError("file-reader",a)}):e.fileUploadError("unsupported-file-type",d.type)})},n=function(a,b){l(),document.queryCommandSupported("hiliteColor")&&document.execCommand("hiliteColor",0,b||"transparent"),k(),a.data(e.selectionMarker,b)},o=function(b,c){b.find(f).unbind().click(function(){l(),g.focus(),g.get(0).ownerDocument.execCommand(a(this).data(c.commandRole)),k()}),b.find("[data-toggle=dropdown]").click(l),b.find("input[type=text][data-"+c.commandRole+"]").on("webkitspeechchange change",function(){var b=this.value;this.value="",l(),b&&(g.focus(),i(a(this).data(c.commandRole),b)),k()}).on("focus",function(){var b=a(this);b.data(c.selectionMarker)||(n(b,c.selectionColor),b.focus())}).on("blur",function(){var b=a(this);b.data(c.selectionMarker)&&n(b,!1)}),b.find("input[type=file][data-"+c.commandRole+"]").change(function(){l(),"file"===this.type&&this.files&&this.files.length>0&&m(this.files),k(),this.value=""})},p=function(){g.on("dragenter dragover",!1).on("drop",function(a){var b=a.originalEvent.dataTransfer;a.stopPropagation(),a.preventDefault(),b&&b.files&&b.files.length>0&&m(b.files)})};return"string"==typeof c&&"destroy"==c?(g.attr("contenteditable",!1).unbind("mouseup keyup mouseout dragenter dragover"),a(window).unbind("touchend"),this):(e=a.extend({},a.fn.wysiwyg.defaults,c),f="a[data-"+e.commandRole+"],button[data-"+e.commandRole+"],input[type=button][data-"+e.commandRole+"]",e.dragAndDropImages&&p(),o(a(e.toolbarSelector),e),g.attr("contenteditable",!0).on("mouseup keyup mouseout",function(){k(),h()}),a(window).bind("touchend",function(a){var b=g.is(a.target)||g.has(a.target).length>0,c=j(),d=c&&c.startContainer===c.endContainer&&c.startOffset===c.endOffset;(!d||b)&&(k(),h())}),this)},a.fn.wysiwyg.defaults={hotKeys:{"ctrl+b meta+b":"bold","ctrl+i meta+i":"italic","ctrl+u meta+u":"underline","ctrl+z meta+z":"undo","ctrl+y meta+y meta+shift+z":"redo","ctrl+l meta+l":"justifyleft","ctrl+r meta+r":"justifyright","ctrl+e meta+e":"justifycenter","ctrl+j meta+j":"justifyfull","shift+tab":"outdent",tab:"indent"},toolbarSelector:"[data-role=editor-toolbar]",commandRole:"edit",activeToolbarClass:"btn-info",selectionMarker:"edit-focus-marker",selectionColor:"darkgrey",dragAndDropImages:!0,fileUploadError:function(a,b){console.log("File upload error",a,b)}},a}),c("RichTextEditor/model/CommandButton",["backbone"],function(a){return a.Model.extend({defaults:{command:"",title:"","class":"",group:""}})}),c("RichTextEditor/model/CommandButtons",["backbone","./CommandButton"],function(a,b){return a.Collection.extend({model:b})}),c("RichTextEditor/view/CommandButtonView",["backbone"],function(a){return a.View.extend({tagName:"a",initialize:function(a){this.config=a.config||{},this.className=this.config.stylePrefix+"btn "+this.model.get("class")},render:function(){return this.$el.attr("class",_.result(this,"className")),this}})}),c("RichTextEditor/view/CommandButtonsView",["backbone","./CommandButtonView"],function(a,b){return a.View.extend({attributes:{"data-role":"editor-toolbar"},initialize:function(a){this.config=a.config||{},this.id=this.config.stylePrefix+this.config.toolbarId,this.$el.data("helper",1)},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(c){var d=new b({model:c,config:this.config,attributes:{title:c.get("title"),"data-edit":c.get("command")}});a.appendChild(d.render().el)},this),this.$el.append(a),this.$el.attr("id",_.result(this,"id")),this}})}),c("RichTextEditor/main",["require","./config/config","./view/TextEditorView","./model/CommandButtons","./view/CommandButtonsView"],function(a){return function(b){var c=b||{},d=a("./config/config"),e=(a("./view/TextEditorView"),a("./model/CommandButtons")),f=a("./view/CommandButtonsView");for(var g in d)g in c||(c[g]=d[g]);var h=(c.stylePrefix,new f({collection:new e(c.commands),config:c}));return{udpatePosition:function(){if(this.lastEl&&c.em){var a="px",b=c.em.get("canvasOffset"),d=c.em.get("Canvas").CanvasView,e=d.getElementPos(this.lastEl),f=h.el.style,g=h.$el.outerHeight();f.top=e.top-g+a,f.left=e.left+b.left+a}},attach:function(a){a.$el.wysiwyg({}).focus(),this.lastEl=a.el,c.em&&(this.udpatePosition(),c.em.off("change:canvasOffset",this.udpatePosition,this),c.em.on("change:canvasOffset",this.udpatePosition,this)),this.show(),h.$el.on("mousedown",this.disableProp)},detach:function(a){a.$el.wysiwyg("destroy"),this.hide(),h.$el.off("mousedown",this.disableProp)},show:function(){h.el.style.display="block"},hide:function(){h.el.style.display="none"},disableProp:function(a){a.stopPropagation()},getToolbarEl:function(){return h.el},render:function(){return h.render().el}}}}),c("RichTextEditor",["RichTextEditor/main"],function(a){return a}),c("DomComponents/config/config",[],function(){return{stylePrefix:"comp-",wrapperId:"wrapper",wrapper:{removable:!1,copyable:!1,stylable:["background","background-color","background-image","background-repeat","background-attachment","background-position"],draggable:!1,badgable:!1,components:[]},components:[],rte:{},em:{},imageCompClass:"fa fa-picture-o",oAssetsOnCreate:!0,voidElements:["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"]}}),c("DomComponents/model/Components",["backbone","require"],function(a,b){return a.Collection.extend({initialize:function(a,c){this.on("add",this.onAdd),this.config=c&&c.config?c.config:null,c&&c.sm&&(this.editor=c.sm),this.model=function(a,d){var e;switch(!d.sm&&c&&c.sm&&(d.sm=c.sm),c&&c.config&&(d.config=c.config),a.type){case"text":this.mComponentText||(this.mComponentText=b("./ComponentText")),e=new this.mComponentText(a,d);break;case"image":this.mComponentImage||(this.mComponentImage=b("./ComponentImage")),e=new this.mComponentImage(a,d);break;default:this.mComponent||(this.mComponent=b("./Component")),e=new this.mComponent(a,d)}return e}},add:function(b,c){if("string"==typeof b){var d=this.editor.Parser.parseHtml(b);b=d.html,d.css&&this.editor.CssComposer.getRules().add(d.css)}return a.Collection.prototype.add.apply(this,[b,c])},onAdd:function(a,b,c){var d=a.get("style");if(!_.isEmpty(d)&&this.editor){var e=this.editor.get("CssComposer"),f=this.editor.get("ClassManager").addClass(a.cid);a.set({style:{}}),a.get("classes").add(f);var g=e.newRule(f);e.addRule(g),g.set("style",d)}}})}),c("ClassManager/model/ClassTag",["backbone"],function(a){return a.Model.extend({defaults:{label:"",name:"",active:!0},initialize:function(){this.set("name",this.escapeName(this.get("name")))},escapeName:function(a){return a.toLowerCase().replace(/([^a-z0-9\w]+)/gi,"-")}})}),c("ClassManager/model/ClassTags",["backbone","./ClassTag"],function(a,b){return a.Collection.extend({model:b})}),c("DomComponents/model/Component",["backbone","./Components","ClassManager/model/ClassTags"],function(a,b,c){return a.Model.extend({defaults:{tagName:"div",type:"",editable:!1,removable:!0,draggable:!0,droppable:!0,badgable:!0,stylable:!0,copyable:!0,"void":!1,state:"",status:"",previousModel:"",content:"",style:{},attributes:{}},initialize:function(a,d){d&&d.config&&d.config.voidElements.indexOf(this.get("tagName"))>=0&&this.set("void",!0),this.sm=d?d.sm||{}:{},this.config=a||{},this.defaultC=this.config.components||[],this.defaultCl=this.normalizeClasses(this.config.classes||[]),this.components=new b(this.defaultC,d),this.set("components",this.components),this.set("classes",new c(this.defaultCl))},normalizeClasses:function(a){var b=[];if(this.sm.get){var c=this.sm.get("ClassManager");if(c)return a.forEach(function(a){var d="";d="string"==typeof a?a:a.name;var e=c.addClass(d);b.push(e)}),b}},clone:function(){var a=_.clone(this.attributes),b=this.get("components"),c=this.get("classes");return a.components=[],a.classes=[],b.length&&b.each(function(b,c){a.components[c]=b.clone()}),c.length&&c.each(function(b,c){a.classes[c]=b.get("name")}),a.status="",new this.constructor(a,{sm:this.sm})},getName:function(){if(!this.name){var a=this.cid.replace(/\D/g,""),b=this.get("type"),c=this.get("tagName");c="div"==c?"box":c,c=b?b:c,this.name=c.charAt(0).toUpperCase()+c.slice(1)+" "+a}return this.name}})}),c("DomComponents/model/ComponentText",["./Component"],function(a){return a.extend({defaults:_.extend({},a.prototype.defaults,{content:"",droppable:!1})})}),c("DomComponents/model/ComponentImage",["./Component"],function(a){return a.extend({defaults:_.extend({},a.prototype.defaults,{src:"",droppable:!1})})}),c("DomComponents/view/ComponentsView",["backbone","require"],function(a,b){return a.View.extend({initialize:function(a){this.config=a.config,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render)},addTo:function(a){var b=this.collection.indexOf(a);this.addToCollection(a,null,b)},addToCollection:function(a,c,d){this.compView||(this.compView=b("./ComponentView"));var e=c||null,f=this.compView;switch(a.get("type")){case"text":this.compViewText||(this.compViewText=b("./ComponentTextView")),f=this.compViewText;break;case"image":this.compViewImage||(this.compViewImage=b("./ComponentImageView")),f=this.compViewImage}var g=new f({model:a,config:this.config}),h=g.render().el;if(e)e.appendChild(h);else{var i=this.$parent;if("undefined"!=typeof d){var j="before";i.children().length==d&&(d--,j="after"),0>d?i.append(h):i.children().eq(d)[j](h)}else i.append(h)}return h},render:function(a){var b=document.createDocumentFragment();return this.$parent=a||this.$el,this.$el.empty(),this.collection.each(function(a){this.addToCollection(a,b)},this),this.$el.append(b),this}})}),c("DomComponents/view/ComponentView",["backbone","./ComponentsView"],function(a,b){return a.View.extend({className:function(){return this.getClasses()},tagName:function(){return this.model.get("tagName")},initialize:function(a){this.config=a.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.components=this.model.get("components"),this.attr=this.model.get("attributes"),this.classe=this.attr["class"]||[],this.listenTo(this.model,"destroy remove",this.remove),this.listenTo(this.model,"change:style",this.updateStyle),this.listenTo(this.model,"change:attributes",this.updateAttributes),this.listenTo(this.model,"change:status",this.updateStatus),this.listenTo(this.model,"change:state",this.updateState),this.listenTo(this.model.get("classes"),"add remove change",this.updateClasses),this.$el.data("model",this.model),this.$el.data("collection",this.components),this.model.get("classes").length&&this.importClasses()},importClasses:function(){var a=this.config.em.get("ClassManager");a&&this.model.get("classes").each(function(b){a.addClass(b.get("name"))})},updateState:function(a){var b="hc-state",c=this.model.get("state");c?this.$el.addClass(b):this.$el.removeClass(b)},updateStatus:function(a){var b=this.model.get("status"),c=this.pfx;switch(b){case"selected":this.$el.addClass(c+"selected");break;case"moving":break;default:this.$el.removeClass(c+"selected")}},getClasses:function(){var a=this.model.get("attributes"),b=a["class"]||[];return b.length?b.join(" "):null},updateAttributes:function(){var a={},b=this.model.get("attributes");for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);this.model.get("src")&&(a.src=this.model.get("src"));var d=this.getStyleString();d&&(a.style=d),this.$el.attr(a)},updateStyle:function(){this.$el.attr("style",this.getStyleString())},getStyleString:function(){var a="";this.style=this.model.get("style");for(var b in this.style)this.style.hasOwnProperty(b)&&(a+=b+":"+this.style[b]+";");return a},updateClasses:function(){var a="";this.model.get("classes").each(function(b){a+=b.get("name")+" "}),a=a.trim(),a&&this.$el.attr("class",a),this.updateStatus()},eventCall:function(a){a.viewResponse=this},render:function(){this.updateAttributes(),this.updateClasses(),this.$el.html(this.model.get("content"));var a=new b({collection:this.components,config:this.config});return this.$el.append(a.render(this.$el).el.childNodes),this}})}),c("DomComponents/view/ComponentImageView",["backbone","./ComponentView"],function(a,b){return b.extend({tagName:"img",events:{dblclick:"openModal"},initialize:function(a){b.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:src",this.updateSrc),this.listenTo(this.model,"dblclick active",this.openModal),this.classEmpty=this.ppfx+"plh-image",this.config.modal&&(this.modal=this.config.modal),this.config.am&&(this.am=this.config.am)},updateSrc:function(){var a=this.model.get("src");this.$el.attr("src",a),a?this.$el.removeClass(this.classEmpty):this.$el.addClass(this.classEmpty)},openModal:function(a){var b=this;this.modal&&this.am&&(this.modal.setTitle("Select image"),this.modal.setContent(this.am.render(1)),this.am.setTarget(this.model),this.modal.show(),this.am.onSelect(function(){b.modal.hide(),b.am.setTarget(null)}))},render:function(){return this.updateAttributes(),this.updateClasses(),this.model.get("src")||this.$el.attr("class",this.classEmpty),this.$el.attr("onmousedown","return false"),this}})}),c("DomComponents/view/ComponentTextView",["backbone","./ComponentView"],function(a,b){return b.extend({events:{dblclick:"enableEditing"},initialize:function(a){b.prototype.initialize.apply(this,arguments),_.bindAll(this,"disableEditing"),this.listenTo(this.model,"focus active",this.enableEditing),this.rte=this.config.rte||""},enableEditing:function(a){this.rte&&this.rte.attach(this),this.toggleEvents(1)},disableEditing:function(a){this.rte&&this.rte.detach(this),this.toggleEvents(),this.updateContents()},disablePropagation:function(a){a.stopPropagation()},updateContents:function(){this.model.set("content",this.el.innerHTML)},toggleEvents:function(a){var b=a?"on":"off",c=[this.el.ownerDocument,document,this.rte];$(c)[b]("mousedown",this.disableEditing),this.$el[b]("mousedown",this.disablePropagation)},render:function(){return this.updateAttributes(),this.updateClasses(),this.el.innerHTML=this.model.get("content"),this}})}),c("DomComponents/main",["require","./config/config","./model/Component","./model/ComponentText","./model/ComponentImage","./view/ComponentView","./view/ComponentImageView","./view/ComponentTextView"],function(a){var b=function(b){var c=b||{},d=a("./config/config"),e=a("./model/Component"),f=(a("./model/ComponentText"),a("./model/ComponentImage"),a("./view/ComponentView"));a("./view/ComponentImageView"),a("./view/ComponentTextView");for(var g in d)g in c||(c[g]=d[g]);var h=new e(c.wrapper,{sm:c.em,config:c});h.set({attributes:{id:"wrapper"}}),h.get("components").add(c.components),this.c=c;var i=new f({model:h,config:c});return{getComponent:function(){return h},getWrapper:function(){return this.getComponent()},getComponents:function(){return this.getWrapper().get("components")},addComponent:function(a){return this.getComponents().add(a)},render:function(){return i.render().el},clear:function(){for(var a=this.getComponents(),b=0,c=a.length;c>b;b++)a.pop();return this},setComponents:function(a){this.clear().addComponent(a)}}};return b}),c("DomComponents",["DomComponents/main"],function(a){return a}),c("ClassManager/config/config",[],function(){return{stylePrefix:"clm-",defaults:[],label:"Classes",statesLabel:"- State -",states:[{name:"hover",label:"Hover"},{name:"active",label:"Click"},{name:"nth-of-type(2n)",label:"Even/Odd"}]}}),c("text!ClassManager/template/classTags.html",[],function(){return'
\n
<%= label %>
\n
\n \n
\n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
Selected
\n
\n
\n
\n'}),c("text!ClassManager/template/classTag.html",[],function(){ return'\n \n />\n \n'}),c("ClassManager/view/ClassTagView",["backbone","text!./../template/classTag.html"],function(a,b){return a.View.extend({template:_.template(b),events:{},initialize:function(a){this.config=a.config||{},this.coll=a.coll||null,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.inputProp="readonly",this.target=this.config.target,this.className=this.pfx+"tag",this.closeId=this.pfx+"close",this.chkId=this.pfx+"checkbox",this.labelId=this.pfx+"tag-label",this.events["click #"+this.closeId]="removeTag",this.events["click #"+this.chkId]="changeStatus",this.events["dblclick #"+this.labelId]="startEditTag",this.events["keypress #"+this.labelId+" input"]="updateInputLabel",this.events["blur #"+this.labelId+" input"]="endEditTag",this.listenTo(this.model,"change:active",this.updateStatus),this.delegateEvents()},startEditTag:function(){this.$labelInput.prop(this.inputProp,!1)},endEditTag:function(){var a=this.$labelInput.val(),b=this.model.escapeName(a);if(this.target){var c=this.target.ClassManager;c&&(c.getClass(b)?this.$labelInput.val(this.model.get("label")):this.model.set({name:b,label:a}))}this.$labelInput.prop(this.inputProp,!0)},changeStatus:function(){this.model.set("active",!this.model.get("active")),this.target.trigger("targetClassUpdated")},removeTag:function(a){var b=this.target.get("selectedComponent");b&&b.get("classes").remove(this.model),this.coll&&(this.coll.remove(this.model),this.target.trigger("targetClassRemoved")),this.remove()},updateStatus:function(){this.$chk||(this.$chk=this.$el.find("#"+this.pfx+"checkbox")),this.model.get("active")?(this.$chk.removeClass("fa-circle-o").addClass("fa-dot-circle-o"),this.$el.removeClass("opac50")):(this.$chk.removeClass("fa-dot-circle-o").addClass("fa-circle-o"),this.$el.addClass("opac50"))},updateInputLabel:function(){this.$labelInput||(this.$labelInput=this.$el.find("input"));var a=this.$labelInput.val().length-2;a=1>a?1:a,this.$labelInput.attr("size",a)},render:function(){return this.$el.html(this.template({label:this.model.get("label"),pfx:this.pfx,ppfx:this.ppfx,inputProp:this.inputProp})),this.updateStatus(),this.$el.attr("class",this.className),this.updateInputLabel(),this}})}),c("ClassManager/view/ClassTagsView",["backbone","text!./../template/classTags.html","./ClassTagView"],function(a,b,c){return a.View.extend({template:_.template(b),events:{},initialize:function(a){this.config=a.config||{},this.pfx=this.config.stylePrefix||"",this.className=this.pfx+"tags",this.addBtnId=this.pfx+"add-tag",this.newInputId=this.pfx+"new",this.stateInputId=this.pfx+"states",this.stateInputC=this.pfx+"input-c",this.states=this.config.states||[],this.events["click #"+this.addBtnId]="startNewTag",this.events["blur #"+this.newInputId]="endNewTag",this.events["keyup #"+this.newInputId]="onInputKeyUp",this.events["change #"+this.stateInputId]="stateChanged",this.target=this.config.target,this.listenTo(this.target,"change:selectedComponent",this.componentChanged),this.listenTo(this.target,"targetClassUpdated",this.updateSelector),this.listenTo(this.collection,"add",this.addNew),this.listenTo(this.collection,"reset",this.renderClasses),this.listenTo(this.collection,"remove",this.tagRemoved),this.delegateEvents()},tagRemoved:function(a){this.updateStateVis()},getStateOptions:function(){for(var a="",b=0;b'+this.states[b].label+"";return a},addNew:function(a){this.addToClasses(a)},startNewTag:function(a){this.$addBtn.hide(),this.$input.show().focus()},endNewTag:function(a){this.$addBtn.show(),this.$input.hide().val("")},onInputKeyUp:function(a){13===a.keyCode?this.addNewTag(this.$input.val()):27===a.keyCode&&this.endNewTag()},componentChanged:function(a){this.compTarget=this.target.get("selectedComponent"),this.compTarget&&this.$states.val(this.compTarget.get("state"));var b=this.compTarget?this.compTarget.get("classes").models:[];this.collection.reset(b),this.updateStateVis()},updateStateVis:function(){this.collection.length?this.$statesC.css("display","block"):this.$statesC.css("display","none"),this.updateSelector()},updateSelector:function(){if(this.compTarget=this.target.get("selectedComponent"),this.compTarget&&this.compTarget.get){var a="",b=this.compTarget.get("classes");b.each(function(b){b.get("active")&&(a+="."+b.get("name"))});var c=this.compTarget.get("state");a=c?a+":"+c:a;var d=this.el.querySelector("#"+this.pfx+"sel");d&&(d.innerHTML=a)}},stateChanged:function(a){this.compTarget&&(this.compTarget.set("state",this.$states.val()),this.target&&this.target.trigger("targetStateUpdated"),this.updateSelector())},addNewTag:function(a){if(a){if(this.target){var b=this.target.get("ClassManager"),c=b.addClass(a);if(this.compTarget){var d=this.compTarget.get("classes"),e=d.length;d.add(c);var f=d.length;this.collection.add(c),f>e&&this.target.trigger("targetClassAdded"),this.updateStateVis()}}this.endNewTag()}},addToClasses:function(a,b){var d=b||null,e=new c({model:a,config:this.config,coll:this.collection}),f=e.render().el;return d?d.appendChild(f):this.$classes.append(f),f},renderClasses:function(){var a=document.createDocumentFragment();return this.collection.each(function(b){this.addToClasses(b,a)},this),this.$classes&&this.$classes.empty().append(a),this},render:function(){return this.$el.html(this.template({label:this.config.label,statesLabel:this.config.statesLabel,pfx:this.pfx})),this.$input=this.$el.find("input#"+this.newInputId),this.$addBtn=this.$el.find("#"+this.addBtnId),this.$classes=this.$el.find("#"+this.pfx+"tags-c"),this.$states=this.$el.find("#"+this.stateInputId),this.$statesC=this.$el.find("#"+this.stateInputC),this.$states.append(this.getStateOptions()),this.renderClasses(),this.$el.attr("class",this.className),this}})}),c("ClassManager/main",["require","./config/config","./model/ClassTags","./view/ClassTagsView"],function(a){var b=function(b){var c=b||{},d=a("./config/config");this.ClassTags=a("./model/ClassTags"),this.ClassTagsView=a("./view/ClassTagsView");for(var e in d)e in c||(c[e]=d[e]);this.classes=new this.ClassTags(c.defaults),this.config=c};return b.prototype={addClass:function(a){var b=a,c=this.getClass(a);return c?c:this.classes.add({name:a,label:b})},getClass:function(a){var b=this.classes.where({name:a});return b.length?b[0]:null},getClasses:function(){return this.classes}},b}),c("ClassManager",["ClassManager/main"],function(a){return a}),c("Panels/config/config",[],function(){var a="create-comp",b="move-comp",c="sw-visibility",d="export-template",e="open-sm",f="open-layers",g="open-blocks";return{stylePrefix:"pn-",defaults:[{id:"commands",buttons:[{id:a,command:a,className:"fa fa-pencil-square-o",attributes:{title:"Create element"},stopDefaultCommand:1},{id:b,command:b,className:"fa fa-arrows",attributes:{title:"Move elements"},stopDefaultCommand:1}]},{id:"options",buttons:[{active:!0,id:c,className:"fa fa-square-o",command:c,context:c,attributes:{title:"View components"}},{id:d,className:"fa fa-code",command:d,attributes:{title:"View code"}}]},{id:"views",buttons:[{id:e,className:"fa fa-paint-brush",command:e,active:!0,attributes:{title:"Open Style Manager"}},{id:f,className:"fa fa-bars",command:f,attributes:{title:"Open Layer Manager"}},{id:g,className:"fa fa-th-large",command:g,attributes:{title:"Open Blocks"}}]}],em:null,delayBtnsShow:300}}),c("Panels/model/Button",["backbone","require"],function(a,b){return a.Model.extend({defaults:{id:"",className:"",command:"",context:"",buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,runDefaultCommand:!0,stopDefaultCommand:!1},initialize:function(a){if(this.get("buttons").length){var c=b("./Buttons");this.set("buttons",new c(this.get("buttons")))}}})}),c("Panels/model/Buttons",["backbone","./Button"],function(a,b){return a.Collection.extend({model:b,deactivateAllExceptOne:function(a,b){this.forEach(function(c,d){c!==a&&(c.set("active",!1),b&&c.get("buttons").length&&c.get("buttons").deactivateAllExceptOne(a,b))})},deactivateAll:function(a){var b=a||"";this.forEach(function(a,c){a.get("context")==b&&(a.set("active",!1),a.get("buttons").length&&a.get("buttons").deactivateAll(b))})}})}),c("Panels/model/Panel",["backbone","./Buttons"],function(a,b){return a.Model.extend({defaults:{id:"",content:"",visible:!0,buttons:[]},initialize:function(a){this.btn=this.get("buttons")||[],this.buttons=new b(this.btn),this.set("buttons",this.buttons)}})}),c("Panels/model/Panels",["backbone","./Panel"],function(a,b){return a.Collection.extend({model:b})}),c("Panels/view/ButtonView",["backbone","require"],function(a,b){return a.View.extend({tagName:"span",initialize:function(a){_.bindAll(this,"startTimer","stopTimer","showButtons","hideButtons","closeOnKeyPress","onDrop","initSorter","stopDrag");var b=this.model.get("className");this.config=a.config||{},this.em=this.config.em||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.id=this.pfx+this.model.get("id"),this.activeCls=this.pfx+"active",this.btnsVisCls=this.pfx+"visible",this.parentM=a.parentM||null,this.className=this.pfx+"btn"+(b?" "+b:""),this.listenTo(this.model,"change:active updateActive",this.updateActive),this.listenTo(this.model,"checkActive",this.checkActive),this.listenTo(this.model,"change:bntsVis",this.updateBtnsVis),this.listenTo(this.model,"change:attributes",this.updateAttributes),this.listenTo(this.model,"change:className",this.updateClassName),this.model.get("buttons").length&&(this.$el.on("mousedown",this.startTimer),this.$el.append($("
",{"class":this.pfx+"arrow-rd"}))),this.em&&this.em.get&&(this.commands=this.em.get("Commands")),this.events={},this.model.get("dragDrop")?(this.events.mousedown="initDrag",this.em.on("loaded",this.initSorter)):this.events.click="clicked",this.delegateEvents()},initSorter:function(){if(this.em.Canvas){var a=this.em.Canvas;this.canvasEl=a.getBody(),this.sorter=new this.em.Utils.Sorter({container:this.canvasEl,placer:a.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onMove:this.onDrag,onEndMove:this.onDrop,document:a.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1});var b=a.getOffset();this.sorter.offTop=b.top,this.sorter.offLeft=b.left}},initDrag:function(){this.model.collection.deactivateAll(this.model.get("context")),this.sorter.startSort(this.el),this.sorter.setDropContent(this.model.get("options").content),this.canvasEl.style.cursor="grabbing",$(document).on("mouseup",this.stopDrag)},stopDrag:function(){$(document).off("mouseup",this.stopDrag),this.sorter.endMove()},onDrag:function(a){},onDrop:function(a){this.canvasEl.style.cursor="default"},updateClassName:function(){var a=this.model.get("className");this.$el.attr("class",this.pfx+"btn"+(a?" "+a:""))},updateAttributes:function(){this.$el.attr(this.model.get("attributes"))},updateBtnsVis:function(){this.$buttons&&(this.model.get("bntsVis")?this.$buttons.addClass(this.btnsVisCls):this.$buttons.removeClass(this.btnsVisCls))},startTimer:function(){this.timeout=setTimeout(this.showButtons,this.config.delayBtnsShow),$(document).on("mouseup",this.stopTimer)},stopTimer:function(){$(document).off("mouseup",this.stopTimer),this.timeout&&clearTimeout(this.timeout)},showButtons:function(){clearTimeout(this.timeout),this.model.set("bntsVis",!0),$(document).on("mousedown",this.hideButtons),$(document).on("keypress",this.closeOnKeyPress)},hideButtons:function(a){a&&$(a.target).trigger("click"),this.model.set("bntsVis",!1),$(document).off("mousedown",this.hideButtons),$(document).off("keypress",this.closeOnKeyPress)},closeOnKeyPress:function(a){var b=a.which||a.keyCode;27==b&&this.hideButtons()},updateActive:function(){var a=null,b=this.em&&this.em.get?this.em.get("Editor"):null,c=this.model.get("command");this.commands&&(a=this.commands.get(c)),this.model.get("active")?(this.model.collection.deactivateAll(this.model.get("context")),this.model.set("active",!0,{silent:!0}).trigger("checkActive"),this.parentM&&this.parentM.set("active",!0,{silent:!0}).trigger("checkActive"),a&&(a.run(b,this.model,this.model.get("options")),b.trigger("run:"+c))):(this.$el.removeClass(this.activeCls),this.model.collection.deactivateAll(this.model.get("context")),this.parentM&&this.parentM.set("active",!1,{silent:!0}).trigger("checkActive"),a&&(a.stop(b,this.model,this.model.get("options")),b.trigger("stop:"+c)))},checkActive:function(){this.model.get("active")?this.$el.addClass(this.activeCls):this.$el.removeClass(this.activeCls)},clicked:function(a){if(!this.model.get("bntsVis")){this.parentM&&this.swapParent();var b=this.model.get("active");this.model.set("active",!b);this.em.get("Commands").get("select-comp");b?this.model.get("runDefaultCommand")&&this.em.runDefault():this.model.get("stopDefaultCommand")&&this.em.stopDefault()}},swapParent:function(){this.parentM.collection.deactivateAll(this.model.get("context")),this.parentM.set("attributes",this.model.get("attributes")),this.parentM.set("options",this.model.get("options")),this.parentM.set("command",this.model.get("command")),this.parentM.set("className",this.model.get("className")),this.parentM.set("active",!0,{silent:!0}).trigger("checkActive")},render:function(){if(this.updateAttributes(),this.$el.attr("class",this.className),this.model.get("buttons").length){var a=b("./ButtonsView"),c=new a({collection:this.model.get("buttons"),config:this.config,parentM:this.model});this.$buttons=c.render().$el,this.$buttons.append($("
",{"class":this.pfx+"arrow-l"})),this.$el.append(this.$buttons)}return this}})}),c("Panels/view/ButtonsView",["backbone","./ButtonView"],function(a,b){return a.View.extend({initialize:function(a){this.opt=a||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.parentM=this.opt.parentM||null,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"buttons"},addTo:function(a){this.addToCollection(a)},addToCollection:function(a,c){var d=c||null,e=b,f=new e({model:a,config:this.config,parentM:this.parentM}),g=f.render().el;return d?d.appendChild(g):this.$el.append(g),g},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(b){this.addToCollection(b,a)},this),this.$el.append(a),this.$el.attr("class",_.result(this,"className")),this}})}),c("Panels/view/PanelView",["backbone","./ButtonsView"],function(a,b){return a.View.extend({initialize:function(a){this.config=a.config||{},this.pfx=this.config.stylePrefix||"",this.buttons=this.model.get("buttons"),this.className=this.pfx+"panel",this.id=this.pfx+this.model.get("id"),this.listenTo(this.model,"change:appendContent",this.appendContent),this.listenTo(this.model,"change:content",this.updateContent)},appendContent:function(){this.$el.append(this.model.get("appendContent"))},updateContent:function(){this.$el.html(this.model.get("content"))},render:function(){if(this.$el.attr("class",_.result(this,"className")),this.id&&this.$el.attr("id",this.id),this.buttons.length){var a=new b({collection:this.buttons,config:this.config});this.$el.append(a.render().el)}return this.$el.append(this.model.get("content")),this}})}),c("Panels/view/PanelsView",["backbone","./PanelView"],function(a,b){return a.View.extend({initialize:function(a){this.opt=a||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"panels"},addTo:function(a){this.addToCollection(a)},addToCollection:function(a,c){var d=c||null,e=b,f=new e({model:a,config:this.config}),g=f.render().el;return d?d.appendChild(g):this.$el.append(g),g},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(b){this.addToCollection(b,a)},this),this.$el.append(a),this.$el.attr("class",_.result(this,"className")),this}})}),c("Panels/main",["require","./config/config","./model/Panel","./model/Panels","./view/PanelView","./view/PanelsView"],function(a){var b=function(b){var c=b||{},d=a("./config/config"),e=a("./model/Panel"),f=a("./model/Panels"),g=(a("./view/PanelView"),a("./view/PanelsView"));for(var h in d)h in c||(c[h]=d[h]);var i=new f(c.defaults),j={collection:i,config:c},k=new g(j);return{getPanels:function(){return i},addPanel:function(a){return i.add(a)},getPanel:function(a){var b=i.where({id:a});return b.length?b[0]:null},addButton:function(a,b){var c=this.getPanel(a);return c?c.get("buttons").add(b):null},getButton:function(a,b){var c=this.getPanel(a);if(c){var d=c.get("buttons").where({id:b});return d.length?d[0]:null}return null},render:function(){return k.render().el},active:function(){this.getPanels().each(function(a){a.get("buttons").each(function(a){a.get("active")&&a.trigger("updateActive")})})},Panel:e}};return b}),c("Panels",["Panels/main"],function(a){return a}),c("Parser/config/config",[],function(){return{textTags:["br","b","i","u"]}}),c("Parser/model/ParserCss",["require"],function(a){return function(a){return{parseSelector:function(a){for(var b=[],c=a.split(","),d=0,e=c.length;e>d;d++){var f=c[d].trim();if(/^(\.{1}[\w\-]+)+(:{1,2}[\w\-()]+)?$/gi.test(f)){var g=f.split(".").filter(Boolean);b.push(g)}}return b},parseNode:function(a){for(var b=[],c=a.cssRules,d=0,e=c.length;e>d;d++){var f=c[d],g=f.selectorText;if(f.cssRules){for(var h=this.parseNode(f),i=f.conditionText.match(/-width:(.*)\)/i)[1],j=0,k=h.length;k>j;j++){var l=h[j];l.maxWidth=i?i.trim():""}b=b.concat(h)}if(g){g=this.parseSelector(g);for(var m=f.style,n={},o=0,p=m.length;p>o;o++)n[m[o]]=m[m[o]];for(var q=0,r=g.length;r>q;q++){var s=g[q],t={},u=s[s.length-1].split(/:(.+)/);u[1]&&(s[s.length-1]=u[0],t.state=u[1],u.splice(u.length-1,1)),t.selectors=s,t.style=n,b.push(t)}}}return b},parse:function(a){var b=document.createElement("style");b.innerHTML=a,document.head.appendChild(b);var c=b.sheet;document.head.removeChild(b);var d=this.parseNode(c);return 1==d.length&&(d=d[0]),d}}}}),c("Parser/model/ParserHtml",["require"],function(a){return function(a){var b="span",c=a;return{parseStyle:function(a){for(var b={},c=a.split(";"),d=0,e=c.length;e>d;d++){var f=c[d].trim();if(f){var g=f.split(":");b[g[0].trim()]=g[1].trim()}}return b},parseClass:function(a){for(var b=[],c=a.split(" "),d=0,e=c.length;e>d;d++){var f=c[d].trim();f&&b.push(f)}return b},parseNode:function(a){for(var d=[],e=a.childNodes,f=0,g=e.length;g>f;f++){var h=e[f],i={},j=h.attributes||[],k=j.length,l=d.length-1,m=d[l];i.tagName=h.tagName?h.tagName.toLowerCase():"",k&&(i.attributes={});for(var n=0;k>n;n++){var o=j[n].nodeName,p=j[n].nodeValue;"style"==o?i.style=this.parseStyle(p):"class"==o?i.classes=this.parseClass(p):"src"==o&&"img"==i.tagName?(i.type="image",i.src=p):i.attributes[o]=p}var q=h.childNodes.length;if(q){var r=h.childNodes[0];if(1===q&&3===r.nodeType)i.type="text",i.content=r.nodeValue;else{var s=this.parseNode(h);1==s.length&&"text"==s[0].type&&q>1&&s[0].tagName==b?(i.type="text",i.content=s[0].content):i.components=s}}var t=m&&"text"==m.type&&m.tagName==b;if(!i.tagName&&3===h.nodeType){if(t){m.content+=h.nodeValue;continue}h.nodeValue.trim()&&(i.type="text",i.tagName=b,i.content=h.nodeValue)}if(c.textTags.indexOf(i.tagName)>=0){if(t){m.content+=h.outerHTML;continue}i={type:"text",tagName:b,content:h.outerHTML}}i.tagName&&d.push(i)}return d},parse:function(a,b){var c={html:"",css:""},d=document.createElement("div");d.innerHTML=a;for(var e=d.querySelectorAll("script"),f=e.length;f--;)e[f].parentNode.removeChild(e[f]);if(b){for(var g="",h=d.querySelectorAll("style"),i=h.length;i--;)g=h[i].innerHTML+g,h[i].parentNode.removeChild(h[i]);g&&(c.css=b.parse(g))}var j=this.parseNode(d);return 1==j.length&&(j=j[0]),c.html=j,c}}}}),c("Parser/main",["require","./config/config","./model/ParserCss","./model/ParserHtml"],function(a){var b=function(b){var c=b||{},d=a("./config/config"),e=a("./model/ParserCss"),f=a("./model/ParserHtml");for(var g in d)g in c||(c[g]=d[g]);var h=new f(c),i=new e(c);return{parseHtml:function(a){return h.parse(a,i)},parseCss:function(a){return i.parse(a)}}};return b}),c("Parser",["Parser/main"],function(a){return a}),c("Utils/Sorter",["backbone"],function(a){return a.View.extend({initialize:function(a){_.bindAll(this,"startSort","onMove","endMove","rollback","udpateOffset");var b=a||{};this.elT=0,this.elL=0,this.borderOffset=b.borderOffset||10;var c=b.container;this.el="string"==typeof c?document.querySelector(b.container):c,this.$el=$(this.el),this.containerSel=b.containerSel||"div",this.itemSel=b.itemSel||"div",this.nested=b.nested||0,this.pfx=b.pfx||"",this.freezeClass=b.freezeClass||this.pfx+"freezed",this.onStart=b.onStart||"",this.onEndMove=b.onEndMove||"",this.direction=b.direction||"v",this.onMoveClb=b.onMove||"",this.relative=b.relative||0,this.plh=b.placer||"",this.wmargin=b.wmargin||0,this.offTop=b.offsetTop||0,this.offLeft=b.offsetLeft||0,this.document=b.document||document,this.dropContent="",this.helper="",this.em=b.em||"",this.em&&this.em.on&&(this.em.on("change:canvasOffset",this.udpateOffset),this.udpateOffset())},udpateOffset:function(){var a=this.em.get("canvasOffset");this.offTop=a.top,this.offLeft=a.left},setDropContent:function(a){this.dropContent=a},matches:function(a,b){for(var c=(a.parentNode||document.body).querySelectorAll(b),d=0;c[d]&&c[d]!==a;)++d;return!!c[d]},closest:function(a,b){if(a){for(var c=a.parentNode;c&&1===c.nodeType;){if(this.matches(c,b))return c;c=c.parentNode}return null}},offset:function(a){var b=a.getBoundingClientRect();return{top:b.top+document.body.scrollTop,left:b.left+document.body.scrollLeft}},createPlaceholder:function(){var a=this.pfx,b=document.createElement("div"),c=document.createElement("div");return b.className=a+"placeholder",b.style.display="none",b.style["pointer-events"]="none",c.className=a+"placeholder-int",b.appendChild(c),b},startSort:function(a){this.moved=0,this.eV=a,a&&!this.matches(a,this.itemSel+","+this.containerSel)&&(this.eV=this.closest(a,this.itemSel)),this.plh||(this.plh=this.createPlaceholder(),this.el.appendChild(this.plh)),this.eV&&(this.eV.className+=" "+this.freezeClass,$(this.document).on("mouseup",this.endMove)),this.helper&&(this.helperEl=this.helper,this.helperEl.className+=" "+this.ppfx+"bdrag",document.body.appendChild(this.helperEl)),this.$el.on("mousemove",this.onMove),$(document).on("keypress",this.rollback),"function"==typeof this.onStart&&this.onStart()},onMove:function(a){this.moved=1;var b=this.plh,c=b.style.display;c&&"none"!==c||(b.style.display="block");var d=this.offset(this.el);this.elT=this.wmargin?Math.abs(d.top):d.top,this.elL=this.wmargin?Math.abs(d.left):d.left,this.rY=a.pageY-this.elT+this.el.scrollTop,this.rX=a.pageX-this.elL+this.el.scrollLeft;var e=this.dimsFromTarget(a.target,this.rX,this.rY);this.lastDims=e;var f=this.findPosition(e,this.rX,this.rY);if(this.lastPos&&this.lastPos.index==f.index&&this.lastPos.method==f.method||(this.movePlaceholder(this.plh,e,f,this.prevTargetDim),this.$plh||(this.$plh=$(this.plh)),this.offTop&&this.$plh.css("top","+="+this.offTop+"px"),this.offLeft&&this.$plh.css("left","+="+this.offLeft+"px"),this.lastPos=f),this.helperEl){var g=this.helperEl.style;g.left=this.rX+"px",g.top=this.rY+"px"}"function"==typeof this.onMoveClb&&this.onMoveClb(a)},isInFlow:function(a,b){if(!a)return!1;b=b||document.body;var c,d=a;return c=d.offsetHeight,this.styleInFlow(d,b)?!0:!1},styleInFlow:function(a,b){var c=a.style,d=$(a);if(!(c.overflow&&"visible"!==c.overflow||"none"!==d.css("float")||b&&"flex"==$(b).css("display"))){switch(c.position){case"static":case"relative":case"":break;default:return}switch(d.css("display")){case"block":case"list-item":case"table":case"flex":return!0}}},dimsFromTarget:function(a,b,c){var d=[];return this.matches(a,this.itemSel+","+this.containerSel)||(a=this.closest(a,this.itemSel)),a?(this.prevTarget&&this.prevTarget!=a&&(this.prevTarget=null),this.prevTarget||(this.targetP=this.closest(a,this.containerSel),this.prevTarget=a,this.prevTargetDim=this.getDim(a),this.cacheDimsP=this.getChildrenDim(this.targetP),this.cacheDims=this.getChildrenDim(a)),this.prevTarget==a&&(d=this.cacheDims),this.target=this.prevTarget,(this.nearBorders(this.prevTargetDim,b,c)||!this.nested&&!this.cacheDims.length)&&(d=this.cacheDimsP,this.target=this.targetP),this.lastPos=null,d):d},getDim:function(a){var b=this.offset(a),c=this.relative?a.offsetTop:b.top-(this.wmargin?-1:1)*this.elT,d=this.relative?a.offsetLeft:b.left-(this.wmargin?-1:1)*this.elL;return[c,d,a.offsetHeight,a.offsetWidth]},getChildrenDim:function(a){var b=[];if(!a)return b;for(var c=a.children,d=0,e=c.length;e>d;d++){var f=c[d];if(this.matches(f,this.itemSel)){var g=this.getDim(f),h=this.direction;h="v"==h?!0:"h"==h?!1:this.isInFlow(f,a),g.push(h),g.push(f),b.push(g)}}return b},nearBorders:function(a,b,c){var d=0,e=this.borderOffset,f=b||0,g=c||0,h=a[0],i=a[1],j=a[2],k=a[3];return(h+e>g||g>h+j-e||i+e>f||f>i+k-e)&&(d=1),!!d},findPosition:function(a,b,c){for(var d={index:0,method:"before"},e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=a.length;n>m;m++)if(l=a[m],g=l[1]+l[3],k=l[0]+l[2],i=l[1]+l[3]/2,j=l[0]+l[2]/2,!(f&&l[1]>f||h&&j>=h||e&&e>g))if(d.index=m,l[4]){if(j>c){d.method="before";break}d.method="after"}else k>c&&(h=k),i>b?(f=i,d.method="before"):(e=i,d.method="after");return d},movePlaceholder:function(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j="px",k=5,l="#62c462",m=3,n=c.method,o=b[c.index];if(a.style.borderColor="transparent "+l,a.style.borderWidth=m+j+" "+(m+2)+j,a.style.margin="-"+m+"px 0 0",o)o[4]?(h=o[3]+j,i="auto",f="before"==n?o[0]-e:o[0]+o[2]-e,g=o[1]):(h="auto",i=o[2]-2*e+j,f=o[0]+e,g="before"==n?o[1]-e:o[1]+o[3]-e,a.style.borderColor=l+" transparent",a.style.borderWidth=m+2+j+" "+m+j,a.style.margin="0 0 0 -"+m+"px");else{if(!this.nested)return void(a.style.display="none");d&&(f=d[0]+k,g=d[1]+k,h=parseInt(d[3])-2*k+j,i="auto")}a.style.top=f+j,a.style.left=g+j,h&&(a.style.width=h),i&&(a.style.height=i)},endMove:function(a){var b;this.$el.off("mousemove",this.onMove),$(this.document).off("mouseup",this.endMove),$(this.document).off("keypress",this.rollback),this.plh.style.display="none";var c=new RegExp("(?:^|\\s)"+this.freezeClass+"(?!\\S)","gi");this.eV&&(this.eV.className=this.eV.className.replace(c,"")),this.moved&&(b=this.move(this.target,this.eV,this.lastPos)),this.plh&&(this.plh.style.display="none"),this.helperEl="",this.helper&&this.helper.parentNode.removeChild(this.helper),"function"==typeof this.onEndMove&&this.onEndMove(b)},move:function(a,b,c){var d=c.index,e=$(b).data("model"),f=$(a),g=f.data("collection"),h=f.data("model"),i=h?h.get("droppable"):1;if(g&&i){d="after"===c.method?d+1:d;var j,k,l={at:d,noIncrement:1};this.dropContent?(j=this.dropContent,l.silent=!1):(k=g.add({},l),e&&(j=e.collection.remove(e)));var m=g.add(j,l);return this.dropContent?this.dropContent=null:g.remove(k),this.prevTarget=null,m}console.warn("Invalid target position")},rollback:function(a){$(document).off("keypress",this.rollback);var b=a.which||a.keyCode;27==b&&(this.moved=!1,this.endMove())}})}),c("Utils/main",["require","./Sorter"],function(a){var b=function(){var b=a("./Sorter");return{Sorter:b}};return b}),c("Utils",["Utils/main"],function(a){return a}),c("editor/model/Editor",["backbone","backboneUndo","keymaster","AssetManager","BlockManager","StorageManager","DeviceManager","ModalDialog","CodeManager","CssComposer","Commands","Canvas","RichTextEditor","DomComponents","ClassManager","StyleManager","Panels","Parser","Utils"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s){return a.Model.extend({defaults:{clipboard:null,selectedComponent:null,previousModel:null,changesCount:0,device:""},initialize:function(a){this.config=a,this.pfx=this.config.storagePrefix,this.compName=this.pfx+"components"+this.config.id,this.rulesName=this.pfx+"rules"+this.config.id,this.set("Config",a),a.el&&a.fromElement&&(this.config.components=a.el.innerHTML),this.initDeviceManager(),this.initParser(),this.initStorage(),this.initClassManager(),this.initModal(),this.initAssetManager(),this.initUtils(),this.initCodeManager(),this.initCommands(),this.initPanels(),this.initRichTextEditor(),this.initCssComposer(),this.initComponents(),this.initCanvas(),this.initUndoManager(),this.initStyleManager(),this.initBlockManager(),this.on("change:selectedComponent",this.componentSelected,this)},init:function(a){this.set("Editor",a)},initBlockManager:function(){var a=this.config.blockManager;a.em=this,a.pStylePrefix=this.config.stylePrefix,this.set("BlockManager",new e(a))},initDeviceManager:function(){var a=this.config.deviceManager;a.em=this,a.pStylePrefix=this.config.stylePrefix;var b=new g(a);this.set("DeviceManager",b)},initParser:function(){this.Parser=new r,this.set("parser",this.Parser)},initUtils:function(){this.Utils=new s,this.set("Utils",this.Utils)},initStyleManager:function(){var a=this.config.styleManager,b=a.stylePrefix||"sm-";a.pStylePrefix=this.config.stylePrefix,a.stylePrefix=this.config.stylePrefix+b,a.target=this,this.set("StyleManager",new p(a))},initCssComposer:function(){var a=this.config.style||"",b=_.clone(this.config.cssComposer),c="";pfx=b.stylePrefix||"css-",b.stylePrefix=this.config.stylePrefix+pfx,this.StorageManager.getConfig().autoload&&(c=this.loadRules()),a&&(b.defaults=a),c&&(b.defaults=c),b.sm=this,this.cssc=new j(b),this.CssComposer=this.cssc,this.set("CssComposer",this.cssc),this.stm.isAutosave()&&this.listenRules(this.cssc.getRules())},listenRules:function(a){this.stopListening(a,"add remove",this.listenRule),this.listenTo(a,"add remove",this.listenRule),a.each(function(a){this.listenRule(a)},this)},listenRule:function(a){this.stopListening(a,"change:style",this.ruleUpdated),this.listenTo(a,"change:style",this.ruleUpdated)},ruleUpdated:function(a,b,c){var d=this.get("changesCount")+1,e=c?c.avoidStore:0;this.set("changesCount",d),this.stm.isAutosave()&&dc;c++)b.pop();return b.add(a),this},getStyle:function(){return this.CssComposer.getRules()},getHtml:function(){var a=this.Components,b=this.CodeManager;if(a&&b){var c=a.getComponent();return b.getCode(c,"html")}},getCss:function(){var a=this.Components,b=this.CodeManager,c=this.CssComposer;if(a&&b&&c){var d=a.getComponent();return b.getCode(d,"css",c)}},store:function(){var a=this.StorageManager;if(a){var b=a.getConfig(),c={};return b.storeHtml&&(c.html=this.getHtml()),b.storeComponents&&(c.components=JSON.stringify(this.getComponents())),b.storeCss&&(c.css=this.getCss()),b.storeStyles&&(c.styles=JSON.stringify(this.getStyle())),a.store(c),c}},load:function(){var a=this.getCacheLoad(1);return a},getCacheLoad:function(a){var b=a?1:0;if(this.cacheLoad&&!b)return this.cacheLoad;var c=this.StorageManager,d=[];if(!c)return{};var e=c.getConfig();return e.storeHtml&&d.push("html"),e.storeComponents&&d.push("components"),e.storeCss&&d.push("css"),e.storeStyles&&d.push("styles"),this.cacheLoad=c.load(d),this.cacheLoad},getDeviceModel:function(){var a=this.get("device");return this.get("DeviceManager").get(a)},runDefault:function(){var a=this.get("Commands").get(this.config.defaultCommand);a&&!this.defaultRunning&&(a.stop(this,this),a.run(this,this),this.defaultRunning=1)},stopDefault:function(){var a=this.get("Commands").get(this.config.defaultCommand);a&&(a.stop(this,this),this.defaultRunning=0)}})}),c("editor/view/EditorView",["backbone"],function(a){return a.View.extend({initialize:function(){this.pn=this.model.get("Panels"),this.conf=this.model.config,this.className=this.conf.stylePrefix+"editor",this.model.on("loaded",function(){this.pn.active(),this.model.runDefault()},this)},render:function(){var a=this.conf;return this.$el.empty(),this.$cont=$(a.el||"body "+a.container),a.width&&this.$cont.css("width",a.width),a.height&&this.$cont.css("height",a.height),this.$el.append(this.model.get("Canvas").render()),this.$el.append(this.pn.render()),this.$el.attr("class",this.className),this.$cont.html(this.$el),this}})}),c("editor/main",["require","./config/config","./model/Editor","./view/EditorView"],function(a){var b=function(b){var c=b||{},d=a("./config/config"),e=a("./model/Editor"),f=a("./view/EditorView");for(var g in d)g in c||(c[g]=d[g]);var h=new e(c),i=new f({model:h,config:c});return{editor:h,DomComponents:h.get("Components"),CssComposer:h.get("CssComposer"),StorageManager:h.get("StorageManager"),AssetManager:h.get("AssetManager"),BlockManager:h.get("BlockManager"),ClassManager:h.get("ClassManager"),CodeManager:h.get("CodeManager"),Commands:h.get("Commands"),Dialog:h.get("Modal"),Panels:h.get("Panels"),StyleManager:h.get("StyleManager"),Canvas:h.get("Canvas"),UndoManager:h.get("UndoManager"),DeviceManager:h.get("DeviceManager"),Utils:h.get("Utils"),Config:h.get("Config"),init:function(){return h.init(this),this},getConfig:function(){return c},getHtml:function(){return h.getHtml()},getCss:function(){return h.getCss()},getComponents:function(){return h.get("Components").getComponents()},setComponents:function(a){return h.setComponents(a),this},getStyle:function(){return h.get("CssComposer").getRules()},setStyle:function(a){return h.setStyle(a),this},getSelected:function(){return h.getSelected()},setDevice:function(a){return h.set("device",a)},getDevice:function(){return h.get("device")},runCommand:function(a,b){var c=h.get("Commands").get(a);c&&(c.run(this,this,b),this.trigger("run:"+a))},stopCommand:function(a,b){var c=h.get("Commands").get(a);c&&(c.stop(this,this,b),this.trigger("stop:"+a))},store:function(){return h.store()},load:function(){return h.load()},getContainer:function(){return c.el},on:function(a,b){return h.on(a,b)},trigger:function(a){return h.trigger(a)},render:function(){return i.render().el}}};return b}),c("PluginManager/config/config",[],function(){return{plugins:[]}}),c("PluginManager/main",["require","./config/config"],function(a){return function(b){var c=b||{},d=a("./config/config");for(var e in d)e in c||(c[e]=d[e]);var f={};return{add:function(a,b){return f[a]?this:(f[a]=b,this)},get:function(a){return f[a]},getAll:function(){return f}}}}),c("PluginManager",["PluginManager/main"],function(a){return a}),c("grapesjs/main",["require","./config/config","editor/main","PluginManager"],function(a){return function(b){var c=a("./config/config"),d=a("editor/main"),e=a("PluginManager"),f=new e,g=[];return{plugins:f,init:function(a){var b=a||{},e=b.container;for(var h in c)h in b||(b[h]=c[h]);if(!e)throw new Error("'container' is required");b.noticeOnUnload&&(window.onbeforeunload=function(a){return 1}),b.el=document.querySelector(e);var i=new d(b).init(),j=f.getAll();for(var k in j)if(!(b.plugins.indexOf(k)<0)){var l=f.get(k);l(i)}return b.autorender&&i.render(),g.push(i),i}}}()}),b(["src/config/require-config.js"],function(){b(["grapesjs/main"],function(a){return a})}),c("main",function(){}),b("grapesjs/main")}); \ No newline at end of file +var a=this.config.modal,b=a.stylePrefix||"mdl-";a.stylePrefix=this.config.stylePrefix+b,this.modal=new h(a),this.modal.render().appendTo("body"),this.Dialog=this.modal,this.set("Modal",this.modal)},initCodeManager:function(){var a=this.config.codeManager,b=a.stylePrefix||"cm-";a.stylePrefix=this.config.stylePrefix+b,this.cm=new i(a),this.CodeManager=this.cm,this.cm.loadDefaultGenerators().loadDefaultViewers(),this.set("CodeManager",this.cm)},initCommands:function(){var a=this.config.commands,b=a.stylePrefix||"com-";a.pStylePrefix=this.config.stylePrefix,a.stylePrefix=this.config.stylePrefix+b,a.em=this,a.canvasId=this.config.idCanvas,a.wrapperId=this.config.idWrapper,this.com=new k(a),this.Commands=this.com,this.com.loadDefaultCommands(),this.set("Commands",this.com)},initPanels:function(){var a=this.config.panels,b=a.stylePrefix||"pn-";a.pStylePrefix=this.config.stylePrefix,a.stylePrefix=this.config.stylePrefix+b,a.em=this,this.pn=new q(a),this.Panels=this.pn,this.set("Panels",this.pn)},initUndoManager:function(){if(!this.um&&this.cmp&&this.config.undoManager){var b=this;this.um=new a.UndoManager({register:[this.cmp.getComponents(),this.cssc.getRules()],track:!0}),this.UndoManager=this.um,this.set("UndoManager",this.um),key("⌘+z, ctrl+z",function(){b.um.undo(!0)}),key("⌘+shift+z, ctrl+shift+z",function(){b.um.redo(!0)}),a.UndoManager.removeUndoType("change");var c;a.UndoManager.addUndoType("change:style",{on:function(a,b,d){if(c||(c=a.toJSON()),!d||!d.avoidStore){var e={object:a,before:c,after:a.toJSON()};return c=null,e}},undo:function(a,b,c,d){a.set(b)},redo:function(a,b,c,d){a.set(c)}})}},componentsUpdated:function(a,b,c){var d=this.get("changesCount")+1,e=c?c.avoidStore:0;this.set("changesCount",d),this.stm.isAutosave()&&dc;c++)b.pop();return b.add(a),this},getStyle:function(){return this.CssComposer.getRules()},getHtml:function(){var a=this.Components,b=this.CodeManager;if(a&&b){var c=a.getComponent();return b.getCode(c,"html")}},getCss:function(){var a=this.Components,b=this.CodeManager,c=this.CssComposer;if(a&&b&&c){var d=a.getComponent();return b.getCode(d,"css",c)}},store:function(){var a=this.StorageManager;if(a){var b=a.getConfig(),c={};return b.storeHtml&&(c.html=this.getHtml()),b.storeComponents&&(c.components=JSON.stringify(this.getComponents())),b.storeCss&&(c.css=this.getCss()),b.storeStyles&&(c.styles=JSON.stringify(this.getStyle())),a.store(c),c}},load:function(){var a=this.getCacheLoad(1);return a},getCacheLoad:function(a){var b=a?1:0;if(this.cacheLoad&&!b)return this.cacheLoad;var c=this.StorageManager,d=[];if(!c)return{};var e=c.getConfig();return e.storeHtml&&d.push("html"),e.storeComponents&&d.push("components"),e.storeCss&&d.push("css"),e.storeStyles&&d.push("styles"),this.cacheLoad=c.load(d),this.cacheLoad},getDeviceModel:function(){var a=this.get("device");return this.get("DeviceManager").get(a)},runDefault:function(){var a=this.get("Commands").get(this.config.defaultCommand);a&&!this.defaultRunning&&(a.stop(this,this),a.run(this,this),this.defaultRunning=1)},stopDefault:function(){var a=this.get("Commands").get(this.config.defaultCommand);a&&(a.stop(this,this),this.defaultRunning=0)}})}),c("editor/view/EditorView",["backbone"],function(a){return a.View.extend({initialize:function(){this.pn=this.model.get("Panels"),this.conf=this.model.config,this.className=this.conf.stylePrefix+"editor",this.model.on("loaded",function(){this.pn.active(),this.model.runDefault()},this)},render:function(){var a=this.conf;return this.$el.empty(),this.$cont=$(a.el||"body "+a.container),a.width&&this.$cont.css("width",a.width),a.height&&this.$cont.css("height",a.height),this.$el.append(this.model.get("Canvas").render()),this.$el.append(this.pn.render()),this.$el.attr("class",this.className),this.$cont.html(this.$el),this}})}),c("editor/main",["require","./config/config","./model/Editor","./view/EditorView"],function(a){var b=function(b){var c=b||{},d=a("./config/config"),e=a("./model/Editor"),f=a("./view/EditorView");for(var g in d)g in c||(c[g]=d[g]);var h=new e(c),i=new f({model:h,config:c});return{editor:h,DomComponents:h.get("Components"),CssComposer:h.get("CssComposer"),StorageManager:h.get("StorageManager"),AssetManager:h.get("AssetManager"),BlockManager:h.get("BlockManager"),ClassManager:h.get("ClassManager"),CodeManager:h.get("CodeManager"),Commands:h.get("Commands"),Dialog:h.get("Modal"),Panels:h.get("Panels"),StyleManager:h.get("StyleManager"),Canvas:h.get("Canvas"),UndoManager:h.get("UndoManager"),DeviceManager:h.get("DeviceManager"),Utils:h.get("Utils"),Config:h.get("Config"),init:function(){return h.init(this),this},getConfig:function(){return c},getHtml:function(){return h.getHtml()},getCss:function(){return h.getCss()},getComponents:function(){return h.get("Components").getComponents()},setComponents:function(a){return h.setComponents(a),this},getStyle:function(){return h.get("CssComposer").getRules()},setStyle:function(a){return h.setStyle(a),this},getSelected:function(){return h.getSelected()},setDevice:function(a){return h.set("device",a)},getDevice:function(){return h.get("device")},runCommand:function(a,b){var c=h.get("Commands").get(a);c&&(c.run(this,this,b),this.trigger("run:"+a))},stopCommand:function(a,b){var c=h.get("Commands").get(a);c&&(c.stop(this,this,b),this.trigger("stop:"+a))},store:function(){return h.store()},load:function(){return h.load()},getContainer:function(){return c.el},on:function(a,b){return h.on(a,b)},trigger:function(a){return h.trigger(a)},render:function(){return i.render().el}}};return b}),c("PluginManager/config/config",[],function(){return{plugins:[]}}),c("PluginManager/main",["require","./config/config"],function(a){return function(b){var c=b||{},d=a("./config/config");for(var e in d)e in c||(c[e]=d[e]);var f={};return{add:function(a,b){return f[a]?this:(f[a]=b,this)},get:function(a){return f[a]},getAll:function(){return f}}}}),c("PluginManager",["PluginManager/main"],function(a){return a}),c("grapesjs/main",["require","./config/config","editor/main","PluginManager"],function(a){return function(b){var c=a("./config/config"),d=a("editor/main"),e=a("PluginManager"),f=new e,g=[];return{plugins:f,init:function(a){var b=a||{},e=b.container;for(var h in c)h in b||(b[h]=c[h]);if(!e)throw new Error("'container' is required");b.noticeOnUnload&&(window.onbeforeunload=function(a){return 1}),b.el=document.querySelector(e);var i=new d(b).init(),j=f.getAll();for(var k in j)if(!(b.plugins.indexOf(k)<0)){var l=b.pluginsOpts[k]||{},m=f.get(k);m(i,l)}return b.autorender&&i.render(),g.push(i),i}}}()}),b(["src/config/require-config.js"],function(){b(["grapesjs/main"],function(a){return a})}),c("main",function(){}),b("grapesjs/main")}); \ No newline at end of file diff --git a/src/block_manager/view/BlocksView.js b/src/block_manager/view/BlocksView.js index b979833ec..e978ee896 100644 --- a/src/block_manager/view/BlocksView.js +++ b/src/block_manager/view/BlocksView.js @@ -105,6 +105,7 @@ function(Backbone, BlockView) { * Render new model inside the view * @param {Model} model * @param {Object} fragment Fragment collection + * @private * */ add: function(model, fragment){ var frag = fragment || null; diff --git a/src/device_manager/main.js b/src/device_manager/main.js index c3b117b00..60af42a8d 100644 --- a/src/device_manager/main.js +++ b/src/device_manager/main.js @@ -9,7 +9,7 @@ * var deviceManager = editor.DeviceManager; * ``` * - * @module Devices + * @module DeviceManager * @param {Object} config Configurations * @param {Array} [config.devices=[]] Default devices * @example diff --git a/src/device_manager/view/DevicesView.js b/src/device_manager/view/DevicesView.js index a94de8d96..c2c45dc5c 100644 --- a/src/device_manager/view/DevicesView.js +++ b/src/device_manager/view/DevicesView.js @@ -21,6 +21,7 @@ function(Backbone, devicesTemplate) { /** * Start adding new device * @return {[type]} [description] + * @private */ startAdd: function(){}, diff --git a/src/editor/main.js b/src/editor/main.js index 6e3593283..40416ea1d 100644 --- a/src/editor/main.js +++ b/src/editor/main.js @@ -14,6 +14,9 @@ * * [stopCommand](#stopcommand) * * [store](#store) * * [load](#load) + * * [getContainer](#getcontainer) + * * [on](#on) + * * [trigger](#trigger) * * [render](#render) * * Editor class contains the top level API which you'll probably use to custom the editor or extend it with plugins. @@ -42,6 +45,8 @@ * @param {Object} [config.panels={}] Panels configuration, see the relative documentation * @param {Object} [config.showDevices=true] If true render a select of available devices inside style manager panel * @param {string} [config.defaultCommand='select-comp'] Command to execute when no other command is running + * @param {Array} [config.plugins=[]] Array of plugins to execute on start + * @param {Object} [config.pluginsOpts={}] Custom options for plugins * @example * var editor = grapesjs.init({ * container : '#gjs', diff --git a/src/grapesjs/config/config.js b/src/grapesjs/config/config.js index 3f404fb09..13d1e1876 100644 --- a/src/grapesjs/config/config.js +++ b/src/grapesjs/config/config.js @@ -30,5 +30,8 @@ define(function () { // Array of plugins to init plugins: [], + + // Custom options for plugins + pluginsOpts: {} }; }); \ No newline at end of file diff --git a/src/grapesjs/main.js b/src/grapesjs/main.js index 5d79ab4a0..91c20a8dc 100644 --- a/src/grapesjs/main.js +++ b/src/grapesjs/main.js @@ -60,8 +60,9 @@ define(function (require) { if(c.plugins.indexOf(id) < 0) continue; + var opts = c.pluginsOpts[id] || {}; var plug = plugins.get(id); - plug(editor); + plug(editor, opts); } if(c.autorender) diff --git a/styles/css/main.css b/styles/css/main.css index 9b78639b1..2bc25549d 100644 --- a/styles/css/main.css +++ b/styles/css/main.css @@ -3578,6 +3578,12 @@ ol.example li.placeholder:before { .wte-mdl-content { border-top: 1px solid rgba(255, 255, 255, 0.1); } +#wte-mdl-c > div::after { + content: ""; + clear: both; + display: block; + margin-bottom: 10px; } + /********* Assets Manager **********/ .wte-am-assets { height: 290px; diff --git a/styles/scss/main.scss b/styles/scss/main.scss index 0a9ba0678..08d09a965 100644 --- a/styles/scss/main.scss +++ b/styles/scss/main.scss @@ -1193,6 +1193,12 @@ $paddElClm: 5px 6px; .#{$mdl-prefix}content{ border-top: 1px solid $mainLhColor; } +##{$mdl-prefix}c > div::after{ + content: ""; + clear: both; + display:block; + margin-bottom:10px; +} /********* Assets Manager **********/ .#{$am-prefix}assets{ diff --git a/test/specs/grapesjs/main.js b/test/specs/grapesjs/main.js index 4d5688886..304ec8265 100644 --- a/test/specs/grapesjs/main.js +++ b/test/specs/grapesjs/main.js @@ -143,6 +143,19 @@ define(['GrapesJS', 'PluginManager', 'chai'], data.html.should.equal(htmlString); }); + it('Execute plugins with custom options', function() { + var pluginName = storageId + '-plugin-opts'; + obj.plugins.add(pluginName, function(edt, opts){ + var opts = opts || {}; + edt.customValue = opts.cVal || ''; + }); + config.plugins = [pluginName]; + config.pluginsOpts = {}; + config.pluginsOpts[pluginName] = {cVal: 'TEST'}; + var editor = obj.init(config); + editor.customValue.should.equal('TEST'); + }); + it('Execute custom command', function() { var editor = obj.init(config); editor.testVal = '';