jekyll-admin 0.10.1 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +2 -3
- data/lib/jekyll-admin/apiable.rb +1 -1
- data/lib/jekyll-admin/file_helper.rb +1 -6
- data/lib/jekyll-admin/public/asset-manifest.json +11 -11
- data/lib/jekyll-admin/public/index.html +1 -1
- data/lib/jekyll-admin/public/{precache-manifest.52de67482747a1012d0d27a209b930d0.js → precache-manifest.aff7726cf55090e9b1a563d77344218e.js} +9 -9
- data/lib/jekyll-admin/public/service-worker.js +1 -1
- data/lib/jekyll-admin/public/static/css/{main.223e267c.chunk.css → main.913a54c0.chunk.css} +2 -2
- data/lib/jekyll-admin/public/static/css/main.913a54c0.chunk.css.map +1 -0
- data/lib/jekyll-admin/public/static/js/2.dc118925.chunk.js +3 -0
- data/lib/jekyll-admin/public/static/js/{2.49911da2.chunk.js.LICENSE.txt → 2.dc118925.chunk.js.LICENSE.txt} +0 -0
- data/lib/jekyll-admin/public/static/js/2.dc118925.chunk.js.map +1 -0
- data/lib/jekyll-admin/public/static/js/main.2e88166c.chunk.js +2 -0
- data/lib/jekyll-admin/public/static/js/main.2e88166c.chunk.js.map +1 -0
- data/lib/jekyll-admin/server/collections.rb +1 -1
- data/lib/jekyll-admin/server/configuration.rb +1 -1
- data/lib/jekyll-admin/server/data.rb +1 -1
- data/lib/jekyll-admin/server/drafts.rb +1 -1
- data/lib/jekyll-admin/server/pages.rb +1 -1
- data/lib/jekyll-admin/server/static_files.rb +1 -1
- data/lib/jekyll-admin/version.rb +1 -1
- metadata +29 -16
- data/lib/jekyll-admin/public/static/css/main.223e267c.chunk.css.map +0 -1
- data/lib/jekyll-admin/public/static/js/2.49911da2.chunk.js +0 -3
- data/lib/jekyll-admin/public/static/js/2.49911da2.chunk.js.map +0 -1
- data/lib/jekyll-admin/public/static/js/main.dd81e877.chunk.js +0 -2
- data/lib/jekyll-admin/public/static/js/main.dd81e877.chunk.js.map +0 -1
@@ -1,2 +0,0 @@
|
|
1
|
-
(this["webpackJsonpjekyll-admin"]=this["webpackJsonpjekyll-admin"]||[]).push([[0],{20:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return addFieldToMetadata})),__webpack_require__.d(__webpack_exports__,"f",(function(){return removeFieldFromMetadata})),__webpack_require__.d(__webpack_exports__,"g",(function(){return updateMetadataFieldKey})),__webpack_require__.d(__webpack_exports__,"h",(function(){return updateMetadataFieldValue})),__webpack_require__.d(__webpack_exports__,"c",(function(){return convertMetadataField})),__webpack_require__.d(__webpack_exports__,"e",(function(){return moveMetadataArrayItem})),__webpack_require__.d(__webpack_exports__,"d",(function(){return injectDefaultFields})),__webpack_require__.d(__webpack_exports__,"b",(function(){return computeFieldType}));var _Users_mertkahyaoglu_dev_jekyll_admin_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(38),underscore__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(9),underscore__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(underscore__WEBPACK_IMPORTED_MODULE_1__),lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(53),lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2__),addFieldToMetadata=function addFieldToMetadata(state,namePrefix){var tmpState=lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2___default()(state),field=eval("tmpState.".concat(namePrefix));return void 0===field||(underscore__WEBPACK_IMPORTED_MODULE_1___default.a.isArray(field)?field.push(""):field["New field ".concat(state.new_field_count)]=""),tmpState.metadata},removeFieldFromMetadata=function removeFieldFromMetadata(state,namePrefix,key){var tmpState=lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2___default()(state),field=eval("tmpState.".concat(namePrefix));if(void 0===field)return tmpState.metadata;if(underscore__WEBPACK_IMPORTED_MODULE_1___default.a.isArray(field)){if(key>=field.length)return tmpState.metadata;field.splice(key,1)}else{if(!underscore__WEBPACK_IMPORTED_MODULE_1___default.a.has(field,key))return tmpState.metadata;delete field[key]}return tmpState.metadata},updateMetadataFieldKey=function updateMetadataFieldKey(state,namePrefix,fieldKey,newKey){var tmpState=lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2___default()(state),field=eval("tmpState.".concat(namePrefix));return void 0===field||underscore__WEBPACK_IMPORTED_MODULE_1___default.a.has(field,newKey)||(field=Object.keys(field).reduce((function(e,t){return t===fieldKey?e[newKey]=field[t]:e[t]=field[t],e}),{}),eval("tmpState.".concat(namePrefix," = field"))),tmpState.metadata},updateMetadataFieldValue=function updateMetadataFieldValue(state,nameAttr,value){var tmpState=lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2___default()(state);return eval("tmpState.".concat(nameAttr," = value")),tmpState.metadata},convertMetadataField=function convertMetadataField(state,nameAttr,convertType){var tmpState=lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2___default()(state),field=eval("tmpState.".concat(nameAttr));if(void 0===field)return tmpState.metadata;if("array"===convertType)field=[""];else if("object"===convertType){var key="New field ".concat(state.new_field_count);field=Object(_Users_mertkahyaoglu_dev_jekyll_admin_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__.a)({},key,"")}else field="";return eval("tmpState.".concat(nameAttr," = field")),tmpState.metadata},moveMetadataArrayItem=function moveMetadataArrayItem(state,namePrefix,srcInd,targetInd){var tmpState=lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2___default()(state),arr=eval("tmpState.".concat(namePrefix));return underscore__WEBPACK_IMPORTED_MODULE_1___default.a.isArray(arr)?(arr.splice(targetInd,0,arr.splice(srcInd,1)[0]),tmpState.metadata):tmpState.metadata},injectDefaultFields=function(e,t,a){var n,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};try{n=e.content.defaults}catch(c){return{}}var i={};return underscore__WEBPACK_IMPORTED_MODULE_1___default.a.each(n,(function(e){var n=e.scope;n.type&&n.type!==a||n.path&&n.path!==t||underscore__WEBPACK_IMPORTED_MODULE_1___default.a.extend(i,e.values)})),underscore__WEBPACK_IMPORTED_MODULE_1___default.a.extend(i,r)},computeFieldType=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a="simple",n=["tags","categories"];return n.includes(t)&&underscore__WEBPACK_IMPORTED_MODULE_1___default.a.isArray(e)||(underscore__WEBPACK_IMPORTED_MODULE_1___default.a.isObject(e)&&(a="object"),underscore__WEBPACK_IMPORTED_MODULE_1___default.a.isArray(e)&&(a="array")),a}},275:function(e,t,a){e.exports=a(672)},585:function(e,t){},667:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAB5CAYAAACDSRyFAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5n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RYbz5fhyYyutNeGQHynwLv/vhobaEf8ZT1QAcKx1EgI6CXjw6bctD9+gfnNzzD0x8f4wnKj8hp8ik6ohMynHYJhkCTFGIxX8RBeQE/8hBWQABswEB1REZlNOwbiW422/ibgCvw3H/GfZVjIAlHmvUr5TTsPCXh1Nj50tkO5qzbORU8shFgownd4HCeiOrZNWgN0wbfYCLG0BD/jBZyKmtCy20PGALN7wm8lDxQ8BfSbxcMAxxzLBIz38YdvFq85D5byZxcJeF0DSdIR/4iqohUOQQdfe5yMQ9BSn6JyuobYHx1xEbrgFlyB83Ec2uoEes7uz7wORPQjq+EZtPacwIfKJH7v0AKJragAfSBJbkBG0jRNewOSZBquClnr1g7Pwry85UpkNE3TtEuwCZKkFEPRE0/jBXyKmRDDLOwDTdO0rFQPL6IEYmkBumObpGmaVoCL0BujsQTrsBYL8DtewXHI+/4ftS4BbH1NbcMAAAAASUVORK5CYII="},671:function(e,t,a){},672:function(e,t,a){"use strict";a.r(t);var n={};a.r(n),a.d(n,"getDeleteMessage",(function(){return U})),a.d(n,"getLeaveMessage",(function(){return x})),a.d(n,"getNotFoundMessage",(function(){return B})),a.d(n,"getOverrideMessage",(function(){return H})),a.d(n,"getParserErrorMessage",(function(){return V})),a.d(n,"getSuccessMessage",(function(){return K})),a.d(n,"getErrorMessage",(function(){return G})),a.d(n,"getUploadSuccessMessage",(function(){return Q})),a.d(n,"getUploadErrorMessage",(function(){return W})),a.d(n,"getFetchErrorMessage",(function(){return q})),a.d(n,"getUpdateErrorMessage",(function(){return Y})),a.d(n,"getDeleteErrorMessage",(function(){return z})),a.d(n,"getPublishDraftMessage",(function(){return Z})),a.d(n,"getTitleRequiredMessage",(function(){return J})),a.d(n,"getFilenameRequiredMessage",(function(){return X})),a.d(n,"getContentRequiredMessage",(function(){return $})),a.d(n,"getFilenameNotValidMessage",(function(){return ee})),a.d(n,"sidebar",(function(){return te})),a.d(n,"labels",(function(){return ae}));var r=a(0),i=a.n(r),c=a(109),l=a(22),o=a(12),s=a(1),u=a(5),d=a(8),p=a(7),f=a(3),m=a(6),h=a(11),g=a(25),E=a(15),v=a.n(E),y=a(2),b="/_api",C=function(){return"".concat(b,"/configuration")},_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(b,"/pages/").concat(e)},O=function(e,t){return e?"".concat(b,"/pages/").concat(e,"/").concat(t):"".concat(b,"/pages/").concat(t)},k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(b,"/drafts/").concat(e)},F=function(e,t){return e?"".concat(b,"/drafts/").concat(e,"/").concat(t):"".concat(b,"/drafts/").concat(t)},T=function(e,t){return t?"".concat(b,"/collections/").concat(e,"/entries/").concat(t):"".concat(b,"/collections/").concat(e,"/entries")},A=function(e,t,a){return t?"".concat(b,"/collections/").concat(e,"/").concat(t,"/").concat(a):"".concat(b,"/collections/").concat(e,"/").concat(a)},j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(b,"/data/").concat(e)},D=function(e,t){return e?"".concat(b,"/data/").concat(e,"/").concat(t):"".concat(b,"/data/").concat(t)},S=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(b,"/static_files/").concat(e)},w=function(e,t){return e?"".concat(b,"/static_files/").concat(e,"/").concat(t):"".concat(b,"/static_files/").concat(t)},L=a(38),I=a(113),N=a.n(I),R=function(e,t,a){return{type:"ADD_NOTIFICATION",notification:{title:e,message:t,level:a}}};var P=a(273),M=function(e){function t(e){var a;return Object(u.a)(this,t),(a=Object(p.a)(this,Object(f.a)(t).call(this))).name="BadInputError",a.message=e||"Bad input",a.stack=(new Error).stack,a}return Object(m.a)(t,e),t}(Object(P.a)(Error)),U=function(e){return'Are you sure that you want to delete "'.concat(e,'" ?')},x=function(){return"You have unsaved changes on this page. Are you sure you want to leave?"},B=function(e){return"No ".concat(e," found.")},H=function(e){return"".concat(e," will be overwritten. Continue anyway?")},V=function(){return"Parse Error"},K=function(){return"Success"},G=function(){return"Error"},Q=function(e){return"".concat(e," uploaded successfully")},W=function(){return"Error occurred uploading the file."},q=function(e){return"Could not fetch the ".concat(e)},Y=function(e){return"Could not update the ".concat(e)},z=function(e){return"Could not delete the ".concat(e)},Z=function(e,t){return"'".concat(e,"' will be converted to '").concat(t,"'")},J=function(){return"The title is required."},X=function(){return"The filename is required."},$=function(){return"The content is required."},ee=function(){return"The filename is not valid."},te={pages:"Pages",posts:"Posts",drafts:"Drafts",datafiles:"Data Files",collections:"Collections",staticfiles:"Static Files",configuration:"Configuration"},ae={save:{label:"Save",triggeredLabel:"Saved"},create:{label:"Create",triggeredLabel:"Created"},delete:{label:"Delete"},publish:{label:"Publish"},view:{label:"View"},upload:{label:"Upload files"},viewToggle:{label:"Switch View to GUI Editor",triggeredLabel:"Switch View to Raw Editor"}},ne=n,re=ne.getErrorMessage,ie=ne.getFetchErrorMessage,ce=ne.getUpdateErrorMessage,le=ne.getDeleteErrorMessage,oe=function(e,t,a,n){return N()(e,{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){return n(Object(L.a)({type:t.type},t.name,e))})).catch((function(e){n(Object(L.a)({type:a.type},a.name,e)),n(R(re(),ie(t.name),"error"))}))},se=function(e,t,a,n,r){return N()(e,{method:"PUT",credentials:"same-origin",body:t}).then((function(e){return e.json()})).then((function(e){if(e.error_message)throw new M(e.error_message);r(Object(L.a)({type:a.type},a.name,e))})).catch((function(e){r(Object(L.a)({type:n.type},n.name,e));var t="BadInputError"===e.name?e.message:ce(a.name);r(R(re(),t,"error"))}))},ue=function(e,t,a,n){return N()(e,{method:"DELETE",credentials:"same-origin"}).then((function(e){return n({type:t.type,id:t.id})})).catch((function(e){n(Object(L.a)({type:a.type},a.name,e)),n(R(re(),le(t.name),"error"))}))},de=a(9),pe=a.n(de),fe=/^(?:.+\/)*(\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]))-(.*)(\.[^.]+)$/,me=/^(.*)(\.[^.]+)$/,he=function(e,t,a){var n=[];return pe.a.each(t,(function(t,r,i){var c=t.split("|");pe.a.each(c,(function(t){(function(e,t){switch(t){case"required":return!!e;case"date":return fe.test(e);case"filename":return me.test(e);default:return!1}})(e[r],t)||n.push(a["".concat(r,".").concat(t)])}))})),n},ge=function(e,t){return t?e.filter((function(e){return e.name.toLowerCase().includes(t.toLowerCase())})):e},Ee=function(e,t){return e.filter((function(e){return e.relative_path!==t}))},ve=function(e){return{type:"SEARCH_CONTENT",input:e}},ye=function(){return{type:"CLEAR_ERRORS"}},be=function(e){return{type:"VALIDATION_ERROR",errors:e}};var Ce=a(161),_e=a.n(Ce),Oe=function(e){return pe.a.isEmpty(e)?"":_e.a.safeDump(e,{indent:2})},ke=function(e){return e?e.charAt(0).toUpperCase()+e.substring(1).toLowerCase():""},Fe=function(e){return e?e.replace(/\w\S*/g,(function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})):""},Te=function(e){if(!e)return"";var t="\xe0\xe1\xe4\xe2\xe8\xe9\xeb\xea\xec\xed\xef\xee\u0131\xf2\xf3\xf6\xf4\xf9\xfa\xfc\xfb\xf1\xe7\u015f\xdf\xff\u0153\xe6\u0155\u015b\u0144\u1e55\u1e83\u01f5\u011f\u01f9\u1e3f\u01d8\u1e8d\u017a\u1e27\xb7/_,:;",a=new RegExp(t.split("").join("|"),"g");return e.toString().toLowerCase().replace(/\s+/g,"-").replace(a,(function(e){return"aaaaeeeeiiiiioooouuuuncssyoarsnpwggnmuxzh------".charAt(t.indexOf(e))})).replace(/&/g,"-").replace(/[^\w-]+/g,"").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},Ae=function(e){return e?e.substring(e.lastIndexOf("/")+1):""},je=function(e){if(!e)return"";var t=Ae(e),a=t.lastIndexOf(".");return a>0?t.substring(a+1):""},De=function(e){e&&e.preventDefault&&e.preventDefault()},Se=function e(t){return pe.a.isObject(t)?pe.a.keys(t).reduce((function(a,n){if("string"===typeof t[n])try{a[n.trim()]=JSON.parse(t[n].trim())}catch(r){a[n.trim()]=t[n].trim()}else a[n.trim()]=e(t[n]);return a}),Array.isArray(t)?[]:{}):t},we=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!e)return"";var n=Fe(e.toString());return[a,t,n].filter(Boolean).join(" | ")},Le=function(e,t){return e?"".concat(e,"/").concat(t):"".concat(t)},Ie=ne.getContentRequiredMessage,Ne=function(){return function(e){return e({type:"FETCH_CONFIG_REQUEST"}),oe("".concat(b,"/configuration"),{type:"FETCH_CONFIG_SUCCESS",name:"config"},{type:"FETCH_CONFIG_FAILURE",name:"error"},e)}},Re=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"editor";return function(a,n){var r;"gui"===t?(e=n().metadata.metadata,r={raw_content:Oe(e)}):r={raw_content:e};var i=Pe(e);return i.length?a(be(i)):(a({type:"CLEAR_ERRORS"}),se(C(),JSON.stringify(r),{type:"PUT_CONFIG_SUCCESS",name:"config"},{type:"PUT_CONFIG_FAILURE",name:"error"},a))}},Pe=function(e){return he({config:e},{config:"required"},{"config.required":Ie()})},Me=function(){return{type:"CONFIG_EDITOR_CHANGED"}};var Ue={save:"mod+s"},xe=function(){return i.a.createElement("div",{className:"splitter"})};function Be(e){var t=e.name;return i.a.createElement("i",{className:"fa fa-".concat(t),"aria-hidden":"true"})}var He=a(18),Ve=a.n(He),Ke=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).state={collapsed:!0},a.handleClick=function(){a.setState((function(e){return{collapsed:!e.collapsed}}))},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"renderIndicator",value:function(){var e=this.props,t=e.counter,a=e.count,n=this.state.collapsed;return n&&t&&a?i.a.createElement("div",{className:"counter"},a):i.a.createElement("div",{className:"chevrons"},i.a.createElement(Be,{name:"chevron-".concat(n?"down":"up")}))}},{key:"render",value:function(){var e=this.props,t=e.icon,a=e.label,n=e.minHeight,r=e.count,c=e.children,l=this.state.collapsed,o=Ve()("accordion",{collapsed:l}),s=n;return l||(s=n&&r?(r+1)*n:"none"),i.a.createElement("div",{className:o,style:{maxHeight:s},onClick:this.handleClick},i.a.createElement("div",{className:"accordion-label"},t&&i.a.createElement(Be,{name:t}),a,i.a.createElement("div",{className:"indicator"},this.renderIndicator())),c)}}]),t}(r.Component);Ke.defaultProps={minHeight:50};var Ge=Ke,Qe=a(27),We=a.n(Qe),qe=ne.getTitleRequiredMessage,Ye=ne.getFilenameRequiredMessage,ze=ne.getFilenameNotValidMessage,Ze=function(){return function(e){return e({type:"FETCH_COLLECTIONS_REQUEST"}),oe("".concat(b,"/collections"),{type:"FETCH_COLLECTIONS_SUCCESS",name:"collections"},{type:"FETCH_COLLECTIONS_FAILURE",name:"error"},e)}},Je=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return function(a){return a({type:"FETCH_COLLECTION_REQUEST"}),oe(T(e,t),{type:"FETCH_COLLECTION_SUCCESS",name:"entries"},{type:"FETCH_COLLECTION_FAILURE",name:"error"},a)}},Xe=function(e,t,a){return function(n){return n({type:"FETCH_DOCUMENT_REQUEST"}),oe(A(e,t,a),{type:"FETCH_DOCUMENT_SUCCESS",name:"doc"},{type:"FETCH_DOCUMENT_FAILURE",name:"error"},n)}},$e=function(e,t){return function(a,n){var r=n().metadata.metadata,i=r.path,c=r.raw_content,l=r.title;if(i&&"".concat(i,"/")!==t||!l){var o=nt(r,e);if(o.length)return a(be(o))}else i=at(r,e);a({type:"CLEAR_ERRORS"});var s=pe.a.omit(r,(function(e,t,a){return"raw_content"===t||"path"===t||""===e}));return se(A(e,t,i),rt({raw_content:c,front_matter:s}),{type:"PUT_DOCUMENT_SUCCESS",name:"doc"},{type:"PUT_DOCUMENT_FAILURE",name:"error"},a)}},et=function(e,t,a){return function(n,r){var i=r().metadata.metadata,c=i.path,l=i.raw_content,o=i.title;if(c&&"".concat(c,"/")!==t||!o){var s=nt(i,e);if(s.length)return n(be(s))}else c=at(i,e);n({type:"CLEAR_ERRORS"});var u=pe.a.omit(i,(function(e,t,a){return"raw_content"===t||"path"===t||""===e})),d=t?"_".concat(e,"/").concat(t,"/").concat(c):"_".concat(e,"/").concat(c);return se(A(e,t,a),rt({path:d,raw_content:l,front_matter:u}),{type:"PUT_DOCUMENT_SUCCESS",name:"doc"},{type:"PUT_DOCUMENT_FAILURE",name:"error"},n)}},tt=function(e,t,a){return function(n){var r=Le(t,a);return ue(A(e,t,a),{type:"DELETE_DOCUMENT_SUCCESS",name:"doc",id:r},{type:"DELETE_DOCUMENT_FAILURE",name:"error"},n)}},at=function(e,t){var a;return"posts"===t?(a=e.date?e.date.split(" ")[0]:We()().format("YYYY-MM-DD"),"".concat(a,"-").concat(Te(e.title),".md")):"".concat(Te(e.title),".md")},nt=function(e,t){var a={title:"required"},n={"title.required":qe(),"path.required":Ye()};return"posts"===t?(a.path="required|date",n["path.date"]=ze()):(a.path="required|filename",n["path.filename"]=ze()),he(e,a,n)},rt=function(e){return JSON.stringify(Se(e))};var it=ne.sidebar,ct=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){(0,this.props.fetchCollections)()}},{key:"renderCollections",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=this.props.collections;if(!t.length)return null;var a=pe.a.map(t,(function(t,a){if("posts"!==t.label&&!e.includes(t.label))return i.a.createElement("li",{key:a},i.a.createElement(s.Link,{activeClassName:"active",to:"".concat("/admin","/collections/").concat(t.label)},i.a.createElement(Be,{name:"book"}),t.sidebar_label||ke(t.label)))})).filter(Boolean),n=a.length;return n?i.a.createElement(Ge,{count:n,icon:"briefcase",label:it.collections,counter:!0},i.a.createElement("ul",null,a)):null}},{key:"render",value:function(){var e,t=this.props.config,a={pages:{icon:"file-text",link:"pages",translation:"pages"},datafiles:{icon:"database",link:"datafiles",translation:"datafiles",splitterBefore:!0},staticfiles:{icon:"file",link:"staticfiles",translation:"staticfiles"},configuration:{icon:"cog",link:"configuration",translation:"configuration",splitterBefore:!0}},n=pe.a.keys(a);try{e=t.jekyll_admin.hidden_links||[]}catch(d){e=[]}var r=pe.a.difference(n,e),c=[];pe.a.each(r,(function(e,t,n){var r=a[e];r.splitterBefore&&c.push(i.a.createElement(xe,{key:"splitter"+t})),c.push(i.a.createElement("li",{key:t},i.a.createElement(s.Link,{activeClassName:"active",to:"".concat("/admin","/").concat(r.link)},i.a.createElement(Be,{name:r.icon}),it[r.translation])))}));var l=this.renderCollections(e),o=!e.includes("posts"),u=t&&t.show_drafts;return i.a.createElement("div",{className:"sidebar"},i.a.createElement(s.Link,{className:"logo",to:"".concat("/admin","/pages")}),i.a.createElement("ul",{className:"routes"},l,o&&i.a.createElement("li",null,i.a.createElement(s.Link,{activeClassName:"active",to:"".concat("/admin","/collections/posts")},i.a.createElement(Be,{name:"book"}),it.posts)),u&&i.a.createElement("li",null,i.a.createElement(s.Link,{activeClassName:"active",to:"".concat("/admin","/drafts")},i.a.createElement(Be,{name:"edit"}),it.drafts)),(l||o||u)&&i.a.createElement(xe,null),c))}}]),t}(r.Component),lt=Object(o.b)((function(e){return{collections:e.collections.collections}}),(function(e){return Object(h.b)({fetchCollections:Ze},e)}))(ct),ot=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"render",value:function(){var e=this.props.config;return i.a.createElement("div",{className:"header"},i.a.createElement("h3",{className:"title"},i.a.createElement(s.Link,{target:"_blank",to:e.url||"/"},i.a.createElement(Be,{name:"home"}),i.a.createElement("span",null,e.title||"You have no title!"))),i.a.createElement("span",{className:"version"},"v","0.10.1"))}}]),t}(r.Component),st=a(262),ut=a.n(st),dt=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).elementStyles={Containers:{DefaultStyle:{padding:15,width:360,textAlign:"center"}},Title:{DefaultStyle:{fontSize:21,color:"#fff"}},NotificationItem:{DefaultStyle:{margin:0,padding:"9px 15px 15px",fontSize:15,borderRadius:0,transition:"0.5s ease-in-out"},success:{color:"#fff",backgroundColor:"#088217"},error:{color:"#fff",backgroundColor:"#e21414"},warning:{color:"#fff",backgroundColor:"#ebad1a"},info:{color:"#fff",backgroundColor:"#369cc7"}},Dismiss:{DefaultStyle:{top:7,right:9,width:25,height:25,padding:4,backgroundColor:"transparent",border:"2px solid",opacity:"0.84"}}},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){this.notificationSystem=this.refs.notificationSystem}},{key:"componentWillReceiveProps",value:function(e){var t=e.notification;this.notificationSystem.addNotification({title:t.title,message:t.message,level:t.level,position:"br",autoDismiss:10})}},{key:"render",value:function(){return i.a.createElement(ut.a,{ref:"notificationSystem",style:this.elementStyles})}}]),t}(r.Component),pt=Object(o.b)((function(e){return{notification:e.notifications.notification}}))(dt),ft=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){(0,this.props.fetchConfig)()}},{key:"componentWillReceiveProps",value:function(e){this.props.updated!==e.updated&&(0,this.props.fetchConfig)()}},{key:"render",value:function(){var e=this.props,t=e.config;return e.isFetching?null:i.a.createElement(v.a,{title:"Jekyll Admin"},i.a.createElement(g.HotKeys,{keyMap:Ue,className:"wrapper"},t.content&&i.a.createElement("div",null,i.a.createElement(lt,{config:t.content}),i.a.createElement("div",{className:"container"},i.a.createElement(ot,{config:t.content}),i.a.createElement("div",{className:"content"},this.props.children)),i.a.createElement(pt,null))))}}]),t}(r.Component),mt=Object(o.b)((function(e){return{config:e.config.config,updated:e.config.updated,isFetching:e.config.isFetching}}),(function(e){return Object(h.b)({fetchConfig:Ne},e)}))(ft),ht=a(263),gt=a.n(ht),Et=a(84),vt=a(35),yt=a(264),bt=a.n(yt),Ct=a(265),_t=a.n(Ct),Ot=a(266),kt=a.n(Ot),Ft=a(267),Tt=a.n(Ft),At=ne.getDeleteMessage,jt=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"handleClickDelete",value:function(e){var t=this.props,a=t.splat,n=t.onClickDelete,r=Ae(e);window.confirm(At(e))&&n(a,r)}},{key:"renderFileOverlay",value:function(e,t){var a=this;return e.from_theme?i.a.createElement("span",{className:"theme-indicator",title:"Theme Asset"},i.a.createElement(Be,{name:"diamond"})):"index"!==t?i.a.createElement("button",{onClick:function(){return a.handleClickDelete(e.relative_path)},className:"delete",title:"Delete file"},"x"):void 0}},{key:"render",value:function(){var e=this.props,t=e.onClick,a=e.file,n=e.splat,r=this.isImageFile?i.a.createElement("img",{src:a.http_url,alt:a.relative_path}):i.a.createElement("div",null,i.a.createElement(Be,{name:"file-text-o"})),c=t?i.a.createElement("a",{onClick:function(){return t(a.relative_path)}},r):i.a.createElement("a",{href:a.http_url,target:"_blank",rel:"noopener noreferrer"},r),l="index"===n?a.relative_path:a.name;return i.a.createElement("div",{className:"file-preview"},this.renderFileOverlay(a,n),c,i.a.createElement("span",{className:"filename"},l))}},{key:"isImageFile",get:function(){var e=this.props.file,t=e.type,a=e.extname;return"directory"!==t&&/png|jpg|gif|jpeg|svg|ico/i.test(a.substring(1))}}]),t}(r.Component);function Dt(e){var t=e.type,a=e.splat,n=void 0===a?"":a,r=["pages","datafiles","drafts","staticfiles"].includes(t)?"".concat("/admin","/").concat(t):"".concat("/admin","/collections/").concat(t),c=t;"datafiles"===t?c="data files":"staticfiles"===t&&(c="static files");var l=[];if(n){var o=n.split("/");l=o.map((function(e,t){var a=0===t?"":o.slice(0,t).join("/")+"/";return i.a.createElement("li",{key:t},i.a.createElement(s.Link,{to:"".concat(r,"/").concat(a).concat(e)},e))}))}return i.a.createElement("ul",{className:"breadcrumbs"},i.a.createElement("li",null,i.a.createElement(s.Link,{to:r},Fe(c))),l)}var St=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).handleKeyPress=function(e){(0,a.props.search)(e.target.value)},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"render",value:function(){var e=this.props.searchBy;return i.a.createElement("input",{onKeyPress:this.handleKeyPress,type:"text",className:"field",placeholder:"Search by ".concat(e)})}}]),t}(r.Component),wt=ne.getSuccessMessage,Lt=ne.getErrorMessage,It=ne.getUploadSuccessMessage,Nt=ne.getUploadErrorMessage,Rt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return function(t){return t({type:"FETCH_STATICFILES_REQUEST"}),oe(S(e),{type:"FETCH_STATICFILES_SUCCESS",name:"files"},{type:"FETCH_STATICFILES_FAILURE",name:"error"},t)}},Pt=function(e,t){return function(a){pe.a.each(t,(function(t){var n=new FileReader;n.readAsDataURL(t),n.onloadend=function(){var r=JSON.stringify({encoded_content:n.result.split("base64,")[1]});return fetch(w(e,t.name),{method:"PUT",body:r,credentials:"same-origin"}).then((function(n){a({type:"PUT_STATICFILE_SUCCESS"}),a(Rt(e)),a(R(wt(),It(t.name),"success"))})).catch((function(e){a({type:"PUT_STATICFILE_FAILURE",error:e}),a(R(Lt(),Nt(),"error"))}))}}))}},Mt=function(e,t){return function(a){var n=Le(e,t);return ue(w(e,t),{type:"DELETE_STATICFILE_SUCCESS",name:"file",id:n},{type:"DELETE_STATICFILE_FAILURE",name:"error"},a)}};var Ut=function(e,t){return t?e.filter((function(e){return e.path.toLowerCase().includes(t.toLowerCase())})):e},xt=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){(0,this.props.fetchStaticFiles)("index")}},{key:"renderDirectoryListingBtn",value:function(){var e="".concat("/admin","/staticfiles");return i.a.createElement("div",{className:"page-buttons"},i.a.createElement(s.Link,{className:"btn btn-view",to:e},"Directory Listing"))}},{key:"renderPreviewNode",value:function(){var e=this.props,t=e.files,a=e.onClickStaticFile;return t.length?i.a.createElement("div",{className:"preview-container"},t.map((function(e,t){return i.a.createElement(jt,{key:t,onClick:a,splat:"index",file:e})}))):i.a.createElement("div",{className:"preview-info"},i.a.createElement(Be,{name:"exclamation-triangle"}),i.a.createElement("h2",null,"No files found!"),i.a.createElement("h4",null,"Upload files at 'Directory Listing' to have them displayed here."))}},{key:"render",value:function(){var e=this.props,t=e.isFetching,a=e.search,n=e.modalView;return t?null:i.a.createElement(v.a,{title:"Static File Listing"},i.a.createElement("div",null,i.a.createElement("div",{className:"content-header"},i.a.createElement(Dt,{type:"staticfiles"}),!n&&this.renderDirectoryListingBtn(),i.a.createElement("div",{className:"pull-right"},i.a.createElement(St,{searchBy:"filename",search:a}))),i.a.createElement("div",{className:"static-list"},this.renderPreviewNode())))}}]),t}(r.Component),Bt=Object(o.b)((function(e){return{files:Ut(e.staticfiles.files,e.utils.input),isFetching:e.staticfiles.isFetching}}),(function(e){return Object(h.b)({fetchStaticFiles:Rt,search:ve},e)}))(xt),Ht=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).state={showModal:!1},a.customStyles={overlay:{backgroundColor:"rgba(0,0,0,0.6)",zIndex:10},content:{margin:20,paddingTop:0,paddingRight:10,paddingLeft:15}},a.openModal=function(){return a.setState({showModal:!0})},a.shutModal=function(){return a.setState({showModal:!1})},a.onPickItem=function(e){a.props.onPick(e),a.shutModal()},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"render",value:function(){return i.a.createElement("span",{className:"images-wrapper"},i.a.createElement("button",{onClick:this.openModal,ref:"trigger"},i.a.createElement(Be,{name:"picture-o"})),i.a.createElement(Tt.a,{isOpen:this.state.showModal,contentLabel:"FilePicker",onRequestClose:this.shutModal,style:this.customStyles},i.a.createElement("div",{className:"content"},i.a.createElement(Bt,{onClickStaticFile:this.onPickItem,modalView:!0}))))}}]),t}(r.Component),Vt=ne.getDeleteMessage,Kt=function(e){function t(e){var a;return Object(u.a)(this,t),(a=Object(p.a)(this,Object(f.a)(t).call(this,e))).creators=[","," ","Enter"],a.handleKeyUp=function(e){var t=a.state.pageTags,n=e.target.value;n.length&&a.creators.includes(e.key)?a.createTag(n):t.length&&0===n.length&&"Backspace"===e.key&&a.deleteTag(-1)},a.handleOnChange=function(e){var t=e.target.value;a.setState((function(e){return{tagInput:t}}))},a.showSuggestions=function(){a.setState((function(e){return{autoSuggest:!0}}))},a.closeSuggestions=function(){a.setState((function(e){return{autoSuggest:!1}}))},a.rectifyTag=function(e){var t=e.toString().split(" ");a.setState((function(e){return{pageTags:t}}))},a.state={tagInput:"",pageTags:e.fieldValue||[],autoSuggest:!1},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentWillReceiveProps",value:function(e){var t=e.fieldValue;this.setState({pageTags:t||[]})}},{key:"componentDidUpdate",value:function(){var e=this.props,t=e.nameAttr;(0,e.updateFieldValue)(t,this.state.pageTags)}},{key:"createTag",value:function(e){var t=this.state.pageTags,a=Object(Et.a)(t);a.includes(e)||(a.push(e),this.setState((function(e){return{pageTags:a,tagInput:"",autoSuggest:!1}})))}},{key:"deleteTag",value:function(e){var t=this.state.pageTags,a=Object(Et.a)(t),n=-1===e?a.slice(-1).pop():a[e];window.confirm(Vt("tag: ".concat(n)))&&(a.splice(e,1),this.setState({pageTags:a}),this.refs.taginput.focus())}},{key:"render",value:function(){var e=this,t=this.state.pageTags,a="".concat(this.state.tagInput),n=this.props.suggestions.filter((function(e){return e.startsWith(a)}));if(!(t instanceof Array))return i.a.createElement("span",{className:"meta-error"},"Expected an array of items. Found: ",i.a.createElement("strong",null,t),i.a.createElement("br",null),i.a.createElement("span",{onClick:function(){return e.rectifyTag(t)}},"Click here"),"to correct.");var r=t.filter(Boolean).map((function(t,a){return i.a.createElement("span",{key:a,className:"tag"},t,i.a.createElement("span",{className:"delete-tag",onClick:function(){return e.deleteTag(a)}}))})),c=n.map((function(a,n){return t.includes(a)?null:i.a.createElement("li",{key:n,onClick:function(){return e.createTag(a)}},a)})).filter(Boolean),l=Ve()("tag-suggestions",{visible:this.state.autoSuggest});return i.a.createElement("div",{className:"tags-wrap field value-field"},r.length>0&&i.a.createElement("div",{className:"tags-list"},r),i.a.createElement("div",{className:"tags-input"},i.a.createElement("input",{type:"text",onChange:this.handleOnChange,onFocus:this.showSuggestions,onKeyUp:this.handleKeyUp,value:a.replace(/,|\s+/,""),ref:"taginput"}),i.a.createElement(vt.a,{className:"field value-field",value:this.state.pageTags.toString(),hidden:!0})),c.length>0&&i.a.createElement("div",{className:l},i.a.createElement("ul",null,c),i.a.createElement("div",{className:"close-suggestions",onClick:this.closeSuggestions},"Close suggestions")))}}]),t}(r.Component);Kt.defaultProps={fieldValue:[],suggestions:[]};a(546);kt()(We.a);var Gt=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).handleEditableChange=function(e){var t=a.props,n=t.nameAttr;(0,t.updateFieldValue)(n,e.target.value)},a.handleDatepickerChange=function(e,t){var n=a.props,r=n.nameAttr;(0,n.updateFieldValue)(r,We()(e).format("YYYY-MM-DD HH:mm:ss"))},a.handleEditableBlur=function(e){var t=a.props,n=t.nameAttr;(0,t.updateFieldValue)(n,e.target.value.trim())},a.onPickItem=function(e){var t=a.props,n=t.nameAttr,r=t.updateFieldValue;a.refs.imagepicker.value=e,r(n,e)},a.handleLayoutChange=function(e){var t=a.props,n=t.nameAttr;(0,t.updateFieldValue)(n,e)},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"renderEditable",value:function(){var e=this.props.fieldValue;return i.a.createElement(vt.a,{onChange:this.handleEditableChange,onBlur:this.handleEditableBlur,className:"field value-field",value:"".concat(e)})}},{key:"renderDatepicker",value:function(){var e=this.props.fieldValue,t=new Date(e);return"Invalid Date"==="".concat(t)&&(t=null),i.a.createElement(bt.a,{onChange:this.handleDatepickerChange,className:"date-field",value:t})}},{key:"renderStaticFilePicker",value:function(){var e=this.props.fieldValue;return i.a.createElement("div",{className:"imagepicker"},i.a.createElement(vt.a,{onChange:this.handleEditableChange,className:"field value-field",value:e,ref:"imagepicker"}),i.a.createElement(Ht,{onPick:this.onPickItem}))}},{key:"renderLayoutPicker",value:function(){var e=this.props,t=e.fieldValue,a=e.siteMeta;if(!a)return this.renderEditable();var n=a.layouts||[];return i.a.createElement(_t.a,{className:"layout-field",data:["none"].concat(Object(Et.a)(n)),defaultValue:t,onChange:this.handleLayoutChange})}},{key:"renderTagsInput",value:function(e){var t=this.props,a=t.fieldValue,n=t.nameAttr,r=t.updateFieldValue,c=t.siteMeta,l=c&&c[e]||[];return i.a.createElement(Kt,{fieldValue:a,nameAttr:n,updateFieldValue:r,suggestions:l})}},{key:"render",value:function(){var e,t=this.props,a=t.fieldKey,n=t.nameAttr;switch(a){case"date":e=this.renderDatepicker();break;case"image":case"file":e=this.renderStaticFilePicker();break;case"tags":case"categories":e=this.renderTagsInput(a);break;default:e=this.renderEditable()}return"metadata['layout']"===n&&(e=this.renderLayoutPicker()),i.a.createElement("div",{className:"meta-value"},e)}}]),t}(r.Component),Qt=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).state={dropdown:!1},a.fieldTypes={simple:{icon:"pencil",label:"Simple"},array:{icon:"list-ol",label:"List"},object:{icon:"th-large",label:"Object"}},a.fieldTypeKeys=Object.keys(a.fieldTypes),a.toggleDropdownState=function(){a.setState((function(e){return{dropdown:!e.dropdown}}))},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"renderDropdownItems",value:function(e){var t=this,a=this.props,n=a.onConvertClick;return"tags"===a.parentKey?null:this.fieldTypeKeys.map((function(a,r){if(e!==a){var c=t.fieldTypes[a],l=c.icon,o=c.label;return i.a.createElement("span",{key:r,onMouseDown:function(){return n(a)}},i.a.createElement(Be,{name:l}),"Convert to ",o)}return null})).filter(Boolean)}},{key:"render",value:function(){var e=this,t=this.props,a=t.currentType,n=t.parentType,r=t.onRemoveClick,c=i.a.createElement("span",{className:"move"},i.a.createElement(Be,{name:"arrows"})),l=Ve()("dropdown",{"showing-dropdown":this.state.dropdown});return i.a.createElement("div",{className:"meta-buttons"},"array"===n&&c,i.a.createElement("span",{className:l},i.a.createElement("a",{className:"meta-button",tabIndex:"1",onClick:this.toggleDropdownState,onBlur:function(){return e.setState({dropdown:!1})}},i.a.createElement(Be,{name:"chevron-down"})),i.a.createElement("div",{className:"dropdown-wrap"},this.renderDropdownItems(a),i.a.createElement("span",{onMouseDown:function(){return r()},className:"remove-field"},i.a.createElement(Be,{name:"trash-o"}),"Remove field"))))}}]),t}(r.Component),Wt=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"handleConvertClick",value:function(e){var t=this.props;(0,t.convertField)(t.nameAttr,e)}},{key:"handleKeyBlur",value:function(){var e=this.props,t=e.namePrefix,a=e.fieldKey,n=e.updateFieldKey,r=Object(l.findDOMNode)(this.refs.field_key).value;a!==r&&""!==r&&n(t,a,r)}},{key:"handleRemoveClick",value:function(){var e=this.props;(0,e.removeField)(e.namePrefix,e.fieldKey)}},{key:"render",value:function(){var e=this,t=this.props,a=t.type,n=t.fieldKey,r=t.fieldValue,c=t.nameAttr,l=t.addField,o=t.removeField,s=t.updateFieldKey,u=t.updateFieldValue,d=t.convertField,p=t.key_prefix,f=t.moveArrayItem,m={array:Zt,object:Yt,simple:Gt}[a];return i.a.createElement("div",{ref:"wrap",className:"object-item-wrap"},i.a.createElement("div",{className:"object-key ".concat(a)},i.a.createElement("input",{ref:"field_key",onBlur:function(t){return e.handleKeyBlur(t)},defaultValue:n,className:"field key-field",type:"text",placeholder:"Key"}),i.a.createElement(Qt,{currentType:a,parentType:"object",onConvertClick:function(t){return e.handleConvertClick(t)},onRemoveClick:function(){return e.handleRemoveClick()}})),i.a.createElement("div",{className:"object-value"},i.a.createElement(m,{key_prefix:p,parentType:"object",fieldKey:n,fieldValue:r,addField:l,removeField:o,updateFieldKey:s,updateFieldValue:u,moveArrayItem:f,convertField:d,nameAttr:c,namePrefix:c})))}}]),t}(r.Component),qt=a(20),Yt=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"render",value:function(){var e=this.props,t=e.fieldKey,a=e.fieldValue,n=e.namePrefix,r=e.addField,c=e.removeField,l=e.updateFieldKey,o=e.updateFieldValue,s=e.convertField,u=e.key_prefix,d=e.moveArrayItem,p=pe.a.map(a,(function(e,t){var a=Object(qt.b)(e,t);return i.a.createElement(Wt,{key:t,key_prefix:u,fieldKey:t,fieldValue:e,type:a,addField:r,removeField:c,updateFieldKey:l,updateFieldValue:o,moveArrayItem:d,convertField:s,nameAttr:"".concat(n,"['").concat(t,"']"),namePrefix:n})}));return i.a.createElement("div",{className:"meta-value-object"},p,i.a.createElement("a",{onClick:function(){return r(n)},className:"add-field-object",title:"Add new key/value pair"},"New key/value pair under ",i.a.createElement("strong",null,t)))}}]),t}(r.Component),zt=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"handleConvertClick",value:function(e){var t=this.props;(0,t.convertField)(t.nameAttr,e)}},{key:"handleRemoveClick",value:function(){var e=this.props;(0,e.removeField)(e.namePrefix,e.index)}},{key:"render",value:function(){var e=this,t=this.props,a=t.type,n=t.fieldKey,r=t.fieldValue,c=t.index,l=t.nameAttr,o=t.addField,s=t.removeField,u=t.updateFieldKey,d=t.updateFieldValue,p=t.moveArrayItem,f=t.convertField,m=t.key_prefix,h={array:Zt,object:Yt,simple:Gt}[a];return i.a.createElement("div",{ref:"wrap","data-id":c,className:"array-item-wrap"},i.a.createElement("div",{className:"array"},i.a.createElement("div",{className:"array-header"},i.a.createElement("span",{className:"array-field-num"},c+1,"."),i.a.createElement(Qt,{currentType:a,parentType:"array",onConvertClick:function(t){return e.handleConvertClick(t)},onRemoveClick:function(){return e.handleRemoveClick()}})),i.a.createElement(h,{key_prefix:m,parentType:"array",fieldKey:n,fieldValue:r,addField:o,removeField:s,updateFieldKey:u,updateFieldValue:d,moveArrayItem:p,convertField:f,nameAttr:l,namePrefix:l})))}}]),t}(r.Component),Zt=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"sortableGroupDecorator",value:function(e){var t=this.props,a=t.moveArrayItem,n=t.namePrefix;if(e){var r={draggable:".array-item-wrap",group:{name:"meta-array-items",pull:!1,put:!1},handle:".move",animation:0,onEnd:function(e){var t=e.item.getAttribute("data-id");a(n,t,e.newIndex)}};gt.a.create(e,r)}}},{key:"render",value:function(){var e=this.props,t=e.fieldKey,a=e.fieldValue,n=e.namePrefix,r=e.addField,c=e.removeField,l=e.updateFieldKey,o=e.updateFieldValue,s=e.moveArrayItem,u=e.convertField,d=e.key_prefix,p=a.map((function(e,a){var p=Object(qt.b)(e);return i.a.createElement(zt,{key:"".concat(d,"-").concat(a),key_prefix:d,index:a,fieldKey:t,fieldValue:e,type:p,addField:r,removeField:c,updateFieldKey:l,updateFieldValue:o,moveArrayItem:s,convertField:u,nameAttr:"".concat(n,"[").concat(a,"]"),namePrefix:n})}));return i.a.createElement("div",{className:"meta-value-array",ref:this.sortableGroupDecorator.bind(this)},p,i.a.createElement("a",{onClick:function(){return r(n)},className:"add-field-array",title:"Add new list item"},i.a.createElement(Be,{name:"plus"})))}}]),t}(r.Component),Jt=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){/New field/.test(this.props.fieldKey)&&this.refs.field_key.select()}},{key:"handleConvertClick",value:function(e){var t=this.props;(0,t.convertField)(t.nameAttr,e)}},{key:"handleKeyBlur",value:function(){var e=this.props,t=e.namePrefix,a=e.fieldKey,n=e.updateFieldKey,r=Object(l.findDOMNode)(this.refs.field_key).value;a!==r&&""!==r&&n(t,a,r)}},{key:"handleRemoveClick",value:function(){var e=this.props;(0,e.removeField)(e.namePrefix,e.fieldKey)}},{key:"render",value:function(){var e=this,t=this.props,a=t.type,n=t.parentType,r=t.fieldKey,c=t.fieldValue,l=t.namePrefix,o=t.addField,s=t.removeField,u=t.updateFieldKey,d=t.updateFieldValue,p=t.moveArrayItem,f=t.convertField,m=t.key_prefix,h=t.siteMeta,g={array:Zt,object:Yt,simple:Gt}[a];return i.a.createElement("div",{ref:"wrap",className:"metafield"},i.a.createElement("div",{className:"meta-key ".concat(a)},i.a.createElement("input",{ref:"field_key",onBlur:function(){return e.handleKeyBlur()},defaultValue:r,className:"field key-field",type:"text",placeholder:"Key"}),i.a.createElement(Qt,{currentType:a,parentType:"top",parentKey:r,onConvertClick:function(t){return e.handleConvertClick(t)},onRemoveClick:function(){return e.handleRemoveClick()}})),i.a.createElement(g,{key_prefix:m,fieldKey:r,parentType:n,fieldValue:c,addField:o,removeField:s,updateFieldKey:u,updateFieldValue:d,moveArrayItem:p,convertField:f,nameAttr:"".concat(l,"['").concat(r,"']"),namePrefix:"".concat(l,"['").concat(r,"']"),siteMeta:h}))}}]),t}(r.Component),Xt=function(e){return{type:"STORE_CONTENT_FIELDS",content:e}},$t=function(e){return{type:"ADD_METAFIELD",namePrefix:e}},ea=function(e,t){return{type:"REMOVE_METAFIELD",namePrefix:e,key:t}},ta=function(e,t,a){return{type:"UPDATE_FIELD_KEY",namePrefix:e,fieldKey:t,newKey:a}},aa=function(e,t){return{type:"UPDATE_FIELD_VALUE",nameAttr:e,value:t}},na=function(e,t,a){return{type:"MOVE_ARRAY_ITEM",namePrefix:e,srcInd:t,targetInd:a}},ra=function(e,t){return{type:"CONVERT_FIELD",nameAttr:e,convertType:t}},ia=function(e){return{type:"UPDATE_TITLE",title:e}},ca=function(e){return{type:"UPDATE_BODY",body:e}},la=function(e){return{type:"UPDATE_PATH",path:e}};var oa=function(){return function(e){return e({type:"FETCH_SITE_META_REQUEST"}),oe("".concat(b,"/site_meta"),{type:"FETCH_SITE_META_SUCCESS",name:"site"},{type:"FETCH_SITE_META_FAILURE",name:"error"},e)}};var sa=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.storeContentFields,a=e.fields,n=e.fetchSiteMeta;e.dataview||n(),t(a)}},{key:"shouldComponentUpdate",value:function(e){return!pe.a.isEqual(e.metadata,this.props.metadata)}},{key:"render",value:function(){var e=this.props,t=e.metadata,a=e.addField,n=e.removeField,r=e.updateFieldKey,c=e.updateFieldValue,l=e.moveArrayItem,o=e.convertField,s=e.key_prefix,u=e.dataview,d=e.site,p=t;u||(p=pe.a.omit(p,["title","path","raw_content"]));var f=Ve()({datafields:u,metafields:!u}),m=pe.a.map(p,(function(e,t){var p=Object(qt.b)(e,t);return i.a.createElement(Jt,{key:t,key_prefix:s,type:p,parentType:"top",fieldKey:t,fieldValue:e,addField:a,removeField:n,updateFieldKey:r,updateFieldValue:c,moveArrayItem:l,convertField:o,nameAttr:"metadata['".concat(t,"']"),namePrefix:"metadata",siteMeta:u?null:d})})),h=u?i.a.createElement("div",{className:"data-new"},i.a.createElement("a",{onClick:function(){return a("metadata")}},i.a.createElement(Be,{name:"plus-circle"})," New data field")):i.a.createElement("div",{className:"meta-new"},i.a.createElement("a",{onClick:function(){return a("metadata")},className:"tooltip"},i.a.createElement(Be,{name:"plus-circle"})," New metadata field",i.a.createElement("span",{className:"tooltip-text"},"Metadata will be stored as the ",i.a.createElement("b",null,"YAML front matter")," within the document.")),i.a.createElement("small",{className:"tooltip pull-right"},i.a.createElement(Be,{name:"info-circle"}),"Special Keys",i.a.createElement("span",{className:"tooltip-text"},"You can use special keys like ",i.a.createElement("b",null,"date"),", ",i.a.createElement("b",null,"file"),", ",i.a.createElement("b",null,"image"),", ",i.a.createElement("b",null,"layout")," or ",i.a.createElement("b",null,"tags")," for user-friendly functionalities.")));return i.a.createElement("div",{className:f},m,h)}}]),t}(r.Component),ua=Object(o.b)((function(e){return{metadata:e.metadata.metadata,key_prefix:e.metadata.key_prefix,site:e.meta.site}}),(function(e){return Object(h.b)({storeContentFields:Xt,fetchSiteMeta:oa,addField:$t,removeField:ea,updateFieldKey:ta,updateFieldValue:aa,moveArrayItem:na,convertField:ra},e)}))(sa),da=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).handleChange=function(e){return a.props.onChange(e.target.value)},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"renderPathFields",value:function(e,t){return i.a.createElement("form",{className:"datafile-path"},i.a.createElement("fieldset",{className:"filename"},i.a.createElement("legend",null,"Path (without extension)"),i.a.createElement("input",{type:"text",id:"path",defaultValue:e,placeholder:"filename",onChange:this.handleChange,ref:"filepath"})),i.a.createElement("fieldset",{className:"file-type"},i.a.createElement("legend",null,"File Type"),i.a.createElement("select",{id:"extn",defaultValue:t,onChange:this.handleChange,ref:"extname"},i.a.createElement("option",{value:".yml"},"YAML"),i.a.createElement("option",{value:".json"},"JSON"))))}},{key:"render",value:function(){var e=this.props,t=e.fields,a=e.slug,n=e.ext,r=e.restricted;return i.a.createElement("div",null,i.a.createElement("div",{className:"warning"},"CAUTION! Any existing comments will be lost when editing via this view. Switch to the ",i.a.createElement("strong",null,"Raw Editor")," to preserve them."),!r&&this.renderPathFields(a,n),i.a.createElement(ua,{fields:t,dataview:!0}))}}]),t}(r.Component);da.defaultProps={fields:{},slug:"",ext:"",restricted:!1};var pa=da,fa=a(268),ma=a.n(fa),ha=(a(572),a(574),a(575),function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).handleChange=function(){var e=a.props,t=e.onEditorChange;!e.editorChanged&&t()},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"shouldComponentUpdate",value:function(e,t){return e.content!==this.props.content}},{key:"getValue",value:function(){return this.refs.ace.editor.getValue()}},{key:"render",value:function(){var e=this.props,t=e.content,a=e.type,n=/json/i.test(a)?"json":"yaml";return i.a.createElement("div",null,i.a.createElement(ma.a,{value:t,mode:n,theme:"monokai",width:"100%",height:"400px",showGutter:!1,showPrintMargin:!1,highlightActiveLine:!1,className:"config-editor",fontSize:14,scrollMargin:[15,15,15,15],ref:"ace",onChange:this.handleChange}),i.a.createElement("div",{className:"statusbar"},"mode: ",n.toUpperCase()))}}]),t}(r.Component)),ga=function(e){var t=e.errors;return i.a.createElement("div",{className:"error-messages"},pe.a.map(t,(function(e,t){return i.a.createElement("div",{key:t},e)})))},Ea=ne.labels,va={create:"plus-square",delete:"trash",publish:"send-o",save:"save",upload:"upload",view:"eye"};function ya(e){var t,a,n=e.type,r=e.active,c=e.triggered,l=e.onClick,o=e.block,s=e.thin,u=e.icon,d=e.to,p=Ve()("btn",{"btn-active":r,"btn-success":r&&("save"===n||"create"===n),"btn-delete":"delete"===n,"btn-view":"view"===n||"publish"===n,"btn-inactive":!r,"btn-fat":o,"btn-thin":s});switch(n){case"save":case"create":t=Ea[n].label,a=Ea[n].triggeredLabel;break;case"view-toggle":t=Ea.viewToggle.label,a=Ea.viewToggle.triggeredLabel;break;case"view":case"delete":case"upload":case"publish":t=Ea[n].label;break;default:t="<LABEL>",a="<NEXT LABEL>"}var f=u||va[n],m=f&&i.a.createElement(Be,{name:f});return d?i.a.createElement("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:p},m,t):l?i.a.createElement("button",{onClick:l,className:p},m,c?a:t):null}var ba=ne.getLeaveMessage,Ca=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).state={guiView:!1},a.routerWillLeave=function(e){var t=a.props,n=t.editorChanged,r=t.fieldChanged;if(n||r)return ba()},a.toggleView=function(){a.setState((function(e){return{guiView:!e.guiView}}))},a.handleClickSave=function(e){De(e);var t=a.props,n=t.editorChanged,r=t.fieldChanged,i=t.putConfig;n?i(a.refs.editor.getValue()):r&&i(null,"gui")},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.router,a=e.route;t.setRouteLeaveHook(a,this.routerWillLeave)}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.clearErrors;e.errors.length&&t()}},{key:"renderContentBody",value:function(){var e=this.props,t=e.config,a=e.editorChanged,n=e.onEditorChange,r=t.raw_content,c=t.content;return this.state.guiView&&c?i.a.createElement(pa,{fields:c,onChange:n,restricted:!0}):i.a.createElement(ha,{editorChanged:a,onEditorChange:n,content:r,ref:"editor"})}},{key:"render",value:function(){var e=this.props,t=e.editorChanged,a=e.fieldChanged,n=e.updated,r=e.errors,c={save:this.handleClickSave};return i.a.createElement(v.a,{title:"Configuration"},i.a.createElement(g.HotKeys,{handlers:c,className:"single"},r&&r.length>0&&i.a.createElement(ga,{errors:r}),i.a.createElement("div",{className:"content-header"},i.a.createElement("h1",null,"Configuration"),i.a.createElement("div",{className:"page-buttons multiple"},i.a.createElement(ya,{onClick:this.toggleView,type:"view-toggle",triggered:this.state.guiView,active:!0,block:!0}),i.a.createElement(ya,{onClick:this.handleClickSave,type:"save",active:t||a,triggered:n,block:!0}))),i.a.createElement("div",{className:"content-body"},this.renderContentBody())))}}]),t}(r.Component),_a=Object(s.withRouter)(Object(o.b)((function(e){return{config:e.config.config,updated:e.config.updated,editorChanged:e.config.editorChanged,fieldChanged:e.metadata.fieldChanged,errors:e.utils.errors}}),(function(e){return Object(h.b)({putConfig:Re,onEditorChange:Me,clearErrors:ye},e)}))(Ca)),Oa=ne.getDeleteMessage,ka=ne.getNotFoundMessage,Fa=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"handleClickDelete",value:function(e){var t=this.props,a=t.deleteItem,n=t.params,r=t.type,i=window.confirm(Oa(e)),c=n.splat?"/".concat(n.splat):"";i&&(a(n.splat,e),s.browserHistory.push("".concat("/admin","/").concat(r).concat(c)))}},{key:"renderTitleCell",value:function(e,t,a,n){return i.a.createElement("td",{className:"row-title"},i.a.createElement("strong",null,i.a.createElement(s.Link,{to:"".concat("/admin","/").concat(a,"/").concat(n)},i.a.createElement(Be,{name:t}),e)))}},{key:"renderDirectoryRow",value:function(e,t,a){var n=e.name,r=e.relative_path;return i.a.createElement("tr",{key:a},this.renderTitleCell(n,"folder",t,r),i.a.createElement("td",null))}},{key:"renderFileRow",value:function(e,t,a){var n=this,r=e.name,c=e.relative_path,l=e.http_url;return i.a.createElement("tr",{key:a},this.renderTitleCell(r,"file-text-o",t,c),i.a.createElement("td",null,i.a.createElement("div",{className:"row-actions"},i.a.createElement(ya,{onClick:function(){return n.handleClickDelete(r)},type:"delete",active:!0,thin:!0}),l&&i.a.createElement(ya,{to:l,type:"view",active:!0,thin:!0}))))}},{key:"renderRows",value:function(){var e=this,t=this.props,a=t.items,n=t.type;return a.map((function(t,a){return"directory"===t.type?e.renderDirectoryRow(t,n,a):e.renderFileRow(t,n,a)}))}},{key:"render",value:function(){var e=this.props,t=e.items,a=e.type,n=e.newBtnLabel,r=e.search,c=e.params,l="datafiles"===a?"data files":a,o=c.splat?"".concat("/admin","/").concat(a,"/").concat(c.splat,"/new"):"".concat("/admin","/").concat(a,"/new"),u=t.length?i.a.createElement("div",{className:"content-table"},i.a.createElement("table",null,i.a.createElement("thead",null,i.a.createElement("tr",null,i.a.createElement("th",null,"Filename"),i.a.createElement("th",{className:"th-actions"},"Actions"))),i.a.createElement("tbody",null,this.renderRows()))):i.a.createElement("h1",null,ka(l));return i.a.createElement("div",null,i.a.createElement("div",{className:"content-header"},i.a.createElement(Dt,{type:a,splat:c.splat}),i.a.createElement("div",{className:"page-buttons"},i.a.createElement(s.Link,{className:"btn btn-active",to:o},n)),i.a.createElement("div",{className:"pull-right"},i.a.createElement(St,{searchBy:"filename",search:r}))),u)}}]),t}(r.Component),Ta=ne.getTitleRequiredMessage,Aa=ne.getFilenameNotValidMessage,ja=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return function(t){return t({type:"FETCH_PAGES_REQUEST"}),oe(_(e),{type:"FETCH_PAGES_SUCCESS",name:"pages"},{type:"FETCH_PAGES_FAILURE",name:"error"},t)}},Da=function(e,t){return function(a){return a({type:"FETCH_PAGE_REQUEST"}),oe(O(e,t),{type:"FETCH_PAGE_SUCCESS",name:"page"},{type:"FETCH_PAGE_FAILURE",name:"error"},a)}},Sa=function(e){return function(t,a){var n=a().metadata.metadata,r=n.path,i=n.raw_content,c=n.title;if(!r&&c)r="".concat(Te(c),".md");else{var l=Ia(n);if(l.length)return t(be(l))}t({type:"CLEAR_ERRORS"});var o=pe.a.omit(n,(function(e,t,a){return"raw_content"===t||"path"===t||""===e}));return se(O(e,r),Na({front_matter:o,raw_content:i}),{type:"PUT_PAGE_SUCCESS",name:"page"},{type:"PUT_PAGE_FAILURE",name:"error"},t)}},wa=function(e,t){return function(a,n){var r=n().metadata.metadata,i=r.path,c=r.raw_content,l=r.title;if(!i&&l)i="".concat(Te(l),".md");else{var o=Ia(r);if(o.length)return a(be(o))}a({type:"CLEAR_ERRORS"});var s=pe.a.omit(r,(function(e,t,a){return"raw_content"===t||"path"===t||""===e})),u=e?"".concat(e,"/").concat(i):"".concat(i);return se(O(e,t),Na({path:u,front_matter:s,raw_content:c}),{type:"PUT_PAGE_SUCCESS",name:"page"},{type:"PUT_PAGE_FAILURE",name:"error"},a)}},La=function(e,t){return function(a){var n=Le(e,t);return ue(O(e,t),{type:"DELETE_PAGE_SUCCESS",name:"page",id:n},{type:"DELETE_PAGE_FAILURE",name:"error"},a)}},Ia=function(e){return he(e,{path:"required|filename"},{"path.required":Ta(),"path.filename":Aa()})},Na=function(e){return JSON.stringify(Se(e))};var Ra=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props;(0,e.fetchPages)(e.params.splat)}},{key:"componentWillReceiveProps",value:function(e){var t=e.fetchPages;this.props.params.splat!==e.params.splat&&t(e.params.splat)}},{key:"render",value:function(){var e=this.props,t=e.isFetching,a=e.pages,n=e.search,r=e.params,c=e.deletePage;if(t)return null;var l=we("pages",r.splat);return i.a.createElement(v.a,{title:l},i.a.createElement(Fa,{type:"pages",items:a,params:r,newBtnLabel:"New page",search:n,deleteItem:c}))}}]),t}(r.Component),Pa=Object(o.b)((function(e){return{pages:ge(e.pages.pages,e.utils.input),isFetching:e.pages.isFetching}}),(function(e){return Object(h.b)({fetchPages:ja,deletePage:La,search:ve},e)}))(Ra),Ma=a(26),Ua=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).handleChange=function(e){var t=a.props.onChange;a.refs.input.value=e.target.value,t(e.target.value)},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"render",value:function(){var e=this.props,t=e.path,a=e.type,n="example.md";if("posts"===a){var r=We()().format("YYYY-MM-DD");n="".concat(r,"-your-title.md")}else"data files"===a&&(n="your-filename.yml");var c=null;return"data files"!==a&&(c=i.a.createElement("span",{className:"tooltip"},i.a.createElement(Be,{name:"info-circle"}),i.a.createElement("span",{className:"tooltip-text"},"If you leave ",i.a.createElement("b",null,"path")," blank, it will be autogenerated from title."))),i.a.createElement("div",{className:"input-path"},i.a.createElement("label",null,"Path ",c),i.a.createElement(vt.a,{key:t,onChange:this.handleChange,placeholder:n,defaultValue:t,ref:"input"}))}}]),t}(r.Component),xa=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).handleChange=function(e){(0,a.props.onChange)(e.target.value)},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"shouldComponentUpdate",value:function(e){return e.title!==this.props.title}},{key:"render",value:function(){var e=this.props.title;return i.a.createElement("div",{className:"input-title"},i.a.createElement("label",null,"Title"),i.a.createElement(vt.a,{onChange:this.handleChange,placeholder:"Title",defaultValue:e,ref:"input"}))}}]),t}(r.Component),Ba=a(274),Ha=a(269),Va=a.n(Ha),Ka=a(4),Ga=a.n(Ka);Ga.a.registerLanguage("actionscript",a(587)),Ga.a.registerLanguage("apache",a(588)),Ga.a.registerLanguage("applescript",a(589)),Ga.a.registerLanguage("asciidoc",a(590)),Ga.a.registerLanguage("bash",a(591)),Ga.a.registerLanguage("basic",a(592)),Ga.a.registerLanguage("clojure",a(593)),Ga.a.registerLanguage("clojure-repl",a(594)),Ga.a.registerLanguage("cmake",a(595)),Ga.a.registerLanguage("coffeescript",a(596)),Ga.a.registerLanguage("cpp",a(597)),Ga.a.registerLanguage("crystal",a(598)),Ga.a.registerLanguage("css",a(599)),Ga.a.registerLanguage("dart",a(600)),Ga.a.registerLanguage("diff",a(601)),Ga.a.registerLanguage("django",a(602)),Ga.a.registerLanguage("dns",a(603)),Ga.a.registerLanguage("dockerfile",a(604)),Ga.a.registerLanguage("dos",a(605)),Ga.a.registerLanguage("dsconfig",a(606)),Ga.a.registerLanguage("elixir",a(607)),Ga.a.registerLanguage("elm",a(608)),Ga.a.registerLanguage("erb",a(609)),Ga.a.registerLanguage("erlang-repl",a(610)),Ga.a.registerLanguage("erlang",a(611)),Ga.a.registerLanguage("excel",a(612)),Ga.a.registerLanguage("fortran",a(613)),Ga.a.registerLanguage("fsharp",a(614)),Ga.a.registerLanguage("gherkin",a(615)),Ga.a.registerLanguage("go",a(616)),Ga.a.registerLanguage("gradle",a(617)),Ga.a.registerLanguage("groovy",a(618)),Ga.a.registerLanguage("haml",a(619)),Ga.a.registerLanguage("handlebars",a(620)),Ga.a.registerLanguage("haskell",a(621)),Ga.a.registerLanguage("htmlbars",a(622)),Ga.a.registerLanguage("http",a(623)),Ga.a.registerLanguage("ini",a(624)),Ga.a.registerLanguage("java",a(625)),Ga.a.registerLanguage("javascript",a(626)),Ga.a.registerLanguage("json",a(627)),Ga.a.registerLanguage("julia",a(628)),Ga.a.registerLanguage("julia-repl",a(629)),Ga.a.registerLanguage("kotlin",a(630)),Ga.a.registerLanguage("ldif",a(631)),Ga.a.registerLanguage("less",a(632)),Ga.a.registerLanguage("lisp",a(633)),Ga.a.registerLanguage("livescript",a(634)),Ga.a.registerLanguage("lua",a(635)),Ga.a.registerLanguage("makefile",a(636)),Ga.a.registerLanguage("markdown",a(637)),Ga.a.registerLanguage("mathematica",a(638)),Ga.a.registerLanguage("matlab",a(639)),Ga.a.registerLanguage("perl",a(640)),Ga.a.registerLanguage("nginx",a(641)),Ga.a.registerLanguage("nix",a(642)),Ga.a.registerLanguage("objectivec",a(643)),Ga.a.registerLanguage("ocaml",a(644)),Ga.a.registerLanguage("pgsql",a(645)),Ga.a.registerLanguage("php",a(646)),Ga.a.registerLanguage("plaintext",a(647)),Ga.a.registerLanguage("powershell",a(648)),Ga.a.registerLanguage("prolog",a(649)),Ga.a.registerLanguage("python",a(650)),Ga.a.registerLanguage("r",a(651)),Ga.a.registerLanguage("reasonml",a(652)),Ga.a.registerLanguage("ruby",a(653)),Ga.a.registerLanguage("rust",a(654)),Ga.a.registerLanguage("scala",a(655)),Ga.a.registerLanguage("scss",a(656)),Ga.a.registerLanguage("shell",a(657)),Ga.a.registerLanguage("smalltalk",a(658)),Ga.a.registerLanguage("sql",a(659)),Ga.a.registerLanguage("swift",a(660)),Ga.a.registerLanguage("typescript",a(661)),Ga.a.registerLanguage("vbnet",a(662)),Ga.a.registerLanguage("vbscript",a(663)),Ga.a.registerLanguage("vim",a(664)),Ga.a.registerLanguage("yaml",a(665)),Ga.a.registerLanguage("xml",a(666));var Qa=Ga.a,Wa=["editor-toolbar","CodeMirror","editor-preview-side","editor-statusbar"],qa=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r))))._replaceSelectedText=function(e,t,a){var n=e.getCursor("start"),r=e.getCursor("end"),i=e.getSelection(),c=Object(Ba.a)(t,2),l=c[0],o=c[1];a&&(o=o.replace("#url#",a)),e.replaceSelection("".concat(l).concat(i).concat(o)),n.ch+=l.length,n!==r&&(r.ch+=l.length),e.setSelection(n,r),e.focus()},a.handleFilePick=function(e){var t=a.editor,n=t.codemirror,r=t.options.insertTexts,i=r.image,c=r.link,l="{{ '".concat(e,"' | relative_url }}"),o=je(e),s=/png|jpg|gif|jpeg|svg|ico/i.test(o)?i:c;a._replaceSelectedText(n,s,l)},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){this.create(),window.hljs=Qa}},{key:"shouldComponentUpdate",value:function(e){return e.initialValue!==this.props.initialValue}},{key:"componentDidUpdate",value:function(){this.destroy(),this.create()}},{key:"componentWillUnmount",value:function(){this.destroy()}},{key:"create",value:function(){var e=this,t=this.props,a=t.onChange,n=t.onSave,r=Object.create(this.props);r.element=this.refs.text,r.autoDownloadFontAwesome=!1,r.spellChecker=!1,r.renderingConfig={codeSyntaxHighlighting:!0},r.insertTexts={image:["![","](#url#)"]};var i=["bold","italic","heading","|","code","quote","unordered-list","ordered-list","|","link","image","table",{name:"filepicker",action:function(){return e.refs.filepicker.refs.trigger.click()},className:"fa fa-paperclip",title:"Insert Static File"},"|","preview","side-by-side","fullscreen","|"];n&&i.push({name:"save",action:n,className:"fa fa-floppy-o",title:"Save"}),r.toolbar=i;var c=new Va.a(r);c.codemirror&&c.codemirror.on("change",(function(){a(c.value())})),this.editor=c}},{key:"destroy",value:function(){for(var e in Wa){var t=this.refs.container.querySelector("."+Wa[e]);t&&t.remove()}}},{key:"render",value:function(){return i.a.createElement("div",null,i.a.createElement("div",{style:{display:"none"}},i.a.createElement(Ht,{ref:"filepicker",onPick:this.handleFilePick})),i.a.createElement("div",{ref:"container"},i.a.createElement("textarea",{ref:"text"})))}}]),t}(r.Component);function Ya(e){var t=e.fieldValue;return i.a.createElement("div",{className:"meta-value"},i.a.createElement(vt.a,{className:"field value-field",value:"".concat(t),disabled:!0}))}var za={array:en,object:Ja,simple:Ya};function Za(e){var t=e.type,a=e.fieldKey,n=e.fieldValue,r=za[t];return i.a.createElement("div",{className:"object-item-wrap"},i.a.createElement("div",{className:"object-key ".concat(t)},i.a.createElement("input",{value:a,className:"field key-field",type:"text",disabled:!0})),i.a.createElement("div",{className:"object-value"},i.a.createElement(r,{fieldValue:n})))}function Ja(e){var t=e.fieldValue,a=pe.a.map(t,(function(e,t){var a=Object(qt.b)(e);return i.a.createElement(Za,{key:t,fieldKey:t,fieldValue:e,type:a})}));return i.a.createElement("div",{className:"meta-value-object"},a)}var Xa={array:en,object:Ja,simple:Ya};function $a(e){var t=e.type,a=e.fieldValue,n=e.index,r=Xa[t];return i.a.createElement("div",{className:"array-item-wrap"},i.a.createElement("div",{className:"array"},i.a.createElement("div",{className:"array-header"},i.a.createElement("span",{className:"array-field-num"},n+1,".")),i.a.createElement(r,{fieldValue:a})))}function en(e){var t=e.fieldValue.map((function(e,t){var a=Object(qt.b)(e);return i.a.createElement($a,{key:t,index:t,fieldValue:e,type:a})}));return i.a.createElement("div",{className:"meta-value-array"},t)}var tn={array:en,object:Ja,simple:Ya};function an(e){var t=e.type,a=e.fieldKey,n=e.fieldValue,r=tn[t];return i.a.createElement("div",{className:"metafield"},i.a.createElement("div",{className:"meta-key ".concat(t)},i.a.createElement("input",{value:a,className:"field key-field",type:"text",disabled:!0})),i.a.createElement(r,{fieldValue:n}))}function nn(e){var t=e.fields,a=pe.a.omit(t,["raw_content"]),n=pe.a.map(a,(function(e,t){var a=Object(qt.b)(e);return i.a.createElement(an,{key:t,type:a,fieldKey:t,fieldValue:e})}));return i.a.createElement("div",{id:"defaults",className:"metafields",title:"Default Front Matter"},n)}function rn(e){var t=e.type,a=e.path,n=e.body,r=e.title,c=e.onSave,l=e.updateTitle,o=e.updatePath,s=e.updateBody,u=e.metafields,d=e.staticmetafields;return i.a.createElement("div",{className:"content-body"},i.a.createElement(Ua,{onChange:o,type:t,path:a}),i.a.createElement(xa,{onChange:l,title:r}),i.a.createElement(qa,{onChange:s,onSave:c,placeholder:"Body",initialValue:n}),i.a.createElement(xe,null),i.a.createElement(nn,{fields:d}),i.a.createElement(ua,{fields:u}))}rn.defaultProps={path:"",body:"",title:"",metafields:{},staticmetafields:{}};var cn=ne.getLeaveMessage,ln=ne.getDeleteMessage,on=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).routerWillLeave=function(e){if(a.props.fieldChanged)return cn()},a.handleClickSave=function(e){De(e);var t=a.props,n=t.putPage,r=t.fieldChanged,i=t.params;if(r){var c=Object(Ma.a)(i.splat);n(c[0],c.slice(1).join("."))}},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchPage,a=e.params,n=e.router,r=e.route,i=Object(Ma.a)(a.splat);t(i[0],i.slice(1).join(".")),n.setRouteLeaveHook(r,this.routerWillLeave)}},{key:"componentWillReceiveProps",value:function(e){if(this.props.updated!==e.updated){var t=e.page.path;t!==this.props.page.path&&s.browserHistory.push("".concat("/admin","/pages/").concat(t))}}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.clearErrors;e.errors.length&&t()}},{key:"handleClickDelete",value:function(e){var t=this.props,a=t.deletePage,n=t.params;if(window.confirm(ln(e))){var r=Object(Ma.a)(n.splat),i=r[0];a(i,r.slice(1).join(".")),s.browserHistory.push("".concat("/admin","/pages/").concat(i||""))}}},{key:"render",value:function(){var e=this,t=this.props,a=t.isFetching,n=t.page,r=t.errors,c=t.updateTitle,l=t.updateBody,o=t.updatePath,s=t.updated,u=t.fieldChanged,d=t.params;if(a)return null;if(pe.a.isEmpty(n))return i.a.createElement("h1",null,"Could not find the page.");var p={save:this.handleClickSave},f=n.name,m=n.raw_content,h=n.http_url,E=n.front_matter,b=n.front_matter_defaults,C=d.splat[0],_=E&&E.title?E.title:"",O=we("pages",C,_||f);return i.a.createElement(v.a,{title:O},i.a.createElement(g.HotKeys,{handlers:p,className:"single"},r.length>0&&i.a.createElement(ga,{errors:r}),i.a.createElement("div",{className:"content-header"},i.a.createElement(Dt,{type:"pages",splat:C})),i.a.createElement("div",{className:"content-wrapper"},i.a.createElement(rn,{type:"pages",updateTitle:c,updatePath:o,updateBody:l,onSave:this.handleClickSave,path:f,title:_,body:m,metafields:Object(y.a)({title:_,raw_content:m,path:f},E),staticmetafields:b}),i.a.createElement("div",{className:"content-side"},i.a.createElement(ya,{onClick:this.handleClickSave,type:"save",active:u,triggered:s,block:!0}),i.a.createElement(ya,{to:h,type:"view",active:!0,block:!0}),i.a.createElement(xe,null),i.a.createElement(ya,{onClick:function(){return e.handleClickDelete(f)},type:"delete",active:!0,block:!0})))))}}]),t}(r.Component),sn=Object(s.withRouter)(Object(o.b)((function(e){return{page:e.pages.page,isFetching:e.pages.isFetching,fieldChanged:e.metadata.fieldChanged,updated:e.pages.updated,errors:e.utils.errors}}),(function(e){return Object(h.b)({fetchPage:Da,deletePage:La,putPage:wa,updateTitle:ia,updateBody:ca,updatePath:la,clearErrors:ye},e)}))(on));function un(e){var t=e.type,a=e.config,n=e.errors,r=e.updated,c=e.updateBody,l=e.updatePath,o=e.updateTitle,s=e.fieldChanged,u=e.onClickSave,d=e.params.splat,p="drafts"===t?"posts":t;return i.a.createElement(g.HotKeys,{handlers:{save:u}},n.length>0&&i.a.createElement(ga,{errors:n}),i.a.createElement("div",{className:"content-header"},i.a.createElement(Dt,{type:t,splat:d})),i.a.createElement("div",{className:"content-wrapper"},i.a.createElement(rn,{type:t,updatePath:l,updateTitle:o,updateBody:c,onSave:u,staticmetafields:Object(qt.d)(a,d,p)}),i.a.createElement("div",{className:"content-side"},i.a.createElement(ya,{onClick:u,type:"create",active:s,triggered:r,block:!0}))))}var dn=ne.getLeaveMessage,pn=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).routerWillLeave=function(e){if(a.props.fieldChanged)return dn()},a.handleClickSave=function(e){De(e);var t=a.props,n=t.fieldChanged,r=t.createPage,i=t.params;n&&r(i.splat)},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.router,a=e.route;t.setRouteLeaveHook(a,this.routerWillLeave)}},{key:"componentWillReceiveProps",value:function(e){this.props.updated!==e.updated&&s.browserHistory.push("".concat("/admin","/pages/").concat(e.page.path))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.clearErrors;e.errors.length&&t()}},{key:"render",value:function(){var e=this.props,t=e.params,a=e.config,n=e.errors,r=e.updated,c=e.updateBody,l=e.updatePath,o=e.updateTitle,s=e.fieldChanged,u=we("pages",t.splat,"New page");return i.a.createElement(v.a,{title:u},i.a.createElement(un,{type:"pages",params:t,config:a,errors:n,updated:r,updateBody:c,updatePath:l,updateTitle:o,fieldChanged:s,onClickSave:this.handleClickSave}))}}]),t}(r.Component),fn=Object(s.withRouter)(Object(o.b)((function(e){return{page:e.pages.page,fieldChanged:e.metadata.fieldChanged,errors:e.utils.errors,updated:e.pages.updated,config:e.config.config}}),(function(e){return Object(h.b)({updateTitle:ia,updateBody:ca,updatePath:la,createPage:Sa,clearErrors:ye},e)}))(pn)),mn=ne.getDeleteMessage,hn=ne.getNotFoundMessage,gn=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchCollection,a=e.params;t(a.collection_name,a.splat)}},{key:"componentWillReceiveProps",value:function(e){var t=e.fetchCollection,a=e.params;a.splat===this.props.params.splat&&a.collection_name===this.props.params.collection_name||t(a.collection_name,a.splat)}},{key:"handleClickDelete",value:function(e){var t=this.props,a=t.deleteDocument,n=t.params;window.confirm(mn(e))&&a(n.collection_name,n.splat,e)}},{key:"renderTable",value:function(){return i.a.createElement("div",{className:"content-table"},i.a.createElement("table",null,i.a.createElement("thead",null,i.a.createElement("tr",null,i.a.createElement("th",null,"Name"),i.a.createElement("th",null,"Date"),i.a.createElement("th",{className:"th-actions"},"Actions"))),i.a.createElement("tbody",null,this.renderRows())))}},{key:"renderFileRow",value:function(e){var t=this,a=e.id,n=e.name,r=e.title,c=e.http_url,l=e.collection,o=e.relative_path,u="".concat("/admin","/collections/").concat(l,"/").concat(o),d=e.date.substring(0,e.date.lastIndexOf(" "));return d="12:00:00"===We()(d).format("hh:mm:ss")?We()(d).format("ll"):We()(d).format("lll"),i.a.createElement("tr",{key:a},i.a.createElement("td",{className:"row-title"},i.a.createElement("strong",null,i.a.createElement(s.Link,{to:u},i.a.createElement(Be,{name:"file-text-o"}),r||n))),i.a.createElement("td",null,d),i.a.createElement("td",null,i.a.createElement("div",{className:"row-actions"},i.a.createElement(ya,{onClick:function(){return t.handleClickDelete(n)},type:"delete",active:!0,thin:!0}),c&&i.a.createElement(ya,{to:c,type:"view",active:!0,thin:!0}))))}},{key:"renderDirectoryRow",value:function(e){var t=this.props.params.collection_name,a=e.name,n=e.relative_path,r=e.modified_time,c="".concat("/admin","/collections/").concat(t,"/").concat(n),l=r.substring(0,r.lastIndexOf(" "));return l=We()(l).format("ll"),i.a.createElement("tr",{key:a},i.a.createElement("td",{className:"row-title"},i.a.createElement("strong",null,i.a.createElement(s.Link,{to:c},i.a.createElement(Be,{name:"folder"}),a))),i.a.createElement("td",null,l),i.a.createElement("td",null))}},{key:"renderRows",value:function(){var e=this,t=this.props.documents;return pe.a.map(t,(function(t){return t.type&&"directory"===t.type?e.renderDirectoryRow(t):e.renderFileRow(t)}))}},{key:"render",value:function(){var e=this.props,t=e.isFetching,a=e.documents,n=e.search,r=e.params,c=r.collection_name;if(t)return null;var l=r.splat||"",o=r.splat?"".concat("/admin","/collections/").concat(c,"/").concat(l,"/new"):"".concat("/admin","/collections/").concat(c,"/new"),u=we(c,r.splat);return i.a.createElement(v.a,{title:u},i.a.createElement("div",null,i.a.createElement("div",{className:"content-header"},i.a.createElement(Dt,{type:c,splat:l}),i.a.createElement("div",{className:"page-buttons"},i.a.createElement(s.Link,{className:"btn btn-active",to:o},"posts"===c?"New post":"New document")),i.a.createElement("div",{className:"pull-right"},i.a.createElement(St,{searchBy:"title",search:n}))),a.length>0&&this.renderTable(),!a.length&&i.a.createElement("h1",null,hn("documents"))))}}]),t}(r.Component),En=Object(o.b)((function(e){return{documents:(t=e.collections.entries,a=e.utils.input,t?a?pe.a.filter(t,(function(e){return e.type?e.name.toLowerCase().includes(a.toLowerCase()):e.title.toLowerCase().includes(a.toLowerCase())})):t:[]),isFetching:e.collections.isFetching};var t,a}),(function(e){return Object(h.b)({fetchCollection:Je,deleteDocument:tt,search:ve},e)}))(gn),vn=ne.getLeaveMessage,yn=ne.getDeleteMessage,bn=ne.getNotFoundMessage,Cn=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).routerWillLeave=function(e){if(a.props.fieldChanged)return vn()},a.handleClickSave=function(e){De(e);var t=a.props,n=t.putDocument,r=t.fieldChanged,i=t.params;if(r){var c=i.collection_name,l=Object(Ma.a)(i.splat);n(c,l[0],l.slice(1).join("."))}},a.handleClickDelete=function(){var e=a.props,t=e.deleteDocument,n=e.params,r=Object(Ma.a)(n.splat),i=r[0],c=r.slice(1).join(".");if(window.confirm(yn(c))){var l=n.collection_name;t(l,i,c),s.browserHistory.push("".concat("/admin","/collections/").concat(l,"/").concat(i||""))}},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchDocument,a=e.params,n=e.router,r=e.route,i=Object(Ma.a)(a.splat),c=i[0],l=i.slice(1).join(".");t(a.collection_name,c,l),n.setRouteLeaveHook(r,this.routerWillLeave)}},{key:"componentWillReceiveProps",value:function(e){var t=this.props.currentDocument;if(this.props.updated!==e.updated){var a=e.currentDocument.path;a!==t.path&&s.browserHistory.push("".concat("/admin","/collections/").concat(a.substring(1)))}}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.clearErrors;e.errors.length&&t()}},{key:"render",value:function(){var e=this.props,t=e.isFetching,a=e.currentDocument,n=e.errors,r=e.updateTitle,c=e.updateBody,l=e.updatePath,o=e.updated,s=e.fieldChanged,u=e.params;if(t)return null;if(pe.a.isEmpty(a))return i.a.createElement("h1",null,bn("document"));var d=a.title,p=a.raw_content,f=a.http_url,m=a.collection,h=a.front_matter,E=a.front_matter_defaults,b=a.name,C=u.splat[0],_={save:this.handleClickSave},O=we(m,C,d);return i.a.createElement(v.a,{title:O},i.a.createElement(g.HotKeys,{handlers:_,className:"single"},n.length>0&&i.a.createElement(ga,{errors:n}),i.a.createElement("div",{className:"content-header"},i.a.createElement(Dt,{type:m,splat:C})),i.a.createElement("div",{className:"content-wrapper"},i.a.createElement(rn,{type:m,path:b,title:d,body:p,updatePath:l,updateTitle:r,updateBody:c,onSave:this.handleClickSave,metafields:Object(y.a)({title:d,path:b,raw_content:p},h),staticmetafields:E}),i.a.createElement("div",{className:"content-side"},i.a.createElement(ya,{onClick:this.handleClickSave,type:"save",active:s,triggered:o,block:!0}),i.a.createElement(ya,{to:f,type:"view",active:!0,block:!0}),i.a.createElement(xe,null),i.a.createElement(ya,{onClick:this.handleClickDelete,type:"delete",active:!0,block:!0})))))}}]),t}(r.Component),_n=Object(s.withRouter)(Object(o.b)((function(e){return{currentDocument:e.collections.currentDocument,isFetching:e.collections.isFetching,fieldChanged:e.metadata.fieldChanged,updated:e.collections.updated,errors:e.utils.errors}}),(function(e){return Object(h.b)({fetchDocument:Xe,deleteDocument:tt,putDocument:et,updateTitle:ia,updateBody:ca,updatePath:la,clearErrors:ye},e)}))(Cn)),On=ne.getLeaveMessage,kn=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).routerWillLeave=function(e){if(a.props.fieldChanged)return On()},a.handleClickSave=function(e){De(e);var t=a.props,n=t.fieldChanged,r=t.createDocument,i=t.params;n&&r(i.collection_name,i.splat)},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.router,a=e.route;t.setRouteLeaveHook(a,this.routerWillLeave)}},{key:"componentWillReceiveProps",value:function(e){if(this.props.updated!==e.updated){var t=e.currentDocument.path,a=t.substr(t.indexOf("/")+1,t.length);s.browserHistory.push("".concat("/admin","/collections/").concat(e.currentDocument.collection,"/").concat(a))}}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.clearErrors;e.errors.length&&t()}},{key:"render",value:function(){var e=this.props,t=e.params,a=e.config,n=e.errors,r=e.updated,c=e.updateBody,l=e.updatePath,o=e.updateTitle,s=e.fieldChanged,u=t.collection_name,d=we(u,t.splat,"New document");return i.a.createElement(v.a,{title:d},i.a.createElement(un,{type:u,params:t,config:a,errors:n,updated:r,updateBody:c,updatePath:l,updateTitle:o,fieldChanged:s,onClickSave:this.handleClickSave}))}}]),t}(r.Component),Fn=Object(s.withRouter)(Object(o.b)((function(e){return{currentDocument:e.collections.currentDocument,fieldChanged:e.metadata.fieldChanged,errors:e.utils.errors,updated:e.collections.updated,config:e.config.config}}),(function(e){return Object(h.b)({updateTitle:ia,updateBody:ca,updatePath:la,createDocument:$e,clearErrors:ye},e)}))(kn)),Tn=ne.getContentRequiredMessage,An=ne.getFilenameRequiredMessage,jn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return function(t){return t({type:"FETCH_DATAFILES_REQUEST"}),oe(j(e),{type:"FETCH_DATAFILES_SUCCESS",name:"files"},{type:"FETCH_DATAFILES_FAILURE",name:"error"},t)}},Dn=function(e,t){return function(a){return a({type:"FETCH_DATAFILE_REQUEST"}),oe(D(e,t),{type:"FETCH_DATAFILE_SUCCESS",name:"file"},{type:"FETCH_DATAFILE_FAILURE",name:"error"},a)}},Sn=function(e,t,a){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"editor";return function(i,c){var l=je(n||t);if("gui"===r){var o=/json/i.test(l),s=c().metadata.metadata;s=Se(s),a=o?JSON.stringify(s,null,2):Oe(s)}var u=n?{path:n,raw_content:a}:{raw_content:a},d=In(t,a);return d.length?i(be(d)):(i({type:"CLEAR_ERRORS"}),se(D(e,t),JSON.stringify(u),{type:"PUT_DATAFILE_SUCCESS",name:"file"},{type:"PUT_DATAFILE_FAILURE",name:"error"},i))}},wn=function(e,t){return function(a){var n=Le(e,t);return ue(D(e,t),{type:"DELETE_DATAFILE_SUCCESS",name:"file",id:n},{type:"DELETE_DATAFILE_FAILURE",name:"error"},a)}},Ln=function(){return{type:"DATAFILE_CHANGED"}},In=function(e,t){return he({filename:e,data:t},{filename:"required",data:"required"},{"filename.required":An(),"data.required":Tn()})};var Nn=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props;(0,e.fetchDataFiles)(e.params.splat)}},{key:"componentWillReceiveProps",value:function(e){var t=e.fetchDataFiles;this.props.params.splat!==e.params.splat&&t(e.params.splat)}},{key:"render",value:function(){var e=this.props,t=e.isFetching,a=e.files,n=e.search,r=e.params,c=e.deleteDataFile;if(t)return null;var l=we("data files",r.splat);return i.a.createElement(v.a,{title:l},i.a.createElement(Fa,{type:"datafiles",items:a,params:r,newBtnLabel:"New data file",search:n,deleteItem:c}))}}]),t}(r.Component),Rn=Object(o.b)((function(e){return{files:ge(e.datafiles.files,e.utils.input),isFetching:e.datafiles.isFetching}}),(function(e){return Object(h.b)({fetchDataFiles:jn,deleteDataFile:wn,search:ve},e)}))(Nn),Pn=ne.getLeaveMessage,Mn=ne.getDeleteMessage,Un=ne.getNotFoundMessage,xn=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).state={guiView:!1},a.routerWillLeave=function(e){var t=a.props,n=t.datafileChanged,r=t.fieldChanged;if(n||r)return Pn()},a.toggleView=function(){a.setState((function(e){return{guiView:!e.guiView}}))},a.handleClickSave=function(e){De(e);var t,n,r,i=a.props,c=i.datafile,l=i.datafileChanged,o=i.fieldChanged,s=i.putDataFile,u=i.params,d=c.path,p=c.relative_path,f=d.replace(p,""),m=Object(Ma.a)(u.splat),h=m[0],g=m.slice(1).join(".");if(l||o){if(a.state.guiView){var E=a.refs.gui.refs,v=E.filepath,y=E.extname;t=v.value+y.value,n=null,r="gui"}else{var b=a.refs.inputpath.refs.input;t=b.value||b.props.defaultValue,n=a.refs.editor.getValue(),r="editor"}var C=h?f+"".concat(h,"/")+t:f+t;s(h,g,n,C!==d?C:"",r)}},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchDataFile,a=e.params,n=e.router,r=e.route,i=Object(Ma.a)(a.splat),c=i[0],l=i.slice(1).join(".");n.setRouteLeaveHook(r,this.routerWillLeave),t(c,l)}},{key:"componentWillReceiveProps",value:function(e){this.props.updated!==e.updated&&(e.datafile.path!==this.props.datafile.path&&s.browserHistory.push("".concat("/admin","/datafiles/").concat(e.datafile.relative_path)))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.clearErrors;e.errors.length&&t()}},{key:"handleClickDelete",value:function(e){var t=this.props,a=t.deleteDataFile,n=t.params;if(window.confirm(Mn(e))){var r=n.splat[0];a(r,Ae(e));var i=r?"/".concat(r):"";s.browserHistory.push("".concat("/admin","/datafiles").concat(i))}}},{key:"renderAside",value:function(){var e=this,t=this.props,a=t.datafile,n=t.datafileChanged,r=t.fieldChanged,c=t.updated,l=a.path,o=Ae(l),s=je(l),u=/ya?ml|json/i.test(s);return i.a.createElement("div",{className:"content-side"},i.a.createElement(ya,{onClick:this.handleClickSave,type:"save",active:n||r,triggered:c,block:!0}),u&&i.a.createElement(ya,{onClick:this.toggleView,type:"view-toggle",triggered:this.state.guiView,active:!0,block:!0}),i.a.createElement(xe,null),i.a.createElement(ya,{onClick:function(){return e.handleClickDelete(o)},type:"delete",active:!0,block:!0}))}},{key:"renderContentBody",value:function(e){var t=this.props,a=t.datafile,n=t.datafileChanged,r=t.onDataFileChanged,c=a.raw_content,l=a.content,o=a.slug,s=a.ext,u=this.state.guiView;return u&&l?i.a.createElement("div",{className:"content-body"},i.a.createElement(pa,{fields:l,slug:o,ext:s,onChange:r,ref:"gui"})):!u&&c?i.a.createElement("div",{className:"content-body"},i.a.createElement(Ua,{onChange:r,type:"data files",path:e,ref:"inputpath"}),i.a.createElement(ha,{editorChanged:n,onEditorChange:r,content:c,type:s,ref:"editor"})):void 0}},{key:"render",value:function(){var e=this.props,t=e.datafile,a=e.isFetching,n=e.params,r=e.errors;if(a)return null;if(pe.a.isEmpty(t.content))return i.a.createElement("h1",null,Un("content"));var c=n.splat[0],l=Ae(t.path),o={save:this.handleClickSave},s=we("data files",c,l);return i.a.createElement(v.a,{title:s},i.a.createElement(g.HotKeys,{handlers:o,className:"single"},r.length>0&&i.a.createElement(ga,{errors:r}),i.a.createElement("div",{className:"content-header"},i.a.createElement(Dt,{type:"datafiles",splat:c})),i.a.createElement("div",{className:"content-wrapper"},this.renderContentBody(l),this.renderAside())))}}]),t}(r.Component),Bn=Object(s.withRouter)(Object(o.b)((function(e){return{datafile:e.datafiles.currentFile,isFetching:e.datafiles.isFetching,updated:e.datafiles.updated,datafileChanged:e.datafiles.datafileChanged,fieldChanged:e.metadata.fieldChanged,errors:e.utils.errors}}),(function(e){return Object(h.b)({fetchDataFile:Dn,putDataFile:Sn,deleteDataFile:wn,onDataFileChanged:Ln,clearErrors:ye},e)}))(xn)),Hn=ne.getLeaveMessage,Vn=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).state={guiView:!1},a.routerWillLeave=function(e){if(!a.state.guiView&&a.props.datafileChanged)return Hn()},a.toggleView=function(){a.setState((function(e){return{guiView:!e.guiView}}))},a.handleClickSave=function(e){De(e);var t,n=a.props,r=n.datafileChanged,i=n.fieldChanged,c=n.putDataFile,l=n.params;if(r||i)if(a.state.guiView){var o=a.refs.gui.refs,s=o.filepath,u=o.extname;t=s.value+u.value,c(l.splat,t,null,null,"gui")}else t=a.refs.inputpath.refs.input.value,c(l.splat,t,a.refs.editor.getValue())},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.router,a=e.route;t.setRouteLeaveHook(a,this.routerWillLeave)}},{key:"componentWillReceiveProps",value:function(e){this.props.updated!==e.updated&&s.browserHistory.push("".concat("/admin","/datafiles/").concat(e.datafile.relative_path))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.clearErrors;e.errors.length&&t()}},{key:"renderAside",value:function(){var e=this.props,t=e.datafileChanged,a=e.fieldChanged,n=e.updated;return i.a.createElement("div",{className:"content-side"},i.a.createElement(ya,{onClick:this.handleClickSave,type:"create",active:t||a,triggered:n,block:!0}),i.a.createElement(ya,{onClick:this.toggleView,type:"view-toggle",triggered:this.state.guiView,active:!0,block:!0}))}},{key:"renderContentBody",value:function(){var e=this.props,t=e.datafileChanged,a=e.onDataFileChanged;return this.state.guiView?i.a.createElement("div",{className:"content-body"},i.a.createElement(pa,{onChange:a,ref:"gui"})):i.a.createElement("div",{className:"content-body"},i.a.createElement(Ua,{onChange:a,type:"data files",path:"",ref:"inputpath"}),i.a.createElement(ha,{editorChanged:t,onEditorChange:a,content:"",ref:"editor"}))}},{key:"render",value:function(){var e=this.props,t=e.errors,a=e.params,n={save:this.handleClickSave},r=we("data files",a.splat,"New data file");return i.a.createElement(v.a,{title:r},i.a.createElement(g.HotKeys,{handlers:n},t.length>0&&i.a.createElement(ga,{errors:t}),i.a.createElement("div",{className:"content-header"},i.a.createElement(Dt,{type:"datafiles",splat:a.splat})),i.a.createElement("div",{className:"content-wrapper"},this.renderContentBody(),this.renderAside())))}}]),t}(r.Component),Kn=Object(s.withRouter)(Object(o.b)((function(e){return{datafile:e.datafiles.currentFile,updated:e.datafiles.updated,datafileChanged:e.datafiles.datafileChanged,fieldChanged:e.metadata.fieldChanged,errors:e.utils.errors}}),(function(e){return Object(h.b)({putDataFile:Sn,onDataFileChanged:Ln,clearErrors:ye},e)}))(Vn)),Gn=ne.getTitleRequiredMessage,Qn=ne.getFilenameNotValidMessage,Wn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return function(t){return t({type:"FETCH_DRAFTS_REQUEST"}),oe(k(e),{type:"FETCH_DRAFTS_SUCCESS",name:"drafts"},{type:"FETCH_DRAFTS_FAILURE",name:"error"},t)}},qn=function(e,t){return function(a){return a({type:"FETCH_DRAFT_REQUEST"}),oe(F(e,t),{type:"FETCH_DRAFT_SUCCESS",name:"draft"},{type:"FETCH_DRAFT_FAILURE",name:"error"},a)}},Yn=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return function(n,r){var i=r().metadata.metadata,c=i.path,l=i.raw_content,o=i.title;if(!c&&o)c="".concat(Te(o),".md");else if(!c&&!o)return n(be(Jn(i)));n({type:"CLEAR_ERRORS"});var s,u=pe.a.omit(i,(function(e,t,a){return"raw_content"===t||"path"===t||""===e}));"create"===e?(a=c.replace("_drafts/",""),s={front_matter:u,raw_content:l}):s={path:t?"_drafts/".concat(t,"/").concat(c):"_drafts/".concat(c),front_matter:u,raw_content:l};return se(F(t,a),Xn(s),{type:"PUT_DRAFT_SUCCESS",name:"draft"},{type:"PUT_DRAFT_FAILURE",name:"error"},n)}},zn=function(e,t){return function(a){var n=Le(e,t);return ue(F(e,t),{type:"DELETE_DRAFT_SUCCESS",name:"draft",id:n},{type:"DELETE_DRAFT_FAILURE",name:"error"},a)}},Zn=function(e,t){return function(a,n){var r=n().metadata.metadata,i=r.raw_content,c=pe.a.omit(r,(function(e,t,a){return"raw_content"===t||"path"===t||""===e}));return se(A("posts",e,t),Xn({raw_content:i,front_matter:c}),{type:"PUT_DOCUMENT_SUCCESS",name:"doc"},{type:"PUT_DOCUMENT_FAILURE",name:"error"},a)}},Jn=function(e){return he(e,{path:"required|filename"},{"path.required":Gn(),"path.filename":Qn()})},Xn=function(e){return JSON.stringify(Se(e))};var $n=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props;(0,e.fetchDrafts)(e.params.splat)}},{key:"componentWillReceiveProps",value:function(e){var t=e.fetchDrafts;this.props.params.splat!==e.params.splat&&t(e.params.splat)}},{key:"render",value:function(){var e=this.props,t=e.isFetching,a=e.drafts,n=e.search,r=e.params,c=e.deleteDraft;if(t)return null;var l=we("drafts",r.splat);return i.a.createElement(v.a,{title:l},i.a.createElement(Fa,{type:"drafts",items:a,params:r,newBtnLabel:"New draft",search:n,deleteItem:c}))}}]),t}(r.Component),er=Object(o.b)((function(e){return{drafts:ge(e.drafts.drafts,e.utils.input),isFetching:e.drafts.isFetching}}),(function(e){return Object(h.b)({fetchDrafts:Wn,deleteDraft:zn,search:ve},e)}))($n),tr=ne.getLeaveMessage,ar=ne.getDeleteMessage,nr=ne.getPublishDraftMessage,rr=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).routerWillLeave=function(e){if(a.props.fieldChanged)return tr()},a.handleClickSave=function(e){De(e);var t=a.props,n=t.putDraft,r=t.fieldChanged,i=t.params;if(r){var c=Object(Ma.a)(i.splat);n("edit",c[0],c.slice(1).join("."))}},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchDraft,a=e.params,n=e.router,r=e.route,i=Object(Ma.a)(a.splat);t(i[0],i.slice(1).join(".")),n.setRouteLeaveHook(r,this.routerWillLeave)}},{key:"componentWillReceiveProps",value:function(e){this.props.updated!==e.updated&&(e.draft.path!==this.props.draft.path&&s.browserHistory.push("".concat("/admin","/drafts/").concat(e.draft.relative_path)))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.clearErrors;e.errors.length&&t()}},{key:"handleClickPublish",value:function(e){var t=this.props,a=t.deleteDraft,n=t.publishDraft,r=t.params,i=Object(Ma.a)(r.splat),c=i[0],l=i.slice(1).join("."),o=We()().format("YYYY-MM-DD"),u="".concat(o,"-").concat(l),d=c?"_posts/".concat(c,"/").concat(u):"_posts/".concat(u);if(window.confirm(nr(e,d))){var p=c?"/".concat(c):"";a(c,l),n(c,u),s.browserHistory.push("".concat("/admin","/drafts").concat(p))}}},{key:"handleClickDelete",value:function(e){var t=this.props,a=t.deleteDraft,n=t.params;if(window.confirm(ar(e))){var r=Object(Ma.a)(n.splat),i=r[0],c=r.slice(1).join("."),l=i?"/".concat(i):"";a(i,c),s.browserHistory.push("".concat("/admin","/drafts").concat(l))}}},{key:"render",value:function(){var e=this,t=this.props,a=t.isFetching,n=t.draft,r=t.errors,c=t.updateTitle,l=t.updateBody,o=t.updatePath,s=t.updated,u=t.fieldChanged,d=t.params;if(a)return null;if(pe.a.isEmpty(n))return i.a.createElement("h1",null,"Could not find the draft.");var p={save:this.handleClickSave},f=n.name,m=n.path,h=n.raw_content,E=n.http_url,b=n.front_matter,C=n.front_matter_defaults,_=d.splat[0],O=b&&b.title?b.title:"",k=we("drafts",_,O||f);return i.a.createElement(v.a,{title:k},i.a.createElement(g.HotKeys,{handlers:p,className:"single"},r.length>0&&i.a.createElement(ga,{errors:r}),i.a.createElement("div",{className:"content-header"},i.a.createElement(Dt,{type:"drafts",splat:_})),i.a.createElement("div",{className:"content-wrapper"},i.a.createElement(rn,{type:"drafts",path:f,title:O,body:h,updatePath:o,updateBody:l,updateTitle:c,onSave:this.handleClickSave,metafields:Object(y.a)({title:O,raw_content:h,path:f},b),staticmetafields:C}),i.a.createElement("div",{className:"content-side"},i.a.createElement(ya,{onClick:this.handleClickSave,type:"save",active:u,triggered:s,block:!0}),i.a.createElement(ya,{to:E,type:"view",active:!0,block:!0}),i.a.createElement(xe,null),i.a.createElement(ya,{onClick:function(){return e.handleClickPublish(m)},type:"publish",active:!0,block:!0}),i.a.createElement(ya,{onClick:function(){return e.handleClickDelete(f)},type:"delete",active:!0,block:!0})))))}}]),t}(r.Component),ir=Object(s.withRouter)(Object(o.b)((function(e){return{draft:e.drafts.draft,isFetching:e.drafts.isFetching,fieldChanged:e.metadata.fieldChanged,updated:e.drafts.updated,errors:e.utils.errors}}),(function(e){return Object(h.b)({fetchDraft:qn,deleteDraft:zn,putDraft:Yn,publishDraft:Zn,updateTitle:ia,updateBody:ca,updatePath:la,clearErrors:ye},e)}))(rr)),cr=ne.getLeaveMessage,lr=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).routerWillLeave=function(e){if(a.props.fieldChanged)return cr()},a.handleClickSave=function(e){De(e);var t=a.props,n=t.fieldChanged,r=t.putDraft,i=t.params;n&&r("create",i.splat)},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.router,a=e.route;t.setRouteLeaveHook(a,this.routerWillLeave)}},{key:"componentWillReceiveProps",value:function(e){this.props.updated!==e.updated&&s.browserHistory.push("".concat("/admin","/drafts/").concat(e.draft.relative_path))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.clearErrors;e.errors.length&&t()}},{key:"render",value:function(){var e=this.props,t=e.params,a=e.config,n=e.errors,r=e.updated,c=e.updateBody,l=e.updatePath,o=e.updateTitle,s=e.fieldChanged,u=we("drafts",t.splat,"New draft");return i.a.createElement(v.a,{title:u},i.a.createElement(un,{type:"drafts",params:t,config:a,errors:n,updated:r,updateBody:c,updatePath:l,updateTitle:o,fieldChanged:s,onClickSave:this.handleClickSave}))}}]),t}(r.Component),or=Object(s.withRouter)(Object(o.b)((function(e){return{draft:e.drafts.draft,fieldChanged:e.metadata.fieldChanged,errors:e.utils.errors,updated:e.drafts.updated,config:e.config.config}}),(function(e){return Object(h.b)({updateTitle:ia,updateBody:ca,updatePath:la,putDraft:Yn,clearErrors:ye},e)}))(lr)),sr=a(270),ur=a.n(sr),dr=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"openDropzone",value:function(){this.refs.ReactDropzone.open()}},{key:"render",value:function(){var e=this.props,t=e.files,a=e.splat,n=e.onDrop,r=e.onClickDelete,c=e.onClickItem;return i.a.createElement(ur.a,{onDrop:n,ref:"ReactDropzone",className:"dropzone",activeClassName:"dropzone-active",multiple:!0,disableClick:!0},t.length?i.a.createElement("div",{className:"preview-container"},pe.a.map(t,(function(e,t){return i.a.createElement(jt,{key:t,onClick:c,onClickDelete:r,splat:a,file:e})})),i.a.createElement(xe,null),i.a.createElement("div",{className:"preview-tip"},i.a.createElement("div",null,"Drag and drop file(s) here to upload"))):i.a.createElement("div",{className:"preview-info"},i.a.createElement(Be,{name:"upload"}),i.a.createElement("p",null,"Drag and drop file(s) here to upload")))}}]),t}(r.Component),pr=ne.getOverrideMessage,fr=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).openDropzone=function(){a.refs.dropzone.openDropzone()},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props;(0,e.fetchStaticFiles)(e.params.splat)}},{key:"componentWillReceiveProps",value:function(e){var t=e.fetchStaticFiles;this.props.params.splat!==e.params.splat&&t(e.params.splat)}},{key:"onDrop",value:function(e){var t=this.props,a=t.uploadStaticFiles,n=t.files,r=t.params,i=function(e,t){if(e&&!e.length||t&&!t.length)return[];var a=pe.a.map(t,(function(e){return Ae(e.path)}));return pe.a.chain(e).filter((function(e){return a.includes(e.name)})).map((function(e){return e.name})).value()}(e,n);if(i.length>0&&!window.confirm(pr(i.join(", "))))return!1;a(r.splat,e)}},{key:"renderFilePreviewRow",value:function(e,t){var a=this,n=this.props,r=n.params,c=n.onClickStaticFile,l=n.deleteStaticFile;return i.a.createElement("tr",{key:t},i.a.createElement("td",null,i.a.createElement(dr,{ref:"dropzone",splat:r.splat||"",files:e,onClickItem:c,onClickDelete:l,onDrop:function(e){return a.onDrop(e)}})))}},{key:"renderDirectoryRow",value:function(e,t){var a=e.name,n=e.path,r="".concat("/admin","/staticfiles/").concat(n);return i.a.createElement("tr",{key:t},i.a.createElement("td",{className:"row-title"},i.a.createElement("strong",null,i.a.createElement(s.Link,{to:r},i.a.createElement(Be,{name:"folder"}),a))))}},{key:"renderRows",value:function(){var e=this,t=this.props.files,a=t.filter((function(e){return"directory"===e.type})),n=t.filter((function(e){return!e.type}));return a.map((function(t,a){return e.renderDirectoryRow(t,a)})).concat(this.renderFilePreviewRow(n,a.length+1))}},{key:"renderTable",value:function(){return i.a.createElement("div",{className:"content-table"},i.a.createElement("table",null,i.a.createElement("thead",null,i.a.createElement("tr",null,i.a.createElement("th",null,"Directory Contents"))),i.a.createElement("tbody",null,this.renderRows())))}},{key:"render",value:function(){var e=this,t=this.props,a=t.isFetching,n=t.params,r=t.search;if(a)return null;var c="".concat("/admin","/staticfiles/index"),l=we("static files",n.splat);return i.a.createElement(v.a,{title:l},i.a.createElement("div",null,i.a.createElement("div",{className:"content-header"},i.a.createElement(Dt,{type:"staticfiles",splat:n.splat}),i.a.createElement("div",{className:"page-buttons multiple"},i.a.createElement(s.Link,{className:"btn btn-view",to:c},"Index Listing"),i.a.createElement(ya,{onClick:function(){return e.openDropzone()},type:"upload",active:!0})),i.a.createElement("div",{className:"pull-right"},i.a.createElement(St,{searchBy:"filename",search:r}))),this.renderTable()))}}]),t}(r.Component),mr=Object(o.b)((function(e){return{files:Ut(e.staticfiles.files,e.utils.input),isFetching:e.staticfiles.isFetching}}),(function(e){return Object(h.b)({fetchStaticFiles:Rt,uploadStaticFiles:Pt,deleteStaticFile:Mt,search:ve},e)}))(fr),hr=function(){return i.a.createElement("div",{className:"notfound"},i.a.createElement("img",{src:a(667),alt:"Jekyll Admin"}),i.a.createElement("h1",null,"Huh. It seems that page is Hyde-ing..."),i.a.createElement("h2",null,"The resource you requested was not found."))},gr=i.a.createElement(s.Route,{path:"".concat("/admin"),component:mt},i.a.createElement(s.IndexRoute,{component:Pa}),i.a.createElement(s.Route,{path:"configuration",component:_a}),i.a.createElement(s.Route,{path:"pages"},i.a.createElement(s.IndexRoute,{component:Pa}),i.a.createElement(s.Route,{path:"(**/)new",component:fn}),i.a.createElement(s.Route,{path:"(**/)*.*",component:sn}),i.a.createElement(s.Route,{path:"**",component:Pa})),i.a.createElement(s.Route,{path:"collections"},i.a.createElement(s.Route,{path:":collection_name"},i.a.createElement(s.IndexRoute,{component:En}),i.a.createElement(s.Route,{path:"(**/)new",component:Fn}),i.a.createElement(s.Route,{path:"(**/)*.*",component:_n}),i.a.createElement(s.Route,{path:"**",component:En}))),i.a.createElement(s.Route,{path:"drafts"},i.a.createElement(s.IndexRoute,{component:er}),i.a.createElement(s.Route,{path:"(**/)new",component:or}),i.a.createElement(s.Route,{path:"(**/)*.*",component:ir}),i.a.createElement(s.Route,{path:"**",component:er})),i.a.createElement(s.Route,{path:"datafiles"},i.a.createElement(s.IndexRoute,{component:Rn}),i.a.createElement(s.Route,{path:"(**/)new",component:Kn}),i.a.createElement(s.Route,{path:"(**/)*.*",component:Bn}),i.a.createElement(s.Route,{path:"**",component:Rn})),i.a.createElement(s.Route,{path:"staticfiles"},i.a.createElement(s.IndexRoute,{component:mr}),i.a.createElement(s.Route,{path:"index",component:Bt}),i.a.createElement(s.Route,{path:"**",component:mr})),i.a.createElement(s.Route,{path:"".concat("/admin","/*"),component:hr})),Er=(a(271),a(162)),vr=a.n(Er),yr=a(272),br=a.n(yr),Cr=Object(h.c)({routing:c.routerReducer,meta:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{site:{},isFetching:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_SITE_META_REQUEST":return Object(y.a)({},e,{isFetching:!0});case"FETCH_SITE_META_SUCCESS":return Object(y.a)({},e,{site:t.site,isFetching:!1});case"FETCH_SITE_META_FAILURE":return Object(y.a)({},e,{isFetching:!1});default:return e}},config:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{config:{},updated:!1,editorChanged:!1,fieldChanged:!1,isFetching:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_CONFIG_REQUEST":return Object(y.a)({},e,{isFetching:!0});case"FETCH_CONFIG_SUCCESS":return Object(y.a)({},e,{config:t.config,isFetching:!1});case"FETCH_CONFIG_FAILURE":return Object(y.a)({},e,{isFetching:!1});case"PUT_CONFIG_SUCCESS":return Object(y.a)({},e,{config:t.config,editorChanged:!1,updated:!0});case"PUT_CONFIG_FAILURE":return Object(y.a)({},e,{editorChanged:!1});case"CONFIG_EDITOR_CHANGED":return Object(y.a)({},e,{editorChanged:!0,updated:!1});default:return Object(y.a)({},e,{updated:!1,editorChanged:!1})}},pages:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pages:[],page:{},isFetching:!1,updated:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_PAGES_REQUEST":case"FETCH_PAGE_REQUEST":return Object(y.a)({},e,{isFetching:!0});case"FETCH_PAGES_SUCCESS":return Object(y.a)({},e,{pages:t.pages,isFetching:!1,page:{}});case"FETCH_PAGES_FAILURE":return Object(y.a)({},e,{isFetching:!1,pages:[]});case"FETCH_PAGE_SUCCESS":return Object(y.a)({},e,{page:t.page,isFetching:!1});case"FETCH_PAGE_FAILURE":return Object(y.a)({},e,{page:{},isFetching:!1});case"PUT_PAGE_SUCCESS":return Object(y.a)({},e,{page:t.page,updated:!0});case"DELETE_PAGE_SUCCESS":return Object(y.a)({},e,{pages:Ee(e.pages,t.id)});default:return Object(y.a)({},e,{updated:!1})}},collections:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{collections:[],entries:[],currentDocument:{},isFetching:!1,updated:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_COLLECTIONS_REQUEST":case"FETCH_COLLECTION_REQUEST":case"FETCH_DOCUMENT_REQUEST":return Object(y.a)({},e,{isFetching:!0});case"FETCH_COLLECTIONS_SUCCESS":return Object(y.a)({},e,{collections:t.collections,isFetching:!1});case"FETCH_COLLECTION_SUCCESS":return Object(y.a)({},e,{entries:t.entries,isFetching:!1});case"FETCH_DOCUMENT_SUCCESS":return Object(y.a)({},e,{currentDocument:t.doc,isFetching:!1});case"FETCH_COLLECTIONS_FAILURE":return Object(y.a)({},e,{collections:[],isFetching:!1});case"FETCH_COLLECTION_FAILURE":return Object(y.a)({},e,{entries:[],isFetching:!1});case"FETCH_DOCUMENT_FAILURE":return Object(y.a)({},e,{currentDocument:{},isFetching:!1});case"PUT_DOCUMENT_SUCCESS":return Object(y.a)({},e,{currentDocument:t.doc,updated:!0});case"DELETE_DOCUMENT_SUCCESS":return Object(y.a)({},e,{entries:Ee(e.entries,t.id)});default:return Object(y.a)({},e,{updated:!1})}},metadata:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{metadata:{},new_field_count:1,key_prefix:"",fieldChanged:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_TITLE":return Object(y.a)({},e,{metadata:Object(y.a)({},e.metadata,{title:t.title}),fieldChanged:!0});case"UPDATE_BODY":return Object(y.a)({},e,{metadata:Object(y.a)({},e.metadata,{raw_content:t.body}),fieldChanged:!0});case"UPDATE_PATH":return Object(y.a)({},e,{metadata:Object(y.a)({},e.metadata,{path:t.path}),fieldChanged:!0});case"STORE_CONTENT_FIELDS":return Object(y.a)({},e,{metadata:t.content});case"ADD_METAFIELD":return Object(y.a)({},e,{metadata:Object(qt.a)(e,t.namePrefix),new_field_count:e.new_field_count+1});case"REMOVE_METAFIELD":return Object(y.a)({},e,{metadata:Object(qt.f)(e,t.namePrefix,t.key),fieldChanged:!0,key_prefix:"".concat(100*Math.random())});case"UPDATE_FIELD_KEY":return Object(y.a)({},e,{metadata:Object(qt.g)(e,t.namePrefix,t.fieldKey,t.newKey.trim()),fieldChanged:!0});case"UPDATE_FIELD_VALUE":return Object(y.a)({},e,{metadata:Object(qt.h)(e,t.nameAttr,t.value),fieldChanged:!0});case"MOVE_ARRAY_ITEM":return Object(y.a)({},e,{metadata:Object(qt.e)(e,t.namePrefix,t.srcInd,t.targetInd),key_prefix:"".concat(100*Math.random()),fieldChanged:!0});case"CONVERT_FIELD":return Object(y.a)({},e,{metadata:Object(qt.c)(e,t.nameAttr,t.convertType),new_field_count:e.new_field_count+1,fieldChanged:!0});default:return Object(y.a)({},e,{fieldChanged:!1})}},drafts:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{drafts:[],draft:{},isFetching:!1,updated:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_DRAFTS_REQUEST":case"FETCH_DRAFT_REQUEST":return Object(y.a)({},e,{isFetching:!0});case"FETCH_DRAFTS_SUCCESS":return Object(y.a)({},e,{drafts:t.drafts,isFetching:!1,draft:{}});case"FETCH_DRAFTS_FAILURE":return Object(y.a)({},e,{isFetching:!1,drafts:[]});case"FETCH_DRAFT_SUCCESS":return Object(y.a)({},e,{draft:t.draft,isFetching:!1});case"FETCH_DRAFT_FAILURE":return Object(y.a)({},e,{draft:{},isFetching:!1});case"PUT_DRAFT_SUCCESS":return Object(y.a)({},e,{draft:t.draft,updated:!0});case"DELETE_DRAFT_SUCCESS":return Object(y.a)({},e,{drafts:Ee(e.drafts,t.id)});default:return Object(y.a)({},e,{updated:!1})}},datafiles:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{files:[],currentFile:{},isFetching:!1,updated:!1,datafileChanged:!1,fieldChanged:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_DATAFILES_REQUEST":case"FETCH_DATAFILE_REQUEST":return Object(y.a)({},e,{isFetching:!0});case"FETCH_DATAFILES_SUCCESS":return Object(y.a)({},e,{files:t.files,isFetching:!1,currentFile:{}});case"FETCH_DATAFILES_FAILURE":return Object(y.a)({},e,{isFetching:!1,currentFile:{}});case"FETCH_DATAFILE_SUCCESS":return Object(y.a)({},e,{currentFile:t.file,isFetching:!1});case"FETCH_DATAFILE_FAILURE":return Object(y.a)({},e,{currentFile:{},isFetching:!1});case"PUT_DATAFILE_SUCCESS":return Object(y.a)({},e,{currentFile:t.file,updated:!0,datafileChanged:!1});case"PUT_DATAFILE_FAILURE":return Object(y.a)({},e,{datafileChanged:!1});case"DELETE_DATAFILE_SUCCESS":return Object(y.a)({},e,{files:Ee(e.files,t.id)});case"DATAFILE_CHANGED":return Object(y.a)({},e,{datafileChanged:!0,updated:!1});default:return Object(y.a)({},e,{updated:!1,datafileChanged:!1})}},staticfiles:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{files:[],isFetching:!1,uploading:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_STATICFILES_REQUEST":return Object(y.a)({},e,{isFetching:!0});case"FETCH_STATICFILES_SUCCESS":return Object(y.a)({},e,{files:t.files,isFetching:!1});case"FETCH_STATICFILES_FAILURE":return Object(y.a)({},e,{isFetching:!1});case"PUT_STATICFILE_REQUEST":return Object(y.a)({},e,{uploading:!0});case"PUT_STATICFILE_SUCCESS":case"PUT_STATICFILE_FAILURE":return Object(y.a)({},e,{uploading:!1});case"DELETE_STATICFILE_SUCCESS":return Object(y.a)({},e,{files:Ee(e.files,t.id)});default:return e}},utils:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{input:"",errors:[]},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SEARCH_CONTENT":return Object(y.a)({},e,{input:t.input});case"CLEAR_ERRORS":return Object(y.a)({},e,{errors:[]});case"VALIDATION_ERROR":return Object(y.a)({},e,{errors:t.errors});default:return Object(y.a)({},e,{input:""})}},notifications:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{notification:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_NOTIFICATION":return Object(y.a)({},e,{notification:t.notification});default:return e}}}),_r=(br()(),function(e){var t=[vr.a];return Object(h.e)(Cr,e,Object(h.d)(h.a.apply(void 0,t)))}),Or=(a(671),_r()),kr=Object(c.syncHistoryWithStore)(s.browserHistory,Or);Object(l.render)(i.a.createElement(o.a,{store:Or},i.a.createElement(s.Router,{history:kr,routes:gr},i.a.createElement(s.Redirect,{from:"".concat("/admin","/"),to:"".concat("/admin","/pages/")}))),document.getElementById("root"))}},[[275,1,2]]]);
|
2
|
-
//# sourceMappingURL=main.dd81e877.chunk.js.map
|