UNPKG

record-editor

Version:

Editor (used in inspirehep.net) for JSON documents with bibliographic metadata

2 lines 41.9 kB
webpackJsonp([1],{G9oL:function(n,l,e){"use strict";Object.defineProperty(l,"__esModule",{value:!0});var t=e("/oeL"),u=function(){return function(){}}(),r=e("5qJj"),o=e("ipzd"),i=e("IksT"),a=e("d+d+"),c=e("J1Nk"),s=e("9ntG"),d=e("BuAv"),_=e("Qrns"),p=e("YzaK"),f=e("EoPk"),h=e("RHc9"),v=e("ZWz7"),g=e("asIx"),m=e("sWh4"),y=e("XPrR"),b=e("wvet"),S=e("QKo9"),C=e("lQKB"),k=e("s7QI"),R=e("lrLV"),P=e("SIAm"),w=e("VWpA"),I=e("2FwN"),O=function(){function n(n,l,e){this.apiService=n,this.jsonStoreService=l,this.toastrService=e}return n.prototype.onFileSelect=function(n){var l=this;if(n){var e=this.toastrService.info("Uploading file...","Wait",I.b);this.apiService.uploadFile(n).subscribe(function(t){l.jsonStoreService.addIn(["documents","-"],{url:t,key:n.name}),l.toastrService.clear(e.toastId),l.toastrService.success("File uploaded","Success")},function(n){l.toastrService.clear(e.toastId),l.toastrService.error("Could not upload the file","Error!")})}},n.ctorParameters=function(){return[{type:w.b},{type:P.b},{type:b.h}]},n}(),x=[[""]],j=t._19({encapsulation:0,styles:x,data:{}});function A(n){return t._46(2,[(n()(),t._22(0,0,[["uploader",1]],null,0,"input",[["accept","application/pdf"],["type","file"]],[[4,"display",null]],[[null,"change"]],function(n,l,e){var t=!0,u=n.component;"change"===l&&(t=!1!==u.onFileSelect(e.target.files[0])&&t);return t},null,null)),(n()(),t._44(-1,null,["\n"])),(n()(),t._22(2,0,null,null,1,"button",[["type","button"]],null,[[null,"click"]],function(n,l,e){var u=!0;"click"===l&&(u=!1!==t._36(n,0).click()&&u);return u},null,null)),(n()(),t._44(-1,null,["Upload"]))],null,function(n,l){n(l,0,0,"none")})}t._17("re-file-upload-button",O,function(n){return t._46(0,[(n()(),t._22(0,0,null,null,1,"re-file-upload-button",[],null,null,null,A,j)),t._20(1,49152,null,0,O,[m.a,y.a,b.h],null,null)],null,null)},{},{},[]);var U,M=e("OrGp"),D=e("zihN"),T=e("1VXn"),E=e("ls8O"),F=e("vNM0"),B=e("QaWf"),q=e("y2v8"),$=e("Ezgg"),z=e("xVWs"),V=e("tVim"),W=e("EW85"),L=e("BkNc"),N=e("DFJI"),Z=this&&this.__extends||(U=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,l){n.__proto__=l}||function(n,l){for(var e in l)l.hasOwnProperty(e)&&(n[e]=l[e])},function(n,l){function e(){this.constructor=n}U(n,l),n.prototype=null===l?Object.create(l):(e.prototype=l.prototype,new e)}),Q=function(n){function l(l,e,t,u,r,o,i){var a=n.call(this)||this;return a.changeDetectorRef=l,a.route=e,a.apiService=t,a.appConfigService=u,a.toastrService=r,a.domUtilsService=o,a.globalAppStateService=i,a}return Z(l,n),l.prototype.ngOnChanges=function(n){(n.recordId||n.recordType)&&this.recordId&&this.recordType&&(this.record=void 0,this.fetch(this.recordType,this.recordId))},l.prototype.ngOnInit=function(){var n=this;this.domUtilsService.registerBeforeUnloadPrompt(),this.domUtilsService.fitEditorHeightFullPageOnResize(),this.domUtilsService.fitEditorHeightFullPage(),this.recordId&&this.recordType||this.route.params.filter(function(n){return n.recid}).takeUntil(this.isDestroyed).subscribe(function(l){n.fetch(l.type,l.recid)}),this.globalAppStateService.jsonBeingEdited$.takeUntil(this.isDestroyed).subscribe(function(l){n.record=l,n.changeDetectorRef.markForCheck()}),this.appConfigService.onConfigChange.takeUntil(this.isDestroyed).subscribe(function(l){n.config=Object.assign({},l),n.changeDetectorRef.markForCheck()})},l.prototype.onRecordChange=function(n){this.revision?this.toastrService.warning("You are changing the revision and your changes will be lost!","Warning"):(this.globalAppStateService.jsonBeingEdited$.next(n),this.globalAppStateService.isJsonUpdated$.next(!0))},l.prototype.onRevisionRevert=function(){this.globalAppStateService.jsonBeingEdited$.next(this.revision),this.revision=void 0,this.changeDetectorRef.markForCheck()},l.prototype.onRevisionChange=function(n){this.revision=n,this.changeDetectorRef.markForCheck()},l.prototype.onValidationProblems=function(n){this.globalAppStateService.validationProblems$.next(n)},l.prototype.fetch=function(n,l){var e,t=this;this.apiService.checkEditorPermission(n,l).then(function(){return e=t.toastrService.info("Loading "+n+"/"+l,"Wait").toastId,t.apiService.fetchRecord(n,l)}).then(function(n){var l=n.metadata;return t.globalAppStateService.jsonBeingEdited$.next(l),t.globalAppStateService.isJsonUpdated$.next(!1),t.config=t.appConfigService.getConfigForRecord(l),t.apiService.fetchUrl(l.$schema)}).then(function(n){t.toastrService.clear(e),t.schema=n,t.changeDetectorRef.markForCheck()}).catch(function(u){t.toastrService.clear(e),403===u.status?t.toastrService.error("Logged in user can not access to the record: "+n+"/"+l,"Forbidden"):t.toastrService.error("Could not load the record!","Error")})},l.ctorParameters=function(){return[{type:t.j},{type:L.a},{type:w.f},{type:w.a},{type:b.h},{type:w.c},{type:w.d}]},l}(N.b),G=e("7e4G"),J=e("tWvV"),H=e("MP6C"),K=e("k8C3"),X=e("vWeb"),Y=e("aAYB"),nn=e("z3D9"),ln=e("0Pg/"),en=e("qbdv"),tn=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,l){n.__proto__=l}||function(n,l){for(var e in l)l.hasOwnProperty(e)&&(n[e]=l[e])};return function(l,e){function t(){this.constructor=l}n(l,e),l.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),un=function(n){function l(l,e,t,u,r,o){var i=n.call(this)||this;return i.route=l,i.router=e,i.changeDetectorRef=t,i.globalAppStateService=u,i.recordSearchService=r,i.savePreviewModalService=o,i}return tn(l,n),l.prototype.ngOnInit=function(){var n=this;this.recordSearchService.cursor$.takeUntil(this.isDestroyed).subscribe(function(l){n.cursor=l,n.changeDetectorRef.markForCheck()}),this.recordSearchService.resultCount$.takeUntil(this.isDestroyed).subscribe(function(l){n.resultCount=l,n.changeDetectorRef.markForCheck()}),this.route.queryParams.takeUntil(this.isDestroyed).subscribe(function(l){n.query=l.query,n.changeDetectorRef.markForCheck()}),this.route.params.takeUntil(this.isDestroyed).subscribe(function(l){n.recordType=l.type,n.changeDetectorRef.markForCheck()}),this.route.params.filter(function(n){return n.recid}).takeUntil(this.isDestroyed).subscribe(function(l){n.query=l.recid,n.recordSearchService.resultCount$.next(void 0),n.changeDetectorRef.markForCheck()}),this.globalAppStateService.jsonBeingEdited$.takeUntil(this.isDestroyed).subscribe(function(l){n.record=l}),this.globalAppStateService.isJsonUpdated$.distinctUntilChanged().takeUntil(this.isDestroyed).subscribe(function(l){n.isRecordUpdated=l})},l.prototype.searchOrGo=function(){var n=this.query;!isNaN(+n)?this.router.navigate([this.recordType+"/"+n]):this.router.navigate([this.recordType+"/search"],{queryParams:{query:n}})},l.prototype.onNextClick=function(){var n=this;this.isRecordUpdated?this.savePreviewModalService.displayModal({record:this.record,onCancel:function(){return n.next()},onConfirm:function(){return n.next()}}):this.next()},l.prototype.onPreviousClick=function(){var n=this;this.isRecordUpdated?this.savePreviewModalService.displayModal({record:this.record,onCancel:function(){return n.previous()},onConfirm:function(){return n.previous()}}):this.previous()},l.prototype.next=function(){this.cursor++,this.recordSearchService.setCursor(this.cursor)},l.prototype.previous=function(){this.cursor--,this.recordSearchService.setCursor(this.cursor)},l.ctorParameters=function(){return[{type:L.a},{type:L.k},{type:t.j},{type:w.d},{type:w.h},{type:w.i}]},l}(N.b),rn=e("bm2B"),on=e("7eGr"),an=e("sQaM"),cn=[[".result-text[_ngcontent-%COMP%]{color:#fff;padding-left:5px;padding-right:5px}.form-control[_ngcontent-%COMP%], .input-group-btn[_ngcontent-%COMP%]{width:auto}.search-container[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{padding-right:10px}input.search[_ngcontent-%COMP%]{min-width:300px}.pull-left[_ngcontent-%COMP%]{float:left}.inline[_ngcontent-%COMP%]{display:inline-block}"]],sn=t._19({encapsulation:0,styles:cn,data:{}});function dn(n){return t._46(0,[(n()(),t._22(0,0,null,null,4,null,null,null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(2,0,null,null,1,"span",[["class","result-text form-control-static"]],null,null,null,null,null)),(n()(),t._44(-1,null,["No results"])),(n()(),t._44(-1,null,["\n "]))],null,null)}function _n(n){return t._46(0,[(n()(),t._22(0,0,null,null,2,null,null,null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n "]))],null,null)}function pn(n){return t._46(0,[(n()(),t._22(0,0,null,null,8,null,null,null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(2,0,null,null,0,"i",[["class","btn btn-default fa fa-chevron-left"]],null,[[null,"click"]],function(n,l,e){var t=!0,u=n.component;"click"===l&&(t=!1!==u.onPreviousClick()&&t);return t},null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(4,0,null,null,1,"span",[["class","result-text"]],null,null,null,null,null)),(n()(),t._44(5,null,[""," / ",""])),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(7,0,null,null,0,"i",[["class","btn btn-default fa fa-chevron-right"]],null,[[null,"click"]],function(n,l,e){var t=!0,u=n.component;"click"===l&&(t=!1!==u.onNextClick()&&t);return t},null,null)),(n()(),t._44(-1,null,["\n "]))],null,function(n,l){var e=l.component;n(l,5,0,e.cursor+1,e.resultCount)})}function fn(n){return t._46(0,[(n()(),t._22(0,0,null,null,14,"div",[["class","navbar-form col-md-5 inline"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(2,0,null,null,11,null,null,null,null,null,null,null)),t._20(3,16384,null,0,en.o,[],{ngSwitch:[0,"ngSwitch"]},null),(n()(),t._44(-1,null,["\n "])),(n()(),t._16(16777216,null,null,1,null,dn)),t._20(6,278528,null,0,en.p,[t._4,t.Z,en.o],{ngSwitchCase:[0,"ngSwitchCase"]},null),(n()(),t._44(-1,null,["\n "])),(n()(),t._16(16777216,null,null,1,null,_n)),t._20(9,278528,null,0,en.p,[t._4,t.Z,en.o],{ngSwitchCase:[0,"ngSwitchCase"]},null),(n()(),t._44(-1,null,["\n "])),(n()(),t._16(16777216,null,null,1,null,pn)),t._20(12,16384,null,0,en.q,[t._4,t.Z,en.o],null,null),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n"]))],function(n,l){n(l,3,0,l.component.resultCount);n(l,6,0,0);n(l,9,0,1)},null)}function hn(n){return t._46(2,[(n()(),t._22(0,0,null,null,13,"div",[["class","navbar-form input-group col-md-7 pull-left inline"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(2,0,null,null,5,"input",[["class","form-control search"],["placeholder","Search records"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"keyup.enter"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(n,l,e){var u=!0,r=n.component;"input"===l&&(u=!1!==t._36(n,3)._handleInput(e.target.value)&&u);"blur"===l&&(u=!1!==t._36(n,3).onTouched()&&u);"compositionstart"===l&&(u=!1!==t._36(n,3)._compositionStart()&&u);"compositionend"===l&&(u=!1!==t._36(n,3)._compositionEnd(e.target.value)&&u);"ngModelChange"===l&&(u=!1!==(r.query=e)&&u);"keyup.enter"===l&&(u=!1!==r.searchOrGo()&&u);return u},null,null)),t._20(3,16384,null,0,rn.d,[t.Q,t.p,[2,rn.a]],null,null),t._41(1024,null,rn.f,function(n){return[n]},[rn.d]),t._20(5,671744,null,0,rn.k,[[8,null],[8,null],[8,null],[2,rn.f]],{model:[0,"model"]},{update:"ngModelChange"}),t._41(2048,null,rn.g,null,[rn.k]),t._20(7,16384,null,0,rn.h,[rn.g],null,null),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(9,0,null,null,3,"span",[["class","input-group-btn"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(11,0,null,null,0,"a",[["class","btn btn-default fa fa-search"]],null,[[null,"click"]],function(n,l,e){var t=!0,u=n.component;"click"===l&&(t=!1!==u.searchOrGo()&&t);return t},null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n"])),(n()(),t._44(-1,null,["\n"])),(n()(),t._16(16777216,null,null,1,null,fn)),t._20(16,16384,null,0,en.l,[t._4,t.Z],{ngIf:[0,"ngIf"]},null)],function(n,l){var e=l.component;n(l,5,0,e.query),n(l,16,0,e.resultCount>=0)},function(n,l){n(l,2,0,t._36(l,7).ngClassUntouched,t._36(l,7).ngClassTouched,t._36(l,7).ngClassPristine,t._36(l,7).ngClassDirty,t._36(l,7).ngClassValid,t._36(l,7).ngClassInvalid,t._36(l,7).ngClassPending)})}t._17("re-search-bar",un,function(n){return t._46(0,[(n()(),t._22(0,0,null,null,1,"re-search-bar",[],null,null,null,hn,sn)),t._20(1,245760,null,0,un,[L.a,L.k,t.j,ln.a,on.a,an.a],null,null)],function(n,l){n(l,1,0)},null)},{},{},[]);var vn=e("yoi/"),gn=e("lzzA"),mn=e("s18B"),yn=e("poDJ"),bn=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,l){n.__proto__=l}||function(n,l){for(var e in l)l.hasOwnProperty(e)&&(n[e]=l[e])};return function(l,e){function t(){this.constructor=l}n(l,e),l.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),Sn=function(n){function l(l,e,t,u,r,o){var i=n.call(this)||this;return i.router=l,i.route=e,i.toastrService=t,i.recordApiService=u,i.domUtilsService=r,i.globalAppStateService=o,i}return bn(l,n),l.prototype.ngOnInit=function(){var n=this;this.route.params.map(function(n){return n.type}).takeUntil(this.isDestroyed).subscribe(function(l){n.currentRecordType=l}),this.globalAppStateService.jsonBeingEdited$.takeUntil(this.isDestroyed).subscribe(function(l){n.record=l})},l.prototype.onMergeClick=function(){var n=this,l=this.toastrService.info("Merging records...","Loading",I.b);this.recordApiService.saveRecord(this.record).switchMap(function(){return n.recordApiService.manualMerge(n.updateRecordId)}).subscribe(function(e){n.toastrService.clear(l.toastId),n.router.navigate(["holdingpen/"+e])},function(){n.toastrService.clear(l.toastId),n.toastrService.error("Could not merge!","Error")})},l.prototype.openUpdateRecordInNewTab=function(){this.domUtilsService.openHostRelativeUrlInNewTab(this.currentRecordType+"/"+this.updateRecordId)},l.prototype.show=function(){this.modal.show()},l.ctorParameters=function(){return[{type:L.k},{type:L.a},{type:b.h},{type:w.f},{type:w.c},{type:w.d}]},l}(N.b),Cn=e("bAhW"),kn=e("SajZ"),Rn=[[".record-link[_ngcontent-%COMP%]{margin-left:12px}"]],Pn=t._19({encapsulation:0,styles:Rn,data:{}});function wn(n){return t._46(0,[(n()(),t._22(0,0,null,null,1,"a",[["class","record-link"],["href","javascript:void(0)"]],null,[[null,"click"]],function(n,l,e){var t=!0,u=n.component;"click"===l&&(t=!1!==u.openUpdateRecordInNewTab()&&t);return t},null,null)),(n()(),t._44(1,null,["Check ","/"," on inspire"]))],null,function(n,l){var e=l.component;n(l,1,0,e.currentRecordType,e.updateRecordId)})}function In(n){return t._46(2,[t._42(402653184,1,{modal:0}),(n()(),t._22(1,16777216,null,null,61,"div",[["bsModal",""],["class","modal fade"],["role","dialog"],["tabindex","-1"]],null,[[null,"click"],[null,"keydown.esc"]],function(n,l,e){var u=!0;"click"===l&&(u=!1!==t._36(n,2).onClick(e)&&u);"keydown.esc"===l&&(u=!1!==t._36(n,2).onEsc()&&u);return u},null,null)),t._20(2,212992,[[1,4],["modal",4]],0,mn.a,[t.p,t._4,t.Q,yn.a],{config:[0,"config"]},null),t._39(3,{backdrop:0}),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(5,0,null,null,56,"div",[["class","modal-dialog modal-md"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(7,0,null,null,53,"div",[["class","modal-content"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(9,0,null,null,10,"div",[["class","modal-header"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(11,0,null,null,1,"h4",[["class","modal-title pull-left"]],null,null,null,null,null)),(n()(),t._44(-1,null,["Merge records"])),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(14,0,null,null,4,"button",[["aria-label","Close"],["class","close pull-right"],["type","button"]],null,[[null,"click"]],function(n,l,e){var u=!0;"click"===l&&(u=!1!==t._36(n,2).hide()&&u);return u},null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(16,0,null,null,1,"span",[],null,null,null,null,null)),(n()(),t._44(-1,null,["\xd7"])),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(21,0,null,null,38,"div",[["class","modal-body form-horizontal"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(23,0,null,null,14,"div",[["class","form-group"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(25,0,null,null,1,"label",[["class","col-sm-12"],["for","updateRecordIdInput"]],null,null,null,null,null)),(n()(),t._44(-1,null,["Fill in the record id that should be merged into the current record"])),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(28,0,null,null,8,"div",[["class","col-sm-12"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(30,0,null,null,5,"input",[["class","form-control"],["id","updateRecordIdInput"],["placeholder","record id"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(n,l,e){var u=!0,r=n.component;"input"===l&&(u=!1!==t._36(n,31)._handleInput(e.target.value)&&u);"blur"===l&&(u=!1!==t._36(n,31).onTouched()&&u);"compositionstart"===l&&(u=!1!==t._36(n,31)._compositionStart()&&u);"compositionend"===l&&(u=!1!==t._36(n,31)._compositionEnd(e.target.value)&&u);"ngModelChange"===l&&(u=!1!==(r.updateRecordId=e)&&u);return u},null,null)),t._20(31,16384,null,0,rn.d,[t.Q,t.p,[2,rn.a]],null,null),t._41(1024,null,rn.f,function(n){return[n]},[rn.d]),t._20(33,671744,null,0,rn.k,[[8,null],[8,null],[8,null],[2,rn.f]],{model:[0,"model"]},{update:"ngModelChange"}),t._41(2048,null,rn.g,null,[rn.k]),t._20(35,16384,null,0,rn.h,[rn.g],null,null),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(39,0,null,null,19,"div",[["class","form-group"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(41,0,null,null,4,"div",[["class","col-sm-12"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(43,0,null,null,1,"label",[],null,null,null,null,null)),(n()(),t._44(-1,null,["The record above will be deleted"])),(n()(),t._44(-1,null,[" \n "])),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(47,0,null,null,10,"div",[["class","col-sm-12"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(49,0,null,null,4,"button",[["class","btn btn-default"],["id","mergeButton"]],null,[[null,"click"]],function(n,l,e){var t=!0,u=n.component;"click"===l&&(t=!1!==u.onMergeClick()&&t);return t},null,null)),(n()(),t._22(50,0,null,null,0,"i",[["class","fa fa-code-fork"]],null,null,null,null,null)),(n()(),t._44(-1,null,[" "])),(n()(),t._22(52,0,null,null,1,"span",[],null,null,null,null,null)),(n()(),t._44(-1,null,["Merge"])),(n()(),t._44(-1,null,["\n "])),(n()(),t._16(16777216,null,null,1,null,wn)),t._20(56,16384,null,0,en.l,[t._4,t.Z],{ngIf:[0,"ngIf"]},null),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n"]))],function(n,l){var e=l.component;n(l,2,0,n(l,3,0,"static")),n(l,33,0,e.updateRecordId),n(l,56,0,e.updateRecordId)},function(n,l){n(l,30,0,t._36(l,35).ngClassUntouched,t._36(l,35).ngClassTouched,t._36(l,35).ngClassPristine,t._36(l,35).ngClassDirty,t._36(l,35).ngClassValid,t._36(l,35).ngClassInvalid,t._36(l,35).ngClassPending)})}t._17("re-manual-merge-modal",Sn,function(n){return t._46(0,[(n()(),t._22(0,0,null,null,1,"re-manual-merge-modal",[],null,null,null,In,Pn)),t._20(1,245760,null,0,Sn,[L.k,L.a,b.h,Cn.a,kn.a,ln.a],null,null)],function(n,l){n(l,1,0)},null)},{},{},[]);var On=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,l){n.__proto__=l}||function(n,l){for(var e in l)l.hasOwnProperty(e)&&(n[e]=l[e])};return function(l,e){function t(){this.constructor=l}n(l,e),l.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),xn=function(n){function l(l,e,u,r,o,i){var a=n.call(this)||this;return a.changeDetectorRef=l,a.apiService=e,a.recordCleanupService=u,a.globalAppStateService=r,a.domUtilsService=o,a.toastrService=i,a.displayingRevision=!1,a.revisionChange=new t.r,a.revisionRevert=new t.r,a.hasAnyValidationProblem=!1,a}return On(l,n),l.prototype.ngOnInit=function(){var n=this;this.globalAppStateService.hasAnyValidationProblem$.takeUntil(this.isDestroyed).subscribe(function(l){n.hasAnyValidationProblem=l,n.changeDetectorRef.markForCheck()}),this.globalAppStateService.jsonBeingEdited$.takeUntil(this.isDestroyed).subscribe(function(l){n.record=l,n.changeDetectorRef.markForCheck()}),this.globalAppStateService.pidTypeBeingEdited$.takeUntil(this.isDestroyed).subscribe(function(l){n.pidType=l})},l.prototype.onRevisionChange=function(n){this.revisionChange.emit(n),this.displayingRevision=!!n,this.changeDetectorRef.markForCheck()},l.prototype.onRevisionRevert=function(){this.revisionRevert.emit(),this.displayingRevision=!1,this.changeDetectorRef.markForCheck()},l.prototype.onSaveClick=function(){var n=this,l=this.record.references;this.apiService.getLinkedReferences(l).then(function(l){n.record.references=l;var e=Object.assign({},n.record);n.globalAppStateService.jsonBeingEdited$.next(e),n.cleanupAndSaveRecord(e)}).catch(function(){n.cleanupAndSaveRecord(n.record)})},l.prototype.cleanupAndSaveRecord=function(n){var l=this;this.recordCleanupService.cleanup(n),this.apiService.saveRecord(n).subscribe(function(){return l.onSaveSuccess()},function(n){return l.onSaveError(n)})},l.prototype.onSaveSuccess=function(){this.domUtilsService.unregisterBeforeUnloadPrompt(),"conferences"===this.pidType?window.location.href="/conferences/"+this.record.control_number:this.toastrService.success("Changes are saved","Success")},l.prototype.onSaveError=function(n){n.message?this.toastrService.error(n.message,"Error",I.b):this.toastrService.error("Could not save the record","Error")},Object.defineProperty(l.prototype,"saveButtonDisabledAttribute",{get:function(){return this.hasAnyValidationProblem?"disabled":""},enumerable:!0,configurable:!0}),l.ctorParameters=function(){return[{type:t.j},{type:w.f},{type:w.g},{type:w.d},{type:w.c},{type:b.h}]},l}(N.b),jn=e("6jTL"),An=[d.a,[".fa-code-fork[_ngcontent-%COMP%]{color:#fff;font-size:23px;padding:0 0 0 12px}"]],Un=t._19({encapsulation:0,styles:An,data:{}});function Mn(n){return t._46(0,[(n()(),t._22(0,0,null,null,17,"div",[],[[2,"re-disabled",null]],null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(2,0,null,null,6,"button",[["class","btn navbar-btn btn-success"],["type","button"]],[[8,"disabled",0]],[[null,"click"]],function(n,l,e){var t=!0,u=n.component;"click"===l&&(t=!1!==u.onSaveClick(e)&&t);return t},null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(4,0,null,null,0,"i",[["aria-hidden","true"],["class","fa fa-floppy-o"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(6,0,null,null,1,"span",[],null,null,null,null,null)),(n()(),t._44(-1,null,["Save"])),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(10,0,null,null,1,"re-undo-button",[],null,null,null,G.b,G.a)),t._20(11,49152,null,0,J.a,[y.a,H.a],null,null),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(13,0,null,null,0,"i",[["class","btn fa fa-code-fork"]],null,[[null,"click"]],function(n,l,e){var u=!0;"click"===l&&(u=!1!==t._36(n.parent,34).show()&&u);return u},null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(15,0,null,null,1,"re-help-modal-button",[],null,null,null,K.b,K.a)),t._20(16,114688,null,0,X.a,[],null,null),(n()(),t._44(-1,null,["\n "]))],function(n,l){n(l,16,0)},function(n,l){var e=l.component;n(l,0,0,e.displayingRevision),n(l,2,0,e.saveButtonDisabledAttribute)})}function Dn(n){return t._46(0,[(n()(),t._22(0,0,null,null,4,"div",[["class","nav navbar-nav navbar-right col-md-2"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(2,0,null,null,1,"re-record-history",[],null,[[null,"revisionChange"],[null,"revisionRevert"]],function(n,l,e){var t=!0,u=n.component;"revisionChange"===l&&(t=!1!==u.onRevisionChange(e)&&t);"revisionRevert"===l&&(t=!1!==u.onRevisionRevert()&&t);return t},Y.b,Y.a)),t._20(3,245760,null,0,nn.a,[m.a,t.j,ln.a],null,{revisionChange:"revisionChange",revisionRevert:"revisionRevert"}),(n()(),t._44(-1,null,["\n "]))],function(n,l){n(l,3,0)},null)}function Tn(n){return t._46(2,[(n()(),t._22(0,0,null,null,31,"nav",[["class","navbar navbar-default"],["id","editor-toolbar"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(2,0,null,null,28,"div",[["class","container-fluid"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(4,0,null,null,25,"div",[["class","row"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(6,0,null,null,4,"div",[["class","navbar-header col-md-2"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._16(16777216,null,null,1,null,Mn)),t._20(9,16384,null,0,en.l,[t._4,t.Z],{ngIf:[0,"ngIf"]},null),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n\n "])),(n()(),t._22(12,0,null,null,13,"div",[["class","nav navbar-nav col-md-8"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(14,0,null,null,4,"div",[["class","col-md-6"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(16,0,null,null,1,"re-search-bar",[],null,null,null,hn,sn)),t._20(17,245760,null,0,un,[L.a,L.k,t.j,ln.a,on.a,an.a],null,null),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(20,0,null,null,4,"div",[["class","col-md-6"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(22,0,null,null,1,"re-tickets",[],null,null,null,vn.b,vn.a)),t._20(23,245760,null,0,gn.a,[m.a,ln.a,b.h,t.j],null,null),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n\n "])),(n()(),t._16(16777216,null,null,1,null,Dn)),t._20(28,16384,null,0,en.l,[t._4,t.Z],{ngIf:[0,"ngIf"]},null),(n()(),t._44(-1,null,["\n\n "])),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n"])),(n()(),t._44(-1,null,["\n\n"])),(n()(),t._22(33,0,null,null,1,"re-manual-merge-modal",[],null,null,null,In,Pn)),t._20(34,245760,[["manualMergeModal",4]],0,Sn,[L.k,L.a,b.h,Cn.a,kn.a,ln.a],null,null)],function(n,l){var e=l.component;n(l,9,0,e.record),n(l,17,0),n(l,23,0),n(l,28,0,e.record),n(l,34,0)},null)}t._17("re-record-toolbar",xn,function(n){return t._46(0,[(n()(),t._22(0,0,null,null,1,"re-record-toolbar",[],null,null,null,Tn,Un)),t._20(1,245760,null,0,xn,[t.j,Cn.a,jn.a,ln.a,kn.a,b.h],null,null)],function(n,l){n(l,1,0)},null)},{},{revisionChange:"revisionChange",revisionRevert:"revisionRevert"},[]);var En=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,l){n.__proto__=l}||function(n,l){for(var e in l)l.hasOwnProperty(e)&&(n[e]=l[e])};return function(l,e){function t(){this.constructor=l}n(l,e),l.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),Fn=function(n){function l(l,e,t,u,r,o){var i=n.call(this)||this;return i.toastrService=l,i.recordPreviewModalService=e,i.apiService=t,i.domUtilsService=u,i.recordCleanupService=r,i.globalAppStateService=o,i}return En(l,n),l.prototype.ngOnInit=function(){var n=this;this.recordPreviewModalService.onPreview.do(function(l){n.options=l}).switchMap(function(l){return n.apiService.preview(l.record)}).takeUntil(this.isDestroyed).subscribe(function(l){n.previewHtml=l,n.modal.show()})},l.prototype.onShown=function(){this.domUtilsService.writeContentIntoIFrameById(this.previewHtml,"re-preview-iframe")},l.prototype.onConfirm=function(){var n=this,l=this.options.record,e=l.references;this.apiService.getLinkedReferences(e).then(function(e){l.references=e;var t=Object.assign({},l);n.globalAppStateService.jsonBeingEdited$.next(t),n.recordCleanupService.cleanup(t),n.apiService.saveRecord(t).subscribe(function(){return n.onSaveSuccess()},function(l){return n.onSaveError(l)})}).catch(function(){n.recordCleanupService.cleanup(l),n.apiService.saveRecord(l).subscribe(function(){return n.onSaveSuccess()},function(l){return n.onSaveError(l)})})},l.prototype.onSaveSuccess=function(){this.domUtilsService.unregisterBeforeUnloadPrompt(),this.modal.hide(),this.options.onConfirm&&this.options.onConfirm()},l.prototype.onSaveError=function(n){n.message?this.toastrService.error(n.message,"Error",I.b):this.toastrService.error("Could not save the record","Error"),this.modal.hide()},l.prototype.onCancel=function(){this.modal.hide(),this.options.onCancel&&this.options.onCancel()},l.ctorParameters=function(){return[{type:b.h},{type:w.i},{type:w.f},{type:w.c},{type:w.g},{type:w.d}]},l}(N.b),Bn=[[".height-85-vh[_ngcontent-%COMP%]{height:85vh}.grow[_ngcontent-%COMP%]{-ms-flex-positive:1;flex-grow:1}.flex-column[_ngcontent-%COMP%]{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.top-padding[_ngcontent-%COMP%]{padding-top:15px}"]],qn=t._19({encapsulation:0,styles:Bn,data:{}});function $n(n){return t._46(0,[t._42(402653184,1,{modal:0}),(n()(),t._22(1,16777216,null,null,40,"div",[["bsModal",""],["class","modal fade"],["role","dialog"],["tabindex","-1"]],null,[[null,"onShown"],[null,"click"],[null,"keydown.esc"]],function(n,l,e){var u=!0,r=n.component;"click"===l&&(u=!1!==t._36(n,2).onClick(e)&&u);"keydown.esc"===l&&(u=!1!==t._36(n,2).onEsc()&&u);"onShown"===l&&(u=!1!==r.onShown()&&u);return u},null,null)),t._20(2,212992,[[1,4],["modal",4]],0,mn.a,[t.p,t._4,t.Q,yn.a],{config:[0,"config"]},{onShown:"onShown"}),t._39(3,{backdrop:0}),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(5,0,null,null,35,"div",[["class","modal-dialog modal-lg"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(7,0,null,null,32,"div",[["class","modal-content"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(9,0,null,null,7,"div",[["class","modal-header"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(11,0,null,null,1,"button",[["class","close"],["type","button"]],null,[[null,"click"]],function(n,l,e){var u=!0;"click"===l&&(u=!1!==t._36(n,2).hide()&&u);return u},null,null)),(n()(),t._44(-1,null,["\xd7"])),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(14,0,null,null,1,"h4",[["class","modal-title"]],null,null,null,null,null)),(n()(),t._44(-1,null,["Preview"])),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(18,0,null,null,20,"div",[["class","modal-body height-85-vh flex-column"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(20,0,null,null,4,"div",[["class","grow flex-column"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(22,0,null,null,1,"iframe",[["class","grow"],["id","re-preview-iframe"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(26,0,null,null,11,"div",[["class","top-padding"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(28,0,null,null,3,"button",[["class","btn btn-success"]],null,[[null,"click"]],function(n,l,e){var t=!0,u=n.component;"click"===l&&(t=!1!==u.onConfirm()&&t);return t},null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(30,0,null,null,0,"i",[["class","fa fa-check"]],null,null,null,null,null)),(n()(),t._44(-1,null,[" Confirm\n "])),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(33,0,null,null,3,"button",[["class","btn btn-danger pull-right"]],null,[[null,"click"]],function(n,l,e){var t=!0,u=n.component;"click"===l&&(t=!1!==u.onCancel()&&t);return t},null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(35,0,null,null,0,"i",[["class","fa fa-times"]],null,null,null,null,null)),(n()(),t._44(-1,null,[" Cancel\n "])),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n"]))],function(n,l){n(l,2,0,n(l,3,0,"static"))},null)}t._17("re-save-preview-modal",Fn,function(n){return t._46(0,[(n()(),t._22(0,0,null,null,1,"re-save-preview-modal",[],null,null,null,$n,qn)),t._20(1,245760,null,0,Fn,[b.h,an.a,Cn.a,kn.a,jn.a,ln.a],null,null)],function(n,l){n(l,1,0)},null)},{},{},[]);var zn=e("V0P1"),Vn=[d.a],Wn=t._19({encapsulation:0,styles:Vn,data:{}});function Ln(n){return t._46(0,[(n()(),t._44(-1,null,["\n "])),(n()(),t._22(1,0,null,null,1,"re-reference-brief",[],null,null,null,_.b,_.a)),t._20(2,49152,null,0,p.a,[],{reference:[0,"reference"]},null),(n()(),t._44(-1,null,["\n"]))],function(n,l){n(l,2,0,l.context.item)},null)}function Nn(n){return t._46(0,[(n()(),t._44(-1,null,["\n "])),(n()(),t._22(1,0,null,null,1,"re-affiliation-brief",[],null,null,null,f.b,f.a)),t._20(2,49152,null,0,h.a,[],{affiliation:[0,"affiliation"]},null),(n()(),t._44(-1,null,["\n"]))],function(n,l){n(l,2,0,l.context.item._source)},null)}function Zn(n){return t._46(0,[(n()(),t._44(-1,null,["\n "])),(n()(),t._22(1,0,null,null,13,"div",[["class","row"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(3,0,null,null,4,"div",[["class","col-md-6"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(5,0,null,null,1,"re-ref-extract-actions",[],null,null,null,v.b,v.a)),t._20(6,49152,null,0,g.a,[m.a,y.a,b.h],null,null),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(9,0,null,null,4,"div",[["class","col-md-6"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._22(11,0,null,null,1,"re-link-references-button",[],null,null,null,S.b,S.a)),t._20(12,49152,null,0,C.a,[m.a,y.a,b.h],null,null),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n "])),(n()(),t._44(-1,null,["\n"]))],null,null)}function Qn(n){return t._46(0,[(n()(),t._44(-1,null,["\n "])),(n()(),t._22(1,0,null,null,1,"re-author-extract-actions",[],null,null,null,k.b,k.a)),t._20(2,49152,null,0,R.a,[m.a,y.a,b.h],null,null),(n()(),t._44(-1,null,["\n"]))],null,null)}function Gn(n){return t._46(0,[(n()(),t._44(-1,null,["\n "])),(n()(),t._22(1,0,null,null,1,"re-file-upload-button",[],null,null,null,A,j)),t._20(2,49152,null,0,O,[m.a,y.a,b.h],null,null),(n()(),t._44(-1,null,["\n"]))],null,null)}function Jn(n){return t._46(0,[(n()(),t._22(0,0,null,null,3,"json-editor",[],null,[[null,"recordChange"],[null,"validationProblems"]],function(n,l,e){var t=!0,u=n.component;"recordChange"===l&&(t=!1!==u.onRecordChange(e)&&t);"validationProblems"===l&&(t=!1!==u.onValidationProblems(e)&&t);return t},M.b,M.a)),t._20(1,770048,null,0,D.a,[T.a,E.a,y.a,F.a,B.a,q.a,$.a,z.a,V.a,W.a],{config:[0,"config"],record:[1,"record"],schema:[2,"schema"],templates:[3,"templates"]},{recordChange:"recordChange",validationProblems:"validationProblems"}),t._39(2,{referenceTemplate:0,affiliationAutocompleteTemplate:1,refActionsTemplate:2,authorExtractTemplate:3,fileUploadButtonTemplate:4}),(n()(),t._44(-1,null,["\n "]))],function(n,l){var e=l.component;n(l,1,0,e.config,e.revision||e.record,e.schema,n(l,2,0,t._36(l.parent,0),t._36(l.parent,2),t._36(l.parent,4),t._36(l.parent,6),t._36(l.parent,8)))},null)}function Hn(n){return t._46(2,[(n()(),t._16(0,[["referenceTemplate",2]],null,0,null,Ln)),(n()(),t._44(-1,null,["\n\n"])),(n()(),t._16(0,[["affiliationAutocompleteTemplate",2]],null,0,null,Nn)),(n()(),t._44(-1,null,["\n\n"])),(n()(),t._16(0,[["refActionsTemplate",2]],null,0,null,Zn)),(n()(),t._44(-1,null,["\n\n"])),(n()(),t._16(0,[["authorExtractTemplate",2]],null,0,null,Qn)),(n()(),t._44(-1,null,["\n\n"])),(n()(),t._16(0,[["fileUploadButtonTemplate",2]],null,0,null,Gn)),(n()(),t._44(-1,null,["\n\n"])),(n()(),t._22(10,0,null,null,1,"re-record-toolbar",[],null,[[null,"revisionChange"],[null,"revisionRevert"]],function(n,l,e){var t=!0,u=n.component;"revisionChange"===l&&(t=!1!==u.onRevisionChange(e)&&t);"revisionRevert"===l&&(t=!1!==u.onRevisionRevert()&&t);return t},Tn,Un)),t._20(11,245760,null,0,xn,[t.j,Cn.a,jn.a,ln.a,kn.a,b.h],null,{revisionChange:"revisionChange",revisionRevert:"revisionRevert"}),(n()(),t._44(-1,null,["\n"])),(n()(),t._22(13,0,null,null,4,"div",[["id","editor-container"]],null,null,null,null,null)),(n()(),t._44(-1,null,["\n "])),(n()(),t._16(16777216,null,null,1,null,Jn)),t._20(16,16384,null,0,en.l,[t._4,t.Z],{ngIf:[0,"ngIf"]},null),(n()(),t._44(-1,null,["\n"])),(n()(),t._44(-1,null,["\n\n"])),(n()(),t._22(19,0,null,null,1,"re-save-preview-modal",[],null,null,null,$n,qn)),t._20(20,245760,null,0,Fn,[b.h,an.a,Cn.a,kn.a,jn.a,ln.a],null,null)],function(n,l){var e=l.component;n(l,11,0),n(l,16,0,e.record&&e.schema),n(l,20,0)},null)}var Kn=t._17("re-json-editor-wrapper",Q,function(n){return t._46(0,[(n()(),t._22(0,0,null,null,1,"re-json-editor-wrapper",[],null,null,null,Hn,Wn)),t._20(1,770048,null,0,Q,[t.j,L.a,Cn.a,zn.a,b.h,kn.a,ln.a],null,null)],function(n,l){n(l,1,0)},null)},{recordId:"recordId",recordType:"recordType"},{},[]),Xn=e("AP4T"),Yn=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,l){n.__proto__=l}||function(n,l){for(var e in l)l.hasOwnProperty(e)&&(n[e]=l[e])};return function(l,e){function t(){this.constructor=l}n(l,e),l.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),nl=function(n){function l(l,e,t){var u=n.call(this)||this;return u.route=l,u.changeDetectorRef=e,u.recordSearchService=t,u}return Yn(l,n),l.prototype.ngOnInit=function(){var n=this;this.recordSearchService.cursor$.takeUntil(this.isDestroyed).subscribe(function(l){n.recordCursor=l,n.changeDetectorRef.markForCheck()});Xn.a.combineLatest(this.route.params,this.route.queryParams,function(n,l){return{params:n,queryParams:l}}).do(function(l){n.recordType=l.params.type}).filter(function(n){return Boolean(n.queryParams.query)}).switchMap(function(l){return n.recordSearchService.search(l.params.type,l.queryParams.query)}).takeUntil(this.isDestroyed).subscribe(function(l){n.foundRecordIds=l,n.changeDetectorRef.markForCheck()})},l.ctorParameters=function(){return[{type:L.a},{type:t.j},{type:w.h}]},l}(N.b),ll=[[""]],el=t._19({encapsulation:0,styles:ll,data:{}});function tl(n){return t._46(0,[(n()(),t._22(0,0,null,null,2,"re-json-editor-wrapper",[],null,null,null,Hn,Wn)),t._20(1,770048,null,0,Q,[t.j,L.a,Cn.a,zn.a,b.h,kn.a,ln.a],{recordId:[0,"recordId"],recordType:[1,"recordType"]},null),(n()(),t._44(-1,null,["\n"]))],function(n,l){var e=l.component;n(l,1,0,e.foundRecordIds[e.recordCursor],e.recordType)},null)}function ul(n){return t._46(2,[(n()(),t._16(16777216,null,null,1,null,tl)),t._20(1,16384,null,0,en.l,[t._4,t.Z],{ngIf:[0,"ngIf"]},null),(n()(),t._44(-1,null,["\n"]))],function(n,l){var e=l.component;n(l,1,0,e.recordType&&e.foundRecordIds&&e.recordCursor>=0)},null)}var rl=t._17("re-record-search",nl,function(n){return t._46(0,[(n()(),t._22(0,0,null,null,1,"re-record-search",[],null,null,null,ul,el)),t._20(1,245760,null,0,nl,[L.a,t.j,on.a],null,null)],function(n,l){n(l,1,0)},null)},{},{},[]),ol=e("CPp0"),il=e("/XUI"),al=e("BhHz"),cl=e("SpOm"),sl=e("4zAq"),dl=e("dWcS"),_l=e("PK6g"),pl=e("5bcs"),fl=e("vWr0"),hl=e("OaOX"),vl=e("orhM"),gl=e("L1L1"),ml=e("ziK0"),yl=e("T4lT"),bl=e("98F0"),Sl=e("msmO"),Cl=e("p5CF"),kl=e("gjbK"),Rl=e("FptV"),Pl=e("zsiT"),wl=e("lX4W"),Il=e("EQxj"),Ol=e("bIam"),xl=e("x/Up"),jl=e("G8gw"),Al=e("Xuu1"),Ul=e("eJnt"),Ml=e("yroR"),Dl=e("8zL4"),Tl=e("w+ny"),El=e("ZLW3"),Fl=e("T2Au"),Bl=function(){return function(){}}(),ql=e("pBJ6");e.d(l,"RecordEditorModuleNgFactory",function(){return $l});var $l=t._18(u,[],function(n){return t._33([t._34(512,t.m,t._14,[[8,[r.a,o.a,i.a,a.a,c.a,s.a,rl,Kn]],[3,t.m],t.G]),t._34(4608,en.n,en.m,[t.C]),t._34(4608,rn.q,rn.q,[]),t._34(4608,ol.c,ol.c,[]),t._34(4608,ol.h,ol.b,[]),t._34(5120,ol.j,ol.k,[]),t._34(4608,ol.i,ol.i,[ol.c,ol.h,ol.j]),t._34(4608,ol.g,ol.a,[]),t._34(5120,ol.e,ol.l,[ol.i,ol.g]),t._34(4608,il.a,il.a,[]),t._34(4608,al.a,al.a,[]),t._34(4608,yn.a,yn.a,[t.m,t.I,t.y,al.a,t.g]),t._34(4608,cl.a,cl.a,[]),t._34(4608,sl.a,sl.a,[]),t._34(4608,dl.a,dl.a,[]),t._34(4608,_l.a,_l.a,[t.R,yn.a]),t._34(4608,pl.a,pl.a,[]),t._34(4608,T.a,T.a,[]),t._34(4608,W.a,W.a,[]),t._34(4608,fl.a,fl.a,[ol.e,W.a]),t._34(4608,hl.a,hl.a,[]),t._34(4608,V.a,V.a,[W.a]),t._34(4608,vl.a,vl.a,[W.a]),t._34(4608,H.a,H.a,[V.a,vl.a]),t._34(4608,gl.a,gl.a,[]),t._34(4608,ml.a,ml.a,[]),t._34(4608,B.a,B.a,[W.a]),t._34(4608,yl.a,yl.a,[]),t._34(4608,q.a,q.a,[T.a,W.a,B.a,yl.a]),t._34(4608,y.a,y.a,[W.a,q.a]),t._34(4608,F.a,F.a,[W.a]),t._34(4608,bl.a,bl.a,[]),t._34(4608,$.a,$.a,[gl.a,hl.a]),t._34(4608,z.a,z.a,[F.a,hl.a]),t._34(4608,Sl.a,Sl.a,[T.a]),t._34(4608,Cl.a,Cl.a,[gl.a,H.a,y.a,B.a,W.a,q.a]),t._34(4608,kl.a,kl.a,[]),t._34(4608,E.a,E.a,[]),t._34(4608,Rl.a,Rl.a,[]),t._34(4608,Pl.a,Pl.a,[]),t._34(512,en.c,en.c,[]),t._34(512,rn.n,rn.n,[]),t._34(512,rn.e,rn.e,[]),t._34(512,wl.a,wl.a,[]),t._34(512,Il.a,Il.a,[]),t._34(512,Ol.a,Ol.a,[]),t._34(512,xl.a,xl.a,[]),t._34(512,jl.a,jl.a,[]),t._34(512,Al.a,Al.a,[]),t._34(512,Ul.a,Ul.a,[]),t._34(512,Ml.a,Ml.a,[]),t._34(512,Dl.a,Dl.a,[]),t._34(512,Tl.a,Tl.a,[]),t._34(512,ol.f,ol.f,[]),t._34(512,El.a,El.a,[]),t._34(512,Fl.a,Fl.a,[]),t._34(512,L.l,L.l,[[2,L.q],[2,L.k]]),t._34(512,Bl,Bl,[]),t._34(512,u,u,[]),t._34(256,ql.a,{autoClose:!0},[]),t._34(1024,L.i,function(){return[[{path:":type/search",component:nl},{path:":type/:recid",component:Q}]]},[])])})}}); //# sourceMappingURL=1.chunk.js.map