AUI.add("liferay-portlet-dynamic-data-mapping-custom-fields",function(d){var N=d.Array,B=d.FormBuilderTextField,O=d.FormBuilderField.types,p=Liferay.FormBuilder.Util,m=d.Lang,C=m.String,s=d.DataType.Boolean.parse,P=m.String.camelize,F=d.instanceOf,Q=m.isNull,v=m.isObject,R=m.isUndefined,w=m.isValue,x=function(){for(var a=0;a<Liferay.Portlet.list.length;a++){var b=d.one("#_"+Liferay.Portlet.list[a]+"_indexable");if(b&&"false"===b.getAttribute("value"))return!1}return!0},h=d.config.FormValidator,y=
Liferay.FormBuilder.LOCALIZABLE_FIELD_ATTRS,S='\x3cdiv class\x3d"field-labels-inline"\x3e\x3cimg src\x3d"'+themeDisplay.getPathThemeImages()+'/common/geolocation.png" title\x3d"'+d.Escape.html("G\u00e9o-localiser")+'" /\x3e\x3cdiv\x3e',D='\x3cdiv class\x3d"form-group"\x3e\x3cinput class\x3d"field form-control" type\x3d"text" value\x3d"" readonly\x3d"readonly"\x3e\x3cdiv class\x3d"button-holder"\x3e\x3cbutton class\x3d"btn select-button btn-default" type\x3d"button"\x3e\x3cspan class\x3d"lfr-btn-label"\x3e'+
d.Escape.html("S\u00e9lectionner")+"\x3c/span\x3e\x3c/button\x3e\x3c/div\x3e\x3c/div\x3e",T='\x3cdiv class\x3d"form-group"\x3e\x3cinput class\x3d"field form-control" type\x3d"text" value\x3d"" readonly\x3d"readonly"\x3e\x3cdiv class\x3d"button-holder"\x3e\x3cbutton class\x3d"btn select-button btn-default" type\x3d"button"\x3e\x3cspan class\x3d"lfr-btn-label"\x3e'+d.Escape.html("S\u00e9lectionner")+'\x3c/span\x3e\x3c/button\x3e\x3c/div\x3e\x3clabel class\x3d"control-label"\x3e'+d.Escape.html("Alt")+
'\x3c/label\x3e\x3cinput class\x3d"field form-control" type\x3d"text" value\x3d"" disabled\x3e\x3c/div\x3e',t=Liferay.FormBuilder.UNIQUE_FIELD_NAMES_MAP,G=Liferay.FormBuilder.UNLOCALIZABLE_FIELD_ATTRS;h.STRINGS.structureDuplicateFieldName="Veuillez entrer un nom unique de r\u00e9pertoire.";h.RULES.structureDuplicateFieldName=function(a,b){var c=t.getValue(a);if(c=c&&!c.get("selected"))b.selectText(0,a.length),this.resetField(b);return!c};h.STRINGS.structureFieldName="Veuillez ne saisir que des caract\u00e8res alphanum\u00e9riques et des soulignements.";
h.RULES.structureFieldName=function(a){return p.validateFieldName(a)};h.STRINGS.structureRestrictedFieldName=m.sub("{0} est un mot r\u00e9serv\u00e9 et ne peut \u00eatre utilis\u00e9.",["submit"]);h.RULES.structureRestrictedFieldName=function(a){return"submit"!==a};var H=function(a,b){var c=b.replace(/\n/g,"").split(";");a.setStyle("");c.forEach(function(f,e){var g=f.split(":");if(2==g.length){var k=P(g[0]),g=g[1].trim();a.setStyle(k,g)}})},z=d.Component.create({EXTENDS:d.BaseCellEditor,NAME:"document-library-file-entry-cell-editor",
prototype:{ELEMENT_TEMPLATE:'\x3cinput type\x3d"hidden" /\x3e',getElementsValue:function(){return this.get("value")},_defInitToolbarFn:function(){z.superclass._defInitToolbarFn.apply(this,arguments);this.toolbar.add({label:"S\u00e9lectionner",on:{click:d.bind("_onClickChoose",this)}},1);this.toolbar.add({label:"Effacer",on:{click:d.bind("_onClickClear",this)}},2)},_getDocumentLibrarySelectorURL:function(){var a=this.get("portletNamespace"),b=Liferay.PortletURL.createURL(themeDisplay.getLayoutRelativeControlPanelURL());
b.setParameter("criteria","com.liferay.item.selector.criteria.file.criterion.FileItemSelectorCriterion");b.setParameter("itemSelectedEventName",a+"selectDocumentLibrary");a={desiredItemSelectorReturnTypes:"com.liferay.item.selector.criteria.FileEntryItemSelectorReturnType"};b.setParameter("0_json",JSON.stringify(a));b.setParameter("1_json",JSON.stringify(a));a={desiredItemSelectorReturnTypes:"com.liferay.item.selector.criteria.FileEntryItemSelectorReturnType",URL:this._getUploadURL()};b.setParameter("2_json",
JSON.stringify(a));b.setPortletId(Liferay.PortletKeys.ITEM_SELECTOR);b.setPortletMode("view");b.setWindowState("pop_up");return b.toString()},_getUploadURL:function(){var a=Liferay.PortletURL.createURL(themeDisplay.getLayoutRelativeControlPanelURL());a.setLifecycle(Liferay.PortletURL.ACTION_PHASE);a.setParameter("cmd","add_temp");a.setParameter("javax.portlet.action","/document_library/upload_file_entry");a.setParameter("p_auth",Liferay.authToken);a.setPortletId(Liferay.PortletKeys.DOCUMENT_LIBRARY);
return a.toString()},_isDocumentLibraryDialogOpen:function(){var a=this.get("portletNamespace");return!!Liferay.Util.getWindow(a+"selectDocumentLibrary")},_onClickChoose:function(){var a=this,b=a.get("portletNamespace");(new d.LiferayItemSelectorDialog({eventName:b+"selectDocumentLibrary",on:{selectedItemChange:function(c){if(c=c.newVal)c=JSON.parse(c.value),a._selectFileEntry(c.groupId,c.title,c.uuid)}},url:a._getDocumentLibrarySelectorURL()})).open()},_onClickClear:function(){this.set("value","")},
_onDocMouseDownExt:function(a){var b=this.get("boundingBox");this._isDocumentLibraryDialogOpen()||b.contains(a.target)||this.set("visible",!1)},_selectFileEntry:function(a,b,c){this.set("value",JSON.stringify({groupId:a,title:b,uuid:c}))},_syncElementsFocus:function(){var a=this.toolbar.get("boundingBox").one("button");a?a.focus():z.superclass._syncElementsFocus.apply(this,arguments)},_syncFileLabel:function(a,b){var c=this.get("contentBox"),f=c.one("a");f||(f=d.Node.create("\x3ca\x3e\x3c/a\x3e"),
c.prepend(f));f.setAttribute("href",b);f.setContent(C.escapeHTML(a))},_uiSetValue:function(a){var b=this;a?p.getFileEntry(a,function(c){var f=p.getFileEntryURL(c);b._syncFileLabel(c.title,f)}):(b._syncFileLabel("",""),a="");b.elements.val(a)}}}),A=d.Component.create({EXTENDS:d.BaseCellEditor,NAME:"journal-article-cell-editor",prototype:{ELEMENT_TEMPLATE:'\x3cinput type\x3d"hidden" /\x3e',getElementsValue:function(){return this.get("value")},getParsedValue:function(a){m.isString(a)&&(a=""!==a?JSON.parse(a):
{});return a},setValue:function(a){a=this.getParsedValue(a);a=a.className||a.classPK?JSON.stringify(a):"";this.set("value",a)},_defInitToolbarFn:function(){A.superclass._defInitToolbarFn.apply(this,arguments);this.toolbar.add({label:"S\u00e9lectionner",on:{click:d.bind("_onClickChoose",this)}},1);this.toolbar.add({label:"Effacer",on:{click:d.bind("_onClickClear",this)}},2)},_getWebContentSelectorURL:function(){var a=Liferay.PortletURL.createRenderURL(themeDisplay.getURLControlPanel());a.setParameter("eventName",
"selectContent");a.setParameter("groupId",themeDisplay.getScopeGroupId());a.setParameter("p_auth",Liferay.authToken);a.setParameter("selectedGroupId",themeDisplay.getScopeGroupId());a.setParameter("showNonindexable",!0);a.setParameter("showScheduled",!0);a.setParameter("typeSelection","com.liferay.journal.model.JournalArticle");a.setPortletId("com_liferay_asset_browser_web_portlet_AssetBrowserPortlet");a.setWindowState("pop_up");return a},_handleCancelEvent:function(a){this.get("boundingBox").hide()},
_handleSaveEvent:function(a){A.superclass._handleSaveEvent.apply(this,arguments);this.get("boundingBox").hide()},_onClickChoose:function(a){var b=this;Liferay.Util.selectEntity({dialog:{constrain:!0,destroyOnHide:!0,modal:!0},eventName:"selectContent",id:"selectContent",title:"Contenu Web",uri:b._getWebContentSelectorURL()},function(c){0<c.details.length&&(c=c.details[0],b.setValue({className:c.assetclassname,classPK:c.assetclasspk}))})},_onClickClear:function(){this.set("value","")},_onDocMouseDownExt:function(a){this.get("boundingBox").contains(a.target)||
this._handleCancelEvent(a)},_syncJournalArticleLabel:function(a){var b=this.get("contentBox"),c=b.one("span");c||(c=d.Node.create("\x3cspan\x3e\x3c/span\x3e"),b.prepend(c));c.setContent(C.escapeHTML(a))},_uiSetValue:function(a){a?(a=JSON.parse(a),this._syncJournalArticleLabel("Contenu Web: "+a.classPK)):this._syncJournalArticleLabel("")}}}),I=d.Component.create({EXTENDS:d.DropDownCellEditor,NAME:"link-to-page-cell-editor",prototype:{OPT_GROUP_TEMPLATE:'\x3coptgroup label\x3d"{label}"\x3e{options}\x3c/optgroup\x3e',
renderUI:function(a){var b=this,c={};I.superclass.renderUI.apply(b,arguments);d.io.request(themeDisplay.getPathMain()+"/portal/get_layouts",{after:{success:function(){var f=JSON.parse(this.get("responseData"));f&&f.layouts&&(b._createOptionElements(f.layouts,c,""),b.set("options",c))}},data:{cmd:"getAll",expandParentLayouts:!0,groupId:themeDisplay.getScopeGroupId(),p_auth:Liferay.authToken,paginate:!1}})},_createOptionElements:function(a,b,c){var f=this;a.forEach(function(e,g){b[c+e.name]={groupId:e.groupId,
layoutId:e.layoutId,name:e.name,privateLayout:e.privateLayout};e.hasChildren&&f._createOptionElements(e.children.layouts,b,c+"- ")})},_createOptions:function(a){var b=this,c=[],f=[];d.each(a,function(k,r){var u={id:d.guid(),label:r,value:C.escapeHTML(JSON.stringify(k))},q=f;k.privateLayout&&(q=c);q.push(m.sub(b.OPTION_TEMPLATE,u))});var e=b.OPT_GROUP_TEMPLATE;a=m.sub(e,{label:"Pages Publiques",options:f.join("")});var e=m.sub(e,{label:"Pages Priv\u00e9es",options:c.join("")}),g=b.elements;g.setContent(a+
e);b.options=g.all("option")},_uiSetValue:function(a){var b=this.options;if(b&&b.size()&&(b.set("selected",!1),w(a))){var c=p.parseJSON(a);b.each(function(f,e){var g=p.parseJSON(f.attr("value"));g.groupId===c.groupId&&g.layoutId===c.layoutId&&g.privateLayout===c.privateLayout&&f.set("selected",!0)})}return a}}});Liferay.FormBuilder.CUSTOM_CELL_EDITORS={};[z,A,I].forEach(function(a,b){Liferay.FormBuilder.CUSTOM_CELL_EDITORS[a.NAME]=a});h=function(){};h.ATTRS={autoGeneratedName:{setter:s,value:!0},
indexType:{valueFn:function(){return x()?"keyword":""}},localizable:{setter:s,value:!0},name:{setter:p.normalizeKey,validator:function(a){return!t.has(a)},valueFn:function(){for(var a=p.normalizeKey(this.get("label")),a=a.replace(/[^a-z0-9]/gi,""),a=a+this._randomString(4);t.has(a);)a=d.FormBuilderField.buildFieldName(a);return a}},repeatable:{setter:s,value:!1}};h.prototype.initializer=function(){this.after("nameChange",this._afterNameChange)};h.prototype._afterNameChange=function(a){t.remove(a.prevVal);
t.put(a.newVal,this)};h.prototype._handleDeleteEvent=function(a){var b=this,c=b.getStrings(),f=Liferay.Util.Window.getWindow({dialog:{bodyContent:c.deleteFieldsMessage,destroyOnHide:!0,height:200,resizable:!1,toolbars:{footer:[{cssClass:"btn-primary",label:"OK",on:{click:function(){b.destroy();f.hide()}}},{label:"Annuler",on:{click:function(){f.hide()}}}]},width:700},title:b.get("label")}).render().show();a.stopPropagation()};h.prototype._randomString=function(a){return Liferay.Util.randomInt().toString(36).substring(0,
a)};var l=function(){};l.ATTRS={localizationMap:{setter:d.clone,value:{}},readOnlyAttributes:{getter:"_getReadOnlyAttributes"}};l.prototype.initializer=function(){var a=this,b=a.get("builder");a.after("render",a._afterLocalizableFieldRender);y.forEach(function(c){a.after(c+"Change",a._afterLocalizableFieldChange)});b.translationManager.after("editingLocaleChange",a._afterEditingLocaleChange,a)};l.prototype._afterEditingLocaleChange=function(a){this._syncLocaleUI(a.newVal)};l.prototype._afterLocalizableFieldChange=
function(a){var b=this.get("builder").translationManager.get("editingLocale");this._updateLocalizationMapAttribute(b,a.attrName)};l.prototype._afterLocalizableFieldRender=function(a){a=this.get("builder").translationManager.get("editingLocale");this._updateLocalizationMap(a)};l.prototype._getReadOnlyAttributes=function(a){var b=this.get("builder").translationManager,c=b.get("defaultLocale"),b=b.get("editingLocale");c!==b&&(a=G.concat(a));return N.dedupe(a)};l.prototype._syncLocaleUI=function(a){var b=
this,c=b.get("builder"),f=b.get("localizationMap"),e=c.translationManager,g=themeDisplay.getDefaultLanguageId();e&&(g=e.get("defaultLocale"));var k=f[a]||f[g];v(k)&&(y.forEach(function(r,u){if("options"!==r){var q=k[r];R(q)||Q(q)||b.set(r,q)}}),c._syncUniqueField(b));F(b,d.FormBuilderMultipleChoiceField)&&b._syncOptionsLocaleUI(a);c.editingField===b&&c.propertyList.set("data",b.getProperties())};l.prototype._syncOptionsLocaleUI=function(a){var b=this.get("options");b.forEach(function(c,f){var e=c.localizationMap;
v(e)&&(e=e[a],v(e)&&(c.label=e.label))});this.set("options",b)};l.prototype._updateLocalizationMap=function(a){var b=this;y.forEach(function(c,f){b._updateLocalizationMapAttribute(a,c)})};l.prototype._updateLocalizationMapAttribute=function(a,b){if("options"===b)this._updateLocalizationMapOptions(a);else{var c=this.get("localizationMap"),f=c[a]||{};f[b]=this.get(b);c[a]=f;this.set("localizationMap",c)}};l.prototype._updateLocalizationMapOptions=function(a){var b=this.get("options");b&&b.forEach(function(c,
f){var e=c.localizationMap;v(e)||(e={});e[a]={label:c.label};c.localizationMap=e})};var n=function(){};n.prototype._addDefinitionFieldLocalizedAttributes=function(a){var b=this;y.forEach(function(c){"options"===c?F(b,d.FormBuilderMultipleChoiceField)&&b._addDefinitionFieldOptions(a):a[c]=b._getLocalizedValue(c)})};n.prototype._addDefinitionFieldUnlocalizedAttributes=function(a){var b=this;G.forEach(function(c){a[c]=b.get(c)})};n.prototype._addDefinitionFieldOptions=function(a){var b=this,c=b.get("options"),
f=[];if(c){var e=b.get("builder").translationManager.get("availableLocales");c.forEach(function(g){var k={},r=g.localizationMap;k.value=g.value;k.label={};e.forEach(function(u){var q=b._getValue("label",u,r);k.label[u]=p.normalizeValue(q)});f.push(k)});a.options=f}};n.prototype._addDefinitionFieldNestedFields=function(a){var b=[];this.get("fields").each(function(c){b.push(c.serialize())});0<b.length&&(a.nestedFields=b)};n.prototype._getLocalizedValue=function(a){var b=this,c=b.get("builder"),f=b.get("localizationMap"),
e={};c.translationManager.get("availableLocales").forEach(function(g){e[g]=p.normalizeValue(b._getValue(a,g,f))});return e};n.prototype._getValue=function(a,b,c){var f=this.get("builder").translationManager.get("defaultLocale");b=d.Object.getValue(c,[b,a]);if(w(b))return b;b=d.Object.getValue(c,[f,a]);if(w(b))return b;for(var e in c)if(b=d.Object.getValue(c,[e,a]),w(b))return b;return""};n.prototype.serialize=function(){var a={};this._addDefinitionFieldLocalizedAttributes(a);this._addDefinitionFieldUnlocalizedAttributes(a);
this._addDefinitionFieldNestedFields(a);return a};d.Base.mix(d.FormBuilderField,[h,l,n]);var h=d.FormBuilderField.prototype,U=h.getPropertyModel;h.getPropertyModel=function(){var a=U.call(this),b=this.get("type"),c={"":"Non",keyword:"Oui"};if("ddm-image"==b||"text"==b)c={"":"Non-indexable",keyword:"Indexable - Mot-cl\u00e9",text:"Indexable - Texte"};if("ddm-text-html"==b||"textarea"==b)c={"":"Non-indexable",text:"Indexable - Texte"};var f={"false":"Non","true":"Oui"};a.forEach(function(e,g){"name"==
e.attributeName&&(e.editor=new d.TextCellEditor({validator:{rules:{value:{required:!0,structureDuplicateFieldName:!0,structureFieldName:!0,structureRestrictedFieldName:!0}}}}))});return a.concat([{attributeName:"indexType",editor:new d.RadioCellEditor({options:c}),formatter:function(e){return c[e.data.value]},name:"Indexable"},{attributeName:"localizable",editor:new d.RadioCellEditor({options:f}),formatter:function(e){return f[e.data.value]},name:"Traduisible"},{attributeName:"repeatable",editor:new d.RadioCellEditor({options:f}),
formatter:function(e){return f[e.data.value]},name:"Qu'on peut r\u00e9p\u00e9ter"}])};var E=d.Component.create({ATTRS:{dataType:{value:"date"},fieldNamespace:{value:"ddm"}},EXTENDS:d.FormBuilderTextField,NAME:"ddm-date",prototype:{renderUI:function(){E.superclass.renderUI.apply(this,arguments);this.datePicker=(new d.DatePickerDeprecated({calendar:{locale:Liferay.ThemeDisplay.getLanguageId()},trigger:this.get("templateNode")})).render();this.datePicker.calendar.set("strings",{next:"Suivant",none:"Aucun",
previous:"Pr\u00e9c\u00e9dent",today:"Aujourd'hui"})},getPropertyModel:function(){var a=E.superclass.getPropertyModel.apply(this,arguments);a.forEach(function(b,c,f){b=b.attributeName;"predefinedValue"===b&&(f[c]={attributeName:b,editor:new d.DateCellEditor({dateFormat:"%m/%d/%Y",inputFormatter:function(e){var g="";Array.isArray(e)?g=this.formatDate(e[0]):e&&0<e.length&&(g=this.formatDate(e));return g},outputFormatter:function(e){return Array.isArray(e)?[d.DataType.Date.parse(this.get("dateFormat"),
e[0])]:e}}),name:"Valeur pr\u00e9d\u00e9finie"})});return a}}}),h=d.Component.create({ATTRS:{dataType:{value:"double"},fieldNamespace:{value:"ddm"}},EXTENDS:d.FormBuilderTextField,NAME:"ddm-decimal"}),J=d.Component.create({ATTRS:{dataType:{value:"document-library"},fieldNamespace:{value:"ddm"}},EXTENDS:d.FormBuilderField,NAME:"ddm-documentlibrary",prototype:{getHTML:function(){return D},getPropertyModel:function(){var a=this,b=J.superclass.getPropertyModel.apply(a,arguments);b.forEach(function(c,
f){var e=c.attributeName;"predefinedValue"===e?(c.editor=new z,c.formatter=function(g){var k="";""!==g.data.value&&(k="(Fichier)");return k}):"type"===e&&(c.formatter=a._defaultFormatter)});return b},_defaultFormatter:function(){return"documents-and-media"},_uiSetValue:function(){return"S\u00e9lectionner"}}}),K=d.Component.create({ATTRS:{dataType:{value:"geolocation"},fieldNamespace:{value:"ddm"},localizable:{setter:s,value:!1}},EXTENDS:d.FormBuilderField,NAME:"ddm-geolocation",prototype:{getHTML:function(){return S},
getPropertyModel:function(){return K.superclass.getPropertyModel.apply(this,arguments).filter(function(a,b){return"predefinedValue"!==a.attributeName})}}}),s=d.Component.create({ATTRS:{dataType:{value:"image"},fieldNamespace:{value:"ddm"},indexType:{valueFn:function(){return x()?"text":""}}},EXTENDS:d.FormBuilderField,NAME:"ddm-image",prototype:{getHTML:function(){return T}}}),l=d.Component.create({ATTRS:{dataType:{value:"integer"},fieldNamespace:{value:"ddm"}},EXTENDS:d.FormBuilderTextField,NAME:"ddm-integer"}),
n=d.Component.create({ATTRS:{dataType:{value:"number"},fieldNamespace:{value:"ddm"}},EXTENDS:d.FormBuilderTextField,NAME:"ddm-number"}),V=d.Component.create({ATTRS:{dataType:{value:void 0},fieldNamespace:{value:"ddm"},showLabel:{readOnly:!0,value:!0},style:{value:""}},EXTENDS:d.FormBuilderField,NAME:"ddm-paragraph",UI_ATTRS:["label","style"],prototype:{getHTML:function(){return"\x3cp\x3e\x3c/p\x3e"},getPropertyModel:function(){return[{attributeName:"type",editor:!1,name:"Type"},{attributeName:"label",
editor:new d.TextAreaCellEditor,name:"Texte"},{attributeName:"style",editor:new d.TextAreaCellEditor,name:"Mod\u00e8le"}]},_uiSetLabel:function(a){this.get("templateNode").setContent(a)},_uiSetStyle:function(a){var b=this.get("templateNode");H(b,a)}}}),L=d.Component.create({ATTRS:{dataType:{value:void 0},fieldNamespace:{value:"ddm"},showLabel:{value:!1},style:{value:""}},EXTENDS:d.FormBuilderField,NAME:"ddm-separator",UI_ATTRS:["style"],prototype:{getHTML:function(){return'\x3cdiv class\x3d"separator"\x3e\x3c/div\x3e'},
getPropertyModel:function(){var a=L.superclass.getPropertyModel.apply(this,arguments);a.push({attributeName:"style",editor:new d.TextAreaCellEditor,name:"Mod\u00e8le"});return a},_uiSetStyle:function(a){var b=this.get("templateNode");H(b,a)}}}),B=d.Component.create({ATTRS:{dataType:{value:"html"},fieldNamespace:{value:"ddm"},indexType:{valueFn:function(){return x()?"text":""}}},EXTENDS:B,NAME:"ddm-text-html",prototype:{getHTML:function(){return'\x3ctextarea class\x3d"form-builder-field-node lfr-ddm-text-html"\x3e\x3c/textarea\x3e'}}}),
M=d.Component.create({ATTRS:{dataType:{value:"journal-article"},fieldNamespace:{value:"ddm"}},EXTENDS:d.FormBuilderField,NAME:"ddm-journal-article",prototype:{getHTML:function(){return D},getPropertyModel:function(){var a=M.superclass.getPropertyModel.apply(this,arguments);a.push({attributeName:"style",editor:new d.TextAreaCellEditor,name:"Mod\u00e8le"});a.forEach(function(b,c,f){"predefinedValue"===b.attributeName&&(b.editor=new A,b.formatter=function(e){var g="";""!==e.data.value&&(g="(Contenu Web)");
return g})});return a}}}),W=d.Component.create({ATTRS:{dataType:{value:"link-to-page"},fieldNamespace:{value:"ddm"}},EXTENDS:d.FormBuilderField,NAME:"ddm-link-to-page",prototype:{getHTML:function(){return D}}}),X=d.Component.create({ATTRS:{indexType:{valueFn:function(){return x()?"text":""}}},EXTENDS:d.FormBuilderTextAreaField,NAME:"textarea"});[E,h,J,K,s,l,M,W,n,V,L,B,X].forEach(function(a,b){O[a.NAME]=a})},"",{requires:"aui-base aui-io-request aui-url liferay-item-selector-dialog liferay-portlet-dynamic-data-mapping liferay-portlet-url".split(" ")});
AUI.add("liferay-portlet-dynamic-data-mapping",function(d){var u=d.Array,m=d.Lang,s=d.getBody(),p=d.instanceOf,v=Array.isArray,l=m.isObject,q=m.isString,w=m.isUndefined,n=d.config.FormValidator,g={checkbox:["readOnly"],DEFAULT:["readOnly","width"],separator:["indexType","localizable","predefinedValue","readOnly","required"]},x=/[-\u2013\u2014]/i;n.STRINGS.structureFieldName="Veuillez \u00e9crire seulement les caract\u00e8res alphanum\u00e9riques.";n.RULES.structureFieldName=function(a){return/^[\w\-]+$/.test(a)};
q=d.Component.create({ATTRS:{localizationMap:{validator:l,value:{}},name:{validator:q}},EXTENDS:d.FormBuilderAvailableField,NAME:"availableField"});n=function(){};n.ATTRS={readOnly:{value:!1}};d.mix(n.prototype,{initializer:function(){this.get("readOnly")&&(this.set("allowRemoveRequiredFields",!1),this.set("enableEditing",!1),this.translationManager.hide(),this.after("render",this._afterRenderReadOnlyFormBuilder),this.after("*:render",this._afterFieldRender),this.dropContainer.delegate("mouseover",
this._onMouseOverFieldReadOnlyFormBuilder,".form-builder-field"))},_afterFieldRender:function(a){a=a.target;if(p(a,d.FormBuilderField)){var b=u.map(a.getPropertyModel(),function(c){return c.attributeName});a.set("readOnlyAttributes",b)}},_afterRenderReadOnlyFormBuilder:function(){this.tabView.enableTab(1);this.openEditProperties(this.get("fields").item(0));this.tabView.getTabs().item(0).hide()},_onMouseOverFieldReadOnlyFormBuilder:function(a){a=d.Widget.getByNode(a.currentTarget);a.controlsToolbar.hide();
a.get("boundingBox").removeClass("form-builder-field-hover")}});d.LiferayAvailableField=q;var h=d.Component.create({ATTRS:{availableFields:{validator:l,valueFn:function(){return h.AVAILABLE_FIELDS.DEFAULT}},fieldNameEditionDisabled:{value:!1},portletNamespace:{value:""},portletResourceNamespace:{value:""},propertyList:{value:{strings:{asc:"Croissant",desc:"D\u00e9croissant",reverseSortBy:m.sub("Tri inverse par {0}",["{column}"]),sortBy:m.sub("Tri\u00e9 par {0}",["{column}"])}}},strings:{value:{addNode:"Ajouter un champ",
button:"Bouton",buttonType:"Type de bouton",deleteFieldsMessage:"\u00cates-vous s\u00fbr de vouloir supprimer l'\u00e9lement selectionn\u00e9 ?",duplicateMessage:"Dupliquer",editMessage:"Modifier",label:"\u00c9tiquette de champ",large:"Grand",localizable:"Traduisible",medium:"Milieu",multiple:"Plusieurs",name:"Nom",no:"Non",options:"Facultatif",predefinedValue:"Valeur pr\u00e9d\u00e9finie",propertyName:"Nom de propri\u00e9t\u00e9",required:"Requis",reset:"Restaurer",save:"Enregistrer",settings:"Param\u00e8tres",
showLabel:"Afficher les intitul\u00e9s",small:"Petit",submit:"Valider",tip:"Truc",type:"Type",value:"Valeur",width:"Taille",yes:"Oui"}},translationManager:{validator:l,value:{}},validator:{setter:function(a){return d.merge({fieldStrings:{name:{required:"Ce champ est exig\u00e9."}},rules:{name:{required:!0,structureFieldName:!0}}},a)},value:{}}},EXTENDS:d.FormBuilder,AUGMENTS:[n],LOCALIZABLE_FIELD_ATTRS:["label","options","predefinedValue","style","tip"],NAME:"liferayformbuilder",UNIQUE_FIELD_NAMES_MAP:new d.Map,
UNLOCALIZABLE_FIELD_ATTRS:"dataType fieldNamespace indexType localizable multiple name readOnly repeatable required showLabel type".split(" "),prototype:{initializer:function(){this.MAP_HIDDEN_FIELD_ATTRS=d.clone(g);var a=this.translationManager=new Liferay.TranslationManager(this.get("translationManager"));this.after("render",function(b){a.render()});this.after("fieldsChange",this._afterFieldsChange);this.addTarget(Liferay.Util.getOpener().Liferay);this._toggleInputDirection(a.get("defaultLocale"))},
bindUI:function(){h.superclass.bindUI.apply(this,arguments);this.translationManager.after("defaultLocaleChange",this._onDefaultLocaleChange,this);this.translationManager.after("editingLocaleChange",this._afterEditingLocaleChange,this);this.on("datatable:render",this._onDataTableRender);this.on("drag:drag",d.DD.DDM.syncActiveShims,d.DD.DDM,!0);this.on("model:change",this._onPropertyModelChange)},createField:function(){var a=h.superclass.createField.apply(this,arguments);a.set("strings",this.get("strings"));
var b={checkbox:this.MAP_HIDDEN_FIELD_ATTRS.checkbox,"ddm-separator":this.MAP_HIDDEN_FIELD_ATTRS.separator,default:this.MAP_HIDDEN_FIELD_ATTRS.DEFAULT},c=b[a.get("type")];c||(c=b.default);a.set("hiddenAttributes",c);return a},deserializeDefinitionFields:function(a){var b=this,c=a.availableLanguageIds;a=a.fields;a.forEach(function(e){b._deserializeField(e,c)});return a},eachParentField:function(a,b){for(var c=a.get("parent");c instanceof d.FormBuilderField;)b.call(this,c),c=c.get("parent")},getContent:function(){var a=
{},b=this.translationManager;a.availableLanguageIds=b.get("availableLocales");a.defaultLanguageId=b.get("defaultLocale");a.fields=this._getSerializedFields();return JSON.stringify(a,null,4)},getContentValue:function(){return window[this.get("portletResourceNamespace")+"getContentValue"]()},plotField:function(a,b){h.UNIQUE_FIELD_NAMES_MAP.put(a.get("name"),a);return h.superclass.plotField.apply(this,arguments)},_afterEditingLocaleChange:function(a){this._toggleInputDirection(a.newVal)},_afterFieldsChange:function(a){1===
this.tabView.getTabs().indexOf(this.tabView.getActiveTab())&&this.editField(a.newVal.item(0))},_beforeGetEditor:function(a,b){var c=this,e=b.editor,f=a.get("editor")||e;p(f,d.BaseOptionsCellEditor)&&(f.get("rendered")?c._toggleOptionsEditorInputs(f):f.after("render",function(){c._toggleOptionsEditorInputs(f)}));f.after("render",function(){f.set("visible",!0);var k=f.get("boundingBox");k&&k.show()})},_deserializeField:function(a,b){var c=this,e=a.fields;v(e)&&e.forEach(function(f,k){c._deserializeField(f,
b)});c._deserializeFieldLocalizationMap(a,b);c._deserializeFieldLocalizableAttributes(a)},_deserializeFieldLocalizableAttributes:function(a){var b=this.translationManager.get("defaultLocale"),c=this.translationManager.get("editingLocale");h.LOCALIZABLE_FIELD_ATTRS.forEach(function(e,f){var k=a[e];"options"!==e&&k&&(a[e]=k[c]||k[b])})},_deserializeFieldLocalizationMap:function(a,b){b.forEach(function(c){a.localizationMap=a.localizationMap||{};a.localizationMap[c]={};h.LOCALIZABLE_FIELD_ATTRS.forEach(function(e){var f=
a[e];f&&f[c]&&(a.localizationMap[c][e]=f[c])})});a.options&&this._deserializeFieldOptionsLocalizationMap(a,b)},_deserializeFieldOptionsLocalizationMap:function(a,b){var c,e=this.translationManager.get("defaultLocale"),f=this.translationManager.get("editingLocale");a.options.forEach(function(k,t){c=k.label;k.label=c[f]||c[e];k.localizationMap={};b.forEach(function(r){k.localizationMap[r]={label:c[r]}})})},_getGeneratedFieldName:function(a){var b=a=h.Util.normalizeKey(a);if(h.Util.validateFieldName(b))for(var c=
1;h.UNIQUE_FIELD_NAMES_MAP.has(b);)b=a+c++;return b},_getSerializedFields:function(){var a=[];this.get("fields").each(function(b){a.push(b.serialize())});return a},_onDataTableRender:function(a){d.on(this._beforeGetEditor,a.target,"getEditor",this)},_onDefaultLocaleChange:function(a){var b=this.get("fields"),c=a.newVal,e=this.translationManager;0>e.get("availableLocales").indexOf(c)&&(a={fields:b,newVal:c,prevVal:a.prevVal},e.addAvailableLocale(c),this._updateLocalizationMaps(a))},_onMouseOutField:function(a){var b=
d.Widget.getByNode(a.currentTarget);this._setInvalidDDHandles(b,"remove");h.superclass._onMouseOutField.apply(this,arguments)},_onMouseOverField:function(a){var b=d.Widget.getByNode(a.currentTarget);this._setInvalidDDHandles(b,"add");h.superclass._onMouseOverField.apply(this,arguments)},_onPropertyModelChange:function(a){var b=this.get("fieldNameEditionDisabled"),c=a.changed,e=a.target.get("attributeName"),f=this.editingField,k=f.get("readOnlyAttributes");c.hasOwnProperty("value")&&-1===k.indexOf("name")&&
("name"===e?f.set("autoGeneratedName",!0===a.autoGeneratedName):"label"===e&&f.get("autoGeneratedName")&&!b&&(a=this.translationManager,a.get("editingLocale")===a.get("defaultLocale")&&(c=this._getGeneratedFieldName(c.value.newVal),h.Util.validateFieldName(c)&&(a=this.propertyList.get("data").filter(function(t,r){return"name"===t.get("attributeName")}),a.length&&a[0].set("value",c,{autoGeneratedName:!0})))))},_renderSettings:function(){this._renderPropertyList()},_setAvailableFields:function(a){a=
a.map(function(b,c){return p(b,d.PropertyBuilderAvailableField)?b:new d.LiferayAvailableField(b)});a.sort(function(b,c){return d.ArraySort.compare(b.get("label"),c.get("label"))});return a},_setFields:function(){h.UNIQUE_FIELD_NAMES_MAP.clear();return h.superclass._setFields.apply(this,arguments)},_setFieldsSortableListConfig:function(){var a=h.superclass._setFieldsSortableListConfig.apply(this,arguments);a.dd.plugins=[{cfg:{constrain:"#main-content"},fn:d.Plugin.DDConstrained},{cfg:{horizontal:!1,
node:"#main-content"},fn:d.Plugin.DDNodeScroll}];return a},_setInvalidDDHandles:function(a,b){var c=b+"Invalid";this.eachParentField(a,function(e){e=e.get("boundingBox");e.dd[c]("#"+e.attr("id"))})},_toggleInputDirection:function(a){a="rtl"===Liferay.Language.direction[a];s.toggleClass("form-builder-ltr-inputs",!a);s.toggleClass("form-builder-rtl-inputs",a)},_toggleOptionsEditorInputs:function(a){var b=a.get("boundingBox");if(b.hasClass("radiocelleditor")){a=this.translationManager.get("defaultLocale");
var c=this.translationManager.get("editingLocale"),b=b.all(".celleditor-edit-input-value");Liferay.Util.toggleDisabled(b,a!==c)}},_updateLocalizationMaps:function(a){var b=this,c=a.newVal,e=a.prevVal;a.fields._items.forEach(function(f){var k=f.get("fields");f=f.get("localizationMap");k={fields:k,newVal:c,prevVal:e};f[c]=f[e];b._updateLocalizationMaps(k)})}}});h.Util={getFileEntry:function(a,b){a=this.parseJSON(a);Liferay.Service("/dlapp/get-file-entry-by-uuid-and-group-id",{groupId:a.groupId,uuid:a.uuid},
b)},getFileEntryURL:function(a){return[themeDisplay.getPathContext(),"documents",a.groupId,a.folderId,encodeURIComponent(a.title)].join("/")},normalizeKey:function(a){a=a.trim();for(var b=0;b<a.length;b++){var c=a[b];d.Text.Unicode.test(c,"L")||d.Text.Unicode.test(c,"N")||d.Text.Unicode.test(c,"Pd")||"_"==c||(a=a.replace(c," "))}a=m.String.camelize(a," ");return a.replace(/\s+/ig,"")},normalizeValue:function(a){w(a)&&(a="");return a},parseJSON:function(a){var b={};try{b=JSON.parse(a)}catch(c){}return b},
validateFieldName:function(a){var b=!0;if(x.test(a))return!1;for(var c=0;c<a.length;c++){var e=a[c];if(!d.Text.Unicode.test(e,"L")&&!d.Text.Unicode.test(e,"N")&&!d.Text.Unicode.test(e,"Pd")&&"_"!=e){b=!1;break}}return b}};h.DEFAULT_ICON_CLASS="icon-fb-custom-field";l={DDM_STRUCTURE:[{hiddenAttributes:g.checkbox,iconClass:"icon-fb-boolean",label:"Bool\u00e9en",type:"checkbox"},{hiddenAttributes:g.DEFAULT,iconClass:"icon-calendar",label:"Donn\u00e9es",type:"ddm-date"},{hiddenAttributes:g.DEFAULT,iconClass:"icon-fb-decimal",
label:"D\u00e9cimal",type:"ddm-decimal"},{hiddenAttributes:g.DEFAULT,iconClass:"icon-file-text",label:"Documents et m\u00e9dias",type:"ddm-documentlibrary"},{hiddenAttributes:g.DEFAULT,iconClass:"icon-fb-text",label:"Contenu Web",type:"ddm-journal-article"},{hiddenAttributes:g.DEFAULT,iconClass:"icon-edit-sign",label:"HTML",type:"ddm-text-html"},{hiddenAttributes:g.DEFAULT,iconClass:"icon-globe",label:"G\u00e9o-localisation",type:"ddm-geolocation"},{hiddenAttributes:g.DEFAULT,iconClass:"icon-fb-integer",
label:"Entier",type:"ddm-integer"},{hiddenAttributes:g.DEFAULT,iconClass:"icon-link",label:"Lien \u00e0 la page",type:"ddm-link-to-page"},{hiddenAttributes:g.DEFAULT,iconClass:"icon-fb-number",label:"Nombre",type:"ddm-number"},{hiddenAttributes:g.DEFAULT,iconClass:"icon-fb-radio",label:"Radio",type:"radio"},{hiddenAttributes:g.DEFAULT,iconClass:"icon-fb-select",label:"S\u00e9lectionner",type:"select"},{hiddenAttributes:g.DEFAULT,iconClass:"icon-fb-text",label:"Texte",type:"text"},{hiddenAttributes:g.DEFAULT,
iconClass:"icon-fb-text-box",label:"Zone de saisie",type:"textarea"}],DDM_TEMPLATE:[{hiddenAttributes:g.DEFAULT,iconClass:"icon-fb-paragraph",label:"Paragraphe",type:"ddm-paragraph"},{hiddenAttributes:g.DEFAULT,iconClass:"icon-fb-separator",label:"S\u00e9parateur",type:"ddm-separator"},{hiddenAttributes:g.DEFAULT,iconClass:"icon-fb-fieldset",label:"Champs",type:"fieldset"}],DEFAULT:[{fieldLabel:"Bouton",iconClass:"form-builder-field-icon form-builder-field-icon-button",label:"Bouton",type:"button"},
{fieldLabel:"Bo\u00eete de contr\u00f4le",iconClass:"icon-fb-boolean",label:"Bo\u00eete de contr\u00f4le",type:"checkbox"},{fieldLabel:"Champs",iconClass:"form-builder-field-icon form-builder-field-icon-fieldset",label:"Champs",type:"fieldset"},{fieldLabel:"Zone de saisie",iconClass:"icon-fb-text",label:"Zone de saisie",type:"text"},{fieldLabel:"Zone de saisie (HTML)",iconClass:"icon-fb-text-box",label:"Zone de saisie (HTML)",type:"textarea"},{fieldLabel:"Boutons par radio",iconClass:"icon-fb-radio",
label:"Boutons par radio",type:"radio"},{fieldLabel:"Choisir une option",iconClass:"icon-fb-select",label:"Choisir une option",type:"select"}],WCM_STRUCTURE:[{hiddenAttributes:g.DEFAULT,iconClass:"icon-picture",label:"Image",type:"ddm-image"},{hiddenAttributes:g.separator,iconClass:"icon-fb-separator",label:"S\u00e9parateur",type:"ddm-separator"}]};l.WCM_STRUCTURE=l.WCM_STRUCTURE.concat(l.DDM_STRUCTURE);h.AVAILABLE_FIELDS=l;Liferay.FormBuilder=h},"",{requires:"arraysort aui-form-builder-deprecated aui-form-validator aui-map aui-text-unicode json liferay-menu liferay-translation-manager liferay-util-window text".split(" ")});
AUI.add("liferay-portlet-dynamic-data-lists",function(h){var w=h.Array,A=h.DataType.DateMath,s=Liferay.FormBuilder,B=h.Lang,x=h.Lang.emptyFn,t=Array.isArray,y=B.isNumber,u=h.Component.create({ATTRS:{portletNamespace:{validator:B.isString,value:""},recordsetId:{validator:y,value:0},structure:{validator:t,value:[]}},CSS_PREFIX:"table",DATATYPE_VALIDATOR:{"double":"number",integer:"digits","long":"digits"},EXTENDS:h.DataTable,NAME:h.DataTable.Base.NAME,TYPE_EDITOR:{checkbox:h.CheckboxCellEditor,"ddm-date":h.DateCellEditor,
"ddm-decimal":h.TextCellEditor,"ddm-documentlibrary":s.CUSTOM_CELL_EDITORS["document-library-file-entry-cell-editor"],"ddm-integer":h.TextCellEditor,"ddm-link-to-page":s.CUSTOM_CELL_EDITORS["link-to-page-cell-editor"],"ddm-number":h.TextCellEditor,radio:h.RadioCellEditor,select:h.DropDownCellEditor,text:h.TextCellEditor,textarea:h.TextAreaCellEditor},prototype:{initializer:function(){this._setDataStableSort(this.get("data"));this.set("scrollable",!0);this.on("dataChange",this._onDataChange);this.on("model:change",
this._onRecordUpdate)},addEmptyRows:function(c){var b=this.get("columns"),d=this.get("data"),b=b.map(function(e,g){return e.key});d.add(u.buildEmptyRecords(c,b))},updateMinDisplayRows:function(c,b){b=b&&h.bind(b,this)||x;var d=this.get("recordsetId");Liferay.Service("/ddl.ddlrecordset/update-min-display-rows",{minDisplayRows:c,recordSetId:d,serviceContext:JSON.stringify({scopeGroupId:themeDisplay.getScopeGroupId(),userId:themeDisplay.getUserId()})},b)},_afterActiveCellIndexChange:function(c){var b=
this.get("activeCell");c=this.get("boundingBox").one(".table-x-scroller");var d=this.highlight.get("activeBorderWidth")[0],e=b.outerWidth()+d,d=c.outerWidth(),b=b.get("offsetLeft"),g=c.get("scrollLeft"),e=b+e,f=g;g+d<e?f=e-d:b<g&&(f=b);c.set("scrollLeft",f)},_normalizeFieldData:function(c,b,d,e){var g=this,f=c.type,k=b.get(c.name);if(b.changed[c.id]||!(k&&0<k.length)){if("ddm-link-to-page"===f)k=s.Util.parseJSON(k),delete k.name,k=JSON.stringify(k);else if("radio"===f||"select"===f)t(k)||(k=w(k)),
k=JSON.stringify(k);e[c.name]=g._normalizeValue(k);d.push(c.name+"_INSTANCE_"+g._randomString(8));t(c.fields)&&c.fields.forEach(function(r){g._normalizeFieldData(r,b,d,e)})}},_normalizeRecordData:function(c){var b=this,d=[],e={};b.get("structure").forEach(function(g){b._normalizeFieldData(g,c,d,e)});e._fieldsDisplay=d.join(",");delete e.displayIndex;delete e.recordId;return e},_normalizeValue:function(c){return String(c)},_onDataChange:function(c){this._setDataStableSort(c.newVal)},_onEditCell:function(c){u.superclass._onEditCell.apply(this,
arguments);var b=this.get("activeCell"),d=c.alignNode||b,b=this.getColumn(d),d=this.getRecord(d),e=this.get("data"),g=this.get("portletNamespace"),f=this.get("recordsetId"),k=this.get("structure");(b=this.getEditor(d,b))&&b.setAttrs({data:e,portletNamespace:g,record:d,recordsetId:f,structure:k,zIndex:Liferay.zIndex.OVERLAY})},_onRecordUpdate:function(c){if(!c.changed.hasOwnProperty("recordId")){var b=this.get("data"),d=this.get("recordsetId"),e=c.target;c=e.get("recordId");var g=this._normalizeRecordData(e),
b=b.indexOf(e);0<c?u.updateRecord(c,b,g,!0):u.addRecord(d,b,g,function(f){0<f.recordId&&e.set("recordId",f.recordId,{silent:!0})})}},_randomString:function(c){return Math.random().toString(36).substring(c)},_setDataStableSort:function(c){c.sort=function(b){if(this.comparator){b=b||{};var d=this._items.concat();h.ArraySort.stableSort(d,h.bind(this._sort,this));d=h.merge(b,{models:d,src:"sort"});b.silent?this._defResetFn(d):this.fire("reset",d)}return this}}},addRecord:function(c,b,d,e){e=e&&h.bind(e,
this)||x;Liferay.Service("/ddl.ddlrecord/add-record",{displayIndex:b,fieldsMap:JSON.stringify(d),groupId:themeDisplay.getScopeGroupId(),recordSetId:c,serviceContext:JSON.stringify({scopeGroupId:themeDisplay.getScopeGroupId(),userId:themeDisplay.getUserId(),workflowAction:Liferay.Workflow.ACTION_PUBLISH})},e)},buildDataTableColumns:function(c,b,d,e){var g=this;c.forEach(function(f,k){var r=f.dataType,p=f.label,m=f.name,n=f.type;f.key=m;var E=g.TYPE_EDITOR[n]||h.TextCellEditor,q={elementName:m,strings:{cancel:"Annuler",
edit:"Modifier",save:"Enregistrer"},validator:{rules:{}}},C=f.required;C&&(p+=" (Requis)");p=h.Escape.html(p);f.label=p;if("checkbox"===n)q.options={"true":"Vrai"},q.inputFormatter=function(a){Array.isArray(a)&&0<a.length&&(a=a[0]);var l="false";"true"===a&&(l=a);return l},f.formatter=function(a){a=a.data[m];"true"===a?a="Vrai":"false"===a&&(a="Faux");return a};else if("ddm-date"===n)q.inputFormatter=function(a){return a.map(function(l,z){return h.DataType.Date.format(l)})},q.outputFormatter=function(a){return a.map(function(l,
z){var v;v=""!==l?h.DataType.Date.parse(l):new Date;return v=A.add(v,A.MINUTES,v.getTimezoneOffset())})},f.formatter=function(a){a=a.data[m];t(a)&&(a=a[0]);return a};else if("ddm-decimal"===n||"ddm-integer"===n||"ddm-number"===n)q.outputFormatter=function(a){a=h.DataType.Number.parse(a);var l="";y(a)&&(l=a);return l},f.formatter=function(a){a=h.DataType.Number.parse(a.data[m]);y(a)||(a="");return a};else if("ddm-documentlibrary"===n)f.formatter=function(a){var l="";a=a.data[m];""!==a&&(a=s.Util.parseJSON(a),
a.title&&(l=a.title));return l};else if("ddm-link-to-page"===n)f.formatter=function(a){var l="";a=a.data[m];""!==a&&(a=s.Util.parseJSON(a),a.name&&(l=a.name));return l};else if("radio"===n||"select"===n){var p=g.findStructureFieldByAttribute(d,"name",m),n=h.DataType.Boolean.parse(p.multiple),D=g.getCellEditorOptions(p.options,b);f.formatter=function(a){var l=[];a=a.data[m];t(a)&&a.forEach(function(z,v){l.push(D[z])});return l.join(", ")};q.inputFormatter=w;q.multiple=n;q.options=D}else"textarea"===
n&&(f.allowHTML=!0,f.formatter=function(a){return(a=a.data[m])?a.split("\n").join("\x3cbr\x3e"):a});r=g.DATATYPE_VALIDATOR[r];p=q.validator.rules;p[m]=h.mix({required:C},p[m]);r&&(p[m][r]=!0);e&&f.editable&&(f.editor=new E(q))});return c},buildEmptyRecords:function(c,b){for(var d=[],e=0;e<c;e++)d.push(this.getRecordModel(b));return d},findStructureFieldByAttribute:function(c,b,d){var e=this,g;w.some(c,function(f){var k=f.fields;f[b]===d?g=f:k&&(g=e.findStructureFieldByAttribute(k,b,d));return void 0!==
g});return g},getCellEditorOptions:function(c,b){var d={};c.forEach(function(e,g){d[e.value]=e.label;var f=e.localizationMap;f[b]&&(d[e.value]=f[b].label)});return d},getRecordModel:function(c){var b={};c.forEach(function(d,e){b[d]=""});return b},updateRecord:function(c,b,d,e,g){g=g&&h.bind(g,this)||x;Liferay.Service("/ddl.ddlrecord/update-record",{displayIndex:b,fieldsMap:JSON.stringify(d),mergeFields:e,recordId:c,serviceContext:JSON.stringify({scopeGroupId:themeDisplay.getScopeGroupId(),userId:themeDisplay.getUserId(),
workflowAction:Liferay.Workflow.ACTION_PUBLISH})},g)}});Liferay.SpreadSheet=u;Liferay.DDLUtil={previewDialog:null,openPreviewDialog:function(c){var b=this.previewDialog;b?(b.show(),b.set("bodyContent",c)):this.previewDialog=b=Liferay.Util.Window.getWindow({dialog:{bodyContent:c},title:"Pr\u00e9visualisation"})}}},"",{requires:"aui-arraysort aui-datatable datatable-sort json liferay-portlet-dynamic-data-mapping-custom-fields liferay-portlet-url liferay-util-window".split(" ")});
