Make WordPress Core

Ticket #31336: 31336.6.9.diff

File 31336.6.9.diff, 599.8 KB (added by dovyp, 9 years ago)

Admin-theme colors for new hover styles. Global WP SASS variables.

  • src/wp-admin/css/colors/_admin.scss

    diff --git src/wp-admin/css/colors/_admin.scss src/wp-admin/css/colors/_admin.scss
    index 20ac8f0..a55ca31 100644
    ul#adminmenu > li.current > a.current:after { 
    418418
    419419.details.attachment {
    420420        box-shadow:
    421                 inset 0 0 0 3px #fff,
     421                inset 0 0 0 3px $text-color,
    422422                inset 0 0 0 7px $highlight-color;
    423423}
    424424
    425425.attachment.details .check {
    426426        background-color: $highlight-color;
    427         box-shadow: 0 0 0 1px #fff, 0 0 0 2px $highlight-color;
     427        box-shadow: 0 0 0 1px $text-color, 0 0 0 2px $highlight-color;
    428428}
    429429
    430430.media-selection .attachment.selection.details .thumbnail {
    431431        -webkit-box-shadow:
    432                 0px 0px 0px 1px #fff,
     432                0px 0px 0px 1px $text-color,
    433433                0px 0px 0px 3px $highlight-color;
    434434        box-shadow:
    435                 0px 0px 0px 1px #fff,
     435                0px 0px 0px 1px $text-color,
    436436                0px 0px 0px 3px $highlight-color;
    437437}
    438438
    body.more-filters-opened .more-filters:focus:before { 
    494494        color: $menu-highlight-text;
    495495}
    496496
     497#customize-controls .customize-info.open .customize-help-toggle,
     498#customize-controls .customize-info .customize-help-toggle:focus,
     499#customize-controls .customize-info .customize-help-toggle:hover {
     500        color: $highlight-color;
     501}
     502
     503#customize-controls .control-section:hover > .accordion-section-title,
     504#customize-controls .control-section .accordion-section-title:hover,
     505#customize-controls .control-section.open .accordion-section-title,
     506#customize-controls .control-section .accordion-section-title:focus {
     507        color: $text-color;
     508        background: $highlight-color;
     509}
     510
     511#customize-controls .customize-info.open .customize-help-toggle,
     512#customize-controls .customize-info .customize-help-toggle:focus,
     513#customize-controls .customize-info .customize-help-toggle:hover {
     514        color: $highlight-color;
     515}
     516
     517#customize-controls .control-section:hover > .accordion-section-title,
     518#customize-controls .control-section .accordion-section-title:hover,
     519#customize-controls .control-section.open .accordion-section-title,
     520#customize-controls .control-section .accordion-section-title:focus {
     521        color: $text-color;
     522        background: $highlight-color;
     523}
     524
     525h3.customize-section-title:hover,
     526h3.customize-section-title:hover:before,
     527h3.customize-section-title:focus,
     528h3.customize-section-title:focus:before {
     529        background: $highlight-color;
     530        color: $text-color;
     531}
     532
     533#customize-theme-controls .control-section.control-panel > h3.accordion-section-title:focus:after,
     534#customize-theme-controls .control-section.control-panel > h3.accordion-section-title:hover:after {
     535        background: $menu-submenu-background;
     536        color: $text-color;
     537}
     538
     539.customize-panel-back:hover,
     540.customize-panel-back:focus {
     541        background: $highlight-color;
     542        color: $text-color;
     543}
     544
     545
    497546/* jQuery UI Slider */
    498547
    499548.wp-slider .ui-slider-handle,
  • src/wp-admin/css/customize-controls.css

    diff --git src/wp-admin/css/customize-controls.css src/wp-admin/css/customize-controls.css
    index b256106..61547dd 100644
    body { 
    5050        overflow-x: hidden;
    5151}
    5252
    53 #customize-info {
     53#customize-controls .customize-info {
    5454        border: none;
    5555        border-top: 1px solid #ddd;
     56        border-bottom: 1px solid #ddd;
     57        margin-bottom: 15px;
    5658}
    5759
    58 #customize-info .accordion-section-title {
    59         background-color: #fff;
    60         color: #666666;
     60#customize-controls .customize-info .accordion-section-title {
     61        background: #fff;
     62        color: #555;
    6163        border-left: none;
    6264        border-right: none;
    63         border-bottom: 1px solid #eeeeee;
     65        border-bottom: none;
     66        cursor: default;
    6467}
    6568
    66 #customize-info.open .accordion-section-title:after,
    67 #customize-info .accordion-section-title:hover:after,
    68 #customize-info .accordion-section-title:focus:after {
    69         color: #555555;
     69#customize-controls .customize-info.open .accordion-section-title:after,
     70#customize-controls .customize-info .accordion-section-title:hover:after,
     71#customize-controls .customize-info .accordion-section-title:focus:after {
     72        color: #333;
     73}
     74
     75#customize-controls .customize-info .accordion-section-title:after {
     76        display: none;
    7077}
    7178
    72 #customize-info .preview-notice {
     79#customize-controls .customize-info .preview-notice {
    7380        font-size: 13px;
    7481        line-height: 24px;
    7582}
    7683
    77 #customize-info .theme-name {
     84#customize-controls .control-section .customize-section-title,
     85#customize-controls .customize-info .panel-title {
    7886        font-size: 20px;
    7987        font-weight: 200;
    8088        line-height: 24px;
    8189        display: block;
     90        overflow: hidden;
     91        white-space: nowrap;
     92        text-overflow: ellipsis;
     93}
     94
     95#customize-controls .customize-info .customize-help-toggle {
     96        position: absolute;
     97        top: 4px;
     98        right: 1px;
     99        padding: 20px 20px 10px 10px;
     100        width: 20px;
     101        height: 20px;
     102        cursor: pointer;
     103        box-shadow: none;
     104        -webkit-appearance: none;
     105        background: transparent;
     106        color: #555;
     107        border: none;
    82108}
    83109
    84 #customize-info .theme-screenshot {
    85         width: 258px;
     110#customize-controls .customize-info .customize-help-toggle:before {
     111        position: absolute;
     112        top: 5px;
     113        left: 5px;
    86114}
    87115
    88 #customize-info .theme-description {
    89         margin-top: 1em;
    90         color: #666666;
    91         line-height: 20px;
     116#customize-controls .customize-info.open .customize-help-toggle,
     117#customize-controls .customize-info .customize-help-toggle:focus,
     118#customize-controls .customize-info .customize-help-toggle:hover {
     119        color: #0073aa;
     120}
     121
     122#customize-controls .customize-info .customize-panel-description {
     123        display: none;
     124        background: #fff;
     125        padding: 12px 15px;
     126        border-top: 1px solid #ddd;
     127}
     128
     129#customize-controls .customize-info .customize-panel-description p:first-child {
     130        margin-top: 0;
     131}
     132
     133#customize-controls .customize-info .customize-panel-description p:last-child {
     134        margin-bottom: 0;
    92135}
    93136
    94137#customize-theme-controls .control-section {
    body { 
    101144        border-bottom: 1px solid #eeeeee;
    102145}
    103146
     147#customize-theme-controls .accordion-section-title:after {
     148        content: "\f345";
     149}
     150
     151.rtl #customize-theme-controls .accordion-section-title:after {
     152        content: "\f341";
     153}
     154
    104155#customize-theme-controls .accordion-section-content {
    105         color: #555555;
    106         background: #fff;
     156        color: #555;
     157        background: transparent;
    107158}
    108159
    109 #customize-info.open .accordion-section-title,
    110 #customize-info .accordion-section-title:hover,
    111 #customize-info .accordion-section-title:focus,
    112 #customize-theme-controls .control-section:hover > .accordion-section-title,
    113 #customize-theme-controls .control-section .accordion-section-title:hover,
    114 #customize-theme-controls .control-section.open .accordion-section-title,
    115 #customize-theme-controls .control-section .accordion-section-title:focus {
    116         color: #23282d;
    117         background: #f5f5f5;
     160#customize-controls .control-section:hover > .accordion-section-title,
     161#customize-controls .control-section .accordion-section-title:hover,
     162#customize-controls .control-section.open .accordion-section-title,
     163#customize-controls .control-section .accordion-section-title:focus {
     164        color: #fff;
     165        background: #0073aa;
    118166}
    119167
    120168.js .control-section:hover .accordion-section-title,
    body { 
    128176#customize-theme-controls .control-section .accordion-section-title:hover:after,
    129177#customize-theme-controls .control-section.open .accordion-section-title:after,
    130178#customize-theme-controls .control-section .accordion-section-title:focus:after {
    131         color: #555;
     179        color: #fff;
    132180}
    133181
    134 #customize-info.open,
    135182#customize-theme-controls .control-section.open {
    136183        border-bottom: 1px solid #eeeeee;
    137184}
    body { 
    145192        border-bottom-color: #ddd;
    146193}
    147194
    148 #customize-theme-controls > ul,
     195#customize-theme-controls > ul {
     196        margin: 0;
     197}
     198
    149199#customize-theme-controls .accordion-section-content {
    150200        margin: 0;
     201        position: absolute;
     202        left: 100%;
     203        top: 0;
     204        width: -webkit-calc(100% - 24px);
     205        width: calc(100% - 24px);
     206        padding: 12px;
     207}
     208
     209.customize-section-description-container {
     210        margin-bottom: 15px;
     211}
     212
     213h3.customize-section-title {
     214        margin: -12px -12px -12px 35px;
     215        padding: 12px;
     216        border-bottom: 1px solid #ddd;
     217        border-left: 1px solid #ddd;
     218        background: #fff;
     219        color: #555;
     220        cursor: pointer;
     221}
     222
     223h3.customize-section-title:before {
     224        font: normal 20px/72px dashicons;
     225        content: "\f341";
     226        -webkit-font-smoothing: antialiased;
     227        -moz-osx-font-smoothing: grayscale;
     228        position: absolute;
     229        top: 0;
     230        left: 0;
     231        width: 47px;
     232        margin: 0;
     233        text-align: center;
     234        background: #fff;
     235        border-bottom: 1px solid #ddd;
     236}
     237
     238.rtl h3.customize-section-title:before {
     239        content: "\f345";
     240}
     241
     242h3.customize-section-title:hover,
     243h3.customize-section-title:hover:before,
     244h3.customize-section-title:focus,
     245h3.customize-section-title:focus:before {
     246        background: #0073aa;
     247        color: #fff;
     248        box-shadow: none;
     249        outline: none;
     250}
     251
     252#customize-theme-controls .control-section .accordion-section-content > li.customize-control:nth-child(2) {
     253        margin-top: 12px;
     254}
     255
     256#customize-theme-controls {
     257        position: relative;
     258        left: 0;
     259        transition: .18s left ease-in-out;
     260}
     261
     262.section-open #customize-info,
     263.section-open #customize-theme-controls {
     264        left: -100%;
     265}
     266
     267.section-open .control-panel-back {
     268        display: none;
    151269}
    152270
    153271.control-section.control-panel > .accordion-section-title {
    body { 
    169287
    170288#customize-theme-controls .control-section.control-panel > h3.accordion-section-title:focus:after,
    171289#customize-theme-controls .control-section.control-panel > h3.accordion-section-title:hover:after {
    172         background: #ddd;
    173         color: #000;
     290        background: #00a0d2;
     291        color: #fff;
    174292        border: 1px solid #d9d9d9;
    175293        border-right: none;
    176294        margin-top: -12px;
    body { 
    184302        left: 300px;
    185303        top: 0;
    186304        width: 300px;
    187         border-top: 1px solid #ddd;
    188305        -webkit-transition: left ease-in-out .18s;
    189306        transition: left ease-in-out .18s;
    190307}
    body { 
    242359        transition: left .18s ease-in-out, color .1s ease-in-out, background .1s ease-in-out;
    243360}
    244361
    245 .ios .control-panel-back {
     362.customize-panel-back {
     363        display: block;
     364        float: left;
     365        width: 48px;
     366        height: 69px;
     367        padding: 0 24px 0 0;
     368        margin: 0;
     369        background: #fff;
     370        border: none;
     371        border-right: 1px solid #ddd;
     372        box-shadow: none;
     373        cursor: pointer;
     374        -webkit-transition: left .18s ease-in-out, color .1s ease-in-out, background .1s ease-in-out;
     375        transition: left .18s ease-in-out, color .1s ease-in-out, background .1s ease-in-out;
     376}
     377
     378
     379.ios .control-panel-back,
     380.ios .customize-panel-back {
    246381        -webkit-transition: left 0s;
    247382        transition: left 0s;
    248383}
    body { 
    251386        display: none;
    252387}
    253388
     389.panel-meta.customize-info .accordion-section-title {
     390        margin-left: 48px;
     391}
     392
     393#customize-controls .panel-meta.customize-info .accordion-section-title:hover {
     394        background: #fff;
     395        color: #555;
     396}
     397
    254398.customize-overlay-close:focus,
    255399.customize-overlay-close:hover,
    256400.customize-controls-close:focus,
    body { 
    267411        box-shadow: none;
    268412}
    269413
     414.customize-panel-back:hover,
     415.customize-panel-back:focus {
     416        background: #0073aa;
     417        border-color: #ccc;
     418        color: #fff;
     419        outline: none;
     420        -webkit-box-shadow: none;
     421        box-shadow: none;
     422}
     423
    270424.customize-overlay-close:before,
    271425.customize-controls-close:before {
    272426        font: normal 22px/45px dashicons;
    body { 
    276430        left: 13px;
    277431}
    278432
     433.customize-panel-back:before {
     434        font: normal 20px/69px dashicons;
     435        content: "\f341";
     436        position: relative;
     437        left: 13px;
     438}
     439
    279440.control-panel-back:before {
    280441        font: normal 20px/45px dashicons;
    281442        content: "\f341";
    body { 
    285446}
    286447
    287448.in-sub-panel .control-panel-back {
    288         left: 0;
     449/*      left: 0; @todo decide whether to bring back the back buttons in the header */
    289450}
    290451
    291452.current-panel > .accordion-section-title {
    body { 
    345506        transition: left 0s;
    346507}
    347508
    348 .control-section.control-panel .accordion-section-title .panel-title {
    349         font-size: 20px;
    350         font-weight: 200;
    351         line-height: 24px;
    352         display: block;
    353         border: none;
    354 }
    355 
    356 .control-section.control-panel .preview-notice {
    357         font-size: 13px;
    358         line-height: 24px;
    359 }
    360 
    361509p.customize-section-description {
    362510        font-style: normal;
     511        margin-top: 22px;
     512        margin-bottom: 0;
    363513}
    364514
    365515.customize-control {
    366516        width: 100%;
    367517        float: left;
    368518        clear: both;
    369         margin-bottom: 8px;
     519        margin-bottom: 12px;
    370520}
    371521
    372522.customize-control select,
    p.customize-section-description { 
    9131063        padding-right: 100px; /* Space for the button */
    9141064}
    9151065
    916 .control-section-themes .accordion-section-title span {
    917         font-size: small;
     1066.control-section-themes .accordion-section-title span.customize-action,
     1067#customize-controls .customize-section-title span.customize-action {
     1068        font-size: 13px;
    9181069        display: block;
    9191070        font-weight: 400;
    9201071}
    p.customize-section-description { 
    9281079        font-weight: normal;
    9291080}
    9301081
     1082.control-section-themes .accordion-section-title:before {
     1083        display: none;
     1084}
     1085
    9311086.customize-themes-panel {
    9321087        display: none;
    9331088        padding: 0 8px;
    p.customize-section-description { 
    9381093        box-sizing: border-box;
    9391094}
    9401095
     1096.customize-themes-panel .accordion-section-title:first-child {
     1097        margin-top: 0;
     1098}
     1099
     1100#customize-controls .customize-themes-panel .accordion-section-title:nth-child(2) {
     1101        font-size: 14px;
     1102        font-weight: 600;
     1103}
    9411104
    9421105.customize-themes-panel > h2 {
    9431106        padding: 15px 8px 0 8px;
    p.customize-section-description { 
    9561119        margin-bottom: 8px;
    9571120}
    9581121
     1122#customize-theme-controls .themes.accordion-section-content {
     1123        position: relative;
     1124        left: 0;
     1125        padding: 0;
     1126        width: 100%;
     1127}
     1128
    9591129.wp-customizer .theme-browser .themes {
    9601130        padding-bottom: 8px;
    9611131}
    body.cheatin p { 
    11701340                margin-bottom: 4px;
    11711341        }
    11721342
    1173         .adding-widget #customize-header-actions .primary-actions {
    1174                 display: none;
    1175         }
    1176 
    1177         .adding-widget #customize-header-actions .secondary-actions {
    1178                 display: block;
    1179         }
    1180 
    11811343        #customize-header-actions .button-primary {
    11821344                margin-top: 6px;
    11831345        }
  • src/wp-admin/css/customize-widgets.css

    diff --git src/wp-admin/css/customize-widgets.css src/wp-admin/css/customize-widgets.css
    index ba95022..b7a7005 100644
    body.adding-widget .add-new-widget:before { 
    348348        width: 300px;
    349349        margin: 0;
    350350        z-index: 1;
    351         background: #fff !important;
     351        background: #eee !important;
    352352        -webkit-transition: all 0.2s;
    353353        transition: all 0.2s;
    354354        border-right: 1px solid #dddddd;
    body.adding-widget .add-new-widget:before { 
    384384#available-widgets .widget-tpl {
    385385        position: relative;
    386386        padding: 20px 15px 20px 60px;
     387        background: #fff;
    387388        border-bottom: 1px solid #e4e4e4;
    388389        cursor: pointer;
    389390        display: none;
    body.adding-widget .add-new-widget:before { 
    391392
    392393#available-widgets .widget-tpl:hover,
    393394#available-widgets .widget-tpl.selected {
    394         background: #fafafa;
     395        background: #eee;
     396        border-bottom-color: #ccc;
    395397}
    396398
    397399#available-widgets .widget-top,
    body.adding-widget #customize-preview { 
    583585#available-widgets [class*="tweet"] .widget-title:before,
    584586#available-widgets [class*="twitter"] .widget-title:before { content: "\f301"; }
    585587
     588#available-widgets .customize-section-title {
     589        display: none;
     590}
    586591
    587592@media screen and (max-height: 700px) and (min-width: 981px) {
    588         .customize-control {
     593        .customize-control-widget {
    589594                margin-bottom: 0;
    590595        }
    591596        .widget-top {
    body.adding-widget #customize-preview { 
    628633                width: 100%;
    629634        }
    630635
     636        #available-widgets .customize-section-title {
     637                margin: 0 0 0 47px;
     638                font-size: 20px;
     639                font-weight: 200;
     640                line-height: 24px;
     641                display: block;
     642                overflow: hidden;
     643                white-space: nowrap;
     644                text-overflow: ellipsis;
     645        }
     646
     647        #available-widgets .customize-section-title .customize-action {
     648                font-size: 13px;
     649                display: block;
     650                font-weight: 400;
     651        }
     652
    631653        #available-widgets-filter {
    632654                position: static;
    633655                width: 100%;
    634656                height: auto;
    635657        }
     658
     659        #available-widgets-list {
     660                top: 122px;
     661        }
    636662}
  • src/wp-admin/customize.php

    diff --git src/wp-admin/customize.php src/wp-admin/customize.php
    index fc181db..cf941f6 100644
    if ( is_rtl() ) { 
    8585}
    8686$body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
    8787
     88$body_class .= ' admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'fresh' );
     89
    8890if ( $wp_customize->is_theme_active() ) {
    8991        $document_title_tmpl = _x( 'Customize: %s', 'Placeholder is the document title from the preview' );
    9092} else {
    do_action( 'customize_controls_print_scripts' ); 
    143145
    144146                <div id="widgets-right"><!-- For Widget Customizer, many widgets try to look for instances under div#widgets-right, so we have to add that ID to a container div in the Customizer for compat -->
    145147                <div class="wp-full-overlay-sidebar-content" tabindex="-1">
    146                         <div id="customize-info" class="accordion-section">
    147                                 <div class="accordion-section-title" aria-label="<?php esc_attr_e( 'Customizer Options' ); ?>" tabindex="0">
     148                        <div id="customize-info" class="accordion-section customize-info">
     149                                <div class="accordion-section-title" aria-label="<?php esc_attr_e( 'Customizer Options' ); ?>">
    148150                                        <span class="preview-notice"><?php
    149                                                 echo sprintf( __( 'You are customizing %s' ), '<strong class="theme-name site-title">' . get_bloginfo( 'name' ) . '</strong>' );
     151                                                echo sprintf( __( 'You are customizing %s' ), '<strong class="panel-title site-title">' . get_bloginfo( 'name' ) . '</strong>' );
    150152                                        ?></span>
     153                                        <button class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"><span class="screen-reader-text"><?php _e( 'Help' ); ?></span></button>
    151154                                </div>
    152                                 <div class="accordion-section-content"><?php
     155                                <div class="customize-panel-description"><?php
    153156                                        _e( 'The Customizer allows you to preview changes to your site before publishing them. You can also navigate to different pages on your site to preview them.' );
    154157                                ?></div>
    155158                        </div>
  • src/wp-admin/js/customize-controls.js

    diff --git src/wp-admin/js/customize-controls.js src/wp-admin/js/customize-controls.js
    index e211a41..4727439 100644
     
    446446                        var section = this;
    447447
    448448                        // Expand/Collapse accordion sections on click.
    449                         section.container.find( '.accordion-section-title' ).on( 'click keydown', function( event ) {
     449                        section.container.find( '.accordion-section-title, .customize-section-title' ).on( 'click keydown', function( event ) {
    450450                                if ( api.utils.isKeydownButNotEnterEvent( event ) ) {
    451451                                        return;
    452452                                }
     
    499499                 * @param {Object}  args
    500500                 */
    501501                onChangeExpanded: function ( expanded, args ) {
    502                         var section = this,
     502                        var position, scroll, section = this,
     503                                container = section.container.closest( '.wp-full-overlay-sidebar-content' ),
    503504                                content = section.container.find( '.accordion-section-content' ),
     505                                overlay = section.container.closest( '.wp-full-overlay' ),
    504506                                expand;
    505507
    506                         if ( expanded ) {
     508                        if ( expanded && ! section.container.hasClass( 'open' ) ) {
    507509
    508510                                if ( args.unchanged ) {
    509511                                        expand = args.completeCallback;
    510512                                } else {
     513                                        container.scrollTop( 0 );
    511514                                        expand = function () {
    512                                                 content.stop().slideDown( args.duration, args.completeCallback );
    513515                                                section.container.addClass( 'open' );
     516                                                overlay.addClass( 'section-open' );
     517                                                position = content.offset().top;
     518                                                scroll = container.scrollTop();
     519                                                content.css( 'margin-top', ( 45 - position - scroll ) );
    514520                                        };
    515521                                }
    516522
     
    531537                                        expand();
    532538                                }
    533539
    534                         } else {
     540                        } else if ( section.container.hasClass( 'open' ) ) {
    535541                                section.container.removeClass( 'open' );
    536                                 content.slideUp( args.duration, args.completeCallback );
     542                                overlay.removeClass( 'section-open' );
     543                                content.css( 'margin-top', 'inherit' );
     544                                container.scrollTop( 0 );
     545                                section.container.find( '.accordion-section-title' ).focus();
    537546                        }
    538547                }
    539548        });
     
    718727                                overlay = section.closest( '.wp-full-overlay' ),
    719728                                container = section.closest( '.wp-full-overlay-sidebar-content' ),
    720729                                siblings = container.find( '.open' ),
    721                                 topPanel = overlay.find( '#customize-theme-controls > ul > .accordion-section > .accordion-section-title' ).add( '#customize-info > .accordion-section-title' ),
     730                                topPanel = overlay.find( '#customize-theme-controls > ul > .accordion-section > .accordion-section-title' ),
    722731                                customizeBtn = section.find( '.customize-theme' ),
    723732                                changeBtn = section.find( '.change-theme' ),
    724733                                content = section.find( '.control-panel-content' );
     
    10121021                                }
    10131022                        });
    10141023
     1024                        // Close panel.
     1025                        panel.container.find( '.customize-panel-back' ).on( 'click keydown', function( event ) {
     1026                                if ( api.utils.isKeydownButNotEnterEvent( event ) ) {
     1027                                        return;
     1028                                }
     1029                                event.preventDefault(); // Keep this AFTER the key filter above
     1030
     1031                                if ( panel.expanded() ) {
     1032                                        panel.collapse();
     1033                                }
     1034                        });
     1035
    10151036                        meta = panel.container.find( '.panel-meta:first' );
    10161037
    1017                         meta.find( '> .accordion-section-title' ).on( 'click keydown', function( event ) {
     1038                        meta.find( '> .accordion-section-title .customize-help-toggle' ).on( 'click keydown', function( event ) {
    10181039                                if ( api.utils.isKeydownButNotEnterEvent( event ) ) {
    10191040                                        return;
    10201041                                }
     
    10241045                                        return;
    10251046                                }
    10261047
    1027                                 var content = meta.find( '.accordion-section-content:first' );
     1048                                var content = meta.find( '.customize-panel-description:first' );
    10281049                                if ( meta.hasClass( 'open' ) ) {
    10291050                                        meta.toggleClass( 'open' );
    10301051                                        content.slideUp( panel.defaultExpandedArguments.duration );
     1052                                        $( this ).attr( 'aria-expanded', false );
    10311053                                } else {
    10321054                                        content.slideDown( panel.defaultExpandedArguments.duration );
    10331055                                        meta.toggleClass( 'open' );
     1056                                        $( this ).attr( 'aria-expanded', true );
    10341057                                }
    10351058                        });
    10361059
     
    10891112                        // Note: there is a second argument 'args' passed
    10901113                        var position, scroll,
    10911114                                panel = this,
    1092                                 section = panel.container.closest( '.accordion-section' ),
     1115                                section = panel.container.closest( '.accordion-section' ), // This is actually the panel.
    10931116                                overlay = section.closest( '.wp-full-overlay' ),
    10941117                                container = section.closest( '.wp-full-overlay-sidebar-content' ),
    10951118                                siblings = container.find( '.open' ),
    1096                                 topPanel = overlay.find( '#customize-theme-controls > ul > .accordion-section > .accordion-section-title' ).add( '#customize-info > .accordion-section-title' ),
    1097                                 backBtn = overlay.find( '.control-panel-back' ),
     1119                                topPanel = overlay.find( '#customize-theme-controls > ul > .accordion-section > .accordion-section-title' ),
     1120                                backBtn = section.find( '.customize-panel-back' ),
    10981121                                panelTitle = section.find( '.accordion-section-title' ).first(),
    10991122                                content = section.find( '.control-panel-content' );
    11001123
     
    25732596                var parent, topFocus,
    25742597                        body = $( document.body ),
    25752598                        overlay = body.children( '.wp-full-overlay' ),
    2576                         title = $( '#customize-info .theme-name.site-title' ),
     2599                        title = $( '#customize-info .panel-title.site-title' ),
    25772600                        closeBtn = $( '.customize-controls-close' ),
    25782601                        saveBtn = $( '#save' );
    25792602
     
    25882611                });
    25892612
    25902613                // Expand/Collapse the main customizer customize info.
    2591                 $( '#customize-info' ).find( '> .accordion-section-title' ).on( 'click keydown', function( event ) {
     2614                $( '.customize-info' ).find( '> .accordion-section-title .customize-help-toggle' ).on( 'click keydown', function( event ) {
    25922615                        if ( api.utils.isKeydownButNotEnterEvent( event ) ) {
    25932616                                return;
    25942617                        }
    25952618                        event.preventDefault(); // Keep this AFTER the key filter above
    25962619
    2597                         var section = $( this ).parent(),
    2598                                 content = section.find( '.accordion-section-content:first' );
     2620                        var section = $( this ).closest( '.accordion-section' ),
     2621                                content = section.find( '.customize-panel-description:first' );
    25992622
    26002623                        if ( section.hasClass( 'cannot-expand' ) ) {
    26012624                                return;
     
    26042627                        if ( section.hasClass( 'open' ) ) {
    26052628                                section.toggleClass( 'open' );
    26062629                                content.slideUp( api.Panel.prototype.defaultExpandedArguments.duration );
     2630                                $( this ).attr( 'aria-expanded', false );
    26072631                        } else {
    26082632                                content.slideDown( api.Panel.prototype.defaultExpandedArguments.duration );
    26092633                                section.toggleClass( 'open' );
     2634                                $( this ).attr( 'aria-expanded', true );
    26102635                        }
    26112636                });
    26122637
  • src/wp-admin/js/customize-widgets.js

    diff --git src/wp-admin/js/customize-widgets.js src/wp-admin/js/customize-widgets.js
    index 729e6a8..d03a7e3 100644
     
    176176
    177177                        // If the available widgets panel is open and the customize controls are
    178178                        // interacted with (i.e. available widgets panel is blurred) then close the
    179                         // available widgets panel.
    180                         $( '#customize-controls, .customize-overlay-close' ).on( 'click keydown', function( e ) {
     179                        // available widgets panel. Also close on back button click.
     180                        $( '#customize-controls, .customize-overlay-close, #available-widgets .customize-section-title' ).on( 'click keydown', function( e ) {
    181181                                var isAddNewBtn = $( e.target ).is( '.add-new-widget, .add-new-widget *' );
    182182                                if ( $( 'body' ).hasClass( 'adding-widget' ) && ! isAddNewBtn ) {
    183183                                        self.close();
     
    12701270
    12711271                        if ( expanded ) {
    12721272
    1273                                 self.expandControlSection();
     1273                                if ( 'undefined' != typeof api.section( self.section ) && ! api.section( self.section ).expanded() ) {
     1274                                        self.expandControlSection();
     1275                                }
    12741276
    12751277                                // Close all other widget controls before expanding this one
    12761278                                api.control.each( function( otherControl ) {
  • src/wp-includes/class-wp-customize-panel.php

    diff --git src/wp-includes/class-wp-customize-panel.php src/wp-includes/class-wp-customize-panel.php
    index ee9f846..8877882 100644
    class WP_Customize_Panel { 
    315315         */
    316316        protected function render_content() {
    317317                ?>
    318                 <li class="panel-meta accordion-section control-section<?php if ( empty( $this->description ) ) { echo ' cannot-expand'; } ?>">
    319                         <div class="accordion-section-title" tabindex="0">
     318                <li class="panel-meta customize-info accordion-section <?php if ( empty( $this->description ) ) { echo ' cannot-expand'; } ?>">
     319                        <button class="customize-panel-back" tabindex="-1"><span class="screen-reader-text"><?php _e( 'Back' ); ?></span></button>
     320                        <div class="accordion-section-title">
    320321                                <span class="preview-notice"><?php
    321322                                        /* translators: %s is the site/panel title in the Customizer */
    322323                                        echo sprintf( __( 'You are customizing %s' ), '<strong class="panel-title">' . esc_html( $this->title ) . '</strong>' );
    323324                                ?></span>
     325                                <button class="customize-help-toggle dashicons dashicons-editor-help" tabindex="0" aria-expanded="false"><span class="screen-reader-text"><?php _e( 'Help' ); ?></span></button>
    324326                        </div>
    325327                        <?php if ( ! empty( $this->description ) ) : ?>
    326                                 <div class="accordion-section-content description">
     328                                <div class="description customize-panel-description">
    327329                                        <?php echo $this->description; ?>
    328330                                </div>
    329331                        <?php endif; ?>
  • src/wp-includes/class-wp-customize-section.php

    diff --git src/wp-includes/class-wp-customize-section.php src/wp-includes/class-wp-customize-section.php
    index a27f22b..814d6da 100644
    class WP_Customize_Section { 
    305305                <li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="<?php echo esc_attr( $classes ); ?>">
    306306                        <h3 class="accordion-section-title" tabindex="0">
    307307                                <?php echo esc_html( $this->title ); ?>
    308                                 <span class="screen-reader-text"><?php _e( 'Press return or enter to expand' ); ?></span>
     308                                <span class="screen-reader-text"><?php _e( 'Press return or enter to open' ); ?></span>
    309309                        </h3>
    310310                        <ul class="accordion-section-content">
    311                                 <?php if ( ! empty( $this->description ) ) : ?>
    312                                         <li class="customize-section-description-container">
     311                                <li class="customize-section-description-container">
     312                                        <h3 class="customize-section-title" tabindex="0">
     313                                                <span class="customize-action"><?php if ( $this->panel ) { echo _x( 'Customizing &#9656; ', 'Customizer sub-section breadcrumbs.' ) . esc_html( $this->manager->get_panel( $this->panel )->title ); } else { _e( 'Customizing' ); } ?></span>
     314                                                <?php echo esc_html( $this->title ); ?>
     315                                                <span class="screen-reader-text"><?php _e( 'Press return or enter to close' ); ?></span>
     316                                        </h3>
     317                                        <?php if ( ! empty( $this->description ) ) : ?>
    313318                                                <p class="description customize-section-description"><?php echo $this->description; ?></p>
    314                                         </li>
    315                                 <?php endif; ?>
     319                                        <?php endif; ?>
     320                                </li>
    316321                        </ul>
    317322                </li>
    318323                <?php
    class WP_Customize_Themes_Section extends WP_Customize_Section { 
    353358                                <?php
    354359                                if ( $this->manager->is_theme_active() ) {
    355360                                        /* translators: %s: theme name */
    356                                         printf( __( '<span>Active theme</span> %s' ), $this->title );
     361                                        printf( __( '<span class="customize-action">Active theme</span> %s' ), $this->title );
    357362                                } else {
    358363                                        /* translators: %s: theme name */
    359                                         printf( __( '<span>Previewing theme</span> %s' ), $this->title );
     364                                        printf( __( '<span class="customize-action">Previewing theme</span> %s' ), $this->title );
    360365                                }
    361366                                ?>
    362367
    363368                                <button type="button" class="button change-theme"><?php _ex( 'Change', 'theme' ); ?></button>
    364369                        </h3>
    365370                        <div class="customize-themes-panel control-panel-content themes-php">
    366                                 <h2>
     371                                <h3 class="accordion-section-title customize-section-title">
     372                                        <span class="customize-action"><?php _e( 'Customizing' ); ?></span>
    367373                                        <?php _e( 'Themes' ); ?>
    368374                                        <span class="title-count theme-count"><?php echo count( $this->controls ) + 1 /* Active theme */; ?></span>
    369                                 </h2>
    370 
     375                                </h3>
    371376                                <h3 class="accordion-section-title customize-section-title">
    372377                                        <?php
    373378                                        if ( $this->manager->is_theme_active() ) {
    374379                                                /* translators: %s: theme name */
    375                                                 printf( __( '<span>Active theme</span> %s' ), $this->title );
     380                                                printf( __( '<span class="customize-action">Active theme</span> %s' ), $this->title );
    376381                                        } else {
    377382                                                /* translators: %s: theme name */
    378                                                 printf( __( '<span>Previewing theme</span> %s' ), $this->title );
     383                                                printf( __( '<span class="customize-action">Previewing theme</span> %s' ), $this->title );
    379384                                        }
    380385                                        ?>
    381386                                        <button type="button" class="button customize-theme"><?php _e( 'Customize' ); ?></button>
  • src/wp-includes/class-wp-customize-widgets.php

    diff --git src/wp-includes/class-wp-customize-widgets.php src/wp-includes/class-wp-customize-widgets.php
    index bf0d3ec..2eac13e 100644
    final class WP_Customize_Widgets { 
    681681                ?>
    682682                <div id="widgets-left"><!-- compatibility with JS which looks for widget templates here -->
    683683                <div id="available-widgets">
     684                        <h3 class="customize-section-title" tabindex="0">
     685                                <span class="customize-action"><?php _e( 'Customizing' ); echo ' &#9656; '; _e( 'Widgets' ); ?></span>
     686                                <?php _e( 'Add a Widget' ); ?>
     687                                <span class="screen-reader-text"><?php _e( 'Press return or enter to close' ); ?></span>
     688                        </h3>
    684689                        <div id="available-widgets-filter">
    685690                                <label class="screen-reader-text" for="widgets-search"><?php _e( 'Search Widgets' ); ?></label>
    686691                                <input type="search" id="widgets-search" placeholder="<?php esc_attr_e( 'Search widgets&hellip;' ) ?>" />
  • src/wp-includes/js/media-audiovideo.js

    diff --git src/wp-includes/js/media-audiovideo.js src/wp-includes/js/media-audiovideo.js
    index cf9d755..75f9e2e 100644
     
    1 (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
     1(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/audiovideo.manifest.js":[function(require,module,exports){
    22/*globals wp, _ */
    33
    44var media = wp.media,
    media.view.MediaDetails = require( './views/media-details.js' ); 
    217217media.view.AudioDetails = require( './views/audio-details.js' );
    218218media.view.VideoDetails = require( './views/video-details.js' );
    219219
    220 },{"./controllers/audio-details.js":2,"./controllers/video-details.js":3,"./models/post-media.js":4,"./views/audio-details.js":5,"./views/frame/audio-details.js":6,"./views/frame/media-details.js":7,"./views/frame/video-details.js":8,"./views/media-details.js":9,"./views/video-details.js":10}],2:[function(require,module,exports){
     220},{"./controllers/audio-details.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/audio-details.js","./controllers/video-details.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/video-details.js","./models/post-media.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/models/post-media.js","./views/audio-details.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/audio-details.js","./views/frame/audio-details.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/frame/audio-details.js","./views/frame/media-details.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/frame/media-details.js","./views/frame/video-details.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/frame/video-details.js","./views/media-details.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/media-details.js","./views/video-details.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/video-details.js"}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/audio-details.js":[function(require,module,exports){
    221221/*globals wp */
    222222
    223223/**
    AudioDetails = State.extend({ 
    252252
    253253module.exports = AudioDetails;
    254254
    255 },{}],3:[function(require,module,exports){
     255},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/video-details.js":[function(require,module,exports){
    256256/*globals wp */
    257257
    258258/**
    VideoDetails = State.extend({ 
    287287
    288288module.exports = VideoDetails;
    289289
    290 },{}],4:[function(require,module,exports){
     290},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/models/post-media.js":[function(require,module,exports){
    291291/*globals wp, Backbone, _ */
    292292
    293293/**
    var PostMedia = Backbone.Model.extend({ 
    331331
    332332module.exports = PostMedia;
    333333
    334 },{}],5:[function(require,module,exports){
     334},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/audio-details.js":[function(require,module,exports){
    335335/*globals wp */
    336336
    337337/**
    AudioDetails = MediaDetails.extend({ 
    371371
    372372module.exports = AudioDetails;
    373373
    374 },{}],6:[function(require,module,exports){
     374},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/frame/audio-details.js":[function(require,module,exports){
    375375/*globals wp */
    376376
    377377/**
    AudioDetails = MediaDetails.extend({ 
    449449
    450450module.exports = AudioDetails;
    451451
    452 },{}],7:[function(require,module,exports){
     452},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/frame/media-details.js":[function(require,module,exports){
    453453/*globals wp */
    454454
    455455/**
    MediaDetails = Select.extend({ 
    581581
    582582module.exports = MediaDetails;
    583583
    584 },{}],8:[function(require,module,exports){
     584},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/frame/video-details.js":[function(require,module,exports){
    585585/*globals wp, _ */
    586586
    587587/**
    VideoDetails = MediaDetails.extend({ 
    718718
    719719module.exports = VideoDetails;
    720720
    721 },{}],9:[function(require,module,exports){
     721},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/media-details.js":[function(require,module,exports){
    722722/*global wp, jQuery, _, MediaElementPlayer */
    723723
    724724/**
    MediaDetails = AttachmentDisplay.extend({ 
    886886
    887887module.exports = MediaDetails;
    888888
    889 },{}],10:[function(require,module,exports){
     889},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/video-details.js":[function(require,module,exports){
    890890/*globals wp */
    891891
    892892/**
    VideoDetails = MediaDetails.extend({ 
    931931
    932932module.exports = VideoDetails;
    933933
    934 },{}]},{},[1]);
     934},{}]},{},["/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/audiovideo.manifest.js"])
     935//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9ncnVudC1icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJzcmMvd3AtaW5jbHVkZXMvanMvbWVkaWEvYXVkaW92aWRlby5tYW5pZmVzdC5qcyIsInNyYy93cC1pbmNsdWRlcy9qcy9tZWRpYS9jb250cm9sbGVycy9hdWRpby1kZXRhaWxzLmpzIiwic3JjL3dwLWluY2x1ZGVzL2pzL21lZGlhL2NvbnRyb2xsZXJzL3ZpZGVvLWRldGFpbHMuanMiLCJzcmMvd3AtaW5jbHVkZXMvanMvbWVkaWEvbW9kZWxzL3Bvc3QtbWVkaWEuanMiLCJzcmMvd3AtaW5jbHVkZXMvanMvbWVkaW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VkaWE6IGZ1bmN0aW9uKCkge1xuXHRcdHZhciB2aWRlbyA9IHRoaXMuJCgnLndwLXZpZGVvLXNob3J0Y29kZScpO1xuXG5cdFx0aWYgKCB2aWRlby5maW5kKCAnc291cmNlJyApLmxlbmd0aCApIHtcblx0XHRcdGlmICggdmlkZW8uaXMoJzpoaWRkZW4nKSApIHtcblx0XHRcdFx0dmlkZW8uc2hvdygpO1xuXHRcdFx0fVxuXG5cdFx0XHRpZiAoICEgdmlkZW8uaGFzQ2xhc3MoICd5b3V0dWJlLXZpZGVvJyApICYmICEgdmlkZW8uaGFzQ2xhc3MoICd2aW1lby12aWRlbycgKSApIHtcblx0XHRcdFx0dGhpcy5tZWRpYSA9IE1lZGlhRGV0YWlscy5wcmVwYXJlU3JjKCB2aWRlby5nZXQoMCkgKTtcblx0XHRcdH0gZWxzZSB7XG5cdFx0XHRcdHRoaXMubWVkaWEgPSB2aWRlby5nZXQoMCk7XG5cdFx0XHR9XG5cdFx0fSBlbHNlIHtcblx0XHRcdHZpZGVvLmhpZGUoKTtcblx0XHRcdHRoaXMubWVkaWEgPSBmYWxzZTtcblx0XHR9XG5cblx0XHRyZXR1cm4gdGhpcztcblx0fVxufSk7XG5cbm1vZHVsZS5leHBvcnRzID0gVmlkZW9EZXRhaWxzO1xuIl19
  • src/wp-includes/js/media-grid.js

    diff --git src/wp-includes/js/media-grid.js src/wp-includes/js/media-grid.js
    index 622c0ae..87ee9df 100644
     
    1 (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
     1(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/edit-attachment-metadata.js":[function(require,module,exports){
    22/*globals wp */
    33
    44/**
    EditAttachmentMetadata = wp.media.controller.State.extend({ 
    2828
    2929module.exports = EditAttachmentMetadata;
    3030
    31 },{}],2:[function(require,module,exports){
     31},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/grid.manifest.js":[function(require,module,exports){
    3232/*globals wp */
    3333
    3434var media = wp.media;
    media.view.SelectModeToggleButton = require( './views/button/select-mode-toggle. 
    4343media.view.DeleteSelectedButton = require( './views/button/delete-selected.js' );
    4444media.view.DeleteSelectedPermanentlyButton = require( './views/button/delete-selected-permanently.js' );
    4545
    46 },{"./controllers/edit-attachment-metadata.js":1,"./routers/manage.js":3,"./views/attachment/details-two-column.js":4,"./views/button/delete-selected-permanently.js":5,"./views/button/delete-selected.js":6,"./views/button/select-mode-toggle.js":7,"./views/edit-image-details.js":8,"./views/frame/edit-attachments.js":9,"./views/frame/manage.js":10}],3:[function(require,module,exports){
     46},{"./controllers/edit-attachment-metadata.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/edit-attachment-metadata.js","./routers/manage.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/routers/manage.js","./views/attachment/details-two-column.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachment/details-two-column.js","./views/button/delete-selected-permanently.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/button/delete-selected-permanently.js","./views/button/delete-selected.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/button/delete-selected.js","./views/button/select-mode-toggle.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/button/select-mode-toggle.js","./views/edit-image-details.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/edit-image-details.js","./views/frame/edit-attachments.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/frame/edit-attachments.js","./views/frame/manage.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/frame/manage.js"}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/routers/manage.js":[function(require,module,exports){
    4747/*globals wp, Backbone */
    4848
    4949/**
    var Router = Backbone.Router.extend({ 
    112112
    113113module.exports = Router;
    114114
    115 },{}],4:[function(require,module,exports){
     115},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachment/details-two-column.js":[function(require,module,exports){
    116116/*globals wp */
    117117
    118118/**
    TwoColumn = Details.extend({ 
    157157
    158158module.exports = TwoColumn;
    159159
    160 },{}],5:[function(require,module,exports){
     160},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/button/delete-selected-permanently.js":[function(require,module,exports){
    161161/*globals wp */
    162162
    163163/**
    DeleteSelectedPermanently = DeleteSelected.extend({ 
    206206
    207207module.exports = DeleteSelectedPermanently;
    208208
    209 },{}],6:[function(require,module,exports){
     209},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/button/delete-selected.js":[function(require,module,exports){
    210210/*globals wp */
    211211
    212212/**
    DeleteSelected = Button.extend({ 
    261261
    262262module.exports = DeleteSelected;
    263263
    264 },{}],7:[function(require,module,exports){
     264},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/button/select-mode-toggle.js":[function(require,module,exports){
    265265/*globals wp */
    266266
    267267/**
    SelectModeToggle = Button.extend({ 
    327327
    328328module.exports = SelectModeToggle;
    329329
    330 },{}],8:[function(require,module,exports){
     330},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/edit-image-details.js":[function(require,module,exports){
    331331/*globals wp, _ */
    332332
    333333/**
    Details = EditImage.extend({ 
    364364
    365365module.exports = Details;
    366366
    367 },{}],9:[function(require,module,exports){
     367},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/frame/edit-attachments.js":[function(require,module,exports){
    368368/*globals wp, _, jQuery */
    369369
    370370/**
    EditAttachments = MediaFrame.extend({ 
    609609
    610610module.exports = EditAttachments;
    611611
    612 },{}],10:[function(require,module,exports){
     612},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/frame/manage.js":[function(require,module,exports){
    613613/*globals wp, _, Backbone */
    614614
    615615/**
    Manage = MediaFrame.extend({ 
    892892
    893893module.exports = Manage;
    894894
    895 },{}]},{},[2]);
     895},{}]},{},["/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/grid.manifest.js"])
     896//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9ncnVudC1icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJzcmMvd3AtaW5jbHVkZXMvanMvbWVkaWEvY29udHJvbGxlcnMvZWRpdC1hdHRhY2htZW50LW1ldGFkYXRhLmpzIiwic3JjL3dwLWluY2x1ZGVzL2pzL21lZGlhL2dyaWQubWFuaWZlc3QuanMiLCJzcmMvd3AtaW5jbHVkZXMvanMvbWVkaWEvcm91dGVycy9tYW5hZ2UuanMiLCJzc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LnN0YXJ0SGlzdG9yeSwgdGhpcyApICk7XG5cdH0sXG5cblx0c3RhcnRIaXN0b3J5OiBmdW5jdGlvbigpIHtcblx0XHQvLyBWZXJpZnkgcHVzaFN0YXRlIHN1cHBvcnQgYW5kIGFjdGl2YXRlXG5cdFx0aWYgKCB3aW5kb3cuaGlzdG9yeSAmJiB3aW5kb3cuaGlzdG9yeS5wdXNoU3RhdGUgKSB7XG5cdFx0XHRCYWNrYm9uZS5oaXN0b3J5LnN0YXJ0KCB7XG5cdFx0XHRcdHJvb3Q6IHdpbmRvdy5fd3BNZWRpYUdyaWRTZXR0aW5ncy5hZG1pblVybCxcblx0XHRcdFx0cHVzaFN0YXRlOiB0cnVlXG5cdFx0XHR9ICk7XG5cdFx0fVxuXHR9XG59KTtcblxubW9kdWxlLmV4cG9ydHMgPSBNYW5hZ2U7XG4iXX0=
  • src/wp-includes/js/media-models.js

    diff --git src/wp-includes/js/media-models.js src/wp-includes/js/media-models.js
    index 4bc7f61..fefd073 100644
     
    1 (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
     1(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/models.manifest.js":[function(require,module,exports){
    22/*globals wp, _, jQuery */
    33
    44var $ = jQuery,
    $(window).on('unload', function(){ 
    231231        window.wp = null;
    232232});
    233233
    234 },{"./models/attachment.js":2,"./models/attachments.js":3,"./models/post-image.js":4,"./models/query.js":5,"./models/selection.js":6}],2:[function(require,module,exports){
     234},{"./models/attachment.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/models/attachment.js","./models/attachments.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/models/attachments.js","./models/post-image.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/models/post-image.js","./models/query.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/models/query.js","./models/selection.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/models/selection.js"}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/models/attachment.js":[function(require,module,exports){
    235235/*globals wp, _, Backbone */
    236236
    237237/**
    Attachment = Backbone.Model.extend({ 
    401401
    402402module.exports = Attachment;
    403403
    404 },{}],3:[function(require,module,exports){
     404},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/models/attachments.js":[function(require,module,exports){
    405405/*globals wp, _, Backbone */
    406406
    407407/**
    var Attachments = Backbone.Collection.extend({ 
    935935
    936936module.exports = Attachments;
    937937
    938 },{}],4:[function(require,module,exports){
     938},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/models/post-image.js":[function(require,module,exports){
    939939/*globals Backbone */
    940940
    941941/**
    var PostImage = Backbone.Model.extend({ 
    10911091
    10921092module.exports = PostImage;
    10931093
    1094 },{}],5:[function(require,module,exports){
     1094},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/models/query.js":[function(require,module,exports){
    10951095/*globals wp, _ */
    10961096
    10971097/**
    Query = Attachments.extend({ 
    14011401
    14021402module.exports = Query;
    14031403
    1404 },{}],6:[function(require,module,exports){
     1404},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/models/selection.js":[function(require,module,exports){
    14051405/*globals wp, _ */
    14061406
    14071407/**
    Selection = Attachments.extend({ 
    15001500
    15011501module.exports = Selection;
    15021502
    1503 },{}]},{},[1]);
     1503},{}]},{},["/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/models.manifest.js"])
     1504//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9ncnVudC1icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJzcmMvd3AtaW5jbHVkZXMvanMvbWVkaWEvbW9kZWxzLm1hbmlmZXN0LmpzIiwic3JjL3dwLWluY2x1ZGVzL2pzL21lZGlhL21vZGVscy9hdHRhY2htZW50LmpzIiwic3JjL3dwLWluY2x1ZGVzL2pzL21lZGlhL21vZGVscy9hdHRhY2htZW50cy5qcyIsInNyYy93cC1pbmNsdWRlcy9qcy9tZWRpYS9tb2RlbHMvcG9zdC1pbWFnZS5qcyIsInNyYy93cC1pbmNsdWRlcy9qcy9tZWRpYS9tb2RlbHMvcXVlcnkuanMiLCJzcmMvd3AtaW5jbHVkZXMvanMvbWVkaWEvbW9kZWxzL3NlbGVjdGlvbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQ0FBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QU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B0aGlzLl9zaW5nbGUgKSB7XG5cdFx0XHRcdHRoaXMuX3NpbmdsZS50cmlnZ2VyKCAnc2VsZWN0aW9uOnNpbmdsZScsIHRoaXMuX3NpbmdsZSwgdGhpcyApO1xuXHRcdFx0fVxuXHRcdH1cblxuXHRcdC8vIFJldHVybiB0aGUgc2luZ2xlIG1vZGVsLCBvciB0aGUgbGFzdCBtb2RlbCBhcyBhIGZhbGxiYWNrLlxuXHRcdHJldHVybiB0aGlzLl9zaW5nbGU7XG5cdH1cbn0pO1xuXG5tb2R1bGUuZXhwb3J0cyA9IFNlbGVjdGlvbjtcbiJdfQ==
  • src/wp-includes/js/media-views.js

    diff --git src/wp-includes/js/media-views.js src/wp-includes/js/media-views.js
    index fc29b3e..aa2f7fa 100644
     
    1 (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
     1(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/collection-add.js":[function(require,module,exports){
    22/*globals wp, _ */
    33
    44/**
    CollectionAdd = Library.extend({ 
    101101
    102102module.exports = CollectionAdd;
    103103
    104 },{}],2:[function(require,module,exports){
     104},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/collection-edit.js":[function(require,module,exports){
    105105/*globals wp, Backbone */
    106106
    107107/**
    CollectionEdit = Library.extend({ 
    265265
    266266module.exports = CollectionEdit;
    267267
    268 },{}],3:[function(require,module,exports){
     268},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/cropper.js":[function(require,module,exports){
    269269/*globals wp, _, Backbone */
    270270
    271271/**
    Cropper = wp.media.controller.State.extend({ 
    383383
    384384module.exports = Cropper;
    385385
    386 },{}],4:[function(require,module,exports){
     386},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/edit-image.js":[function(require,module,exports){
    387387/*globals wp */
    388388
    389389/**
    EditImage = wp.media.controller.State.extend({ 
    461461
    462462module.exports = EditImage;
    463463
    464 },{}],5:[function(require,module,exports){
     464},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/embed.js":[function(require,module,exports){
    465465/*globals wp, _, Backbone */
    466466
    467467/**
    Embed = wp.media.controller.State.extend({ 
    599599
    600600module.exports = Embed;
    601601
    602 },{}],6:[function(require,module,exports){
     602},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/featured-image.js":[function(require,module,exports){
    603603/*globals wp, _ */
    604604
    605605/**
    FeaturedImage = Library.extend({ 
    723723
    724724module.exports = FeaturedImage;
    725725
    726 },{}],7:[function(require,module,exports){
     726},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/gallery-add.js":[function(require,module,exports){
    727727/*globals wp, _ */
    728728
    729729/**
    GalleryAdd = Library.extend({ 
    816816
    817817module.exports = GalleryAdd;
    818818
    819 },{}],8:[function(require,module,exports){
     819},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/gallery-edit.js":[function(require,module,exports){
    820820/*globals wp */
    821821
    822822/**
    GalleryEdit = Library.extend({ 
    960960
    961961module.exports = GalleryEdit;
    962962
    963 },{}],9:[function(require,module,exports){
     963},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/image-details.js":[function(require,module,exports){
    964964/*globals wp, _ */
    965965
    966966/**
    ImageDetails = State.extend({ 
    10241024
    10251025module.exports = ImageDetails;
    10261026
    1027 },{}],10:[function(require,module,exports){
     1027},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/library.js":[function(require,module,exports){
    10281028/*globals wp, _, Backbone */
    10291029
    10301030/**
    _.extend( Library.prototype, wp.media.selectionSync ); 
    12981298
    12991299module.exports = Library;
    13001300
    1301 },{}],11:[function(require,module,exports){
     1301},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/media-library.js":[function(require,module,exports){
    13021302/*globals wp, _ */
    13031303
    13041304/**
    MediaLibrary = Library.extend({ 
    13501350
    13511351module.exports = MediaLibrary;
    13521352
    1353 },{}],12:[function(require,module,exports){
     1353},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/region.js":[function(require,module,exports){
    13541354/*globals Backbone, _ */
    13551355
    13561356/**
    _.extend( Region.prototype, { 
    15311531
    15321532module.exports = Region;
    15331533
    1534 },{}],13:[function(require,module,exports){
     1534},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/replace-image.js":[function(require,module,exports){
    15351535/*globals wp, _ */
    15361536
    15371537/**
    ReplaceImage = Library.extend({ 
    16411641
    16421642module.exports = ReplaceImage;
    16431643
    1644 },{}],14:[function(require,module,exports){
     1644},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/state-machine.js":[function(require,module,exports){
    16451645/*globals _, Backbone */
    16461646
    16471647/**
    _.each([ 'on', 'off', 'trigger' ], function( method ) { 
    17671767
    17681768module.exports = StateMachine;
    17691769
    1770 },{}],15:[function(require,module,exports){
     1770},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/state.js":[function(require,module,exports){
    17711771/*globals _, Backbone */
    17721772
    17731773/**
    _.each(['toolbar','content'], function( region ) { 
    20102010
    20112011module.exports = State;
    20122012
    2013 },{}],16:[function(require,module,exports){
     2013},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/utils/selection-sync.js":[function(require,module,exports){
    20142014/*globals _ */
    20152015
    20162016/**
    var selectionSync = { 
    20782078
    20792079module.exports = selectionSync;
    20802080
    2081 },{}],17:[function(require,module,exports){
     2081},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views.manifest.js":[function(require,module,exports){
    20822082/*globals wp, jQuery, _, Backbone */
    20832083
    20842084var media = wp.media,
    media.view.Cropper = require( './views/cropper.js' ); 
    22272227media.view.EditImage = require( './views/edit-image.js' );
    22282228media.view.Spinner = require( './views/spinner.js' );
    22292229
    2230 },{"./controllers/collection-add.js":1,"./controllers/collection-edit.js":2,"./controllers/cropper.js":3,"./controllers/edit-image.js":4,"./controllers/embed.js":5,"./controllers/featured-image.js":6,"./controllers/gallery-add.js":7,"./controllers/gallery-edit.js":8,"./controllers/image-details.js":9,"./controllers/library.js":10,"./controllers/media-library.js":11,"./controllers/region.js":12,"./controllers/replace-image.js":13,"./controllers/state-machine.js":14,"./controllers/state.js":15,"./utils/selection-sync.js":16,"./views/attachment-compat.js":18,"./views/attachment-filters.js":19,"./views/attachment-filters/all.js":20,"./views/attachment-filters/date.js":21,"./views/attachment-filters/uploaded.js":22,"./views/attachment.js":23,"./views/attachment/details.js":24,"./views/attachment/edit-library.js":25,"./views/attachment/edit-selection.js":26,"./views/attachment/library.js":27,"./views/attachment/selection.js":28,"./views/attachments.js":29,"./views/attachments/browser.js":30,"./views/attachments/selection.js":31,"./views/button-group.js":32,"./views/button.js":33,"./views/cropper.js":34,"./views/edit-image.js":35,"./views/embed.js":36,"./views/embed/image.js":37,"./views/embed/link.js":38,"./views/embed/url.js":39,"./views/focus-manager.js":40,"./views/frame.js":41,"./views/frame/image-details.js":42,"./views/frame/post.js":43,"./views/frame/select.js":44,"./views/iframe.js":45,"./views/image-details.js":46,"./views/label.js":47,"./views/media-frame.js":48,"./views/menu-item.js":49,"./views/menu.js":50,"./views/modal.js":51,"./views/priority-list.js":52,"./views/router-item.js":53,"./views/router.js":54,"./views/search.js":55,"./views/selection.js":56,"./views/settings.js":57,"./views/settings/attachment-display.js":58,"./views/settings/gallery.js":59,"./views/settings/playlist.js":60,"./views/sidebar.js":61,"./views/spinner.js":62,"./views/toolbar.js":63,"./views/toolbar/embed.js":64,"./views/toolbar/select.js":65,"./views/uploader/editor.js":66,"./views/uploader/inline.js":67,"./views/uploader/status-error.js":68,"./views/uploader/status.js":69,"./views/uploader/window.js":70,"./views/view.js":71}],18:[function(require,module,exports){
     2230},{"./controllers/collection-add.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/collection-add.js","./controllers/collection-edit.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/collection-edit.js","./controllers/cropper.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/cropper.js","./controllers/edit-image.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/edit-image.js","./controllers/embed.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/embed.js","./controllers/featured-image.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/featured-image.js","./controllers/gallery-add.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/gallery-add.js","./controllers/gallery-edit.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/gallery-edit.js","./controllers/image-details.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/image-details.js","./controllers/library.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/library.js","./controllers/media-library.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/media-library.js","./controllers/region.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/region.js","./controllers/replace-image.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/replace-image.js","./controllers/state-machine.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/state-machine.js","./controllers/state.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/controllers/state.js","./utils/selection-sync.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/utils/selection-sync.js","./views/attachment-compat.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachment-compat.js","./views/attachment-filters.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachment-filters.js","./views/attachment-filters/all.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachment-filters/all.js","./views/attachment-filters/date.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachment-filters/date.js","./views/attachment-filters/uploaded.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachment-filters/uploaded.js","./views/attachment.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachment.js","./views/attachment/details.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachment/details.js","./views/attachment/edit-library.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachment/edit-library.js","./views/attachment/edit-selection.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachment/edit-selection.js","./views/attachment/library.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachment/library.js","./views/attachment/selection.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachment/selection.js","./views/attachments.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachments.js","./views/attachments/browser.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachments/browser.js","./views/attachments/selection.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachments/selection.js","./views/button-group.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/button-group.js","./views/button.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/button.js","./views/cropper.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/cropper.js","./views/edit-image.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/edit-image.js","./views/embed.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/embed.js","./views/embed/image.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/embed/image.js","./views/embed/link.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/embed/link.js","./views/embed/url.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/embed/url.js","./views/focus-manager.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/focus-manager.js","./views/frame.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/frame.js","./views/frame/image-details.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/frame/image-details.js","./views/frame/post.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/frame/post.js","./views/frame/select.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/frame/select.js","./views/iframe.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/iframe.js","./views/image-details.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/image-details.js","./views/label.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/label.js","./views/media-frame.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/media-frame.js","./views/menu-item.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/menu-item.js","./views/menu.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/menu.js","./views/modal.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/modal.js","./views/priority-list.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/priority-list.js","./views/router-item.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/router-item.js","./views/router.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/router.js","./views/search.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/search.js","./views/selection.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/selection.js","./views/settings.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/settings.js","./views/settings/attachment-display.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/settings/attachment-display.js","./views/settings/gallery.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/settings/gallery.js","./views/settings/playlist.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/settings/playlist.js","./views/sidebar.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/sidebar.js","./views/spinner.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/spinner.js","./views/toolbar.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/toolbar.js","./views/toolbar/embed.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/toolbar/embed.js","./views/toolbar/select.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/toolbar/select.js","./views/uploader/editor.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/uploader/editor.js","./views/uploader/inline.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/uploader/inline.js","./views/uploader/status-error.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/uploader/status-error.js","./views/uploader/status.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/uploader/status.js","./views/uploader/window.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/uploader/window.js","./views/view.js":"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/view.js"}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachment-compat.js":[function(require,module,exports){
    22312231/*globals _ */
    22322232
    22332233/**
    AttachmentCompat = View.extend({ 
    23142314
    23152315module.exports = AttachmentCompat;
    23162316
    2317 },{}],19:[function(require,module,exports){
     2317},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachment-filters.js":[function(require,module,exports){
    23182318/*globals _, jQuery */
    23192319
    23202320/**
    AttachmentFilters = wp.media.View.extend({ 
    23932393
    23942394module.exports = AttachmentFilters;
    23952395
    2396 },{}],20:[function(require,module,exports){
     2396},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachment-filters/all.js":[function(require,module,exports){
    23972397/*globals wp */
    23982398
    23992399/**
    All = wp.media.view.AttachmentFilters.extend({ 
    24852485
    24862486module.exports = All;
    24872487
    2488 },{}],21:[function(require,module,exports){
     2488},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachment-filters/date.js":[function(require,module,exports){
    24892489/*globals wp, _ */
    24902490
    24912491/**
    DateFilter = wp.media.view.AttachmentFilters.extend({ 
    25282528
    25292529module.exports = DateFilter;
    25302530
    2531 },{}],22:[function(require,module,exports){
     2531},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachment-filters/uploaded.js":[function(require,module,exports){
    25322532/*globals wp */
    25332533
    25342534/**
    Uploaded = wp.media.view.AttachmentFilters.extend({ 
    25892589
    25902590module.exports = Uploaded;
    25912591
    2592 },{}],23:[function(require,module,exports){
     2592},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachment.js":[function(require,module,exports){
    25932593/*globals wp, _, jQuery */
    25942594
    25952595/**
    _.each({ 
    31453145
    31463146module.exports = Attachment;
    31473147
    3148 },{}],24:[function(require,module,exports){
     3148},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachment/details.js":[function(require,module,exports){
    31493149/*globals wp, _ */
    31503150
    31513151/**
    Details = Attachment.extend({ 
    32873287
    32883288module.exports = Details;
    32893289
    3290 },{}],25:[function(require,module,exports){
     3290},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachment/edit-library.js":[function(require,module,exports){
    32913291/*globals wp */
    32923292
    32933293/**
    var EditLibrary = wp.media.view.Attachment.extend({ 
    33073307
    33083308module.exports = EditLibrary;
    33093309
    3310 },{}],26:[function(require,module,exports){
     3310},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachment/edit-selection.js":[function(require,module,exports){
    33113311/*globals wp */
    33123312
    33133313/**
    var EditSelection = wp.media.view.Attachment.Selection.extend({ 
    33283328
    33293329module.exports = EditSelection;
    33303330
    3331 },{}],27:[function(require,module,exports){
     3331},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachment/library.js":[function(require,module,exports){
    33323332/*globals wp */
    33333333
    33343334/**
    var Library = wp.media.view.Attachment.extend({ 
    33483348
    33493349module.exports = Library;
    33503350
    3351 },{}],28:[function(require,module,exports){
     3351},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachment/selection.js":[function(require,module,exports){
    33523352/*globals wp */
    33533353
    33543354/**
    var Selection = wp.media.view.Attachment.extend({ 
    33723372
    33733373module.exports = Selection;
    33743374
    3375 },{}],29:[function(require,module,exports){
     3375},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachments.js":[function(require,module,exports){
    33763376/*globals wp, _, jQuery */
    33773377
    33783378/**
    Attachments = View.extend({ 
    36733673
    36743674module.exports = Attachments;
    36753675
    3676 },{}],30:[function(require,module,exports){
     3676},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachments/browser.js":[function(require,module,exports){
    36773677/*globals wp, _, jQuery */
    36783678
    36793679/**
    AttachmentsBrowser = View.extend({ 
    41194119
    41204120module.exports = AttachmentsBrowser;
    41214121
    4122 },{}],31:[function(require,module,exports){
     4122},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/attachments/selection.js":[function(require,module,exports){
    41234123/*globals wp, _ */
    41244124
    41254125/**
    Selection = Attachments.extend({ 
    41514151
    41524152module.exports = Selection;
    41534153
    4154 },{}],32:[function(require,module,exports){
     4154},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/button-group.js":[function(require,module,exports){
    41554155/*globals _, Backbone */
    41564156
    41574157/**
    ButtonGroup = wp.media.View.extend({ 
    41994199
    42004200module.exports = ButtonGroup;
    42014201
    4202 },{}],33:[function(require,module,exports){
     4202},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/button.js":[function(require,module,exports){
    42034203/*globals _, Backbone */
    42044204
    42054205/**
    var Button = wp.media.View.extend({ 
    42874287
    42884288module.exports = Button;
    42894289
    4290 },{}],34:[function(require,module,exports){
     4290},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/cropper.js":[function(require,module,exports){
    42914291/*globals wp, _, jQuery */
    42924292
    42934293/**
    Cropper = View.extend({ 
    43564356
    43574357module.exports = Cropper;
    43584358
    4359 },{}],35:[function(require,module,exports){
     4359},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/edit-image.js":[function(require,module,exports){
    43604360/*globals wp, _ */
    43614361
    43624362/**
    EditImage = View.extend({ 
    44144414
    44154415module.exports = EditImage;
    44164416
    4417 },{}],36:[function(require,module,exports){
     4417},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/embed.js":[function(require,module,exports){
    44184418/**
    44194419 * wp.media.view.Embed
    44204420 *
    var Embed = wp.media.View.extend({ 
    44784478
    44794479module.exports = Embed;
    44804480
    4481 },{}],37:[function(require,module,exports){
     4481},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/embed/image.js":[function(require,module,exports){
    44824482/*globals wp */
    44834483
    44844484/**
    EmbedImage = AttachmentDisplay.extend({ 
    45134513
    45144514module.exports = EmbedImage;
    45154515
    4516 },{}],38:[function(require,module,exports){
     4516},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/embed/link.js":[function(require,module,exports){
    45174517/*globals wp, _, jQuery */
    45184518
    45194519/**
    EmbedLink = wp.media.view.Settings.extend({ 
    46044604
    46054605module.exports = EmbedLink;
    46064606
    4607 },{}],39:[function(require,module,exports){
     4607},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/embed/url.js":[function(require,module,exports){
    46084608/*globals wp, _, jQuery */
    46094609
    46104610/**
    EmbedUrl = View.extend({ 
    46854685
    46864686module.exports = EmbedUrl;
    46874687
    4688 },{}],40:[function(require,module,exports){
     4688},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/focus-manager.js":[function(require,module,exports){
    46894689/**
    46904690 * wp.media.view.FocusManager
    46914691 *
    var FocusManager = wp.media.View.extend({ 
    47314731
    47324732module.exports = FocusManager;
    47334733
    4734 },{}],41:[function(require,module,exports){
     4734},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/frame.js":[function(require,module,exports){
    47354735/*globals _, Backbone */
    47364736
    47374737/**
    _.extend( Frame.prototype, wp.media.controller.StateMachine.prototype ); 
    48994899
    49004900module.exports = Frame;
    49014901
    4902 },{}],42:[function(require,module,exports){
     4902},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/frame/image-details.js":[function(require,module,exports){
    49034903/*globals wp */
    49044904
    49054905/**
    ImageDetails = Select.extend({ 
    50785078
    50795079module.exports = ImageDetails;
    50805080
    5081 },{}],43:[function(require,module,exports){
     5081},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/frame/post.js":[function(require,module,exports){
    50825082/*globals wp, _ */
    50835083
    50845084/**
    Post = Select.extend({ 
    58155815
    58165816module.exports = Post;
    58175817
    5818 },{}],44:[function(require,module,exports){
     5818},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/frame/select.js":[function(require,module,exports){
    58195819/*globals wp, _ */
    58205820
    58215821/**
    Select = MediaFrame.extend({ 
    59885988
    59895989module.exports = Select;
    59905990
    5991 },{}],45:[function(require,module,exports){
     5991},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/iframe.js":[function(require,module,exports){
    59925992/**
    59935993 * wp.media.view.Iframe
    59945994 *
    var Iframe = wp.media.View.extend({ 
    60126012
    60136013module.exports = Iframe;
    60146014
    6015 },{}],46:[function(require,module,exports){
     6015},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/image-details.js":[function(require,module,exports){
    60166016/*globals wp, _, jQuery */
    60176017
    60186018/**
    ImageDetails = AttachmentDisplay.extend({ 
    61826182
    61836183module.exports = ImageDetails;
    61846184
    6185 },{}],47:[function(require,module,exports){
     6185},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/label.js":[function(require,module,exports){
    61866186/**
    61876187 * wp.media.view.Label
    61886188 *
    var Label = wp.media.View.extend({ 
    62086208
    62096209module.exports = Label;
    62106210
    6211 },{}],48:[function(require,module,exports){
     6211},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/media-frame.js":[function(require,module,exports){
    62126212/*globals wp, _, jQuery */
    62136213
    62146214/**
    _.each(['open','close','attach','detach','escape'], function( method ) { 
    64576457
    64586458module.exports = MediaFrame;
    64596459
    6460 },{}],49:[function(require,module,exports){
     6460},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/menu-item.js":[function(require,module,exports){
    64616461/*globals jQuery */
    64626462
    64636463/**
    MenuItem = wp.media.View.extend({ 
    65316531
    65326532module.exports = MenuItem;
    65336533
    6534 },{}],50:[function(require,module,exports){
     6534},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/menu.js":[function(require,module,exports){
    65356535/**
    65366536 * wp.media.view.Menu
    65376537 *
    Menu = PriorityList.extend({ 
    66486648
    66496649module.exports = Menu;
    66506650
    6651 },{}],51:[function(require,module,exports){
     6651},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/modal.js":[function(require,module,exports){
    66526652/*globals wp, _, jQuery */
    66536653
    66546654/**
    Modal = wp.media.View.extend({ 
    68636863
    68646864module.exports = Modal;
    68656865
    6866 },{}],52:[function(require,module,exports){
     6866},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/priority-list.js":[function(require,module,exports){
    68676867/*globals _, Backbone */
    68686868
    68696869/**
    var PriorityList = wp.media.View.extend({ 
    69626962
    69636963module.exports = PriorityList;
    69646964
    6965 },{}],53:[function(require,module,exports){
     6965},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/router-item.js":[function(require,module,exports){
    69666966/**
    69676967 * wp.media.view.RouterItem
    69686968 *
    var RouterItem = wp.media.view.MenuItem.extend({ 
    69866986
    69876987module.exports = RouterItem;
    69886988
    6989 },{}],54:[function(require,module,exports){
     6989},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/router.js":[function(require,module,exports){
    69906990/*globals wp */
    69916991
    69926992/**
    Router = Menu.extend({ 
    70257025
    70267026module.exports = Router;
    70277027
    7028 },{}],55:[function(require,module,exports){
     7028},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/search.js":[function(require,module,exports){
    70297029/*globals wp */
    70307030
    70317031/**
    Search = wp.media.View.extend({ 
    70757075
    70767076module.exports = Search;
    70777077
    7078 },{}],56:[function(require,module,exports){
     7078},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/selection.js":[function(require,module,exports){
    70797079/*globals wp, _, Backbone */
    70807080
    70817081/**
    Selection = wp.media.View.extend({ 
    71607160
    71617161module.exports = Selection;
    71627162
    7163 },{}],57:[function(require,module,exports){
     7163},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/settings.js":[function(require,module,exports){
    71647164/*globals _, Backbone */
    71657165
    71667166/**
    Settings = View.extend({ 
    72837283
    72847284module.exports = Settings;
    72857285
    7286 },{}],58:[function(require,module,exports){
     7286},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/settings/attachment-display.js":[function(require,module,exports){
    72877287/*globals wp, _ */
    72887288
    72897289/**
    AttachmentDisplay = Settings.extend({ 
    73797379
    73807380module.exports = AttachmentDisplay;
    73817381
    7382 },{}],59:[function(require,module,exports){
     7382},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/settings/gallery.js":[function(require,module,exports){
    73837383/*globals wp */
    73847384
    73857385/**
    var Gallery = wp.media.view.Settings.extend({ 
    73987398
    73997399module.exports = Gallery;
    74007400
    7401 },{}],60:[function(require,module,exports){
     7401},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/settings/playlist.js":[function(require,module,exports){
    74027402/*globals wp */
    74037403
    74047404/**
    var Playlist = wp.media.view.Settings.extend({ 
    74177417
    74187418module.exports = Playlist;
    74197419
    7420 },{}],61:[function(require,module,exports){
     7420},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/sidebar.js":[function(require,module,exports){
    74217421/**
    74227422 * wp.media.view.Sidebar
    74237423 *
    var Sidebar = wp.media.view.PriorityList.extend({ 
    74337433
    74347434module.exports = Sidebar;
    74357435
    7436 },{}],62:[function(require,module,exports){
     7436},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/spinner.js":[function(require,module,exports){
    74377437/*globals _ */
    74387438
    74397439/**
    var Spinner = wp.media.View.extend({ 
    74707470
    74717471module.exports = Spinner;
    74727472
    7473 },{}],63:[function(require,module,exports){
     7473},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/toolbar.js":[function(require,module,exports){
    74747474/*globals _, Backbone */
    74757475
    74767476/**
    Toolbar = View.extend({ 
    76327632
    76337633module.exports = Toolbar;
    76347634
    7635 },{}],64:[function(require,module,exports){
     7635},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/toolbar/embed.js":[function(require,module,exports){
    76367636/*globals wp, _ */
    76377637
    76387638/**
    Embed = Select.extend({ 
    76717671
    76727672module.exports = Embed;
    76737673
    7674 },{}],65:[function(require,module,exports){
     7674},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/toolbar/select.js":[function(require,module,exports){
    76757675/*globals wp, _ */
    76767676
    76777677/**
    Select = Toolbar.extend({ 
    77437743
    77447744module.exports = Select;
    77457745
    7746 },{}],66:[function(require,module,exports){
     7746},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/uploader/editor.js":[function(require,module,exports){
    77477747/*globals wp, _, jQuery */
    77487748
    77497749/**
    EditorUploader = View.extend({ 
    79647964
    79657965module.exports = EditorUploader;
    79667966
    7967 },{}],67:[function(require,module,exports){
     7967},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/uploader/inline.js":[function(require,module,exports){
    79687968/*globals wp, _ */
    79697969
    79707970/**
    UploaderInline = View.extend({ 
    80978097
    80988098module.exports = UploaderInline;
    80998099
    8100 },{}],68:[function(require,module,exports){
     8100},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/uploader/status-error.js":[function(require,module,exports){
    81018101/*globals wp */
    81028102
    81038103/**
    var UploaderStatusError = wp.media.View.extend({ 
    81158115
    81168116module.exports = UploaderStatusError;
    81178117
    8118 },{}],69:[function(require,module,exports){
     8118},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/uploader/status.js":[function(require,module,exports){
    81198119/*globals wp, _ */
    81208120
    81218121/**
    UploaderStatus = View.extend({ 
    82558255
    82568256module.exports = UploaderStatus;
    82578257
    8258 },{}],70:[function(require,module,exports){
     8258},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/uploader/window.js":[function(require,module,exports){
    82598259/*globals wp, _, jQuery */
    82608260
    82618261/**
    UploaderWindow = wp.media.View.extend({ 
    83688368
    83698369module.exports = UploaderWindow;
    83708370
    8371 },{}],71:[function(require,module,exports){
     8371},{}],"/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views/view.js":[function(require,module,exports){
    83728372/*globals wp */
    83738373
    83748374/**
    var View = wp.Backbone.View.extend({ 
    84368436
    84378437module.exports = View;
    84388438
    8439 },{}]},{},[17]);
     8439},{}]},{},["/Users/dovy/Development/Sites/wptrunk.dev/trunk/src/wp-includes/js/media/views.manifest.js"])
     8440//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9ncnVudC1icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJzcmMvd3AtaW5jbHVkZXMvanMvbWVkaWEvY29udHJvbGxlcnMvY29sbGVjdGlvbi1hZGQuanMiLCJzcmMvd3AtaW5jbHVkZXMvanMvbWVkaWEvY29udHJvbGxlcnMvY29sbGVjdGlvbi1lZGl0LmpzIiwic3JjL3dwLWluY2x1ZGVzL2pzL21lZGlhL2NvbnRyb2xsZXJzL2Nyb3BwZXIuanMiLCJzcmMvd3AtaW5jbHVkZXMvanMvbWVkaWEvY29udHJvbGxlcnMvZWRpdC1pbWFnZS5qcyIsInNyYy93cC1pbmNsdWRlcy9qcy9tZWRpYS9jb250cm9sbGVycy9lbWJlZC5qcyIsInNyYy93cC1pbmNsdWRlcy9qcy9tZWRpYS9jb250cm9sbGVycy9mZWF0dXJlZC1pbWFnZS5qcyIsInNyYy93cC1pbmNsdWRlcy9qcy9tZWRpYS9jb250cm9sbGVycy9nYWxsZXJ5LWFkZC5qcyIsInNyYy93cC1pbmNsdWRlcy9qcy9tZ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ICAgICAgICAgIFRoZSBhdHRhY2htZW50cyBjb2xsZWN0aW9uIHRvIGJyb3dzZS5cbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJZiBvbmUgaXMgbm90IHN1cHBsaWVkLCBhIGNvbGxlY3Rpb24gb2YgYXR0YWNobWVudHMgb2YgdGhlIHNwZWNpZmllZCB0eXBlIHdpbGwgYmUgY3JlYXRlZC5cbiAqIEBwYXJhbSB7Ym9vbGVhbnxzdHJpbmd9ICAgICAgICAgICAgIFthdHRyaWJ1dGVzLmZpbHRlcmFibGU9dXBsb2FkZWRdICAgICBXaGV0aGVyIHRoZSBsaWJyYXJ5IGlzIGZpbHRlcmFibGUsIGFuZCBpZiBzbyB3aGF0IGZpbHRlcnMgc2hvdWxkIGJlIHNob3duLlxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFjY2VwdHMgJ2FsbCcsICd1cGxvYWRlZCcsIG9yICd1bmF0dGFjaGVkJy5cbiAqIEBwYXJhbSB7c3RyaW5nfSAgICAgICAgICAgICAgICAgICAgIFthdHRyaWJ1dGVzLm1lbnU9Z2FsbGVyeV0gICAgICAgICAgICBJbml0aWFsIG1vZGUgZm9yIHRoZSBtZW51IHJlZ2lvbi5cbiAqIEBwYXJhbSB7c3RyaW5nfSAgICAgICAgICAgICAgICAgICAgIFthdHRyaWJ1dGVzLmNvbnRlbnQ9dXBsb2FkXSAgICAgICAgICBJbml0aWFsIG1vZGUgZm9yIHRoZSBjb250ZW50IHJlZ2lvbi5cbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBPdmVycmlkZGVuIGJ5IHBlcnNpc3RlbnQgdXNlciBzZXR0aW5nIGlmICdjb250ZW50VXNlclNldHRpbmcnIGlzIHR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9kZWwuQXR0YWNobWVudHN9IFthdHRyaWJ1dGVzLmxpYnJhcnldICAgICAgICAgICAgICAgICAgVGhlIGF0dGFjaG1lbnRzIGNvbGxlY3Rpb24gdG8gYnJvd3NlLlxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJZiBvbmUgaXMgbm90IHN1cHBsaWVkLCBhIGNvbGxlY3Rpb24gb2YgYWxsIGltYWdlcyB3aWxsIGJlIGNyZWF0ZWQuXG4gKiBAcGFyYW0ge2Jvb2xlYW59ICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy5tdWx0aXBsZT1mYWxzZV0gICAgICAgICAgIFdoZXRoZXIgbXVsdGktc2VsZWN0IGlzIGVuYWJsZWQuXG4gKiBAcGFyYW0ge3N0cmluZ30gICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy5jb250ZW50PXVwbG9hZF0gICAgICAgICAgIEluaXRpYWwgbW9kZSBmb3IgdGhlIGNvbnRlbnQgcmVnaW9uLlxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBPdmVycmlkZGVuIGJ5IHBlcnNpc3RlbnQgdXNlciBzZXR0aW5nIGlmICdjb250ZW50VXNlclNldHRpbmcnIGlzIHRydWUuXG4gKiBAcGFyYW0ge3N0cmluZ30gICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy5tZW51PWRlZmF1bHRdICAgICAgICAgICAgIEluaXRpYWwgbW9kZSBmb3IgdGhlIG1lbnUgcmVnaW9uLlxuICogQHBhcmFtIHtzdHJpbmd9ICAgICAgICAgICAgICAgICAgICAgW2F0dHJpYnV0ZXMucm91dGVyPWJyb3dzZV0gICAgICAgICAgICBJbml0aWFsIG1vZGUgZm9yIHRoZSByb3V0ZXIgcmVnaW9uLlxuICogQHBhcmFtIHtzdHJpbmd9ICAgICAgICAgICAgICAgICAgICAgW2F0dHJpYnV0ZXMudG9vbGJhcj1mZWF0dXJlZC1pbWFnZV0gICBJbml0aWFsIG1vZGUgZm9yIHRoZSB0b29sYmFyIHJlZ2lvbi5cbiAqIEBwYXJhbSB7aW50fSAgICAgICAgICAgICAgICAgICAgICAgIFthdHRyaWJ1dGVzLnByaW9yaXR5PTYwXSAgICAgICAgICAgICAgVGhlIHByaW9yaXR5IGZvciB0aGUgc3RhdGUgbGluayBpbiB0aGUgbWVkaWEgbWVudS5cbiAqIEBwYXJhbSB7Ym9vbGVhbn0gICAgICAgICAgICAgICAgICAgIFthdHRyaWJ1dGVzLnNlYXJjaGFibGU9dHJ1ZV0gICAgICAgICAgV2hldGhlciB0aGUgbGlicmFyeSBpcyBzZWFyY2hhYmxlLlxuICogQHBhcmFtIHtib29sZWFufHN0cmluZ30gICAgICAgICAgICAgW2F0dHJpYnV0ZXMuZmlsdGVyYWJsZT1mYWxzZV0gICAgICAgICBXaGV0aGVyIHRoZSBsaWJyYXJ5IGlzIGZpbHRlcmFibGUsIGFuZCBpZiBzbyB3aGF0IGZpbHRlcnMgc2hvdWxkIGJlIHNob3duLlxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBY2NlcHRzICdhbGwnLCAndXBsb2FkZWQnLCBvciAndW5hdHRhY2hlZCcuXG4gKiBAcGFyYW0ge2Jvb2xlYW59ICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy5zb3J0YWJsZT10cnVlXSAgICAgICAgICAgIFdoZXRoZXIgdGhlIEF0dGFjaG1lbnRzIHNob3VsZCBiZSBzb3J0YWJsZS4gRGVwZW5kcyBvbiB0aGUgb3JkZXJieSBwcm9wZXJ0eSBiZWluZyBzZXQgdG8gbWVudU9yZGVyIG9uIHRoZSBhdHRhY2htZW50cyBjb2xsZWN0aW9uLlxuICogQHBhcmFtIHtib29sZWFufSAgICAgICAgICA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cmlidXRlcy5maWx0ZXJhYmxlPXVwbG9hZGVkXSAgICAgV2hldGhlciB0aGUgbGlicmFyeSBpcyBmaWx0ZXJhYmxlLCBhbmQgaWYgc28gd2hhdCBmaWx0ZXJzIHNob3VsZCBiZSBzaG93bi5cbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBY2NlcHRzICdhbGwnLCAndXBsb2FkZWQnLCBvciAndW5hdHRhY2hlZCcuXG4gKiBAcGFyYW0ge3N0cmluZ30gICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy5tZW51PWdhbGxlcnldICAgICAgICAgICAgSW5pdGlhbCBtb2RlIGZvciB0aGUgbWVudSByZWdpb24uXG4gKiBAcGFyYW0ge3N0cmluZ30gICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy5jb250ZW50PXVwbG9hZF0gICAgICAgICAgSW5pdGlhbCBtb2RlIGZvciB0aGUgY29udGVudCByZWdpb24uXG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgT3ZlcnJpZGRlbiBieSBwZXJzaXN0ZW50IHVzZXIgc2V0dGluZyBpZiAnY29udGVudFVzZXJTZXR0aW5nJyBpcyB0cnVlLlxuICogQHBhcmFtIHtzdHJpbmd9ICAgICAgICAgICAgICAgICAgICAgW2F0dHJpYnV0ZXMucm91dGVyPWJyb3dzZV0gICAgICAgICAgIEluaXRpYWwgbW9kZSBmb3IgdGhlIHJvdXRlciByZWdpb24uXG4gKiBAcGFyYW0ge3N0cmluZ30gICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy50b29sYmFyPWdhbGxlcnktYWRkXSAgICAgSW5pdGlhbCBtb2RlIGZvciB0aGUgdG9vbGJhciByZWdpb24uXG4gKiBAcGFyYW0ge2Jvb2xlYW59ICAgICAgICAgICAgICAgICAgICBbYXR0c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ZS4gRGlzcGxheXMgaW4gdGhlIG1lZGlhIG1lbnUgYW5kIHRoZSBmcmFtZSdzIHRpdGxlIHJlZ2lvbi5cbiAqIEBwYXJhbSB7d3AubWVkaWEubW9kZWwuQXR0YWNobWVudHN9ICAgICAgW2F0dHJpYnV0ZXMubGlicmFyeV0gICAgICAgICAgICAgICAgIFRoZSBhdHRhY2htZW50cyBjb2xsZWN0aW9uIHRvIGJyb3dzZS5cbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIElmIG9uZSBpcyBub3Qgc3VwcGxpZWQsIGEgY29sbGVjdGlvbiBvZiBhbGwgYXR0YWNobWVudHMgd2lsbCBiZSBjcmVhdGVkLlxuICogQHBhcmFtIHt3cC5tZWRpYS5tb2RlbC5TZWxlY3Rpb258b2JqZWN0fSBbYXR0cmlidXRlcy5zZWxlY3Rpb25dICAgICAgICAgICAgICAgQSBjb2xsZWN0aW9uIHRvIGNvbnRhaW4gYXR0YWNobWVudCBzZWxlY3Rpb25zIHdpdGhpbiB0aGUgc3RhdGUuXG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJZiB0aGUgJ3NlbGVjdGlvbicgYXR0cmlidXRlIGlzIGEgcGxhaW4gSlMgb2JqZWN0LFxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYSBTZWxlY3Rpb24gd2lsbCBiZSBjcmVhdGVkIHVzaW5nIGl0cyB2YWx1ZXMgYXMgdGhlIHNlbGVjdGlvbiBpbnN0YW5jZSdzIGBwcm9wc2AgbW9kZWwuXG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBPdGhlcndpc2UsIGl0IHdpbGwgY29weSB0aGUgbGlicmFyeSdzIGBwcm9wc2AgbW9kZWwuXG4gKiBAcGFyYW0ge2Jvb2xlYW59ICAgICAgICAgICAgICAgICAgICAgICAgIFthdHRyaWJ1dGVzLm11bHRpcGxlPWZhbHNlXSAgICAgICAgICBXaGV0aGVyIG11bHRpLXNlbGVjdCBpcyBlbmFibGVkLlxuICogQHBhcmFtIHtzdHJpbmd9ICAgICAgICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy5jb250ZW50PXVwbG9hZF0gICAgICAgICAgSW5pdGlhbCBtb2RlIGZvciB0aGUgY29udGVudCByZWdpb24uXG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBPdmVycmlkZGVuIGJ5IHBlcnNpc3RlbnQgdXNlciBzZXR0aW5nIGlmICdjb250ZW50VXNlclNldHRpbmcnIGlzIHRydWUuXG4gKiBAcGFyYW0ge3N0cmluZ30gICAgICAgICAgICAgICAgICAgICAgICAgIFthdHRyaWJ1dGVzLm1lbnU9ZGVmYXVsdF0gICAgICAgICAgICBJbml0aWFsIG1vZGUgZm9yIHRoZSBtZW51IHJlZ2lvbi5cbiAqIEBwYXJhbSB7c3RyaW5nfSAgICAgICAgICAgICAgICAgICAgICAgICAgW2F0dHJpYnV0ZXMucm91dGVyPWJyb3dzZV0gICAgICAgICAgIEluaXRpYWwgbW9kZSBmb3IgdGhlIHJvdXRlciByZWdpb24uXG4gKiBAcGFyYW0ge3N0cmluZ30gICAgICAgICAgICAgICAgICAgICAgICAgIFthdHRyaWJ1dGVzLnRvb2xiYXI9c2VsZWN0XSAgICAgICAgICBJbml0aWFsIG1vZGUgZm9yIHRoZSB0b29sYmFyIHJlZ2lvbi5cbiAqIEBwYXJhbSB7Ym9vbGVhbn0gICAgICAgICAgICAgICAgICAgICAgICAgW2F0dHJpYnV0ZXMuc2VhcmNoYWJsZT10cnVlXSAgICAgICAgIFdoZXRoZXIgdGhlIGxpYnJhcnkgaXMgc2VhcmNoYWJsZS5cbiAqIEBwYXJhbSB7Ym9vbGVhbnxzdHJpbmd9ICAgICAgICAgICAgICAgICAgW2F0dHJpYnV0ZXMuZmlsdGVyYWJsZT1mYWxzZV0gICAgICAgIFdoZXRoZXIgdGhlIGxpYnJhcnkgaXMgZmlsdGVyYWJsZSwgYW5kIGlmIHNvIHdoYXQgZmlsdGVycyBzaG91bGQgYmUgc2hvd24uXG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBY2NlcHRzICdhbGwnLCAndXBsb2FkZWQnLCBvciAndW5hdHRhY2hlZCcuXG4gKiBAcGFyYW0ge2Jvb2xlYW59ICAgICAgICAgICAgICAgICAgICAgICAgIFthdHRyaWJ1dGVzLnNvcnRhYmxlPXRydWVdICAgICAgICAgICBXaGV0aGVyIHRoZSBBdHRhY2htZW50cyBzaG91bGQgYmUgc29ydGFibGUuIERlcGVuZHMgb24gdGhlIG9yZGVyYnkgcHJvcGVydHkgYmVpbmcgc2V0IHRvIG1lbnVPcmRlciBvbiB0aGUgYXR0YWNobWVudHMgY29sbGVjdGlvbi5cbiAqIEBwYXJhbSB7Ym9vbGVhbn0gICAgICAgICAgICAgICAgICAgICAgICAgW2F0dHJpYnV0ZXMuYXV0b1NlbGVjdD10cnVlXSAgICAgICAgIFdoZXRoZXIgYW4gdXBsb2FkZWQgYXR0YWNobWVudCBzaG91bGQgYmUgYXV0b21hdGljYWxseSBhZGRlZCB0byB0aGUgc2VsZWN0aW9uLlxuICogQHBhcmFtIHtib29sZWFufSAgICAgICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy5kZXNjcmliZT1mYWxzZV0gICAgICAgICAgV2hldGhlciB0byBvZmZlciBVSSB0byBkZXNjcmliZSBhdHRhY2htZW50cyAtIGUuZy4gY2FwdGlvbmluZy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gICAgICBXaGV0aGVyIG11bHRpLXNlbGVjdCBpcyBlbmFibGVkLlxuICogQHBhcmFtIHtzdHJpbmd9ICAgICAgICAgICAgICAgICAgICAgW2F0dHJpYnV0ZXMuY29udGVudD11cGxvYWRdICAgICAgICAgIEluaXRpYWwgbW9kZSBmb3IgdGhlIGNvbnRlbnQgcmVnaW9uLlxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE92ZXJyaWRkZW4gYnkgcGVyc2lzdGVudCB1c2VyIHNldHRpbmcgaWYgJ2NvbnRlbnRVc2VyU2V0dGluZycgaXMgdHJ1ZS5cbiAqIEBwYXJhbSB7c3RyaW5nfSAgICAgICAgICAgICAgICAgICAgIFthdHRyaWJ1dGVzLm1lbnU9ZGVmYXVsdF0gICAgICAgICAgICBJbml0aWFsIG1vZGUgZm9yIHRoZSBtZW51IHJlZ2lvbi5cbiAqIEBwYXJhbSB7c3RyaW5nfSAgICAgICAgICAgICAgICAgICAgIFthdHRyaWJ1dGVzLnJvdXRlcj1icm93c2VdICAgICAgICAgICBJbml0aWFsIG1vZGUgZm9yIHRoZSByb3V0ZXIgcmVnaW9uLlxuICogQHBhcmFtIHtzdHJpbmd9ICAgICAgICAgICAgICAgICAgICAgW2F0dHJpYnV0ZXMudG9vbGJhcj1yZXBsYWNlXSAgICAgICAgIEluaXRpYWwgbW9kZSBmb3IgdGhlIHRvb2xiYXIgcmVnaW9uLlxuICogQHBhcmFtIHtpbnR9ICAgICAgICAgICAgICAgICAgICAgICAgW2F0dHJpYnV0ZXMucHJpb3JpdHk9NjBdICAgICAgICAgICAgIFRoZSBwcmlvcml0eSBmb3IgdGhlIHN0YXRlIGxpbmsgaW4gdGhlIG1lZGlhIG1lbnUuXG4gKiBAcGFyYW0ge2Jvb2xlYW59ICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy5zZWFyY2hhYmxlPXRydWVdICAgICAgICAgV2hld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dGhlIHZpZXcuXG4gKiBAcGFyYW0ge2Jvb2xlYW58c3RyaW5nfSBbb3B0aW9ucy5maWx0ZXJzPWZhbHNlXSBXaGljaCBmaWx0ZXJzIHRvIHNob3cgaW4gdGhlIGJyb3dzZXIncyB0b29sYmFyLlxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQWNjZXB0cyAndXBsb2FkZWQnIGFuZCAnYWxsJy5cbiAqIEBwYXJhbSB7Ym9vbGVhbn0gICAgICAgIFtvcHRpb25zLnNlYXJjaD10cnVlXSAgIFdoZXRoZXIgdG8gc2hvdyB0aGUgc2VhcmNoIGludGVyZmFjZSBpbiB0aGVcbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyb3dzZXIncyB0b29sYmFyLlxuICogQHBhcmFtIHtib29sZWFufSAgICAgICAgW29wdGlvbnMuZGF0ZT10cnVlXSAgICAgV2hldGhlciB0byBzaG93IHRoZSBkYXRlIGZpbHRlciBpbiB0aGVcbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyb3dzZXIncyB0b29sYmFyLlxuICogQHBhcmFtIHtib29sZWFufSAgICAgICAgW29wdGlvbnMuZGlzcGxheT1mYWxzZV0gV2hldGhlciB0byBzaG93IHRoZSBhdHRhY2htZW50cyBkaXNwbGF5IHNldHRpbmdzXG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aWV3IGluIHRoZSBzaWRlYmFyLlxuICogQHBhcmFtIHtib29sZWFufHN0cmluZ30gW29wdGlvbnMuc2lkZWJhcj10cnVlXSAgV2hldGhlciB0byBjcmVhdGUgYSBzaWRlYmFyIGZvciB0aGUgYnJvd3Nlci5cbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFjY2VwdHMgdHJ1ZSwgZmFsc2UsIGFuZCAn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