IDEMPIERE-5949 Datatables.js and Pivot.js Report Viewer (#2211)

* IDEMPIERE-5949 Datatables.js and Pivot.js Report Viewer

* IDEMPIERE-5949 Datatables.js and Pivot.js Report Viewer

* IDEMPIERE-5949 Datatables.js and Pivot.js Report Viewer

- fix launch configuration
This commit is contained in:
hengsin 2024-02-01 18:12:33 +08:00 committed by Carlos Ruiz
parent 7b210dbfbb
commit 33c8210618
203 changed files with 46192 additions and 1547 deletions

View File

@ -66,6 +66,7 @@ Export-Package: bsh,
org.idempiere.fa.service.api, org.idempiere.fa.service.api,
org.idempiere.model, org.idempiere.model,
org.idempiere.print, org.idempiere.print,
org.idempiere.print.renderer,
org.idempiere.process org.idempiere.process
Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-RequiredExecutionEnvironment: JavaSE-17
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version>=17))" Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version>=17))"

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.idempiere.print.renderer.CSVReportRenderer">
<service>
<provide interface="org.idempiere.print.renderer.IReportRenderer"/>
</service>
<implementation class="org.idempiere.print.renderer.CSVReportRenderer"/>
</scr:component>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.idempiere.print.renderer.HTMLReportRenderer">
<service>
<provide interface="org.idempiere.print.renderer.IReportRenderer"/>
</service>
<implementation class="org.idempiere.print.renderer.HTMLReportRenderer"/>
</scr:component>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.idempiere.print.renderer.PDFReportRenderer">
<service>
<provide interface="org.idempiere.print.renderer.IReportRenderer"/>
</service>
<implementation class="org.idempiere.print.renderer.PDFReportRenderer"/>
</scr:component>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.idempiere.print.renderer.PSReportRenderer">
<service>
<provide interface="org.idempiere.print.renderer.IReportRenderer"/>
</service>
<implementation class="org.idempiere.print.renderer.PSReportRenderer"/>
</scr:component>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.idempiere.print.renderer.SSVReportRenderer">
<service>
<provide interface="org.idempiere.print.renderer.IReportRenderer"/>
</service>
<implementation class="org.idempiere.print.renderer.SSVReportRenderer"/>
</scr:component>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.idempiere.print.renderer.TabDelimitedReportRenderer">
<service>
<provide interface="org.idempiere.print.renderer.IReportRenderer"/>
</service>
<implementation class="org.idempiere.print.renderer.TabDelimitedReportRenderer"/>
</scr:component>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.idempiere.print.renderer.XLSReportRenderer">
<service>
<provide interface="org.idempiere.print.renderer.IReportRenderer"/>
</service>
<implementation class="org.idempiere.print.renderer.XLSReportRenderer"/>
</scr:component>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.idempiere.print.renderer.XLSXReportRenderer">
<service>
<provide interface="org.idempiere.print.renderer.IReportRenderer"/>
</service>
<implementation class="org.idempiere.print.renderer.XLSXReportRenderer"/>
</scr:component>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.idempiere.print.renderer.XMLReportRenderer">
<service>
<provide interface="org.idempiere.print.renderer.IReportRenderer"/>
</service>
<implementation class="org.idempiere.print.renderer.XMLReportRenderer"/>
</scr:component>

View File

@ -67,6 +67,8 @@ import org.idempiere.fa.service.api.IDepreciationMethod;
import org.idempiere.fa.service.api.IDepreciationMethodFactory; import org.idempiere.fa.service.api.IDepreciationMethodFactory;
import org.idempiere.model.IMappedModelFactory; import org.idempiere.model.IMappedModelFactory;
import org.idempiere.print.IPrintHeaderFooter; import org.idempiere.print.IPrintHeaderFooter;
import org.idempiere.print.renderer.IReportRenderer;
import org.idempiere.print.renderer.IReportRendererConfiguration;
import org.idempiere.process.IMappedProcessFactory; import org.idempiere.process.IMappedProcessFactory;
/** /**
@ -1126,4 +1128,18 @@ public class Core {
return myCreditManager; return myCreditManager;
} // getCreditManager } // getCreditManager
@SuppressWarnings("unchecked")
public static IReportRenderer<IReportRendererConfiguration> getReportRenderer(String id) {
IReportRenderer<IReportRendererConfiguration> renderer = null;
@SuppressWarnings("rawtypes")
List<IServiceReferenceHolder<IReportRenderer>> rendererReferences = Service.locator().list(IReportRenderer.class).getServiceReferences();
for(var holder : rendererReferences) {
renderer = holder.getService();
if (renderer.getId().equals(id)) {
return renderer;
}
}
return null;
}
} }

View File

@ -47,7 +47,7 @@ public class Document {
* @param pageable * @param pageable
* @param output * @param output
*/ */
private static void writePDF(Pageable pageable, OutputStream output) public static void writePDF(Pageable pageable, OutputStream output)
{ {
try { try {
final PageFormat pf = pageable.getPageFormat(0); final PageFormat pf = pageable.getPageFormat(0);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,64 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.print.renderer;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.osgi.service.component.annotations.Component;
import com.google.common.net.MediaType;
/**
* Comma separated content rendering service for report engine
*/
@Component(service = IReportRenderer.class, immediate = true)
public class CSVReportRenderer extends DelimitedReportRenderer<CSVReportRendererConfiguration> {
public CSVReportRenderer() {
}
@Override
public String getId() {
return CSVReportRendererConfiguration.ID;
}
@Override
public String getName() {
return Msg.getMsg(Env.getCtx(), "FileCSV");
}
@Override
public String getContentType() {
return MediaType.CSV_UTF_8.toString();
}
@Override
public String getFileExtension() {
return CSVReportRendererConfiguration.FILE_EXTENSION;
}
@Override
public Class<CSVReportRendererConfiguration> getConfigurationType() {
return CSVReportRendererConfiguration.class;
}
}

View File

@ -0,0 +1,63 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.print.renderer;
import java.io.File;
import java.io.Writer;
import org.compiere.util.Language;
/**
* Configuration for comma separated content renderer
*/
public class CSVReportRendererConfiguration extends DelimitedReportRendererConfiguration {
public final static String ID = "CSV";
public static final String FILE_EXTENSION = "csv";
public CSVReportRendererConfiguration() {
}
@Override
public char getDelimiter() {
return ',';
}
@Override
public CSVReportRendererConfiguration setOutputFile(File file) {
super.setOutputFile(file);
return this;
}
@Override
public CSVReportRendererConfiguration setOutputWriter(Writer writer) {
super.setOutputWriter(writer);
return this;
}
@Override
public CSVReportRendererConfiguration setLanguage(Language language) {
super.setLanguage(language);
return this;
}
}

View File

@ -0,0 +1,262 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.print.renderer;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import org.compiere.print.MPrintFormat;
import org.compiere.print.MPrintFormatItem;
import org.compiere.print.PrintData;
import org.compiere.print.PrintDataElement;
import org.compiere.print.ReportEngine;
import org.compiere.print.layout.InstanceAttributeColumn;
import org.compiere.print.layout.InstanceAttributeData;
import org.compiere.print.layout.LayoutEngine;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.Ini;
import org.compiere.util.Language;
/**
* Abstract base class for renderer that output delimited text content.
* @param <C> Renderer configuration type
*/
public abstract class DelimitedReportRenderer<C extends DelimitedReportRendererConfiguration> implements IReportRenderer<C> {
private static final CLogger log = CLogger.getCLogger(DelimitedReportRenderer.class);
public DelimitedReportRenderer() {
}
@Override
public void renderReport(ReportEngine reportEngine, C configuration) {
try {
Writer fw = null;
if (configuration.getOutputFile() != null)
fw = new OutputStreamWriter(new FileOutputStream(configuration.getOutputFile(), false), Ini.getCharset());
else
fw = configuration.getOutputWriter();
createdDelimitedOutput(reportEngine, fw, configuration.getDelimiter(), configuration.getLanguage());
}
catch (FileNotFoundException fnfe) {
log.log(Level.SEVERE, "(f) - " + fnfe.toString());
}
catch (Exception e) {
log.log(Level.SEVERE, "(f)", e);
}
}
@Override
public boolean isBinary() {
return false;
}
/**
* Write delimited text to writer
* @param writer writer
* @param delimiter delimiter, e.g. comma, tab
* @param language translation language
* @return true if success
*/
private boolean createdDelimitedOutput (ReportEngine reportEngine, Writer writer, char delimiter, Language language)
{
MPrintFormat printFormat = reportEngine.getPrintFormat();
PrintData printData = reportEngine.getPrintData();
LayoutEngine layout = reportEngine.getLayout();
if (delimiter == 0)
delimiter = '\t';
try
{
//collect columns to be printed
ArrayList<Object> columns = new ArrayList<>();
List<InstanceAttributeData> asiElements = new ArrayList<>();
int columnCount = 0;
for (int col = 0; col < printFormat.getItemCount(); col++)
{
MPrintFormatItem item = printFormat.getItem(col);
if (item.isPrinted())
{
if (item.isTypeField() && item.isPrintInstanceAttributes())
{
InstanceAttributeData asiElement = new InstanceAttributeData(item, columnCount);
asiElement.readAttributesData(printData);
asiElements.add(asiElement);
continue;
}
else
{
columns.add(item);
columnCount++;
}
}
}
if (asiElements.size() > 0)
{
int columnCreated = 0;
for(InstanceAttributeData data : asiElements)
{
List<InstanceAttributeColumn> instanceColumns = data.getColumns();
int index = data.getColumnIndex() + columnCreated;
for(InstanceAttributeColumn c : instanceColumns)
{
columns.add(index, c);
index++;
columnCreated++;
}
}
}
Boolean [] colSuppressRepeats = layout == null || layout.colSuppressRepeats == null? LayoutEngine.getColSuppressRepeats(printFormat):layout.colSuppressRepeats;
Object [] preValues = null;
if (colSuppressRepeats != null){
preValues = new Object [colSuppressRepeats.length];
}
int printColIndex = -1;
// for all rows (-1 = header row)
for (int row = -1; row < printData.getRowCount(); row++)
{
printColIndex = -1;
StringBuffer sb = new StringBuffer();
if (row != -1)
printData.setRowIndex(row);
// for all columns
boolean first = true; // first column to print
for (int col = 0; col < columns.size(); col++)
{
Object colObj = columns.get(col);
MPrintFormatItem item = null;
InstanceAttributeColumn iaColumn = null;
if (colObj instanceof InstanceAttributeColumn)
{
iaColumn = (InstanceAttributeColumn) colObj;
item = iaColumn.getPrintFormatItem();
}
else if (colObj instanceof MPrintFormatItem)
{
item = (MPrintFormatItem)colObj;
}
if (item != null)
{
// column delimiter (comma or tab)
if (first)
first = false;
else
sb.append(delimiter);
// header row
if (row == -1)
{
String printName = iaColumn != null ? iaColumn.getName() : item.getPrintName(language);
addDelimitedValue (sb, delimiter, printName);
}
else
{
printColIndex++;
Object obj = iaColumn != null ? iaColumn.getPrintDataElement(row) : printData.getNodeByPrintFormatItemId(item.getAD_PrintFormatItem_ID());
String data = "";
if (obj == null || !ReportEngine.isDisplayPFItem(printData, item)){
if (colSuppressRepeats != null && colSuppressRepeats[printColIndex]){
preValues[printColIndex] = null;
}
}
else if (obj instanceof PrintDataElement)
{
PrintDataElement pde = (PrintDataElement)obj;
if (pde.isPKey())
data = pde.getValueAsString();
else
data = pde.getValueDisplay(language); // formatted
if (colSuppressRepeats != null && colSuppressRepeats[printColIndex]){
if (data.equals(preValues[printColIndex])){
continue;
}else{
preValues[printColIndex] = data;
}
}
}
else if (obj instanceof PrintData)
{
}
else
log.log(Level.SEVERE, "Element not PrintData(Element) " + obj.getClass());
addDelimitedValue (sb, delimiter, data);
}
} // printed
} // for all columns
writer.write(sb.toString());
writer.write(Env.NL);
} // for all rows
//
writer.flush();
writer.close();
}
catch (Exception e)
{
log.log(Level.SEVERE, "(w)", e);
return false;
}
return true;
} // createCSV
/**
* Add content to delimited string.
* Encapsulate/mask content in " if required
* @param sb StringBuffer to add to
* @param delimiter delimiter
* @param content column value
*/
private void addDelimitedValue (StringBuffer sb, char delimiter, String content)
{
// nothing to add
if (content == null || content.length() == 0)
return;
//
boolean needMask = false;
StringBuilder buff = new StringBuilder();
char chars[] = content.toCharArray();
for (int i = 0; i < chars.length; i++)
{
char c = chars[i];
if (c == '"')
{
needMask = true;
buff.append(c); // repeat twice
} // mask if any control character
else if (!needMask && (c == delimiter || !Character.isLetterOrDigit(c)))
needMask = true;
buff.append(c);
}
// Optionally mask value
if (needMask)
sb.append('"').append(buff).append('"');
else
sb.append(buff);
}
}

View File

@ -0,0 +1,71 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.print.renderer;
import java.io.File;
import java.io.Writer;
import org.compiere.util.Language;
/**
* Abstract base class for delimited content renderer configuration
*/
public abstract class DelimitedReportRendererConfiguration implements IReportRendererConfiguration {
private File file;
private Writer writer;
private Language language;
public DelimitedReportRendererConfiguration() {
}
@Override
public File getOutputFile() {
return file;
}
public DelimitedReportRendererConfiguration setOutputFile(File file) {
this.file = file;
return this;
}
@Override
public Writer getOutputWriter() {
return writer;
}
public DelimitedReportRendererConfiguration setOutputWriter(Writer writer) {
this.writer = writer;
return this;
}
public DelimitedReportRendererConfiguration setLanguage(Language language) {
this.language = language;
return this;
}
public Language getLanguage() {
return language;
}
public abstract char getDelimiter();
}

View File

@ -0,0 +1,953 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.print.renderer;
import java.awt.Color;
import java.awt.Font;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException;
import org.apache.ecs.MultiPartElement;
import org.apache.ecs.XhtmlDocument;
import org.apache.ecs.xhtml.a;
import org.apache.ecs.xhtml.script;
import org.apache.ecs.xhtml.span;
import org.apache.ecs.xhtml.style;
import org.apache.ecs.xhtml.table;
import org.apache.ecs.xhtml.tbody;
import org.apache.ecs.xhtml.td;
import org.apache.ecs.xhtml.th;
import org.apache.ecs.xhtml.thead;
import org.apache.ecs.xhtml.tr;
import org.compiere.model.MColumn;
import org.compiere.model.MQuery;
import org.compiere.model.MRole;
import org.compiere.model.MStyle;
import org.compiere.model.MSysConfig;
import org.compiere.model.MTable;
import org.compiere.model.X_AD_StyleLine;
import org.compiere.print.IHTMLExtension;
import org.compiere.print.MPrintColor;
import org.compiere.print.MPrintFont;
import org.compiere.print.MPrintFormat;
import org.compiere.print.MPrintFormatItem;
import org.compiere.print.MPrintTableFormat;
import org.compiere.print.PrintData;
import org.compiere.print.PrintDataElement;
import org.compiere.print.ReportEngine;
import org.compiere.print.layout.InstanceAttributeColumn;
import org.compiere.print.layout.InstanceAttributeData;
import org.compiere.print.layout.LayoutEngine;
import org.compiere.print.layout.PrintDataEvaluatee;
import org.compiere.util.CLogger;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
import org.compiere.util.Evaluator;
import org.compiere.util.Ini;
import org.compiere.util.Language;
import org.compiere.util.Msg;
import org.compiere.util.Util;
import org.osgi.service.component.annotations.Component;
import com.google.common.net.MediaType;
import com.googlecode.htmlcompressor.compressor.HtmlCompressor;
/**
* HTML content renderer service for report engine
*/
@Component(service = IReportRenderer.class, immediate = true)
public class HTMLReportRenderer implements IReportRenderer<HTMLReportRendererConfiguration> {
private static final CLogger log = CLogger.getCLogger(HTMLReportRenderer.class);
public HTMLReportRenderer() {
}
@Override
public String getId() {
return HTMLReportRendererConfiguration.ID;
}
@Override
public String getName() {
return Msg.getMsg(Env.getCtx(), "FileHTML");
}
@Override
public String getContentType() {
return MediaType.HTML_UTF_8.toString();
}
@Override
public String getFileExtension() {
return HTMLReportRendererConfiguration.FILE_EXTENSION;
}
@Override
public void renderReport(ReportEngine reportEngine, HTMLReportRendererConfiguration configuration) {
try
{
Language lang = configuration.getLanguage();
if (lang == null)
lang = Language.getLoginLanguage();
Writer fw = null;
if (configuration.getOutputFile() != null)
fw = new OutputStreamWriter(new FileOutputStream(configuration.getOutputFile(), false), Ini.getCharset());
else
fw = configuration.getOutputWriter();
createHTML (reportEngine, new BufferedWriter(fw), configuration.isOnlyTable(), lang, configuration.getExtension(), configuration.isExport());
}
catch (FileNotFoundException fnfe)
{
log.log(Level.SEVERE, "(f) - " + fnfe.toString());
}
catch (Exception e)
{
log.log(Level.SEVERE, "(f)", e);
throw new AdempiereException(e);
}
}
@Override
public boolean isBinary() {
return false;
}
/**
* Write HTML to writer
* @param reportEngine
* @param writer writer
* @param onlyTable if false create complete HTML document
* @param language optional language - if null numbers/dates are not formatted
* @param extension optional extension for html output
* @param isExport when isExport = true will don't embed resource dependent zk framework
*/
private void createHTML (ReportEngine reportEngine, Writer writer, boolean onlyTable, Language language, IHTMLExtension extension, boolean isExport)
{
MPrintFormat printFormat = reportEngine.getPrintFormat();
PrintData printData = reportEngine.getPrintData();
MQuery reportEngineQuery = reportEngine.getQuery();
LayoutEngine layout = reportEngine.getLayout();
Map<CSSInfo, List<ColumnInfo>> mapCssInfo = new HashMap<CSSInfo, List<ColumnInfo>>();
try
{
//collect column to print
List<Object> columns = new ArrayList<>();
List<InstanceAttributeData> asiElements = new ArrayList<>();
int columnCount = 0;
for (int col = 0; col < printFormat.getItemCount(); col++)
{
MPrintFormatItem item = printFormat.getItem(col);
if (item.isPrinted())
{
if (item.isTypeField() && item.isPrintInstanceAttributes())
{
InstanceAttributeData asiElement = new InstanceAttributeData(item, columnCount);
asiElement.readAttributesData(printData);
asiElements.add(asiElement);
continue;
}
else
{
columns.add(item);
columnCount++;
}
}
}
if (asiElements.size() > 0)
{
int columnCreated = 0;
for(InstanceAttributeData data : asiElements)
{
List<InstanceAttributeColumn> instanceColumns = data.getColumns();
int index = data.getColumnIndex() + columnCreated;
for(InstanceAttributeColumn c : instanceColumns)
{
columns.add(index, c);
index++;
columnCreated++;
}
}
}
String cssPrefix = extension != null ? extension.getClassPrefix() : null;
if (cssPrefix != null && cssPrefix.trim().length() == 0)
cssPrefix = null;
table parameterTable = null;
if (!printFormat.isForm()) {
if (reportEngineQuery != null && reportEngineQuery.isActive()) {
int rows = reportEngineQuery.getReportProcessQuery() != null ? reportEngineQuery.getReportProcessQuery().getRestrictionCount() : reportEngineQuery.getRestrictionCount();
if (rows > 0) {
parameterTable = new table();
if (cssPrefix != null)
parameterTable.setClass(cssPrefix + "-parameter-table");
else
parameterTable.setClass("parameter-table");
parameterTable.setNeedClosingTag(false);
}
}
}
table table = new table();
if (cssPrefix != null)
table.setClass(cssPrefix + "-table");
//
//
table.setNeedClosingTag(false);
PrintWriter w = new PrintWriter(writer);
XhtmlDocument doc = null;
boolean minify = MSysConfig.getBooleanValue(MSysConfig.HTML_REPORT_MINIFY, true, Env.getAD_Client_ID(Env.getCtx()));
if (onlyTable)
w.print(compress(table.toString(), minify));
else
{
doc = new XhtmlDocument();
doc.getHtml().setNeedClosingTag(false);
doc.getBody().setNeedClosingTag(false);
doc.appendHead("<meta charset=\"UTF-8\" />");
if (extension != null && !Util.isEmpty(extension.getWebFontLinks(), true))
{
doc.appendHead(extension.getWebFontLinks());
}
if (extension != null && extension.getStyleURL() != null)
{
// maybe cache style content with key is path
String pathStyleFile = extension.getFullPathStyle(); // creates a temp file - delete below
Path path = Paths.get(pathStyleFile);
List<String> styleLines = Files.readAllLines(path, Ini.getCharset());
Files.delete(path); // delete temp file
StringBuilder styleBuild = new StringBuilder();
for (String styleLine : styleLines){
styleBuild.append(styleLine); //.append("\n");
}
appendInlineCss (doc, styleBuild);
}
if (extension != null && extension.getScriptURL() != null && !isExport)
{
script jslink = new script();
jslink.setLanguage("javascript");
jslink.setSrc(extension.getScriptURL());
doc.appendHead(jslink);
}
if (extension != null && !isExport){
extension.setWebAttribute(doc.getBody());
}
}
if (doc != null)
{
MPrintFormatItem item = null;
int printColIndex = -1;
for(int col = 0; col < columns.size(); col++)
{
Object colobj = columns.get(col);
if (colobj instanceof MPrintFormatItem)
item = (MPrintFormatItem) colobj;
else if (colobj instanceof InstanceAttributeColumn)
item = ((InstanceAttributeColumn) colobj).getPrintFormatItem();
if(item != null)
{
printColIndex++;
addCssInfo(printFormat, item, printColIndex, mapCssInfo);
}
}//IDEMPIERE-4113
appendInlineCss(doc, mapCssInfo);
StringBuilder styleBuild = new StringBuilder();
MPrintTableFormat tf = printFormat.getTableFormat();
CSSInfo cssInfo = new CSSInfo(tf.getPageHeader_Font(), tf.getPageHeaderFG_Color());
if (cssPrefix != null) {
if (parameterTable != null)
styleBuild.append("."+cssPrefix + "-parameter-table th").append(cssInfo.getCssRule());
styleBuild.append("."+cssPrefix + "-table th").append(cssInfo.getCssRule());
}
else {
if (parameterTable != null)
styleBuild.append("parameter-table th").append(cssInfo.getCssRule());
styleBuild.append("table th").append(cssInfo.getCssRule());
}
cssInfo = new CSSInfo(tf.getParameter_Font(), tf.getParameter_Color());
styleBuild.append(".tr-parameter td").append(cssInfo.getCssRule());
cssInfo = new CSSInfo(tf.getFunct_Font(), tf.getFunctFG_Color());
styleBuild.append(".tr-function td").append(cssInfo.getCssRule());
MPrintFont printFont = MPrintFont.get(printFormat.getAD_PrintFont_ID());
Font base = printFont.getFont();
Font newFont = new Font(base.getName(), Font.PLAIN, base.getSize()-1);
cssInfo = new CSSInfo(newFont, null);
styleBuild.append(".tr-level-1 td").append(cssInfo.getCssRule());
newFont = new Font(base.getName(), Font.PLAIN, base.getSize()-2);
cssInfo = new CSSInfo(newFont, null);
styleBuild.append(".tr-level-2 td").append(cssInfo.getCssRule());
styleBuild = new StringBuilder(styleBuild.toString().replaceAll(";", "!important;"));
appendInlineCss (doc, styleBuild);
w.print(compress(doc.toString(), minify));
w.print("<div class='"+cssPrefix+"-flex-container'>");
String paraWrapId = null;
if (parameterTable != null) {
paraWrapId = cssPrefix + "-para-table-wrap";
w.print("<details id='" + paraWrapId + "' open=true style='cursor:pointer'>");
w.print("<summary style='cursor:pointer'>"+Msg.getMsg(Env.getCtx(), "Parameter")+"</summary>");
w.print(compress(parameterTable.toString(), minify));
tr tr = new tr();
tr.setClass("tr-parameter");
MQuery query = reportEngineQuery;
if (reportEngineQuery.getReportProcessQuery() != null)
query = reportEngineQuery.getReportProcessQuery();
for (int r = 0; r < query.getRestrictionCount(); r++)
{
if (r > 0) {
tr = new tr();
tr.setClass("tr-parameter");
}
td td = new td();
tr.addElement(td);
td.addElement(query.getInfoName(r));
td = new td();
tr.addElement(td);
td.addElement(query.getInfoOperator(r));
td = new td();
tr.addElement(td);
td.addElement(query.getInfoDisplayAll(r));
w.print(compress(tr.toString(), minify));
}
w.print("</table>");
w.print("</details>");
}
StringBuilder tableWrapDiv = new StringBuilder();
tableWrapDiv.append("<div class='").append(cssPrefix).append("-table-wrap' ");
if (paraWrapId != null) {
String paraWrapGet = "document.getElementById(\""+paraWrapId+"\")";
tableWrapDiv.append("onscroll='setTimeout(() => {if (this.scrollTop > 0) ")
.append(" if(").append(paraWrapGet).append(".open) ")
.append(paraWrapGet).append(".open=false;}, 100)'");
}
tableWrapDiv.append(" >");
w.print(compress(tableWrapDiv.toString(), minify));
w.print(compress(table.toString(), minify));
}
thead thead = new thead();
tbody tbody = new tbody();
tbody.setNeedClosingTag(false);
Boolean [] colSuppressRepeats = layout == null || layout.colSuppressRepeats == null? LayoutEngine.getColSuppressRepeats(printFormat):layout.colSuppressRepeats;
Object [] preValues = null;
if (colSuppressRepeats != null){
preValues = new Object [colSuppressRepeats.length];
}
int printColIndex = -1;
HashMap<Integer, th> suppressMap = new HashMap<>();
// for all rows (-1 = header row)
for (int row = -1; row < printData.getRowCount(); row++)
{
tr tr = new tr();
if (row != -1)
{
printData.setRowIndex(row);
if (extension != null && !isExport)
{
extension.extendRowElement(tr, printData);
}
if (printData.isFunctionRow()) {
tr.setClass(cssPrefix + "-functionrow");
} else if ( row < printData.getRowCount() && printData.isFunctionRow(row+1)) {
tr.setClass(cssPrefix + "-lastgrouprow");
}
// add row to table body
//tbody.addElement(tr);
} else {
// add row to table header
thead.addElement(tr);
}
printColIndex = -1;
// for all columns
for (int col = 0; col < columns.size(); col++)
{
Object colObj = columns.get(col);
MPrintFormatItem item = null;
InstanceAttributeColumn instanceAttributeColumn = null;
if (colObj instanceof MPrintFormatItem)
{
item = (MPrintFormatItem) colObj;
}
else if (colObj instanceof InstanceAttributeColumn)
{
instanceAttributeColumn = (InstanceAttributeColumn) colObj;
item = instanceAttributeColumn.getPrintFormatItem();
}
if (item != null)
{
printColIndex++;
// header row
if (row == -1)
{
th th = new th();
tr.addElement(th);
String columnHeader = instanceAttributeColumn != null ? instanceAttributeColumn.getName() : item.getPrintName(language);
th.addElement(Util.maskHTML(columnHeader));
if (cssPrefix != null && instanceAttributeColumn == null)
{
MColumn column = MColumn.get(Env.getCtx(), item.getAD_Column_ID());
if (column != null && column.getAD_Column_ID() > 0)
{
if (DisplayType.isNumeric(column.getAD_Reference_ID()))
{
th.setClass(cssPrefix + "-number");
}
}
}
if (item.isSuppressNull())
{
suppressMap.put(printColIndex, th);
th.setID("report-th-"+printColIndex);
}
}
else
{
td td = new td();
tr.addElement(td);
MStyle style = item.getAD_FieldStyle_ID() > 0 ? MStyle.get(Env.getCtx(), item.getAD_FieldStyle_ID()) : null;
Object obj = instanceAttributeColumn != null ? instanceAttributeColumn.getPrintDataElement(row)
: printData.getNodeByPrintFormatItemId(item.getAD_PrintFormatItem_ID());
if (obj == null || !ReportEngine.isDisplayPFItem(printData, item)){
td.addElement("&nbsp;");
if (colSuppressRepeats != null && colSuppressRepeats[printColIndex]){
preValues[printColIndex] = null;
}
if (item.isSuppressNull() && obj != null && suppressMap.containsKey(printColIndex))
suppressMap.remove(printColIndex);
}
else if (obj instanceof PrintDataElement)
{
PrintDataElement pde = (PrintDataElement) obj;
String value = pde.getValueDisplay(language); // formatted
if (colSuppressRepeats != null && colSuppressRepeats[printColIndex]){
if (value.equals(preValues[printColIndex])){
td.addElement("&nbsp;");
continue;
}else{
preValues[printColIndex] = value;
}
}
if (item.isSuppressNull() && obj != null && suppressMap.containsKey(printColIndex))
suppressMap.remove(printColIndex);
if (pde.getColumnName().endsWith("_ID") && extension != null && !isExport)
{
boolean isZoom = false;
if (item.getColumnName().equals("Record_ID")) {
Object tablePDE = printData.getNode("AD_Table_ID");
if (tablePDE != null && tablePDE instanceof PrintDataElement) {
int tableID = -1;
try {
tableID = Integer.parseInt(((PrintDataElement)tablePDE).getValueAsString());
} catch (Exception e) {
tableID = -1;
}
if (tableID > 0) {
MTable mTable = MTable.get(Env.getCtx(), tableID);
String tableName = mTable.getTableName();
value = reportEngine.getIdentifier(mTable, tableName, Integer.parseInt(value));
String foreignColumnName = tableName + "_ID";
pde.setForeignColumnName(foreignColumnName);
isZoom = true;
}
}
} else {
isZoom = true;
}
if (isZoom) {
// check permission on the zoomed window
MTable mTable = MTable.get(Env.getCtx(), pde.getForeignColumnName().substring(0, pde.getForeignColumnName().length()-3));
int Record_ID = -1;
try {
Record_ID = Integer.parseInt(pde.getValueAsString());
} catch (Exception e) {
Record_ID = -1;
}
Boolean canAccess = null;
if (Record_ID >= 0 && mTable != null) {
int AD_Window_ID = Env.getZoomWindowID(mTable.get_ID(), Record_ID);
canAccess = MRole.getDefault().getWindowAccess(AD_Window_ID);
}
if (canAccess == null) {
isZoom = false;
}
}
if (isZoom) {
//link for column
a href = new a("javascript:void(0)");
href.setID(pde.getColumnName() + "_" + row + "_a");
td.addElement(href);
href.addElement(Util.maskHTML(value));
if (cssPrefix != null)
href.setClass(cssPrefix + "-href");
// Set Style
if(style != null && style.isWrapWithSpan())
setStyle(printData, href, style);
else
setStyle(printData, td, style);
extension.extendIDColumn(row, td, href, pde);
} else {
// Set Style
if(style != null && style.isWrapWithSpan()) {
span span = new span();
setStyle(printData, span, style);
span.addElement(Util.maskHTML(value));
td.addElement(span);
}
else {
setStyle(printData, td, style);
td.addElement(Util.maskHTML(value));
}
}
}
else
{
// Set Style
if(style != null && style.isWrapWithSpan()) {
span span = new span();
setStyle(printData, span, style);
span.addElement(Util.maskHTML(value));
td.addElement(span);
}
else {
setStyle(printData, td, style);
td.addElement(Util.maskHTML(value));
}
}
if (cssPrefix != null)
{
if (DisplayType.isNumeric(pde.getDisplayType()))
td.setClass(cssPrefix + "-number");
else if (DisplayType.isDate(pde.getDisplayType()))
td.setClass(cssPrefix + "-date");
else
td.setClass(cssPrefix + "-text");
}
}
else if (obj instanceof PrintData)
{
// ignore contained Data
}
else
log.log(Level.SEVERE, "Element not PrintData(Element) " + obj.getClass());
}
} // printed
} // for all columns
/* output table header */
if (row == -1){
w.print(compress(thead.toString(), minify));
// output open of tbody
w.print(compress(tbody.toString(), minify));
}else{
// output row by row
w.print(compress(tr.toString(), minify));
}
} // for all rows
w.print("</tbody>");
w.print("</table>");
if (suppressMap.size() > 0)
{
StringBuilder st = new StringBuilder();
for(th t : suppressMap.values())
{
if (st.length() > 0)
st.append(",");
st.append("#").append(t.getAttribute("id"));
}
st.append(" {\n\t\tdisplay:none;\n\t}");
style styleTag = new style();
styleTag.addElement(st.toString());
w.print(compress(styleTag.toString(), minify));
}
if (!onlyTable)
{
w.print("</div>");
w.print("</div>");
w.print("</body>");
w.print("</html>");
}
w.flush();
w.close();
}
catch (Exception e)
{
log.log(Level.SEVERE, "(w)", e);
throw new AdempiereException(e);
}
} // createHTML
/**
* Compress html content
* @param src
* @param minify
* @return compressed content
*/
public static String compress(String src, boolean minify) {
if(minify) {
HtmlCompressor compressor = new HtmlCompressor();
compressor.setEnabled(true);
compressor.setCompressCss(true);
compressor.setCompressJavaScript(true);
compressor.setRemoveComments(true);
compressor.setRemoveMultiSpaces(true);
compressor.setRemoveIntertagSpaces(true);
// compressor.setGenerateStatistics(false);
// compressor.setRemoveQuotes(false);
// compressor.setSimpleDoctype(false);
// compressor.setRemoveScriptAttributes(false);
// compressor.setRemoveStyleAttributes(false);
// compressor.setRemoveLinkAttributes(false);
// compressor.setRemoveFormAttributes(false);
// compressor.setRemoveInputAttributes(false);
// compressor.setSimpleBooleanAttributes(false);
// compressor.setRemoveJavaScriptProtocol(false);
// compressor.setRemoveHttpProtocol(false);
// compressor.setRemoveHttpsProtocol(false);
// compressor.setPreserveLineBreaks(false);
return compressor.compress(src);
}
else {
return src;
}
}
/**
* Append css for table from mapCssInfo
* @param doc
*/
public static void appendInlineCss (XhtmlDocument doc, Map<CSSInfo, List<ColumnInfo>> mapCssInfo){
StringBuilder buildCssInline = new StringBuilder();
// each entry is a css class
for (Entry<CSSInfo, List<ColumnInfo>> cssClassInfo : mapCssInfo.entrySet()){
// each column is a css name.
for (int i = 0; i < cssClassInfo.getValue().size(); i++){
if (i > 0)
buildCssInline.append (",");
buildCssInline.append(cssClassInfo.getValue().get(i).getCssSelector());
}
buildCssInline.append(cssClassInfo.getKey().getCssRule());
buildCssInline.append("\n");
}
appendInlineCss (doc, buildCssInline);
}
/**
* Append inline css content
* @param doc
* @param buildCssInline
*/
public static void appendInlineCss (XhtmlDocument doc, StringBuilder buildCssInline){
if (buildCssInline.length() > 0){
buildCssInline.insert(0, "<style>");
buildCssInline.append("</style>");
doc.appendHead(buildCssInline.toString());
}
}
/**
* Create css info from formatItem, add all column has same CSSInfo in a list
* @param formatItem
* @param index
*/
public static void addCssInfo (MPrintFormat printFormat, MPrintFormatItem formatItem, int index, Map<CSSInfo, List<ColumnInfo>> mapCssInfo){
CSSInfo cadidateCss = new CSSInfo(printFormat, formatItem);
if (mapCssInfo.containsKey(cadidateCss)) {
mapCssInfo.get(cadidateCss).add(new ColumnInfo(index, formatItem));
} else {
List<ColumnInfo> newColumnList = new ArrayList<ColumnInfo>();
newColumnList.add(new ColumnInfo(index, formatItem));
mapCssInfo.put(cadidateCss, newColumnList);
}
}
/**
* Store info for css rule
* @author hieplq
*/
public static class CSSInfo {
private Font font;
private Color color;
private String cssStr;
public CSSInfo (MPrintFormat printFormat, MPrintFormatItem item){
MPrintFont mPrintFont = null;
if (item.getAD_PrintFont_ID() > 0)
{
mPrintFont = MPrintFont.get(item.getAD_PrintFont_ID());
}
else if (printFormat.getAD_PrintFont_ID() > 0)
{
mPrintFont = MPrintFont.get(printFormat.getAD_PrintFont_ID());
}
if (mPrintFont != null && mPrintFont.getAD_PrintFont_ID() > 0)
{
font = mPrintFont.getFont();
}
MPrintColor mPrintColor = null;
if (item.getAD_PrintColor_ID() > 0)
{
mPrintColor = MPrintColor.get(Env.getCtx(), item.getAD_PrintColor_ID());
}
else if (printFormat.getAD_PrintColor_ID() > 0)
{
mPrintColor = MPrintColor.get(Env.getCtx(), printFormat.getAD_PrintColor_ID());
}
if (mPrintColor != null && mPrintColor.getAD_PrintColor_ID() > 0)
{
color = mPrintColor.getColor();
}
}
public CSSInfo (Font font, Color color) {
this.font = font;
this.color = color;
}
/**
* Sum hashCode of color and font
*/
@Override
public int hashCode() {
return (color == null ? 0 : color.hashCode()) + (font == null ? 0 : font.hashCode());
}
/**
* equal when same color and font
*/
@Override
public boolean equals(Object obj) {
if (obj == null || !(obj instanceof CSSInfo) || obj.hashCode() != this.hashCode())
return false;
CSSInfo compareObj = (CSSInfo)obj;
return compareObj (compareObj.color, color) && compareObj (compareObj.font, font);
}
/**
* Compare two object equal when both is null or equal
* @param obj1
* @param obj2
* @return true if both is null or equal
*/
protected boolean compareObj(Object obj1, Object obj2) {
if (obj1 == null && obj2 != null)
return false;
if (obj1 == null && obj2 == null){
return true;
}
return obj1.equals(obj2);
}
/**
* Append a css rule to a css class
* @param cssBuild css class builder
* @param ruleName
* @param ruleValue
*/
protected void addCssRule(StringBuilder cssBuild, String ruleName, String ruleValue) {
cssBuild.append (ruleName);
cssBuild.append (":");
cssBuild.append (ruleValue);
cssBuild.append (";");
}
/**
* Build css rule
* @return css rule
*/
public String getCssRule (){
if (cssStr != null)
return cssStr;
StringBuilder cssBuild = new StringBuilder();
cssBuild.append ("{");
if (font != null){
String fontFamily = font.getFamily();
fontFamily = getCSSFontFamily(fontFamily);
if (fontFamily != null){
addCssRule(cssBuild, "font-family", fontFamily);
}
if (font.isBold())
{
addCssRule(cssBuild, "font-weight", "bold");
}
if (font.isItalic())
{
addCssRule(cssBuild, "font-style", "italic");
}
int size = font.getSize();
addCssRule(cssBuild, "font-size", size + "pt");
}
if (color != null)
{
cssBuild.append("color:rgb(");
cssBuild.append(color.getRed());
cssBuild.append(",");
cssBuild.append(color.getGreen());
cssBuild.append(",");
cssBuild.append(color.getBlue());
cssBuild.append(");");
}
cssBuild.append ("}");
cssStr = cssBuild.toString();
return cssStr;
}
}
/**
* Get CSS font family
* @param fontFamily Java font family
* @return CSS font family
*/
private static String getCSSFontFamily(String fontFamily) {
if ("Dialog".equals(fontFamily) || "DialogInput".equals(fontFamily) || "Monospaced".equals(fontFamily))
{
return "monospace";
} else if ("SansSerif".equals(fontFamily))
{
return "sans-serif";
} else if ("Serif".equals(fontFamily))
{
return "serif";
}
return null;
}
/**
* Set inline style of element
* @param printData
* @param element
* @param style
*/
public static void setStyle(PrintData printData, MultiPartElement element, MStyle style) {
if (style == null || style.getAD_Style_ID() == 0)
return;
X_AD_StyleLine[] lines = style.getStyleLines();
StringBuilder styleBuilder = new StringBuilder();
for (X_AD_StyleLine line : lines)
{
String inlineStyle = line.getInlineStyle().trim();
String displayLogic = line.getDisplayLogic();
if (!Util.isEmpty(displayLogic))
{
if (!Evaluator.evaluateLogic(new PrintDataEvaluatee(null, printData), displayLogic))
continue;
}
if (styleBuilder.length() > 0 && !(styleBuilder.charAt(styleBuilder.length()-1)==';'))
styleBuilder.append("; ");
styleBuilder.append(inlineStyle);
}
if(styleBuilder.length() > 0)
element.setStyle(styleBuilder.toString());
//
}
/**
* Store info of report column, <br/>
* now just use index to create css selector, but for later maybe will construct a complex class name
* @author hieplq
*
*/
public static class ColumnInfo {
protected static String CSS_SELECTOR_TEMPLATE = "table > tbody > tr > td:nth-child(%1$s)";
int index = -1;
public ColumnInfo (int index, MPrintFormatItem formatItem){
this.index = index;
}
public String getCssSelector(){
return String.format(CSS_SELECTOR_TEMPLATE, index + 1);
}
}
@Override
public Class<HTMLReportRendererConfiguration> getConfigurationType() {
return HTMLReportRendererConfiguration.class;
}
}

View File

@ -0,0 +1,143 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.print.renderer;
import java.io.File;
import java.io.Writer;
import org.compiere.print.IHTMLExtension;
import org.compiere.util.Language;
/**
* Configuration for HTML content renderer
*/
public class HTMLReportRendererConfiguration implements IReportRendererConfiguration {
private boolean onlyTable;
private IHTMLExtension extension;
private boolean isExport;
private File file;
private Writer writer;
private Language language;
public static final String ID = "HTML";
public static final String FILE_EXTENSION = "html";
public HTMLReportRendererConfiguration() {
}
/**
* Is only generate html table instead of html document
* @return true if only generate html table instead of html document
*/
public boolean isOnlyTable() {
return onlyTable;
}
/**
* Set only generate html table or html document
* @param onlyTable
*/
public HTMLReportRendererConfiguration setOnlyTable(boolean onlyTable) {
this.onlyTable = onlyTable;
return this;
}
/**
* Get HTML content extension
* @return HTML content extension
*/
public IHTMLExtension getExtension() {
return extension;
}
/**
* Set HTML content extension
* @param extension
*/
public HTMLReportRendererConfiguration setExtension(IHTMLExtension extension) {
this.extension = extension;
return this;
}
/**
* Is renderer support export
* @return true if renderer support export
*/
public boolean isExport() {
return isExport;
}
/**
* Set is renderer support export
* @param isExport
*/
public HTMLReportRendererConfiguration setExport(boolean isExport) {
this.isExport = isExport;
return this;
}
@Override
public File getOutputFile() {
return file;
}
/**
* Set output file
* @param file
*/
public HTMLReportRendererConfiguration setOutputFile(File file) {
this.file = file;
return this;
}
@Override
public Writer getOutputWriter() {
return writer;
}
/**
* Set output writer
* @param writer
*/
public HTMLReportRendererConfiguration setOutputWriter(Writer writer) {
this.writer = writer;
return this;
}
/**
* Set content language
* @param language
*/
public HTMLReportRendererConfiguration setLanguage(Language language) {
this.language = language;
return this;
}
/**
* Get content language
* @return content language
*/
public Language getLanguage() {
return language;
}
}

View File

@ -0,0 +1,74 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.print.renderer;
import org.compiere.print.ReportEngine;
/**
* Content rendering service for report engine.<br/>
* Implementation must be thread safe.
* @param <T> Renderer configuration type
*/
public interface IReportRenderer<T extends IReportRendererConfiguration> {
/**
* Get id of renderer
* @return renderer id (HTML, XLS, etc)
*/
String getId();
/**
* Get renderer name
* @return renderer name
*/
String getName();
/**
* Get MIME content type (text/html, etc)
* @return MIME content type
*/
String getContentType();
/**
* Get file extension (without dot)
* @return file extension
*/
String getFileExtension();
/**
* Render content for report engine
* @param reportEngine
* @param configuration
*/
void renderReport(ReportEngine reportEngine, T configuration);
/**
* Is binary content
* @return true if content is binary
*/
boolean isBinary();
/**
* Get configuration type
* @return configuration type
*/
Class<T> getConfigurationType ();
}

View File

@ -0,0 +1,57 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.print.renderer;
import java.io.File;
import java.io.OutputStream;
import java.io.Writer;
/**
* Interface for report renderer configuration
*/
public interface IReportRendererConfiguration {
/**
* Get output file
* @return output file
*/
default File getOutputFile() {
return null;
}
/**
* Get output stream
* @return output stream
*/
default OutputStream getOutputStream() {
return null;
}
/**
* Get output writer
* @return output writer
*/
default Writer getOutputWriter() {
return null;
}
}

View File

@ -0,0 +1,100 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.print.renderer;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException;
import org.adempiere.pdf.Document;
import org.compiere.print.ArchiveEngine;
import org.compiere.print.ReportEngine;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.osgi.service.component.annotations.Component;
import com.google.common.net.MediaType;
/**
* PDF content rendering service for report engine
*/
@Component(service = IReportRenderer.class, immediate = true)
public class PDFReportRenderer implements IReportRenderer<PDFReportRendererConfiguration> {
private static final CLogger log = CLogger.getCLogger(PDFReportRenderer.class);
public PDFReportRenderer() {
}
@Override
public String getId() {
return PDFReportRendererConfiguration.ID;
}
@Override
public String getName() {
return Msg.getMsg(Env.getCtx(), "FilePDF");
}
@Override
public String getContentType() {
return MediaType.PDF.toString();
}
@Override
public String getFileExtension() {
return PDFReportRendererConfiguration.FILE_EXTENSION;
}
@Override
public void renderReport(ReportEngine reportEngine, PDFReportRendererConfiguration configuration) {
try
{
OutputStream os = null;
if (configuration.getOutputFile() != null)
os = new FileOutputStream(configuration.getOutputFile());
else
os = configuration.getOutputStream();
Document.writePDF(reportEngine.getLayout().getPageable(false), os);
if (configuration.getOutputFile() != null)
ArchiveEngine.get().archive(configuration.getOutputFile(), reportEngine.getPrintInfo());
}
catch (Exception e)
{
log.log(Level.SEVERE, "PDF", e);
throw new AdempiereException(e);
}
}
@Override
public boolean isBinary() {
return true;
}
@Override
public Class<PDFReportRendererConfiguration> getConfigurationType() {
return PDFReportRendererConfiguration.class;
}
}

View File

@ -0,0 +1,60 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.print.renderer;
import java.io.File;
import java.io.OutputStream;
/**
* Configuration for PDF content renderer
*/
public class PDFReportRendererConfiguration implements IReportRendererConfiguration {
public static final String ID = "PDF";
public static final String FILE_EXTENSION = "pdf";
private File file;
private OutputStream outputStream;
public PDFReportRendererConfiguration() {
}
@Override
public File getOutputFile() {
return file;
}
public PDFReportRendererConfiguration setOutputFile(File file) {
this.file = file;
return this;
}
@Override
public OutputStream getOutputStream() {
return outputStream;
}
public PDFReportRendererConfiguration setOutputStream(OutputStream os) {
this.outputStream = os;
return this;
}
}

View File

@ -0,0 +1,137 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.print.renderer;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.util.logging.Level;
import javax.print.DocFlavor;
import javax.print.StreamPrintService;
import javax.print.StreamPrintServiceFactory;
import javax.print.attribute.HashPrintRequestAttributeSet;
import org.adempiere.exceptions.AdempiereException;
import org.compiere.print.ReportEngine;
import org.compiere.print.layout.LayoutEngine;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.osgi.service.component.annotations.Component;
import com.google.common.net.MediaType;
/**
* Postscript content rendering service for report engine
*/
@Component(service = IReportRenderer.class, immediate = true)
public class PSReportRenderer implements IReportRenderer<PSReportRendererConfiguration> {
private static final CLogger log = CLogger.getCLogger(PSReportRenderer.class);
public PSReportRenderer() {
}
@Override
public String getId() {
return PSReportRendererConfiguration.ID;
}
@Override
public String getName() {
return Msg.getMsg(Env.getCtx(), "FilePS");
}
@Override
public String getContentType() {
return MediaType.POSTSCRIPT.toString();
}
@Override
public String getFileExtension() {
return PSReportRendererConfiguration.FILE_EXTENSION;
}
@Override
public void renderReport(ReportEngine reportEngine, PSReportRendererConfiguration configuration) {
try
{
OutputStream os = null;
if (configuration.getOutputFile() != null)
os = new FileOutputStream(configuration.getOutputFile());
else
os = configuration.getOutputStream();
createPS(reportEngine, os);
}
catch (Exception e)
{
log.log(Level.SEVERE, "PDF", e);
throw new AdempiereException(e);
}
}
@Override
public boolean isBinary() {
return true;
}
/**
* Write PostScript to output stream
* @param os output stream
*/
private void createPS (ReportEngine reportEngine, OutputStream os)
{
try
{
String outputMimeType = DocFlavor.BYTE_ARRAY.POSTSCRIPT.getMimeType();
DocFlavor docFlavor = DocFlavor.SERVICE_FORMATTED.PAGEABLE;
StreamPrintServiceFactory[] spsfactories =
StreamPrintServiceFactory.lookupStreamPrintServiceFactories(docFlavor, outputMimeType);
if (spsfactories.length == 0)
{
log.log(Level.SEVERE, "(fos) - No StreamPrintService");
return;
}
// just use first one - sun.print.PSStreamPrinterFactory
StreamPrintService sps = spsfactories[0].getPrintService(os);
// get format
LayoutEngine layout = reportEngine.getLayout();
// print it
sps.createPrintJob().print(layout.getPageable(false),
new HashPrintRequestAttributeSet());
//
os.flush();
//following 2 line for backward compatibility
if (os instanceof FileOutputStream)
((FileOutputStream)os).close();
}
catch (Exception e)
{
log.log(Level.SEVERE, "(fos)", e);
}
} // createPS
@Override
public Class<PSReportRendererConfiguration> getConfigurationType() {
return PSReportRendererConfiguration.class;
}
}

View File

@ -0,0 +1,68 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.print.renderer;
import java.io.File;
import java.io.OutputStream;
/**
* Configuration for postscript content renderer
*/
public class PSReportRendererConfiguration implements IReportRendererConfiguration {
public static final String ID = "PS";
public static final String FILE_EXTENSION = "ps";
private File file;
private OutputStream outputStream;
public PSReportRendererConfiguration() {
}
@Override
public File getOutputFile() {
return file;
}
/**
* Set output file
* @param file
*/
public PSReportRendererConfiguration setOutputFile(File file) {
this.file = file;
return this;
}
@Override
public OutputStream getOutputStream() {
return outputStream;
}
/**
* Set output stream
* @param os
*/
public PSReportRendererConfiguration setOutputStream(OutputStream os) {
this.outputStream = os;
return this;
}
}

View File

@ -0,0 +1,61 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.print.renderer;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.osgi.service.component.annotations.Component;
import com.google.common.net.MediaType;
/**
* Semicolon separated content rendering service for report engine
*/
@Component(service = IReportRenderer.class, immediate = true)
public class SSVReportRenderer extends DelimitedReportRenderer<SSVReportRendererConfiguration> {
@Override
public String getId() {
return SSVReportRendererConfiguration.ID;
}
@Override
public String getName() {
return Msg.getMsg(Env.getCtx(), "FileSSV");
}
@Override
public String getContentType() {
return MediaType.CSV_UTF_8.toString();
}
@Override
public String getFileExtension() {
return SSVReportRendererConfiguration.FILE_EXTENSION;
}
@Override
public Class<SSVReportRendererConfiguration> getConfigurationType() {
return SSVReportRendererConfiguration.class;
}
}

View File

@ -0,0 +1,62 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.print.renderer;
import java.io.File;
import java.io.Writer;
import org.compiere.util.Language;
/**
* Configuration for semicolon separated content renderer
*/
public class SSVReportRendererConfiguration extends DelimitedReportRendererConfiguration {
public static final String ID = "SSV";
public static final String FILE_EXTENSION = "ssv";
public SSVReportRendererConfiguration() {
}
@Override
public char getDelimiter() {
return ';';
}
@Override
public SSVReportRendererConfiguration setOutputFile(File file) {
super.setOutputFile(file);
return this;
}
@Override
public SSVReportRendererConfiguration setOutputWriter(Writer writer) {
super.setOutputWriter(writer);
return this;
}
@Override
public SSVReportRendererConfiguration setLanguage(Language language) {
super.setLanguage(language);
return this;
}
}

View File

@ -0,0 +1,64 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.print.renderer;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.osgi.service.component.annotations.Component;
import com.google.common.net.MediaType;
/**
* Tab delimited content rendering service for report engine
*/
@Component(service = IReportRenderer.class, immediate = true)
public class TabDelimitedReportRenderer extends DelimitedReportRenderer<TabDelimitedReportRendererConfiguration> {
public TabDelimitedReportRenderer() {
}
@Override
public String getId() {
return TabDelimitedReportRendererConfiguration.ID;
}
@Override
public String getName() {
return Msg.getMsg(Env.getCtx(), "FileTXT");
}
@Override
public String getContentType() {
return MediaType.PLAIN_TEXT_UTF_8.toString();
}
@Override
public String getFileExtension() {
return TabDelimitedReportRendererConfiguration.FILE_EXTENSION;
}
@Override
public Class<TabDelimitedReportRendererConfiguration> getConfigurationType() {
return TabDelimitedReportRendererConfiguration.class;
}
}

View File

@ -0,0 +1,62 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.print.renderer;
import java.io.File;
import java.io.Writer;
import org.compiere.util.Language;
/**
* Configuration for tab delimited content renderer
*/
public class TabDelimitedReportRendererConfiguration extends DelimitedReportRendererConfiguration {
public static final String ID = "TXT";
public static final String FILE_EXTENSION = "txt";
public TabDelimitedReportRendererConfiguration() {
}
@Override
public char getDelimiter() {
return '\t';
}
@Override
public TabDelimitedReportRendererConfiguration setOutputFile(File file) {
super.setOutputFile(file);
return this;
}
@Override
public TabDelimitedReportRendererConfiguration setOutputWriter(Writer writer) {
super.setOutputWriter(writer);
return this;
}
@Override
public TabDelimitedReportRendererConfiguration setLanguage(Language language) {
super.setLanguage(language);
return this;
}
}

View File

@ -0,0 +1,111 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.print.renderer;
import java.io.File;
import java.util.Map;
import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException;
import org.adempiere.print.export.PrintDataExcelExporter;
import org.compiere.print.MPrintFormat;
import org.compiere.print.MPrintFormatItem;
import org.compiere.print.PrintData;
import org.compiere.print.ReportEngine;
import org.compiere.print.layout.LayoutEngine;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.Language;
import org.compiere.util.Msg;
import org.osgi.service.component.annotations.Component;
import com.google.common.net.MediaType;
/**
* Excel (xls) content rendering service for report engine
*/
@Component(service = IReportRenderer.class, immediate = true)
public class XLSReportRenderer implements IReportRenderer<XLSReportRendererConfiguration> {
private static final CLogger log = CLogger.getCLogger(XLSReportRenderer.class);
public XLSReportRenderer() {
}
@Override
public String getId() {
return XLSReportRendererConfiguration.ID;
}
@Override
public String getName() {
return Msg.getMsg(Env.getCtx(), "FileXLS");
}
@Override
public String getContentType() {
return MediaType.MICROSOFT_EXCEL.toString();
}
@Override
public String getFileExtension() {
return XLSReportRendererConfiguration.FILE_EXTENSION;
}
@Override
public void renderReport(ReportEngine reportEngine, XLSReportRendererConfiguration configuration) {
try {
createXLS(reportEngine, configuration.getOutputFile(), configuration.getLanguage());
} catch (Exception e) {
log.log(Level.SEVERE, e.getMessage(), e);
throw new AdempiereException(e);
}
}
@Override
public boolean isBinary() {
return true;
}
/**
* Create Excel file
* @param outFile output file
* @param language
* @throws Exception if error
*/
private void createXLS(ReportEngine reportEngine, File outFile, Language language)
throws Exception
{
LayoutEngine layout = reportEngine.getLayout();
MPrintFormat printFormat = reportEngine.getPrintFormat();
Boolean [] colSuppressRepeats = layout == null || layout.colSuppressRepeats == null? LayoutEngine.getColSuppressRepeats(printFormat):layout.colSuppressRepeats;
Map<MPrintFormatItem, PrintData> childFormats = layout != null ? layout.getChildPrintFormatDetails() : null;
PrintDataExcelExporter exp = new PrintDataExcelExporter(reportEngine.getPrintData(), printFormat, childFormats, colSuppressRepeats, reportEngine.getQuery());
exp.export(outFile, language);
}
@Override
public Class<XLSReportRendererConfiguration> getConfigurationType() {
return XLSReportRendererConfiguration.class;
}
}

View File

@ -0,0 +1,72 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.print.renderer;
import java.io.File;
import org.compiere.util.Language;
/**
* Configuration for Excel (xls) content renderer
*/
public class XLSReportRendererConfiguration implements IReportRendererConfiguration {
public static final String ID = "XLS";
public static final String FILE_EXTENSION = "xls";
private File file;
private Language language;
public XLSReportRendererConfiguration() {
}
@Override
public File getOutputFile() {
return file;
}
/**
* Set output file
* @param file
*/
public XLSReportRendererConfiguration setOutputFile(File file) {
this.file = file;
return this;
}
/**
* Set content language
* @param language
*/
public XLSReportRendererConfiguration setLanguage(Language language) {
this.language = language;
return this;
}
/**
* Get content language
* @return content language
*/
public Language getLanguage() {
return language;
}
}

View File

@ -0,0 +1,111 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.print.renderer;
import java.io.File;
import java.util.Map;
import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException;
import org.adempiere.print.export.PrintDataXLSXExporter;
import org.compiere.print.MPrintFormat;
import org.compiere.print.MPrintFormatItem;
import org.compiere.print.PrintData;
import org.compiere.print.ReportEngine;
import org.compiere.print.layout.LayoutEngine;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.Language;
import org.compiere.util.Msg;
import org.osgi.service.component.annotations.Component;
import com.google.common.net.MediaType;
/**
* Excel open xml (xlsx) content rendering service for report engine
*/
@Component(service = IReportRenderer.class, immediate = true)
public class XLSXReportRenderer implements IReportRenderer<XLSXReportRendererConfiguration> {
private static final CLogger log = CLogger.getCLogger(XLSReportRenderer.class);
public XLSXReportRenderer() {
}
@Override
public String getId() {
return XLSXReportRendererConfiguration.ID;
}
@Override
public String getName() {
return Msg.getMsg(Env.getCtx(), "FileXLSX");
}
@Override
public String getContentType() {
return MediaType.OOXML_SHEET.toString();
}
@Override
public String getFileExtension() {
return XLSXReportRendererConfiguration.FILE_EXTENSION;
}
@Override
public void renderReport(ReportEngine reportEngine, XLSXReportRendererConfiguration configuration) {
try {
createXLSX(reportEngine, configuration.getOutputFile(), configuration.getLanguage());
} catch (Exception e) {
log.log(Level.SEVERE, e.getMessage(), e);
throw new AdempiereException(e);
}
}
@Override
public boolean isBinary() {
return true;
}
/**
* Create Excel open XML file
* @param reportEngine
* @param outFile output file
* @param language
* @throws Exception if error
*/
private void createXLSX(ReportEngine reportEngine, File outFile, Language language)
throws Exception
{
LayoutEngine layout = reportEngine.getLayout();
MPrintFormat printFormat = reportEngine.getPrintFormat();
Boolean [] colSuppressRepeats = layout == null || layout.colSuppressRepeats == null? LayoutEngine.getColSuppressRepeats(printFormat):layout.colSuppressRepeats;
Map<MPrintFormatItem, PrintData> childFormats = layout != null ? layout.getChildPrintFormatDetails() : null;
PrintDataXLSXExporter exp = new PrintDataXLSXExporter(reportEngine.getPrintData(), printFormat, childFormats, colSuppressRepeats, reportEngine.getQuery());
exp.export(outFile, language);
}
@Override
public Class<XLSXReportRendererConfiguration> getConfigurationType() {
return XLSXReportRendererConfiguration.class;
}
}

View File

@ -0,0 +1,72 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.print.renderer;
import java.io.File;
import org.compiere.util.Language;
/**
* Configuration for excel open xml (xlsx) content renderer
*/
public class XLSXReportRendererConfiguration implements IReportRendererConfiguration {
public static final String ID = "XLSX";
public static final String FILE_EXTENSION = "xlsx";
private File file;
private Language language;
public XLSXReportRendererConfiguration() {
}
@Override
public File getOutputFile() {
return file;
}
/**
* Set output file
* @param file
*/
public XLSXReportRendererConfiguration setOutputFile(File file) {
this.file = file;
return this;
}
/**
* Set content language
* @param language
*/
public XLSXReportRendererConfiguration setLanguage(Language language) {
this.language = language;
return this;
}
/**
* Get content language
* @return content language
*/
public Language getLanguage() {
return language;
}
}

View File

@ -0,0 +1,118 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.print.renderer;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.logging.Level;
import javax.xml.transform.stream.StreamResult;
import org.compiere.print.ReportEngine;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.Ini;
import org.compiere.util.Msg;
import org.osgi.service.component.annotations.Component;
import com.google.common.net.MediaType;
/**
* XML content rendering service for report engine
*/
@Component(service = IReportRenderer.class, immediate = true)
public class XMLReportRenderer implements IReportRenderer<XMLReportRendererConfiguration> {
private static final CLogger log = CLogger.getCLogger(XMLReportRenderer.class);
public XMLReportRenderer() {
}
@Override
public String getId() {
return XMLReportRendererConfiguration.ID;
}
@Override
public String getName() {
return Msg.getMsg(Env.getCtx(), "FileXML");
}
@Override
public String getContentType() {
return MediaType.XML_UTF_8.toString();
}
@Override
public String getFileExtension() {
return XMLReportRendererConfiguration.FILE_EXTENSION;
}
@Override
public void renderReport(ReportEngine reportEngine, XMLReportRendererConfiguration configuration) {
try {
Writer fw = null;
if (configuration.getOutputFile() != null)
fw = new OutputStreamWriter(new FileOutputStream(configuration.getOutputFile(), false), Ini.getCharset());
else
fw = configuration.getOutputWriter();
createXML(reportEngine, fw);
}
catch (FileNotFoundException fnfe) {
log.log(Level.SEVERE, "(f) - " + fnfe.toString());
}
catch (Exception e) {
log.log(Level.SEVERE, "(f)", e);
}
}
@Override
public boolean isBinary() {
return false;
}
/**
* Write XML content to writer
* @param reportEngine
* @param writer writer
*/
public void createXML (ReportEngine reportEngine, Writer writer)
{
try
{
reportEngine.getPrintData().createXML(new StreamResult(writer));
writer.flush();
writer.close();
}
catch (Exception e)
{
log.log(Level.SEVERE, "(w)", e);
}
} // createXML
@Override
public Class<XMLReportRendererConfiguration> getConfigurationType() {
return XMLReportRendererConfiguration.class;
}
}

View File

@ -0,0 +1,68 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.print.renderer;
import java.io.File;
import java.io.Writer;
/**
* Configuration for XML content renderer
*/
public class XMLReportRendererConfiguration implements IReportRendererConfiguration {
public final static String ID = "XML";
public static final String FILE_EXTENSION = "xml";
private File file;
private Writer writer;
public XMLReportRendererConfiguration() {
}
@Override
public File getOutputFile() {
return file;
}
/**
* Set output file
* @param file
*/
public XMLReportRendererConfiguration setOutputFile(File file) {
this.file = file;
return this;
}
@Override
public Writer getOutputWriter() {
return writer;
}
/**
* Set output writer
* @param writer
*/
public XMLReportRendererConfiguration setOutputWriter(Writer writer) {
this.writer = writer;
return this;
}
}

View File

@ -0,0 +1,26 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
/**
* Provide interface and classes for report engine content rendering service
*/
package org.idempiere.print.renderer;

View File

@ -448,7 +448,9 @@
<setEntry value="org.idempiere.webservices@default:default"/> <setEntry value="org.idempiere.webservices@default:default"/>
<setEntry value="org.idempiere.zk.billboard.chart@default:default"/> <setEntry value="org.idempiere.zk.billboard.chart@default:default"/>
<setEntry value="org.idempiere.zk.billboard@default:false"/> <setEntry value="org.idempiere.zk.billboard@default:false"/>
<setEntry value="org.idempiere.zk.datatable@default:false"/>
<setEntry value="org.idempiere.zk.extra@default:default"/> <setEntry value="org.idempiere.zk.extra@default:default"/>
<setEntry value="org.idempiere.zk.pivot@default:false"/>
</setAttribute> </setAttribute>
<booleanAttribute key="show_selected_only" value="false"/> <booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/> <booleanAttribute key="tracing" value="false"/>

View File

@ -115,6 +115,7 @@ Export-Package: fi.jawsy.jawwa.zk.atmosphere,
org.adempiere.webui.window, org.adempiere.webui.window,
org.idempiere.ui.zk.annotation, org.idempiere.ui.zk.annotation,
org.idempiere.ui.zk.media, org.idempiere.ui.zk.media,
org.idempiere.ui.zk.report,
org.idempiere.ui.zk.websocket, org.idempiere.ui.zk.websocket,
org.zkforge.ckez, org.zkforge.ckez,
org.zkforge.keylistener, org.zkforge.keylistener,

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.idempiere.ui.zk.report.CSVReportViewerRenderer">
<service>
<provide interface="org.idempiere.ui.zk.report.IReportViewerRenderer"/>
</service>
<implementation class="org.idempiere.ui.zk.report.CSVReportViewerRenderer"/>
</scr:component>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.idempiere.ui.zk.report.HTMLReportViewerRenderer">
<service>
<provide interface="org.idempiere.ui.zk.report.IReportViewerRenderer"/>
</service>
<implementation class="org.idempiere.ui.zk.report.HTMLReportViewerRenderer"/>
</scr:component>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.idempiere.ui.zk.report.PDFReportViewerRenderer">
<service>
<provide interface="org.idempiere.ui.zk.report.IReportViewerRenderer"/>
</service>
<implementation class="org.idempiere.ui.zk.report.PDFReportViewerRenderer"/>
</scr:component>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.idempiere.ui.zk.report.PSReportViewerRenderer">
<service>
<provide interface="org.idempiere.ui.zk.report.IReportViewerRenderer"/>
</service>
<implementation class="org.idempiere.ui.zk.report.PSReportViewerRenderer"/>
</scr:component>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.idempiere.ui.zk.report.SSVReportViewerRenderer">
<service>
<provide interface="org.idempiere.ui.zk.report.IReportViewerRenderer"/>
</service>
<implementation class="org.idempiere.ui.zk.report.SSVReportViewerRenderer"/>
</scr:component>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.idempiere.ui.zk.report.TabDelimitedReportViewerRenderer">
<service>
<provide interface="org.idempiere.ui.zk.report.IReportViewerRenderer"/>
</service>
<implementation class="org.idempiere.ui.zk.report.TabDelimitedReportViewerRenderer"/>
</scr:component>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.idempiere.ui.zk.report.XLSReportViewerRenderer">
<service>
<provide interface="org.idempiere.ui.zk.report.IReportViewerRenderer"/>
</service>
<implementation class="org.idempiere.ui.zk.report.XLSReportViewerRenderer"/>
</scr:component>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.idempiere.ui.zk.report.XLSXReportViewerRenderer">
<service>
<provide interface="org.idempiere.ui.zk.report.IReportViewerRenderer"/>
</service>
<implementation class="org.idempiere.ui.zk.report.XLSXReportViewerRenderer"/>
</scr:component>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.idempiere.ui.zk.report.XMLReportViewerRenderer">
<service>
<provide interface="org.idempiere.ui.zk.report.IReportViewerRenderer"/>
</service>
<implementation class="org.idempiere.ui.zk.report.XMLReportViewerRenderer"/>
</scr:component>

View File

@ -47,6 +47,7 @@ import org.compiere.model.MDashboardContent;
import org.compiere.util.CCache; import org.compiere.util.CCache;
import org.idempiere.ui.zk.media.IMediaView; import org.idempiere.ui.zk.media.IMediaView;
import org.idempiere.ui.zk.media.IMediaViewProvider; import org.idempiere.ui.zk.media.IMediaViewProvider;
import org.idempiere.ui.zk.report.IReportViewerRenderer;
import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.Component;
/** /**
@ -390,4 +391,12 @@ public class Extensions {
} }
return null; return null;
} // getADTabPanel } // getADTabPanel
/**
* @return list of {@link IReportViewerRenderer}
*/
public static List<IReportViewerRenderer> getReportViewerRenderers() {
List<IServiceReferenceHolder<IReportViewerRenderer>> references = Service.locator().list(IReportViewerRenderer.class, null, null).getServiceReferences();
return references.stream().filter(e -> e.getService() != null).map(e -> e.getService()).collect(Collectors.toCollection(ArrayList::new));
}
} }

View File

@ -25,6 +25,8 @@
**********************************************************************/ **********************************************************************/
package org.adempiere.webui.window; package org.adempiere.webui.window;
import java.util.Arrays;
import java.util.Comparator;
import java.util.logging.Level; import java.util.logging.Level;
import org.adempiere.webui.LayoutUtils; import org.adempiere.webui.LayoutUtils;
@ -35,6 +37,7 @@ import org.adempiere.webui.component.Listbox;
import org.adempiere.webui.component.Window; import org.adempiere.webui.component.Window;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.IReportViewerExportSource.ExportFormat;
import org.compiere.model.MSysConfig; import org.compiere.model.MSysConfig;
import org.compiere.util.CLogger; import org.compiere.util.CLogger;
import org.compiere.util.Env; import org.compiere.util.Env;
@ -82,27 +85,18 @@ public class WReportExportDialog extends Window implements EventListener<Event>
cboType.setMold("select"); cboType.setMold("select");
cboType.getItems().clear(); cboType.getItems().clear();
cboType.appendItem("ps" + " - " + Msg.getMsg(Env.getCtx(), "FilePS"), "ps"); ExportFormat[] exportFormats = viewer.getExportFormats();
cboType.appendItem("xml" + " - " + Msg.getMsg(Env.getCtx(), "FileXML"), "xml"); Arrays.sort(exportFormats, new Comparator<ExportFormat>() {
cboType.appendItem("pdf" + " - " + Msg.getMsg(Env.getCtx(), "FilePDF"), "pdf"); @Override
cboType.appendItem("html" + " - " + Msg.getMsg(Env.getCtx(), "FileHTML"), "html"); public int compare(ExportFormat ef0, ExportFormat ef1) {
cboType.appendItem("txt" + " - " + Msg.getMsg(Env.getCtx(), "FileTXT"), "txt"); return ef0.label.compareTo(ef1.label);
cboType.appendItem("ssv" + " - " + Msg.getMsg(Env.getCtx(), "FileSSV"), "ssv"); }
cboType.appendItem("csv" + " - " + Msg.getMsg(Env.getCtx(), "FileCSV"), "csv"); });
cboType.appendItem("xls" + " - " + Msg.getMsg(Env.getCtx(), "FileXLS"), "xls"); for(ExportFormat exportFormat : exportFormats) {
cboType.appendItem("xlsx" + " - " + Msg.getMsg(Env.getCtx(), "FileXLSX"), "xlsx"); ListItem item = cboType.appendItem(exportFormat.label, exportFormat);
if (viewer.getContentType().equals(exportFormat.contentType) && viewer.getFileExtension().equals(exportFormat.extension)) {
String contentType = viewer.getContentType(); item.setSelected(true);
if (IReportViewerExportSource.PDF_MIME_TYPE.equals(contentType)) { }
cboType.setSelectedIndex(2);
} else if (IReportViewerExportSource.HTML_MIME_TYPE.equals(contentType)) {
cboType.setSelectedIndex(3);
} else if (IReportViewerExportSource.EXCEL_MIME_TYPE.equals(contentType)) {
cboType.setSelectedIndex(7);
} else if (IReportViewerExportSource.CSV_MIME_TYPE.equals(contentType)) {
cboType.setSelectedIndex(6);
} else if (IReportViewerExportSource.EXCEL_XML_MIME_TYPE.equals(contentType)) {
cboType.setSelectedIndex(8);
} }
Hbox hb = new Hbox(); Hbox hb = new Hbox();
@ -161,51 +155,11 @@ public class WReportExportDialog extends Window implements EventListener<Event>
return; return;
} }
String ext = li.getValue().toString(); ExportFormat exportFormat = li.getValue();
if (ext.equals(IReportViewerExportSource.PDF_FILE_EXT)) media = viewer.getMedia(exportFormat.contentType, exportFormat.extension);
{
media = viewer.getMedia(IReportViewerExportSource.PDF_MIME_TYPE, IReportViewerExportSource.PDF_FILE_EXT);
}
else if (ext.equals(IReportViewerExportSource.POSTSCRIPT_FILE_EXT))
{
media = viewer.getMedia(IReportViewerExportSource.POSTSCRIPT_MIME_TYPE, IReportViewerExportSource.POSTSCRIPT_FILE_EXT);
}
else if (ext.equals(IReportViewerExportSource.XML_FILE_EXT))
{
media = viewer.getMedia(IReportViewerExportSource.XML_MIME_TYPE, IReportViewerExportSource.XML_FILE_EXT);
}
else if (ext.equals(IReportViewerExportSource.CSV_FILE_EXT))
{
media = viewer.getMedia(IReportViewerExportSource.CSV_MIME_TYPE, IReportViewerExportSource.CSV_FILE_EXT);
}
else if (ext.equals(IReportViewerExportSource.SSV_FILE_EXT))
{
media = viewer.getMedia(IReportViewerExportSource.CSV_MIME_TYPE, IReportViewerExportSource.SSV_FILE_EXT);
}
else if (ext.equals(IReportViewerExportSource.TEXT_FILE_EXT))
{
media = viewer.getMedia(IReportViewerExportSource.TEXT_MIME_TYPE, IReportViewerExportSource.TEXT_FILE_EXT);
}
else if (ext.equals(IReportViewerExportSource.HTML_FILE_EXT) || ext.equals("htm"))
{
media = viewer.getMedia(IReportViewerExportSource.HTML_MIME_TYPE, IReportViewerExportSource.HTML_FILE_EXT);
}
else if (ext.equals(IReportViewerExportSource.EXCEL_XML_FILE_EXT))
{
media = viewer.getMedia(IReportViewerExportSource.EXCEL_XML_MIME_TYPE, IReportViewerExportSource.EXCEL_XML_FILE_EXT);
}
else if (ext.equals(IReportViewerExportSource.EXCEL_FILE_EXT))
{
media = viewer.getMedia(IReportViewerExportSource.EXCEL_MIME_TYPE, IReportViewerExportSource.EXCEL_FILE_EXT);
}
else
{
Dialog.error(-1, "FileInvalidExtension");
return;
}
onClose(); onClose();
Filedownload.save(media, viewer.getReportName() + "." + ext); Filedownload.save(media, viewer.getReportName() + "." + exportFormat.extension);
} }
catch (Exception e) catch (Exception e)
{ {

View File

@ -158,12 +158,12 @@ public class ZkJRViewer extends Window implements EventListener<Event>, ITabOnCl
private boolean isUseEscForTabClosing = MSysConfig.getBooleanValue(MSysConfig.USE_ESC_FOR_TAB_CLOSING, false, Env.getAD_Client_ID(Env.getCtx())); private boolean isUseEscForTabClosing = MSysConfig.getBooleanValue(MSysConfig.USE_ESC_FOR_TAB_CLOSING, false, Env.getAD_Client_ID(Env.getCtx()));
private final ExportFormat[] exportFormats = new ExportFormat[] { private final ExportFormat[] exportFormats = new ExportFormat[] {
new ExportFormat(PDF_FILE_EXT + " - " + Msg.getMsg(Env.getCtx(), "FilePDF"), PDF_FILE_EXT, PDF_MIME_TYPE), new ExportFormat(Msg.getMsg(Env.getCtx(), "FilePDF"), PDF_FILE_EXT, PDF_MIME_TYPE),
new ExportFormat(HTML_FILE_EXT + " - " + Msg.getMsg(Env.getCtx(), "FileHTML"), HTML_FILE_EXT, HTML_MIME_TYPE), new ExportFormat(Msg.getMsg(Env.getCtx(), "FileHTML"), HTML_FILE_EXT, HTML_MIME_TYPE),
new ExportFormat(CSV_FILE_EXT + " - " + Msg.getMsg(Env.getCtx(), "FileCSV"), CSV_FILE_EXT, CSV_MIME_TYPE), new ExportFormat(Msg.getMsg(Env.getCtx(), "FileCSV"), CSV_FILE_EXT, CSV_MIME_TYPE),
new ExportFormat(EXCEL_FILE_EXT + " - " + Msg.getMsg(Env.getCtx(), "FileXLS"), EXCEL_FILE_EXT, EXCEL_MIME_TYPE), new ExportFormat(Msg.getMsg(Env.getCtx(), "FileXLS"), EXCEL_FILE_EXT, EXCEL_MIME_TYPE),
new ExportFormat(EXCEL_XML_FILE_EXT + " - " + Msg.getMsg(Env.getCtx(), "FileXLSX"), EXCEL_XML_FILE_EXT, EXCEL_XML_MIME_TYPE), new ExportFormat(Msg.getMsg(Env.getCtx(), "FileXLSX"), EXCEL_XML_FILE_EXT, EXCEL_XML_MIME_TYPE),
new ExportFormat(SSV_FILE_EXT + " - " + Msg.getMsg(Env.getCtx(), "FileSSV"), SSV_FILE_EXT, CSV_MIME_TYPE) new ExportFormat(Msg.getMsg(Env.getCtx(), "FileSSV"), SSV_FILE_EXT, CSV_MIME_TYPE)
}; };
private Center center; private Center center;

View File

@ -16,20 +16,22 @@
*****************************************************************************/ *****************************************************************************/
package org.adempiere.webui.window; package org.adempiere.webui.window;
import java.io.ByteArrayOutputStream;
import java.io.File; import java.io.File;
import java.io.StringWriter;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Calendar; import java.util.Calendar;
import java.util.Collections; import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.Properties; import java.util.Properties;
import java.util.function.Supplier; import java.util.TreeMap;
import java.util.logging.Level; import java.util.logging.Level;
import javax.activation.FileDataSource; import javax.activation.FileDataSource;
@ -67,7 +69,6 @@ import org.adempiere.webui.event.DrillEvent.DrillData;
import org.adempiere.webui.event.ZoomEvent; import org.adempiere.webui.event.ZoomEvent;
import org.adempiere.webui.panel.ADForm; import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.StatusBarPanel; import org.adempiere.webui.panel.StatusBarPanel;
import org.adempiere.webui.report.HTMLExtension;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.IServerPushCallback; import org.adempiere.webui.util.IServerPushCallback;
@ -103,8 +104,14 @@ import org.compiere.util.KeyNamePair;
import org.compiere.util.Language; import org.compiere.util.Language;
import org.compiere.util.Msg; import org.compiere.util.Msg;
import org.compiere.util.Util; import org.compiere.util.Util;
import org.idempiere.print.renderer.CSVReportRendererConfiguration;
import org.idempiere.print.renderer.HTMLReportRendererConfiguration;
import org.idempiere.print.renderer.PDFReportRendererConfiguration;
import org.idempiere.print.renderer.XLSReportRendererConfiguration;
import org.idempiere.print.renderer.XLSXReportRendererConfiguration;
import org.idempiere.ui.zk.media.IMediaView; import org.idempiere.ui.zk.media.IMediaView;
import org.idempiere.ui.zk.media.WMediaOptions; import org.idempiere.ui.zk.media.WMediaOptions;
import org.idempiere.ui.zk.report.IReportViewerRenderer;
import org.zkoss.util.media.AMedia; import org.zkoss.util.media.AMedia;
import org.zkoss.util.media.Media; import org.zkoss.util.media.Media;
import org.zkoss.zk.au.out.AuScript; import org.zkoss.zk.au.out.AuScript;
@ -159,11 +166,11 @@ public class ZkReportViewer extends Window implements EventListener<Event>, IRep
*/ */
private static final long serialVersionUID = 3732290698059632847L; private static final long serialVersionUID = 3732290698059632847L;
protected static final String CSV_OUTPUT_TYPE = "CSV"; protected static final String CSV_OUTPUT_TYPE = CSVReportRendererConfiguration.ID;
protected static final String HTML_OUTPUT_TYPE = "HTML"; protected static final String HTML_OUTPUT_TYPE = HTMLReportRendererConfiguration.ID;
protected static final String PDF_OUTPUT_TYPE = "PDF"; protected static final String PDF_OUTPUT_TYPE = PDFReportRendererConfiguration.ID;
protected static final String XLS_OUTPUT_TYPE = "XLS"; protected static final String XLS_OUTPUT_TYPE = XLSReportRendererConfiguration.ID;
protected static final String XLSX_OUTPUT_TYPE = "XLSX"; protected static final String XLSX_OUTPUT_TYPE = XLSXReportRendererConfiguration.ID;
/** Window No */ /** Window No */
protected int m_WindowNo = -1; protected int m_WindowNo = -1;
@ -228,19 +235,8 @@ public class ZkReportViewer extends Window implements EventListener<Event>, IRep
/** Row count label */ /** Row count label */
private Label rowCount; private Label rowCount;
private final ExportFormat[] exportFormats = new ExportFormat[] { private final Map<ExportFormat, String> exportMap = new LinkedHashMap<>();
new ExportFormat(POSTSCRIPT_FILE_EXT + " - " + Msg.getMsg(Env.getCtx(), "FilePS"), POSTSCRIPT_FILE_EXT, POSTSCRIPT_MIME_TYPE), private final Map<String, IReportViewerRenderer> rendererMap = new TreeMap<>();
new ExportFormat(XML_FILE_EXT + " - " + Msg.getMsg(Env.getCtx(), "FileXML"), XML_FILE_EXT, XML_MIME_TYPE),
new ExportFormat(PDF_FILE_EXT + " - " + Msg.getMsg(Env.getCtx(), "FilePDF"), PDF_FILE_EXT, PDF_MIME_TYPE),
new ExportFormat(HTML_FILE_EXT + " - " + Msg.getMsg(Env.getCtx(), "FileHTML"), HTML_FILE_EXT, HTML_MIME_TYPE),
new ExportFormat(TEXT_FILE_EXT + " - " + Msg.getMsg(Env.getCtx(), "FileTXT"), TEXT_FILE_EXT, TEXT_MIME_TYPE),
new ExportFormat(SSV_FILE_EXT + " - " + Msg.getMsg(Env.getCtx(), "FileSSV"), SSV_FILE_EXT, CSV_MIME_TYPE),
new ExportFormat(CSV_FILE_EXT + " - " + Msg.getMsg(Env.getCtx(), "FileCSV"), CSV_FILE_EXT, CSV_MIME_TYPE),
new ExportFormat(EXCEL_FILE_EXT + " - " + Msg.getMsg(Env.getCtx(), "FileXLS"), EXCEL_FILE_EXT, EXCEL_MIME_TYPE),
new ExportFormat(EXCEL_XML_FILE_EXT + " - " + Msg.getMsg(Env.getCtx(), "FileXLSX"), EXCEL_XML_FILE_EXT, EXCEL_XML_MIME_TYPE)
};
private final Map<String, Supplier<AMedia>> mediaSuppliers = new HashMap<String, Supplier<AMedia>>();
private Center center; private Center center;
@ -284,136 +280,34 @@ public class ZkReportViewer extends Window implements EventListener<Event>, IRep
/** /**
* @param contentType * @param contentType
* @param fileExtension * @param fileExtension
* @return contentType + ; + fileExtension * @return renderer id
*/ */
private String toMediaType(String contentType, String fileExtension) { private String toRendererId(String contentType, String fileExtension) {
return contentType + ";" + fileExtension; for(Map.Entry<ExportFormat, String> entry : exportMap.entrySet()) {
if (entry.getKey().contentType.equals(contentType) && entry.getKey().extension.equals(fileExtension))
return entry.getValue();
}
return null;
} }
/** /**
* Create media supplier for supported format (pdf, html, etc) * Create media supplier for supported format (pdf, html, etc)
*/ */
private void initMediaSuppliers() { private void initMediaSuppliers() {
mediaSuppliers.put(toMediaType(PDF_MIME_TYPE, PDF_FILE_EXT), () -> { List<IReportViewerRenderer> renderers = Extensions.getReportViewerRenderers();
try { Collections.sort(renderers, new Comparator<IReportViewerRenderer>() {
String path = System.getProperty("java.io.tmpdir"); @Override
String prefix = makePrefix(m_reportEngine.getName()); public int compare(IReportViewerRenderer r1, IReportViewerRenderer r2) {
if (prefix.length() < 3) return r1.getExportLabel().compareTo(r2.getExportLabel());
prefix += "_".repeat(3-prefix.length());
if (log.isLoggable(Level.FINE)) log.log(Level.FINE, "Path="+path + " Prefix="+prefix);
File file = FileUtil.createTempFile(prefix, "."+PDF_FILE_EXT, new File(path));
m_reportEngine.createPDF(file);
return new AMedia(file.getName(), PDF_FILE_EXT, PDF_MIME_TYPE, file, true);
} catch (Exception e) {
if (e instanceof RuntimeException)
throw (RuntimeException)e;
else
throw new RuntimeException(e);
} }
}); });
for(IReportViewerRenderer renderer : renderers) {
mediaSuppliers.put(toMediaType(HTML_MIME_TYPE, HTML_FILE_EXT), () -> { if (renderer.isExport()) {
try { ExportFormat exportFormat = new ExportFormat(renderer.getExportLabel(), renderer.getFileExtension(), renderer.getContentType());
String path = System.getProperty("java.io.tmpdir"); exportMap.put(exportFormat, renderer.getId());
String prefix = makePrefix(m_reportEngine.getName());
if (prefix.length() < 3)
prefix += "_".repeat(3-prefix.length());
if (log.isLoggable(Level.FINE)) log.log(Level.FINE, "Path="+path + " Prefix="+prefix);
File file = FileUtil.createTempFile(prefix, "."+HTML_FILE_EXT, new File(path));
String contextPath = Executions.getCurrent().getContextPath();
m_reportEngine.createHTML(file, false, m_reportEngine.getPrintFormat().getLanguage(), new HTMLExtension(contextPath, "rp", getUuid()));
return new AMedia(file.getName(), HTML_FILE_EXT, HTML_MIME_TYPE, file, false);
} catch (Exception e) {
if (e instanceof RuntimeException)
throw (RuntimeException)e;
else
throw new RuntimeException(e);
} }
}); rendererMap.put(renderer.getId(), renderer);
mediaSuppliers.put(toMediaType(EXCEL_MIME_TYPE, EXCEL_FILE_EXT), () -> {
try {
String path = System.getProperty("java.io.tmpdir");
String prefix = makePrefix(m_reportEngine.getName());
if (prefix.length() < 3)
prefix += "_".repeat(3-prefix.length());
if (log.isLoggable(Level.FINE)) log.log(Level.FINE, "Path="+path + " Prefix="+prefix);
File file = FileUtil.createTempFile(prefix, "."+EXCEL_FILE_EXT, new File(path));
m_reportEngine.createXLS(file, m_reportEngine.getPrintFormat().getLanguage());
return new AMedia(file.getName(), EXCEL_FILE_EXT, EXCEL_MIME_TYPE, file, true);
} catch (Exception e) {
if (e instanceof RuntimeException)
throw (RuntimeException)e;
else
throw new RuntimeException(e);
} }
});
mediaSuppliers.put(toMediaType(CSV_MIME_TYPE, CSV_FILE_EXT), () -> {
try {
String path = System.getProperty("java.io.tmpdir");
String prefix = makePrefix(m_reportEngine.getName());
if (log.isLoggable(Level.FINE))
{
log.log(Level.FINE, "Path="+path + " Prefix="+prefix);
}
File file = FileUtil.createTempFile(prefix, "."+CSV_FILE_EXT, new File(path));
m_reportEngine.createCSV(file, ',', AEnv.getLanguage(Env.getCtx()));
return new AMedia(file.getName(), CSV_FILE_EXT, CSV_MIME_TYPE, file, false);
} catch (Exception e) {
if (e instanceof RuntimeException)
throw (RuntimeException)e;
else
throw new RuntimeException(e);
}
});
mediaSuppliers.put(toMediaType(EXCEL_XML_MIME_TYPE, EXCEL_XML_FILE_EXT), () -> {
try {
String path = System.getProperty("java.io.tmpdir");
String prefix = makePrefix(m_reportEngine.getName());
if (log.isLoggable(Level.FINE))
{
log.log(Level.FINE, "Path=" + path + " Prefix=" + prefix);
}
File file = FileUtil.createTempFile(prefix, "."+EXCEL_XML_FILE_EXT, new File(path));
m_reportEngine.createXLSX(file, m_reportEngine.getPrintFormat().getLanguage());
return new AMedia(file.getName(), EXCEL_XML_FILE_EXT, EXCEL_XML_MIME_TYPE, file, true);
} catch (Exception e) {
if (e instanceof RuntimeException)
throw (RuntimeException)e;
else
throw new RuntimeException(e);
}
});
mediaSuppliers.put(toMediaType(POSTSCRIPT_MIME_TYPE, POSTSCRIPT_FILE_EXT), () -> {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
m_reportEngine.createPS(baos);
byte[] data = baos.toByteArray();
return new AMedia(m_reportEngine.getName() + "."+POSTSCRIPT_FILE_EXT, POSTSCRIPT_FILE_EXT, POSTSCRIPT_MIME_TYPE, data);
});
mediaSuppliers.put(toMediaType(XML_MIME_TYPE, XML_FILE_EXT), () -> {
StringWriter sw = new StringWriter();
m_reportEngine.createXML(sw);
String data = sw.getBuffer().toString();
return new AMedia(m_reportEngine.getName() + "."+XML_FILE_EXT, XML_FILE_EXT, XML_MIME_TYPE, data);
});
mediaSuppliers.put(toMediaType(CSV_MIME_TYPE, SSV_FILE_EXT), () -> {
StringWriter sw = new StringWriter();
m_reportEngine.createCSV(sw, ';', m_reportEngine.getPrintFormat().getLanguage());
String data = sw.getBuffer().toString();
return new AMedia(m_reportEngine.getName() + "."+SSV_FILE_EXT, SSV_FILE_EXT, CSV_MIME_TYPE, data);
});
mediaSuppliers.put(toMediaType(TEXT_MIME_TYPE, TEXT_FILE_EXT), () -> {
StringWriter sw = new StringWriter();
m_reportEngine.createCSV(sw, '\t', m_reportEngine.getPrintFormat().getLanguage());
String data = sw.getBuffer().toString();
return new AMedia(m_reportEngine.getName() + "."+TEXT_FILE_EXT, TEXT_FILE_EXT, TEXT_MIME_TYPE, data);
});
} }
@Override @Override
@ -463,14 +357,11 @@ public class ZkReportViewer extends Window implements EventListener<Event>, IRep
ZKUpdateUtil.setWidth(toolBar, "100%"); ZKUpdateUtil.setWidth(toolBar, "100%");
previewType.setMold("select"); previewType.setMold("select");
previewType.appendItem(HTML_OUTPUT_TYPE, HTML_OUTPUT_TYPE); for(String id : rendererMap.keySet()) {
previewType.appendItem(PDF_OUTPUT_TYPE, PDF_OUTPUT_TYPE); IReportViewerRenderer renderer = rendererMap.get(id);
if (!renderer.isPreview(m_isCanExport))
if ( m_isCanExport ) continue;
{ previewType.appendItem(renderer.getPreviewLabel(), renderer.getId());
previewType.appendItem(XLS_OUTPUT_TYPE, XLS_OUTPUT_TYPE);
previewType.appendItem(CSV_OUTPUT_TYPE, CSV_OUTPUT_TYPE);
previewType.appendItem(XLSX_OUTPUT_TYPE, XLSX_OUTPUT_TYPE);
} }
toolBar.appendChild(previewType); toolBar.appendChild(previewType);
@ -478,41 +369,33 @@ public class ZkReportViewer extends Window implements EventListener<Event>, IRep
toolBar.appendChild(new Separator("vertical")); toolBar.appendChild(new Separator("vertical"));
int pTypeIndex = 0; String type = null;
if (m_reportEngine.getReportType() != null) if (m_reportEngine.getReportType() != null)
{ {
if (m_reportEngine.getReportType().equals(PDF_OUTPUT_TYPE)) type = m_reportEngine.getReportType();
pTypeIndex = 1;
else if (m_reportEngine.getReportType().equals(XLS_OUTPUT_TYPE) && m_isCanExport)
pTypeIndex = 2;
else if (m_reportEngine.getReportType().equals(CSV_OUTPUT_TYPE) && m_isCanExport)
pTypeIndex = 3;
else if (m_reportEngine.getReportType().equals(XLSX_OUTPUT_TYPE) && m_isCanExport)
pTypeIndex = 4;
} }
else else
{ {
//set default type //set default type
String type = m_reportEngine.getPrintFormat().isForm() type = m_reportEngine.getPrintFormat().isForm()
// a42niem - provide explicit default and check on client/org specifics // a42niem - provide explicit default and check on client/org specifics
? MSysConfig.getValue(MSysConfig.ZK_REPORT_FORM_OUTPUT_TYPE,PDF_OUTPUT_TYPE,Env.getAD_Client_ID(m_ctx),Env.getAD_Org_ID(m_ctx)) ? MSysConfig.getValue(MSysConfig.ZK_REPORT_FORM_OUTPUT_TYPE,PDF_OUTPUT_TYPE,Env.getAD_Client_ID(m_ctx),Env.getAD_Org_ID(m_ctx))
: MSysConfig.getValue(MSysConfig.ZK_REPORT_TABLE_OUTPUT_TYPE,PDF_OUTPUT_TYPE,Env.getAD_Client_ID(m_ctx),Env.getAD_Org_ID(m_ctx)); : MSysConfig.getValue(MSysConfig.ZK_REPORT_TABLE_OUTPUT_TYPE,PDF_OUTPUT_TYPE,Env.getAD_Client_ID(m_ctx),Env.getAD_Org_ID(m_ctx));
if (HTML_OUTPUT_TYPE.equals(type)) {
pTypeIndex = 0;
} else if (PDF_OUTPUT_TYPE.equals(type)) {
pTypeIndex = 1;
} else if (XLS_OUTPUT_TYPE.equals(type) && m_isCanExport) {
pTypeIndex = 2;
} else if (CSV_OUTPUT_TYPE.equals(type) && m_isCanExport) {
pTypeIndex = 3;
} else if (XLSX_OUTPUT_TYPE.equals(type) && m_isCanExport) {
pTypeIndex = 4;
}
} }
previewType.setSelectedIndex(pTypeIndex); int defaultIndex = -1;
for(int i = 0; i < previewType.getItemCount(); i++) {
ListItem item = previewType.getItemAtIndex(i);
if (item.getValue().equals(type)) {
previewType.setSelectedIndex(i);
break;
} else if (item.getValue().equals("PDF")) {
defaultIndex = i;
}
}
if (previewType.getSelectedIndex() < 0) {
previewType.setSelectedIndex(defaultIndex >= 0 ? defaultIndex : 0);
}
Vlayout toolbarPopupLayout = null; Vlayout toolbarPopupLayout = null;
if (ClientInfo.maxWidth(ClientInfo.SMALL_WIDTH-1)) if (ClientInfo.maxWidth(ClientInfo.SMALL_WIDTH-1))
@ -921,17 +804,7 @@ public class ZkReportViewer extends Window implements EventListener<Event>, IRep
private void renderReport() { private void renderReport() {
media = null; media = null;
Listitem selected = previewType.getSelectedItem(); Listitem selected = previewType.getSelectedItem();
if (selected == null || PDF_OUTPUT_TYPE.equals(selected.getValue())) { new RendererRunnable(this, selected.getValue()).run();
new PDFRendererRunnable(this).run();
} else if (HTML_OUTPUT_TYPE.equals(selected.getValue())) {
new HTMLRendererRunnable(this).run();
} else if (XLS_OUTPUT_TYPE.equals(selected.getValue())) {
new XLSRendererRunnable(this).run();
} else if (CSV_OUTPUT_TYPE.equals(selected.getValue())) {
new CSVRendererRunnable(this).run();
} else if (XLSX_OUTPUT_TYPE.equals(selected.getValue())) {
new XLSXRendererRunnable(this).run();
}
} }
/** /**
@ -1044,24 +917,6 @@ public class ZkReportViewer extends Window implements EventListener<Event>, IRep
} }
} }
/**
* Create file name prefix from name
* @param name
* @return file name prefix from name
*/
private String makePrefix(String name) {
StringBuilder prefix = new StringBuilder();
char[] nameArray = name.toCharArray();
for (char ch : nameArray) {
if (Character.isLetterOrDigit(ch)) {
prefix.append(ch);
} else {
prefix.append("_");
}
}
return prefix.toString();
}
/** /**
* Dynamic Init * Dynamic Init
*/ */
@ -1975,22 +1830,31 @@ public class ZkReportViewer extends Window implements EventListener<Event>, IRep
}, new Event("onClearTabOnCloseHandler")); }, new Event("onClearTabOnCloseHandler"));
} }
static class PDFRendererRunnable extends ZkContextRunnable implements IServerPushCallback { private static class RendererRunnable extends ZkContextRunnable implements IServerPushCallback {
private ZkReportViewer viewer; private ZkReportViewer viewer;
private String rendererId;
public PDFRendererRunnable(ZkReportViewer viewer) { public RendererRunnable(ZkReportViewer viewer, String rendererId) {
super();
this.viewer = viewer; this.viewer = viewer;
this.rendererId = rendererId;
}
@Override
public void updateUI() {
viewer.onPreviewReport();
} }
@Override @Override
protected void doRun() { protected void doRun() {
try { try {
viewer.m_reportEngine.initName(); viewer.m_reportEngine.initName();
List<String> archiveList = Arrays.asList(PDF_OUTPUT_TYPE, HTML_OUTPUT_TYPE, XLS_OUTPUT_TYPE, XLSX_OUTPUT_TYPE);
if (archiveList.contains(rendererId)) {
if (!ArchiveEngine.isValid(viewer.m_reportEngine.getLayout())) if (!ArchiveEngine.isValid(viewer.m_reportEngine.getLayout()))
log.warning("Cannot archive Document"); log.warning("Cannot archive Document");
viewer.createNewMedia(PDF_MIME_TYPE, PDF_FILE_EXT); }
viewer.createNewMedia(rendererId);
} catch (Exception e) { } catch (Exception e) {
if (e instanceof RuntimeException) if (e instanceof RuntimeException)
throw (RuntimeException)e; throw (RuntimeException)e;
@ -2004,182 +1868,32 @@ public class ZkReportViewer extends Window implements EventListener<Event>, IRep
} }
} }
@Override
public void updateUI() {
viewer.onPreviewReport();
} }
} private void createNewMedia(String rendererId) {
static class HTMLRendererRunnable extends ZkContextRunnable implements IServerPushCallback {
private ZkReportViewer viewer;
public HTMLRendererRunnable(ZkReportViewer viewer) {
super();
this.viewer = viewer;
}
@Override
protected void doRun() {
try {
viewer.m_reportEngine.initName();
if (!ArchiveEngine.isValid(viewer.m_reportEngine.getLayout()))
log.warning("Cannot archive Document");
viewer.createNewMedia(HTML_MIME_TYPE, HTML_FILE_EXT);
} catch (Exception e) {
if (e instanceof RuntimeException)
throw (RuntimeException)e;
else
throw new RuntimeException(e);
} finally {
Desktop desktop = AEnv.getDesktop();
if (desktop != null && desktop.isAlive()) {
new ServerPushTemplate(desktop).executeAsync(this);
}
}
}
@Override
public void updateUI() {
viewer.onPreviewReport();
}
}
static class XLSRendererRunnable extends ZkContextRunnable implements IServerPushCallback {
private ZkReportViewer viewer;
public XLSRendererRunnable(ZkReportViewer viewer) {
super();
this.viewer = viewer;
}
@Override
protected void doRun() {
try {
viewer.m_reportEngine.initName();
if (!ArchiveEngine.isValid(viewer.m_reportEngine.getLayout()))
log.warning("Cannot archive Document");
viewer.createNewMedia(EXCEL_MIME_TYPE, EXCEL_FILE_EXT);
} catch (Exception e) {
if (e instanceof RuntimeException)
throw (RuntimeException)e;
else
throw new RuntimeException(e);
} finally {
Desktop desktop = AEnv.getDesktop();
if (desktop != null && desktop.isAlive()) {
new ServerPushTemplate(desktop).executeAsync(this);
}
}
}
@Override
public void updateUI() {
viewer.onPreviewReport();
}
}
static class CSVRendererRunnable extends ZkContextRunnable implements IServerPushCallback {
private ZkReportViewer viewer;
public CSVRendererRunnable(ZkReportViewer viewer) {
super();
this.viewer = viewer;
}
@Override
protected void doRun() {
try {
viewer.m_reportEngine.initName();
viewer.createNewMedia(CSV_MIME_TYPE,CSV_FILE_EXT);
} catch (Exception e) {
if (e instanceof RuntimeException)
throw (RuntimeException)e;
else
throw new RuntimeException(e);
} finally {
Desktop desktop = AEnv.getDesktop();
if (desktop != null && desktop.isAlive()) {
new ServerPushTemplate(desktop).executeAsync(this);
}
}
}
@Override
public void updateUI() {
viewer.onPreviewReport();
}
}
protected static class XLSXRendererRunnable extends ZkContextRunnable implements IServerPushCallback
{
private ZkReportViewer viewer;
public XLSXRendererRunnable(ZkReportViewer viewer)
{
super();
this.viewer = viewer;
}
@Override
protected void doRun()
{
try
{
viewer.m_reportEngine.initName();
if (!ArchiveEngine.isValid(viewer.m_reportEngine.getLayout()))
log.warning("Cannot archive Document");
viewer.createNewMedia(EXCEL_XML_MIME_TYPE, EXCEL_XML_FILE_EXT);
}
catch (Exception e)
{
if (e instanceof RuntimeException)
throw (RuntimeException) e;
else
throw new RuntimeException(e);
}
finally
{
Desktop desktop = AEnv.getDesktop();
if (desktop != null && desktop.isAlive())
{
new ServerPushTemplate(desktop).executeAsync(this);
}
}
}
@Override
public void updateUI()
{
viewer.onPreviewReport();
}
}
private void createNewMedia(String contentType, String fileExtension) {
media = null; media = null;
media = getMedia(contentType, fileExtension); media = getMedia(rendererId);
} }
@Override @Override
public AMedia getMedia(String contentType, String fileExtension) { public AMedia getMedia(String contentType, String fileExtension) {
if (media != null && media.getContentType().equals(contentType) && media.getFormat().equals(fileExtension)) IReportViewerRenderer renderer = rendererMap.get(toRendererId(contentType, fileExtension));
if (renderer.isSameContentForExportAndPreview() && media != null
&& media.getContentType().equals(contentType) && media.getFormat().equals(fileExtension))
return media; return media;
Supplier<AMedia> supplier = mediaSuppliers.get(toMediaType(contentType, fileExtension)); return renderer != null ? renderer.renderMedia(this, true) : null;
return supplier != null ? supplier.get() : null;
} }
public AMedia getMedia(String rendererId) {
IReportViewerRenderer renderer = rendererMap.get(rendererId);
return renderer != null ? renderer.renderMedia(this, false) : null;
}
@Override @Override
public ExportFormat[] getExportFormats() { public ExportFormat[] getExportFormats() {
return exportFormats; return exportMap.keySet().toArray(new ExportFormat[0]);
} }
@Override @Override
@ -2202,6 +1916,14 @@ public class ZkReportViewer extends Window implements EventListener<Event>, IRep
return m_reportEngine.getName(); return m_reportEngine.getName();
} }
/**
* Get report engine
* @return report engine
*/
public ReportEngine getReportEngine() {
return m_reportEngine;
}
private void setupFindwindow(FindWindow findWindow) { private void setupFindwindow(FindWindow findWindow) {
findWindow.setTitle(null); findWindow.setTitle(null);
findWindow.setBorder("none"); findWindow.setBorder("none");

View File

@ -24,12 +24,21 @@
**********************************************************************/ **********************************************************************/
package org.idempiere.ui.zk.media; package org.idempiere.ui.zk.media;
import org.idempiere.print.renderer.CSVReportRendererConfiguration;
import org.idempiere.print.renderer.HTMLReportRendererConfiguration;
import org.idempiere.print.renderer.PDFReportRendererConfiguration;
import org.idempiere.print.renderer.PSReportRendererConfiguration;
import org.idempiere.print.renderer.SSVReportRendererConfiguration;
import org.idempiere.print.renderer.TabDelimitedReportRendererConfiguration;
import org.idempiere.print.renderer.XLSReportRendererConfiguration;
import org.idempiere.print.renderer.XLSXReportRendererConfiguration;
import org.idempiere.print.renderer.XMLReportRendererConfiguration;
import com.google.common.net.MediaType; import com.google.common.net.MediaType;
/** /**
* Constants for media mime type and file extension * Constants for media mime type and file extension
* @author hengsin * @author hengsin
*
*/ */
public final class Medias { public final class Medias {
@ -42,15 +51,15 @@ public final class Medias {
public static final String TEXT_MIME_TYPE = MediaType.PLAIN_TEXT_UTF_8.toString(); public static final String TEXT_MIME_TYPE = MediaType.PLAIN_TEXT_UTF_8.toString();
public static final String XML_MIME_TYPE = MediaType.XML_UTF_8.toString(); public static final String XML_MIME_TYPE = MediaType.XML_UTF_8.toString();
public static final String CSV_FILE_EXT = "csv"; public static final String CSV_FILE_EXT = CSVReportRendererConfiguration.FILE_EXTENSION;
public static final String SSV_FILE_EXT = "ssv"; public static final String SSV_FILE_EXT = SSVReportRendererConfiguration.FILE_EXTENSION;
public static final String EXCEL_FILE_EXT = "xls"; public static final String EXCEL_FILE_EXT = XLSReportRendererConfiguration.FILE_EXTENSION;
public static final String EXCEL_XML_FILE_EXT = "xlsx"; public static final String EXCEL_XML_FILE_EXT = XLSXReportRendererConfiguration.FILE_EXTENSION;
public static final String HTML_FILE_EXT = "html"; public static final String HTML_FILE_EXT = HTMLReportRendererConfiguration.FILE_EXTENSION;
public static final String PDF_FILE_EXT = "pdf"; public static final String PDF_FILE_EXT = PDFReportRendererConfiguration.FILE_EXTENSION;
public static final String POSTSCRIPT_FILE_EXT = "ps"; public static final String POSTSCRIPT_FILE_EXT = PSReportRendererConfiguration.FILE_EXTENSION;
public static final String TEXT_FILE_EXT = "txt"; public static final String TEXT_FILE_EXT = TabDelimitedReportRendererConfiguration.FILE_EXTENSION;
public static final String XML_FILE_EXT = "xml"; public static final String XML_FILE_EXT = XMLReportRendererConfiguration.FILE_EXTENSION;
private Medias() { private Medias() {
} }

View File

@ -0,0 +1,108 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.ui.zk.report;
import java.io.File;
import java.util.logging.Level;
import org.adempiere.base.Core;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.window.ZkReportViewer;
import org.compiere.print.ReportEngine;
import org.compiere.tools.FileUtil;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.idempiere.print.renderer.CSVReportRendererConfiguration;
import org.idempiere.print.renderer.IReportRenderer;
import org.idempiere.print.renderer.IReportRendererConfiguration;
import org.osgi.service.component.annotations.Component;
import org.zkoss.util.media.AMedia;
import com.google.common.net.MediaType;
/**
* Comma separated content rendering service for report viewer
*/
@Component(service = IReportViewerRenderer.class, immediate = true)
public class CSVReportViewerRenderer implements IReportViewerRenderer {
private static final CLogger log = CLogger.getCLogger(CSVReportViewerRenderer.class);
public CSVReportViewerRenderer() {
}
@Override
public String getId() {
return CSVReportRendererConfiguration.ID;
}
@Override
public String getExportLabel() {
return Msg.getMsg(Env.getCtx(), "FileCSV");
}
@Override
public String getContentType() {
return MediaType.CSV_UTF_8.toString();
}
@Override
public String getFileExtension() {
return CSVReportRendererConfiguration.FILE_EXTENSION;
}
@Override
public boolean isExport() {
return true;
}
@Override
public boolean isPreview(boolean roleCanExport) {
return roleCanExport;
}
@Override
public AMedia renderMedia(ZkReportViewer viewer, boolean export) {
ReportEngine reportEngine = viewer.getReportEngine();
try {
String path = System.getProperty("java.io.tmpdir");
String prefix = makePrefix(reportEngine.getName());
if (log.isLoggable(Level.FINE))
{
log.log(Level.FINE, "Path="+path + " Prefix="+prefix);
}
File file = FileUtil.createTempFile(prefix, "."+getFileExtension(), new File(path));
IReportRenderer<IReportRendererConfiguration> renderer = Core.getReportRenderer(getId());
CSVReportRendererConfiguration config = new CSVReportRendererConfiguration()
.setLanguage(AEnv.getLanguage(Env.getCtx()))
.setOutputFile(file);
renderer.renderReport(reportEngine, config);
return new AMedia(file.getName(), getFileExtension(), getContentType(), file, false);
} catch (Exception e) {
if (e instanceof RuntimeException)
throw (RuntimeException)e;
else
throw new RuntimeException(e);
}
}
}

View File

@ -0,0 +1,116 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.ui.zk.report;
import java.io.File;
import java.util.logging.Level;
import org.adempiere.base.Core;
import org.adempiere.webui.report.HTMLExtension;
import org.adempiere.webui.window.ZkReportViewer;
import org.compiere.print.ReportEngine;
import org.compiere.tools.FileUtil;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.idempiere.print.renderer.HTMLReportRendererConfiguration;
import org.idempiere.print.renderer.IReportRenderer;
import org.idempiere.print.renderer.IReportRendererConfiguration;
import org.osgi.service.component.annotations.Component;
import org.zkoss.util.media.AMedia;
import org.zkoss.zk.ui.Executions;
import com.google.common.net.MediaType;
/**
* HTML content rendering service for report viewer
*/
@Component(service = IReportViewerRenderer.class, immediate = true)
public class HTMLReportViewerRenderer implements IReportViewerRenderer {
private static final CLogger log = CLogger.getCLogger(HTMLReportViewerRenderer.class);
public HTMLReportViewerRenderer() {
}
@Override
public String getId() {
return HTMLReportRendererConfiguration.ID;
}
@Override
public String getExportLabel() {
return Msg.getMsg(Env.getCtx(), "FileHTML");
}
@Override
public String getContentType() {
return MediaType.HTML_UTF_8.toString();
}
@Override
public String getFileExtension() {
return HTMLReportRendererConfiguration.FILE_EXTENSION;
}
@Override
public boolean isExport() {
return true;
}
@Override
public boolean isPreview(boolean roleCanExport) {
return true;
}
@Override
public AMedia renderMedia(ZkReportViewer viewer, boolean export) {
ReportEngine reportEngine = viewer.getReportEngine();
try {
String path = System.getProperty("java.io.tmpdir");
String prefix = makePrefix(reportEngine.getName());
if (prefix.length() < 3)
prefix += "_".repeat(3-prefix.length());
if (log.isLoggable(Level.FINE)) log.log(Level.FINE, "Path="+path + " Prefix="+prefix);
File file = FileUtil.createTempFile(prefix, "."+getFileExtension(), new File(path));
String contextPath = Executions.getCurrent().getContextPath();
IReportRenderer<IReportRendererConfiguration> renderer = Core.getReportRenderer(getId());
HTMLReportRendererConfiguration config = new HTMLReportRendererConfiguration()
.setLanguage(reportEngine.getPrintFormat().getLanguage())
.setOutputFile(file)
.setExport(export)
.setExtension(new HTMLExtension(contextPath, "rp", viewer.getUuid()));
renderer.renderReport(reportEngine, config);
return new AMedia(file.getName(), getFileExtension(), getContentType(), file, false);
} catch (Exception e) {
if (e instanceof RuntimeException)
throw (RuntimeException)e;
else
throw new RuntimeException(e);
}
}
@Override
public boolean isSameContentForExportAndPreview() {
return false;
}
}

View File

@ -0,0 +1,111 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.ui.zk.report;
import org.adempiere.webui.window.ZkReportViewer;
import org.zkoss.util.media.AMedia;
/**
* Service interface for rendering of report viewer content.<br/>
* Implementation must be thread safe.
*/
public interface IReportViewerRenderer {
/**
* Get id of renderer
* @return renderer id (PDF, HTML, etc)
*/
String getId();
/**
* Renderer label for export output type selection
* @return label for export output type selection
*/
String getExportLabel();
/**
* Renderer label for preview output type selection
* @return label for preview output type selection
*/
default String getPreviewLabel() {
return getId();
}
/**
* Get MIME content type (text/html, etc)
* @return MIME content type
*/
String getContentType();
/**
* Output file extension (without dot)
* @return output file extension (html, csv, xls, etc)
*/
String getFileExtension();
/**
* Is renderer support export
* @return true if renderer support export
*/
boolean isExport();
/**
* Is renderer support preview
* @param roleCanExport true if role can export
* @return true if renderer support preview
*/
boolean isPreview(boolean roleCanExport);
/**
* Render output media for report
* @param viewer
* @param export
* @return media
*/
AMedia renderMedia(ZkReportViewer viewer, boolean export);
/**
* Is export and preview generate the exact same output
* @return true if export and preview generate the exact same output
*/
default boolean isSameContentForExportAndPreview() {
return true;
}
/**
* Create file name prefix from name
* @param name
* @return file name prefix from name
*/
default String makePrefix(String name) {
StringBuilder prefix = new StringBuilder();
char[] nameArray = name.toCharArray();
for (char ch : nameArray) {
if (Character.isLetterOrDigit(ch)) {
prefix.append(ch);
} else {
prefix.append("_");
}
}
return prefix.toString();
}
}

View File

@ -0,0 +1,104 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.ui.zk.report;
import java.io.File;
import java.util.logging.Level;
import org.adempiere.base.Core;
import org.adempiere.webui.window.ZkReportViewer;
import org.compiere.print.ReportEngine;
import org.compiere.tools.FileUtil;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.idempiere.print.renderer.IReportRenderer;
import org.idempiere.print.renderer.IReportRendererConfiguration;
import org.idempiere.print.renderer.PDFReportRendererConfiguration;
import org.osgi.service.component.annotations.Component;
import org.zkoss.util.media.AMedia;
import com.google.common.net.MediaType;
/**
* PDF content rendering service for report viewer
*/
@Component(service = IReportViewerRenderer.class, immediate = true)
public class PDFReportViewerRenderer implements IReportViewerRenderer {
private static final CLogger log = CLogger.getCLogger(PDFReportViewerRenderer.class);
public PDFReportViewerRenderer() {
}
@Override
public String getId() {
return PDFReportRendererConfiguration.ID;
}
@Override
public String getExportLabel() {
return Msg.getMsg(Env.getCtx(), "FilePDF");
}
@Override
public String getContentType() {
return MediaType.PDF.toString();
}
@Override
public String getFileExtension() {
return PDFReportRendererConfiguration.FILE_EXTENSION;
}
@Override
public boolean isExport() {
return true;
}
@Override
public boolean isPreview(boolean roleCanExport) {
return true;
}
@Override
public AMedia renderMedia(ZkReportViewer viewer, boolean export) {
ReportEngine reportEngine = viewer.getReportEngine();
try {
String path = System.getProperty("java.io.tmpdir");
String prefix = makePrefix(reportEngine.getName());
if (prefix.length() < 3)
prefix += "_".repeat(3-prefix.length());
if (log.isLoggable(Level.FINE)) log.log(Level.FINE, "Path="+path + " Prefix="+prefix);
File file = FileUtil.createTempFile(prefix, "."+getFileExtension(), new File(path));
IReportRenderer<IReportRendererConfiguration> renderer = Core.getReportRenderer(getId());
PDFReportRendererConfiguration config = new PDFReportRendererConfiguration().setOutputFile(file);
renderer.renderReport(reportEngine, config);
return new AMedia(file.getName(), getFileExtension(), getContentType(), file, true);
} catch (Exception e) {
if (e instanceof RuntimeException)
throw (RuntimeException)e;
else
throw new RuntimeException(e);
}
}
}

View File

@ -0,0 +1,89 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.ui.zk.report;
import java.io.ByteArrayOutputStream;
import org.adempiere.base.Core;
import org.adempiere.webui.window.ZkReportViewer;
import org.compiere.print.ReportEngine;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.idempiere.print.renderer.IReportRenderer;
import org.idempiere.print.renderer.IReportRendererConfiguration;
import org.idempiere.print.renderer.PSReportRendererConfiguration;
import org.osgi.service.component.annotations.Component;
import org.zkoss.util.media.AMedia;
import com.google.common.net.MediaType;
/**
* Postscript content rendering service for report viewer
*/
@Component(service = IReportViewerRenderer.class, immediate = true)
public class PSReportViewerRenderer implements IReportViewerRenderer {
public PSReportViewerRenderer() {
}
@Override
public String getId() {
return PSReportRendererConfiguration.ID;
}
@Override
public String getExportLabel() {
return Msg.getMsg(Env.getCtx(), "FilePS");
}
@Override
public String getContentType() {
return MediaType.POSTSCRIPT.toString();
}
@Override
public String getFileExtension() {
return PSReportRendererConfiguration.FILE_EXTENSION;
}
@Override
public boolean isExport() {
return true;
}
@Override
public boolean isPreview(boolean roleCanExport) {
return false;
}
@Override
public AMedia renderMedia(ZkReportViewer viewer, boolean export) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ReportEngine m_reportEngine = viewer.getReportEngine();
m_reportEngine.createPS(baos);
IReportRenderer<IReportRendererConfiguration> renderer = Core.getReportRenderer(getId());
PSReportRendererConfiguration config = new PSReportRendererConfiguration().setOutputStream(baos);
renderer.renderReport(m_reportEngine, config);
byte[] data = baos.toByteArray();
return new AMedia(m_reportEngine.getName() + "."+getFileExtension(), getFileExtension(), getContentType(), data);
}
}

View File

@ -0,0 +1,91 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.ui.zk.report;
import java.io.StringWriter;
import org.adempiere.base.Core;
import org.adempiere.webui.window.ZkReportViewer;
import org.compiere.print.ReportEngine;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.idempiere.print.renderer.IReportRenderer;
import org.idempiere.print.renderer.IReportRendererConfiguration;
import org.idempiere.print.renderer.SSVReportRendererConfiguration;
import org.osgi.service.component.annotations.Component;
import org.zkoss.util.media.AMedia;
import com.google.common.net.MediaType;
/**
* Semicolon separated content rendering service for report viewer
*/
@Component(service = IReportViewerRenderer.class, immediate = true)
public class SSVReportViewerRenderer implements IReportViewerRenderer {
public SSVReportViewerRenderer() {
}
@Override
public String getId() {
return SSVReportRendererConfiguration.ID;
}
@Override
public String getExportLabel() {
return Msg.getMsg(Env.getCtx(), "FileSSV");
}
@Override
public String getContentType() {
return MediaType.CSV_UTF_8.toString();
}
@Override
public String getFileExtension() {
return SSVReportRendererConfiguration.FILE_EXTENSION;
}
@Override
public boolean isExport() {
return true;
}
@Override
public boolean isPreview(boolean roleCanExport) {
return false;
}
@Override
public AMedia renderMedia(ZkReportViewer viewer, boolean export) {
StringWriter sw = new StringWriter();
ReportEngine reportEngine = viewer.getReportEngine();
IReportRenderer<IReportRendererConfiguration> renderer = Core.getReportRenderer(getId());
SSVReportRendererConfiguration config = new SSVReportRendererConfiguration()
.setLanguage(reportEngine.getPrintFormat().getLanguage())
.setOutputWriter(sw);
renderer.renderReport(reportEngine, config);
String data = sw.getBuffer().toString();
return new AMedia(reportEngine.getName() + "."+getFileExtension(), getFileExtension(), getContentType(), data);
}
}

View File

@ -0,0 +1,91 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.ui.zk.report;
import java.io.StringWriter;
import org.adempiere.base.Core;
import org.adempiere.webui.window.ZkReportViewer;
import org.compiere.print.ReportEngine;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.idempiere.print.renderer.IReportRenderer;
import org.idempiere.print.renderer.IReportRendererConfiguration;
import org.idempiere.print.renderer.TabDelimitedReportRendererConfiguration;
import org.osgi.service.component.annotations.Component;
import org.zkoss.util.media.AMedia;
import com.google.common.net.MediaType;
/**
* Tab separated content rendering service for report viewer
*/
@Component(service = IReportViewerRenderer.class, immediate = true)
public class TabDelimitedReportViewerRenderer implements IReportViewerRenderer {
public TabDelimitedReportViewerRenderer() {
}
@Override
public String getId() {
return TabDelimitedReportRendererConfiguration.ID;
}
@Override
public String getExportLabel() {
return Msg.getMsg(Env.getCtx(), "FileTXT");
}
@Override
public String getContentType() {
return MediaType.PLAIN_TEXT_UTF_8.toString();
}
@Override
public String getFileExtension() {
return TabDelimitedReportRendererConfiguration.FILE_EXTENSION;
}
@Override
public boolean isExport() {
return true;
}
@Override
public boolean isPreview(boolean roleCanExport) {
return false;
}
@Override
public AMedia renderMedia(ZkReportViewer viewer, boolean export) {
StringWriter sw = new StringWriter();
ReportEngine reportEngine = viewer.getReportEngine();
IReportRenderer<IReportRendererConfiguration> renderer = Core.getReportRenderer(getId());
TabDelimitedReportRendererConfiguration config = new TabDelimitedReportRendererConfiguration()
.setLanguage(reportEngine.getPrintFormat().getLanguage())
.setOutputWriter(sw);
renderer.renderReport(reportEngine, config);
String data = sw.getBuffer().toString();
return new AMedia(reportEngine.getName() + "."+getFileExtension(), getFileExtension(), getContentType(), data);
}
}

View File

@ -0,0 +1,106 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.ui.zk.report;
import java.io.File;
import java.util.logging.Level;
import org.adempiere.base.Core;
import org.adempiere.webui.window.ZkReportViewer;
import org.compiere.print.ReportEngine;
import org.compiere.tools.FileUtil;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.idempiere.print.renderer.IReportRenderer;
import org.idempiere.print.renderer.IReportRendererConfiguration;
import org.idempiere.print.renderer.XLSReportRendererConfiguration;
import org.osgi.service.component.annotations.Component;
import org.zkoss.util.media.AMedia;
import com.google.common.net.MediaType;
/**
* Excel (xls) content rendering service for report viewer
*/
@Component(service = IReportViewerRenderer.class, immediate = true)
public class XLSReportViewerRenderer implements IReportViewerRenderer {
private static final CLogger log = CLogger.getCLogger(XLSReportViewerRenderer.class);
public XLSReportViewerRenderer() {
}
@Override
public String getId() {
return XLSReportRendererConfiguration.ID;
}
@Override
public String getExportLabel() {
return Msg.getMsg(Env.getCtx(), "FileXLS");
}
@Override
public String getContentType() {
return MediaType.MICROSOFT_EXCEL.toString();
}
@Override
public String getFileExtension() {
return XLSReportRendererConfiguration.FILE_EXTENSION;
}
@Override
public boolean isExport() {
return false;
}
@Override
public boolean isPreview(boolean roleCanExport) {
return roleCanExport;
}
@Override
public AMedia renderMedia(ZkReportViewer viewer, boolean export) {
ReportEngine reportEngine = viewer.getReportEngine();
try {
String path = System.getProperty("java.io.tmpdir");
String prefix = makePrefix(reportEngine.getName());
if (prefix.length() < 3)
prefix += "_".repeat(3-prefix.length());
if (log.isLoggable(Level.FINE)) log.log(Level.FINE, "Path="+path + " Prefix="+prefix);
File file = FileUtil.createTempFile(prefix, "."+getFileExtension(), new File(path));
IReportRenderer<IReportRendererConfiguration> renderer = Core.getReportRenderer(getId());
XLSReportRendererConfiguration config = new XLSReportRendererConfiguration()
.setLanguage(reportEngine.getPrintFormat().getLanguage())
.setOutputFile(file);
renderer.renderReport(reportEngine, config);
return new AMedia(file.getName(), getFileExtension(), getContentType(), file, true);
} catch (Exception e) {
if (e instanceof RuntimeException)
throw (RuntimeException)e;
else
throw new RuntimeException(e);
}
}
}

View File

@ -0,0 +1,107 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.ui.zk.report;
import java.io.File;
import java.util.logging.Level;
import org.adempiere.base.Core;
import org.adempiere.webui.window.ZkReportViewer;
import org.compiere.print.ReportEngine;
import org.compiere.tools.FileUtil;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.idempiere.print.renderer.IReportRenderer;
import org.idempiere.print.renderer.IReportRendererConfiguration;
import org.idempiere.print.renderer.XLSXReportRendererConfiguration;
import org.osgi.service.component.annotations.Component;
import org.zkoss.util.media.AMedia;
import com.google.common.net.MediaType;
/**
* Excel open xml (xlsx) content rendering service for report viewer
*/
@Component(service = IReportViewerRenderer.class, immediate = true)
public class XLSXReportViewerRenderer implements IReportViewerRenderer {
private static final CLogger log = CLogger.getCLogger(XLSXReportViewerRenderer.class);
public XLSXReportViewerRenderer() {
}
@Override
public String getId() {
return XLSXReportRendererConfiguration.ID;
}
@Override
public String getExportLabel() {
return Msg.getMsg(Env.getCtx(), "FileXLSX");
}
@Override
public String getContentType() {
return MediaType.OOXML_SHEET.toString();
}
@Override
public String getFileExtension() {
return XLSXReportRendererConfiguration.FILE_EXTENSION;
}
@Override
public boolean isExport() {
return false;
}
@Override
public boolean isPreview(boolean roleCanExport) {
return roleCanExport;
}
@Override
public AMedia renderMedia(ZkReportViewer viewer, boolean export) {
ReportEngine reportEngine = viewer.getReportEngine();
try {
String path = System.getProperty("java.io.tmpdir");
String prefix = makePrefix(reportEngine.getName());
if (log.isLoggable(Level.FINE))
{
log.log(Level.FINE, "Path=" + path + " Prefix=" + prefix);
}
File file = FileUtil.createTempFile(prefix, "."+getFileExtension(), new File(path));
IReportRenderer<IReportRendererConfiguration> renderer = Core.getReportRenderer(getId());
XLSXReportRendererConfiguration config = new XLSXReportRendererConfiguration()
.setLanguage(reportEngine.getPrintFormat().getLanguage())
.setOutputFile(file);
renderer.renderReport(reportEngine, config);
return new AMedia(file.getName(), getFileExtension(), getContentType(), file, true);
} catch (Exception e) {
if (e instanceof RuntimeException)
throw (RuntimeException)e;
else
throw new RuntimeException(e);
}
}
}

View File

@ -0,0 +1,89 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.ui.zk.report;
import java.io.StringWriter;
import org.adempiere.base.Core;
import org.adempiere.webui.window.ZkReportViewer;
import org.compiere.print.ReportEngine;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.idempiere.print.renderer.IReportRenderer;
import org.idempiere.print.renderer.IReportRendererConfiguration;
import org.idempiere.print.renderer.XMLReportRendererConfiguration;
import org.osgi.service.component.annotations.Component;
import org.zkoss.util.media.AMedia;
import com.google.common.net.MediaType;
/**
* XML content rendering service for report viewer
*/
@Component(service = IReportViewerRenderer.class, immediate = true)
public class XMLReportViewerRenderer implements IReportViewerRenderer {
public XMLReportViewerRenderer() {
}
@Override
public String getId() {
return XMLReportRendererConfiguration.ID;
}
@Override
public String getExportLabel() {
return Msg.getMsg(Env.getCtx(), "FileXML");
}
@Override
public String getContentType() {
return MediaType.XML_UTF_8.toString();
}
@Override
public String getFileExtension() {
return XMLReportRendererConfiguration.FILE_EXTENSION;
}
@Override
public boolean isExport() {
return true;
}
@Override
public boolean isPreview(boolean roleCanExport) {
return false;
}
@Override
public AMedia renderMedia(ZkReportViewer viewer, boolean export) {
StringWriter sw = new StringWriter();
ReportEngine reportEngine = viewer.getReportEngine();
IReportRenderer<IReportRendererConfiguration> renderer = Core.getReportRenderer(getId());
XMLReportRendererConfiguration config = new XMLReportRendererConfiguration().setOutputWriter(sw);
renderer.renderReport(reportEngine, config);
String data = sw.getBuffer().toString();
return new AMedia(reportEngine.getName() + "."+getFileExtension(), getFileExtension(), getContentType(), data);
}
}

View File

@ -0,0 +1,26 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
/**
* Provide interface and class for report viewer preview and export renderer
*/
package org.idempiere.ui.zk.report;

View File

@ -139,4 +139,8 @@
<name>org.zkoss.zk.ui.uuidRecycle.disabled</name> <name>org.zkoss.zk.ui.uuidRecycle.disabled</name>
<value>true</value> <value>true</value>
</library-property> </library-property>
<library-property>
<name>org.zkoss.zul.Filedownload.contentTypeAsIs</name>
<value>true</value>
</library-property>
</zk> </zk>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.idempiere.zk.datatable</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ds.core.builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

View File

@ -0,0 +1,3 @@
eclipse.preferences.version=1
pluginProject.extensions=false
resolve.requirebundle=false

View File

@ -0,0 +1,27 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Datatable Renderer for Report
Bundle-SymbolicName: org.idempiere.zk.datatable
Bundle-Version: 12.0.0.qualifier
Require-Bundle: org.adempiere.base;bundle-version="12.0.0",
zcommon;bundle-version="9.6.4",
zel;bundle-version="9.6.4",
zhtml;bundle-version="9.6.4",
zjavassist;bundle-version="9.6.4",
zk;bundle-version="9.6.4",
zkbind;bundle-version="9.6.4",
zkplus;bundle-version="9.6.4",
zkwebfragment;bundle-version="9.6.4",
zul;bundle-version="9.6.4",
zweb;bundle-version="9.6.4",
json;bundle-version="20190722.0.0",
org.apache.ecs;bundle-version="12.0.0"
Import-Package: com.google.common.net;version="30.1.1",
org.osgi.service.component.annotations;version="1.5.1"
Bundle-Vendor: idempiere.org
Fragment-Host: org.adempiere.ui.zk;bundle-version="11.0.0"
Automatic-Module-Name: org.idempiere.ui.zk.datatable
Bundle-RequiredExecutionEnvironment: JavaSE-17
Service-Component: OSGI-INF/org.idempiere.zk.datatable.DatatableReportRenderer.xml,
OSGI-INF/org.idempiere.zk.datatable.DatatableReportViewerRenderer.xml
Bundle-ActivationPolicy: lazy

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.idempiere.zk.datatable.DatatableReportRenderer">
<service>
<provide interface="org.idempiere.print.renderer.IReportRenderer"/>
</service>
<implementation class="org.idempiere.zk.datatable.DatatableReportRenderer"/>
</scr:component>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.idempiere.zk.datatable.DatatableReportViewerRenderer">
<service>
<provide interface="org.idempiere.ui.zk.report.IReportViewerRenderer"/>
</service>
<implementation class="org.idempiere.zk.datatable.DatatableReportViewerRenderer"/>
</scr:component>

View File

@ -0,0 +1,5 @@
source.. = src/
output.. = target/classes/
bin.includes = META-INF/,\
.,\
OSGI-INF/

View File

@ -0,0 +1,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.idempiere</groupId>
<artifactId>org.idempiere.parent</artifactId>
<version>${revision}</version>
<relativePath>../org.idempiere.parent/pom.xml</relativePath>
</parent>
<artifactId>org.idempiere.zk.datatable</artifactId>
<packaging>eclipse-plugin</packaging>
</project>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language>
<language-addon>
<addon-name>datatables</addon-name>
<language-name>xul/html</language-name>
<javascript-module name="datatables" version="1.12.1.202401261100"/>
</language-addon>

View File

@ -0,0 +1,510 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.zk.datatable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map.Entry;
import java.util.TreeMap;
import org.compiere.util.Language;
import org.compiere.util.Msg;
import org.compiere.util.Util;
import org.idempiere.zk.datatable.DatatableReportRenderer.FunctionTypes;
import org.json.JSONArray;
import org.json.JSONString;
public class DataTableOptions {
public class JSONFunction implements JSONString {
private String string;
public JSONFunction(String string) {
this.string = string;
}
@Override
public String toJSONString() {
return string;
}
}
public final Integer DESC_OFFSET = 1000000;
private HashMap<FunctionTypes, ArrayList<Integer>> functionMap;
private Integer printColLastIndex;
private String locale;
/**
* @param locale
*/
public DataTableOptions(String locale) {
functionMap = new HashMap<>();
this.locale = locale;
}
/**
* Get datatables settings
* @param path
* @return json datatables settings
*/
public String getDataTableOptions(String path) {
StringBuilder dataOptions = new StringBuilder();
dataOptions.append(" { ");
dataOptions.append(" pageLength: ").append(250);
dataOptions.append(", lengthMenu: [ [250, 500, 1000, -1], [250, 500, 1000,\"").append(Msg.getMsg( Language.getAD_Language(locale), "All")).append("\" ] ] ");
dataOptions.append(", colReorder: ").append(true);
dataOptions.append(", responsive: ").append(true);
dataOptions.append(", ordering: ").append(true);
dataOptions.append(", search: { return: ").append(true).append(" }");
dataOptions.append(", language: { url: '").append(path).append("DataTables/i18n/").append(this.locale).append(".json' }");
dataOptions.append(", dom: \"lfrtip\" ");
dataOptions.append(", initComplete:").append(" function () "
+ "{ this.api().columns().every( function () "
+ "{ var that = this; $('input', this.footer()).on('keyup change clear', function () "
+ "{ if (that.search() !== this.value) "
+ "{ that.search(this.value).draw();}});});}");
String orderBy = getOrderBy();
if(orderBy != null)
dataOptions.append(", order: ").append(orderBy);
String groupByDataSrc = getGroupDataSrc();
if(groupByDataSrc != null) {
dataOptions.append(", rowGroup: { ");
dataOptions.append(" dataSrc: ").append(groupByDataSrc);
String aggregateFunctions = getRowGroupRendered();
if(!Util.isEmpty(aggregateFunctions)) {
dataOptions.append(" , ").append(" endRender: ").append(aggregateFunctions);
dataOptions.append(" , ").append(" startRender: null ");
}
dataOptions.append(" } ");
}
String footerFunction = getFootAggregateFunctions();
if(!Util.isEmpty(footerFunction)) {
dataOptions.append(", footerCallback: ").append(footerFunction);
}
dataOptions.append(" } ");
return dataOptions.toString();
}
/**
* Get group rendering function
* @return group rendering function
*/
private String getRowGroupRendered() {
ArrayList<Integer> groupByList = functionMap.get(FunctionTypes.GROUP_BY);
Integer groupBy = groupByList.get(0);
TreeMap<Integer, String[]> groupRowNamesMap = new TreeMap<>();
StringBuilder retValue = new StringBuilder();
retValue.append(" function ( rows, group ) { ");
// Prepare localization
retValue.append(" let locale = '" + locale + "'; ");
String groupName = "groupBy_"+groupBy;
retValue.append(" let ").append(groupName);
retValue.append(" = group; ");
groupRowNamesMap.put(groupBy, new String[] { groupName, null });
retValue.append(" let totalRows = []; ");
retValue.append(" let displayRows = rows.data(); ");
retValue.append(" rows.rows().data().filter(function(value, index) { ")
.append(" let groupValue = null; ")
.append(" if(value[").append(groupBy).append("].includes('<a ')) { ")
.append(" let htmlObject = $(value[").append(groupBy).append("]);")
.append(" groupValue = htmlObject[0].innerText;")
.append(" } else { ")
.append(" groupValue = value[").append(groupBy).append("] } ")
.append(" if( groupValue === group ) ")
.append(" { totalRows.push(value); } ")
.append(" }); ");
setAggregateFunctions(retValue, groupRowNamesMap);
retValue.append(" let rowRender = $('<tr/>') ");
Integer prevColIndex = 0;
for(Entry<Integer, String[]> groupRowNameSet :groupRowNamesMap.entrySet()) {
Integer actualColIndex = groupRowNameSet.getKey();
String[] varValues = groupRowNameSet.getValue();
if(actualColIndex -prevColIndex > 0) {
retValue.append(".append( '<td ");
retValue.append("colspan=\"").append(actualColIndex-prevColIndex).append("\"/>");
retValue.append("')");
}
if(varValues != null && varValues.length == 2) {
String varName = varValues[0];
String varTotalName = varValues[1];
if(varName.contains("groupBy_"))
retValue.append(".append( '<td class=\"datatable-text\" > ");
else
retValue.append(".append( '<td class=\"datatable-number\" > ");
if(!Util.isEmpty(varName)) {
retValue.append("'+"+varName+"+'");
}
if(!Util.isEmpty(varTotalName)) {
retValue.append(" <br> ('+"+varTotalName+"+')");
}
if(varName.contains("groupBy_"))
retValue.append(" Σ ");
}
retValue.append("</td>' )");
prevColIndex = varValues==null ? actualColIndex : actualColIndex+1;
}
if(prevColIndex < (printColLastIndex+1)) {
retValue.append(".append( '<td ");
if((printColLastIndex+1)-prevColIndex > 1)
retValue.append("colspan=\"").append((printColLastIndex+1)-prevColIndex).append("\"/>");
retValue.append("') ");
}
retValue.append("; ");
retValue.append("return rowRender;");
retValue.append(" } ");
return retValue.toString();
}
/**
* Get table footer aggregate rendering function
* @return table footer aggregate rendering function
*/
private String getFootAggregateFunctions() {
TreeMap<Integer, String[]> groupRowNamesMap = new TreeMap<>();
StringBuilder retValue = new StringBuilder();
retValue.append(" function ( tfoot, data, start, end, display ) { ");
retValue.append(" let api = this.api(); ");
// Prepare localization
retValue.append(" let locale = '" + locale + "'; ");
ArrayList<Integer> groupByList = functionMap.get(FunctionTypes.GROUP_BY);
if(groupByList != null) {
Integer groupBy = groupByList.get(0);
String groupName = "groupBy_"+groupBy;
retValue.append(" let ").append(groupName);
retValue.append(" = ' Σ'; ");
groupRowNamesMap.put(groupBy, new String[] { groupName, null });
}
retValue.append(" let totalRows = data; ");
retValue.append(" let displayRows = api.rows({ page: 'current' }).data(); ");
setAggregateFunctions(retValue, groupRowNamesMap);
for(Entry<Integer, String[]> groupRowNameSet :groupRowNamesMap.entrySet()) {
Integer actualColIndex = groupRowNameSet.getKey();
String[] varValues = groupRowNameSet.getValue();
if(varValues == null || varValues.length != 2) {
continue;
}
String varValue = varValues[0];
String varTotalValue = varValues[1];
retValue.append(" $( api.column( ");
retValue.append(actualColIndex);
retValue.append(" ).footer() ).html(").append(varValue);
if(!Util.isEmpty(varTotalValue)) {
retValue.append(" ).append('<br>') ");
retValue.append(".append( '(' + ").append(varTotalValue).append(" +')'");
}
retValue.append(" ) ");
if(varValue.contains("groupBy_"))
retValue.append(".addClass( 'datatable-text');");
else
retValue.append(".addClass( 'datatable-number');");
}
retValue.append(" } ");
return retValue.toString();
}
/**
* @param retValue
* @param groupRowNamesMap
*/
private void setAggregateFunctions(StringBuilder retValue, TreeMap<Integer, String[]> groupRowNamesMap) {
ArrayList<Integer> averageList = functionMap.get(FunctionTypes.AVG);
ArrayList<Integer> countList = functionMap.get(FunctionTypes.COUNT);
ArrayList<Integer> deviationList = functionMap.get(FunctionTypes.DEVIATION);
ArrayList<Integer> maxList = functionMap.get(FunctionTypes.MAX);
ArrayList<Integer> minList = functionMap.get(FunctionTypes.MIN);
ArrayList<Integer> sumList = functionMap.get(FunctionTypes.SUM);
ArrayList<Integer> varianceList = functionMap.get(FunctionTypes.VARIANCE);
if(averageList != null) {
for(Integer averageID:averageList) {
String varTotalName = "average_total_"+averageID;
retValue.append(" let ").append(varTotalName).append(" = new Intl.NumberFormat(locale).format(+(( totalRows.map(i => new NumberParser(locale).parse(i[").append(averageID).append("])).reduce( function (a, b) { return a + b*1; }, 0) ");
retValue.append(" / totalRows.length ).toFixed(4))); ");
String varName = "average_"+averageID;
groupRowNamesMap.put(averageID, new String[] { varName, varTotalName });
retValue.append(" let ").append(varName).append(" = new Intl.NumberFormat(locale).format(+(( displayRows.map(i => new NumberParser(locale).parse(i[").append(averageID).append("])).reduce( function (a, b) { return a + b*1; }, 0) ");
retValue.append(" / displayRows.length ).toFixed(4))); ");
}
}
// Count List
if(countList != null) {
for(Integer countID:countList) {
String varTotalName = "count_total_"+countID;
retValue.append(" let ").append(varTotalName).append(" = new Intl.NumberFormat(locale).format(totalRows.length); ");
String varName = "count_"+countID;
groupRowNamesMap.put(countID, new String[] { varName, varTotalName });
retValue.append(" let ").append(varName).append(" = new Intl.NumberFormat(locale).format(displayRows.length); ");
}
}
if(sumList != null) {
for(Integer sumID:sumList) {
String varTotalName = "sum_total_"+sumID;
retValue.append(" let ").append(varTotalName).append(" = new Intl.NumberFormat(locale).format(+((totalRows.map(i => new NumberParser(locale).parse(i[").append(sumID).append("])).reduce( function (a, b) { return a + b*1; }, 0)).toFixed(4))); ");
String varName = "sum_"+sumID;
groupRowNamesMap.put(sumID, new String[] { varName, varTotalName });
retValue.append(" let ").append(varName).append(" = new Intl.NumberFormat(locale).format(+((displayRows.map(i => new NumberParser(locale).parse(i[").append(sumID).append("])).reduce( function (a, b) { return a + b*1; }, 0)).toFixed(4))); ");
}
}
if(maxList != null) {
for(Integer maxID:maxList) {
String varTotalName = "max_total_"+maxID;
retValue.append(" let ").append(varTotalName).append(" = new Intl.NumberFormat(locale).format(totalRows.map(i => new NumberParser(locale).parse(i[").append(maxID)
.append("])).reduce(function(a, b) { return Math.max(a, b);})); ");
String varName = "max_"+maxID;
groupRowNamesMap.put(maxID, new String[] { varName, varTotalName });
retValue.append(" let ").append(varName).append(" = new Intl.NumberFormat(locale).format(displayRows.map(i => new NumberParser(locale).parse(i[").append(maxID)
.append("])).reduce(function(a, b) { return Math.max(a, b);})); ");
}
}
if(minList != null) {
for(Integer minID:minList) {
String varTotalName = "min_total_"+minID;
retValue.append(" let ").append(varTotalName).append(" = new Intl.NumberFormat(locale).format( totalRows.map(i => new NumberParser(locale).parse(i[").append(minID)
.append("])).reduce(function(a, b) { return Math.min(a, b);})); ");
String varName = "min_"+minID;
groupRowNamesMap.put(minID, new String[] { varName, varTotalName });
retValue.append(" let ").append(varName).append(" = new Intl.NumberFormat(locale).format( displayRows.map(i => new NumberParser(locale).parse(i[").append(minID)
.append("])).reduce(function(a, b) { return Math.min(a, b);})); ");
}
}
if(varianceList != null) {
for(Integer varianceID:varianceList) {
String varTotalName = "variance_total_"+varianceID;
retValue.append(" let ").append(varTotalName).append(" = totalRows.map((i) => { return { sum: new NumberParser(locale).parse(i[").append(varianceID)
.append("]), sumSquare: (new NumberParser(locale).parse(i[").append(varianceID).append("]) * new NumberParser(locale).parse(i[").append(varianceID).append("])) ")
.append(" }; } )");
retValue.append(".reduce( function (a, b) { let c = { sum: a.sum + b.sum*1, sumSquare: a.sumSquare + b.sumSquare*1 }; return c; }, { sum: 0, sumSquare: 0 }); ");
retValue.append(varTotalName).append(" = new Intl.NumberFormat(locale).format( +(((").append(varTotalName).append(".sumSquare - (( ").append(varTotalName).append(".sum * ").append(varTotalName).append(".sum ) / totalRows.length ))/ totalRows.length ).toFixed(4))); ");
String varName = "variance_"+varianceID;
groupRowNamesMap.put(varianceID, new String[] { varName, varTotalName });
retValue.append(" let ").append(varName).append(" = displayRows.map((i) => { return { sum: new NumberParser(locale).parse(i[").append(varianceID)
.append("]), sumSquare: (new NumberParser(locale).parse(i[").append(varianceID).append("]) * new NumberParser(locale).parse(i[").append(varianceID).append("])) ")
.append(" }; } )");
retValue.append(".reduce( function (a, b) { let c = { sum: a.sum + b.sum*1, sumSquare: a.sumSquare + b.sumSquare*1 }; return c; }, { sum: 0, sumSquare: 0 }); ");
retValue.append(varName).append(" = new Intl.NumberFormat(locale).format( +(((").append(varName).append(".sumSquare - (( ").append(varName).append(".sum * ").append(varName).append(".sum ) / displayRows.length ))/ displayRows.length ).toFixed(4))); ");
}
}
// Deviation
if(deviationList != null) {
for(Integer deviationID:deviationList) {
String varTotalName = "deviation_total_"+deviationID;
retValue.append(" let ").append(varTotalName).append(" = totalRows.map((i) => { return { sum: new NumberParser(locale).parse(i[").append(deviationID)
.append("]), sumSquare: (new NumberParser(locale).parse(i[").append(deviationID).append("]) * new NumberParser(locale).parse(i[").append(deviationID).append("])) ")
.append(" }; } )");
retValue.append(".reduce( function (a, b) { let c = { sum: a.sum + b.sum*1, sumSquare: a.sumSquare + b.sumSquare*1 }; return c; }, { sum: 0, sumSquare: 0 }); ");
retValue.append(varTotalName).append(" = ((").append(varTotalName).append(".sumSquare - (( ").append(varTotalName).append(".sum * ").append(varTotalName).append(".sum ) / totalRows.length ))/ totalRows.length ); ");
retValue.append(varTotalName).append(" = new Intl.NumberFormat(locale).format(+(Math.sqrt(").append(varTotalName).append(").toFixed(4)));");
String varName = "deviation_"+deviationID;
groupRowNamesMap.put(deviationID, new String[] { varName, varTotalName });
retValue.append(" let ").append(varName).append(" = displayRows.map((i) => { return { sum: new NumberParser(locale).parse(i[").append(deviationID)
.append("]), sumSquare: (new NumberParser(locale).parse(i[").append(deviationID).append("]) * new NumberParser(locale).parse(i[").append(deviationID).append("])) ")
.append(" }; } )");
retValue.append(".reduce( function (a, b) { let c = { sum: a.sum + b.sum*1, sumSquare: a.sumSquare + b.sumSquare*1 }; return c; }, { sum: 0, sumSquare: 0 }); ");
retValue.append(varName).append(" = ((").append(varName).append(".sumSquare - (( ").append(varName).append(".sum * ").append(varName).append(".sum ) / displayRows.length ))/ displayRows.length ); ");
retValue.append(varName).append(" = new Intl.NumberFormat(locale).format(+(Math.sqrt(").append(varName).append(").toFixed(4)));");
}
}
}
/**
* @param type
* @param id
*/
public void addPrintColumnIndex(FunctionTypes type, Integer id) {
ArrayList<Integer> list = functionMap.get(type);
if (list == null) {
list = new ArrayList<>();
functionMap.put(type, list);
}
list.add(id);
}
/**
* Get group by json array
* @return group by json array
*/
private String getGroupDataSrc() {
StringBuilder retValue = new StringBuilder();
ArrayList<Integer> groupByList = functionMap.get(FunctionTypes.GROUP_BY);
if(groupByList == null)
return null;
if(groupByList.size() > 1)
retValue.append(" [ ");
for(int index = 0; index < groupByList.size() ; index++) {
Integer groupBy = groupByList.get(index);
StringBuilder function = new StringBuilder();
function.append("function(row) { ")
.append(" if(row[").append(groupBy).append("].includes('<a ')) { ")
.append(" let htmlObject = $(row[").append(groupBy).append("]);")
.append(" return htmlObject[0].innerText;")
.append(" } else { ")
.append(" return row[").append(groupBy).append("] } }");
retValue.append(function.toString());
if((index + 1) < groupByList.size())
retValue.append(" , ");
}
if(groupByList.size() > 1)
retValue.append(" ] ");
return retValue.toString();
}
/**
* Get order by json array
* @return order by json array
*/
private String getOrderBy() {
String orderBy = orderListToJson(functionMap.get(FunctionTypes.ORDER_BY));
return orderBy;
}
/**
* Get last print column index
* @return last print column index
*/
public Integer getPrintColLastIndex() {
return printColLastIndex;
}
/**
* Set last print column index
* @param printColLastIndex
*/
public void setPrintColLastIndex(Integer printColLastIndex) {
this.printColLastIndex = printColLastIndex;
}
/**
* Get locale
* @return locale
*/
public String getLocale() {
return locale;
}
/**
* Convert orderByList to json array
* @param orderByList
* @return json array for orderByList
*/
private String orderListToJson(ArrayList<Integer> orderByList) {
if(orderByList == null)
return null;
JSONArray orderArray = null;
String orderString = "asc"; // asc / desc
for(int orderBy: orderByList) {
if(orderArray == null)
orderArray = new JSONArray();
if(orderBy >= DESC_OFFSET) {
orderBy = orderBy - DESC_OFFSET;
orderString = "desc";
} else {
orderString = "asc";
}
JSONArray orderItem = new JSONArray();
orderItem.put(orderBy);
orderItem.put(orderString);
orderArray.put(orderItem);
}
return orderArray.toString();
}
}

View File

@ -0,0 +1,875 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.zk.datatable;
import java.awt.Font;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException;
import org.apache.ecs.XhtmlDocument;
import org.apache.ecs.xhtml.a;
import org.apache.ecs.xhtml.link;
import org.apache.ecs.xhtml.script;
import org.apache.ecs.xhtml.span;
import org.apache.ecs.xhtml.style;
import org.apache.ecs.xhtml.table;
import org.apache.ecs.xhtml.tbody;
import org.apache.ecs.xhtml.td;
import org.apache.ecs.xhtml.th;
import org.apache.ecs.xhtml.thead;
import org.apache.ecs.xhtml.tr;
import org.compiere.model.MColumn;
import org.compiere.model.MElement;
import org.compiere.model.MQuery;
import org.compiere.model.MRole;
import org.compiere.model.MStyle;
import org.compiere.model.MSysConfig;
import org.compiere.model.MTable;
import org.compiere.print.IHTMLExtension;
import org.compiere.print.MPrintFont;
import org.compiere.print.MPrintFormat;
import org.compiere.print.MPrintFormatItem;
import org.compiere.print.MPrintTableFormat;
import org.compiere.print.PrintData;
import org.compiere.print.PrintDataElement;
import org.compiere.print.ReportEngine;
import org.compiere.print.layout.InstanceAttributeColumn;
import org.compiere.print.layout.InstanceAttributeData;
import org.compiere.print.layout.LayoutEngine;
import org.compiere.util.CLogger;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
import org.compiere.util.Ini;
import org.compiere.util.Language;
import org.compiere.util.Msg;
import org.compiere.util.Util;
import org.idempiere.print.renderer.HTMLReportRenderer;
import org.idempiere.print.renderer.IReportRenderer;
import org.osgi.service.component.annotations.Component;
import org.zkoss.zk.ui.Executions;
import com.google.common.net.MediaType;
@Component(service = IReportRenderer.class, immediate = true)
public class DatatableReportRenderer implements IReportRenderer<DatatableReportRendererConfiguration> {
private static final CLogger log = CLogger.getCLogger(DatatableReportRenderer.class);
private static final String JS_DATA_IDENTIFIER = "JS_DataTable";
protected enum FunctionTypes {SUM, COUNT, MIN, MAX, AVG, DEVIATION, VARIANCE, GROUP_BY, ORDER_BY};
public DatatableReportRenderer() {
}
@Override
public String getId() {
return DatatableReportRendererConfiguration.ID;
}
@Override
public String getName() {
return getId();
}
@Override
public String getContentType() {
return MediaType.HTML_UTF_8.toString();
}
@Override
public String getFileExtension() {
return DatatableReportRendererConfiguration.FILE_EXTENSION;
}
@Override
public void renderReport(ReportEngine reportEngine, DatatableReportRendererConfiguration configuration) {
try
{
Language lang = configuration.getLanguage();
if (lang == null)
lang = Language.getLoginLanguage();
Writer fw = null;
if (configuration.getOutputFile() != null)
fw = new OutputStreamWriter(new FileOutputStream(configuration.getOutputFile(), false), Ini.getCharset());
else
fw = configuration.getOutputWriter();
createHTML (reportEngine, new BufferedWriter(fw), configuration.isOnlyTable(), lang, configuration.getExtension(), configuration.isExport());
}
catch (FileNotFoundException fnfe)
{
log.log(Level.SEVERE, "(f) - " + fnfe.toString());
}
catch (Exception e)
{
log.log(Level.SEVERE, "(f)", e);
throw new AdempiereException(e);
}
}
@Override
public boolean isBinary() {
return false;
}
@Override
public Class<DatatableReportRendererConfiguration> getConfigurationType() {
return DatatableReportRendererConfiguration.class;
}
/**
* Write HTML to writer
* @param reportEngine
* @param writer writer
* @param onlyTable if false create complete HTML document
* @param language optional language - if null numbers/dates are not formatted
* @param extension optional extension for html output
* @param isExport when isExport = true will don't embed resource dependent zk framework
*/
private void createHTML (ReportEngine reportEngine, Writer writer, boolean onlyTable, Language language, IHTMLExtension extension, boolean isExport)
{
MPrintFormat printFormat = reportEngine.getPrintFormat();
PrintData printData = reportEngine.getPrintData();
MQuery reportEngineQuery = reportEngine.getQuery();
LayoutEngine layout = reportEngine.getLayout();
Map<HTMLReportRenderer.CSSInfo, List<HTMLReportRenderer.ColumnInfo>> mapCssInfo = new HashMap<>();
try
{
DataTableOptions dataTableOptions = new DataTableOptions(language.getLanguageCode());
//collect column to print
List<Object> columns = new ArrayList<>();
List<InstanceAttributeData> asiElements = new ArrayList<>();
int columnCount = 0;
for (int col = 0; col < printFormat.getItemCount(); col++)
{
MPrintFormatItem item = printFormat.getItem(col);
if (item.isPrinted())
{
if (item.isTypeField() && item.isPrintInstanceAttributes())
{
InstanceAttributeData asiElement = new InstanceAttributeData(item, columnCount);
asiElement.readAttributesData(printData);
asiElements.add(asiElement);
continue;
}
else
{
columns.add(item);
columnCount++;
}
}
}
if (asiElements.size() > 0)
{
int columnCreated = 0;
for(InstanceAttributeData data : asiElements)
{
List<InstanceAttributeColumn> instanceColumns = data.getColumns();
int index = data.getColumnIndex() + columnCreated;
for(InstanceAttributeColumn c : instanceColumns)
{
columns.add(index, c);
index++;
columnCreated++;
}
}
}
String cssPrefix = extension != null ? extension.getClassPrefix() : null;
if (cssPrefix != null && cssPrefix.trim().length() == 0)
cssPrefix = null;
table parameterTable = null;
if (!printFormat.isForm()) {
if (reportEngineQuery != null && reportEngineQuery.isActive()) {
int rows = reportEngineQuery.getReportProcessQuery() != null ? reportEngineQuery.getReportProcessQuery().getRestrictionCount() : reportEngineQuery.getRestrictionCount();
if (rows > 0) {
parameterTable = new table();
if (cssPrefix != null)
parameterTable.setClass(cssPrefix + "-parameter-table");
else
parameterTable.setClass("parameter-table");
parameterTable.setNeedClosingTag(false);
}
}
}
table table = new table();
if (cssPrefix != null) {
table.setClass("cell-border compact hover " + cssPrefix + "-table");
}
table.setID(JS_DATA_IDENTIFIER);
//
table.setNeedClosingTag(false);
PrintWriter w = new PrintWriter(writer);
XhtmlDocument doc = null;
boolean minify = MSysConfig.getBooleanValue(MSysConfig.HTML_REPORT_MINIFY, true, Env.getAD_Client_ID(Env.getCtx()));
if (onlyTable)
{
w.print(HTMLReportRenderer.compress(table.toString(), minify));
}
else
{
doc = new XhtmlDocument();
doc.getHtml().setNeedClosingTag(false);
doc.getBody().setNeedClosingTag(false);
doc.appendHead("<meta charset=\"UTF-8\" />");
if (extension != null && !Util.isEmpty(extension.getWebFontLinks(), true))
{
doc.appendHead(extension.getWebFontLinks());
}
if (extension != null && extension.getStyleURL() != null)
{
// maybe cache style content with key is path
String pathStyleFile = extension.getFullPathStyle(); // creates a temp file - delete below
Path path = Paths.get(pathStyleFile);
List<String> styleLines = Files.readAllLines(path, Ini.getCharset());
Files.delete(path); // delete temp file
StringBuilder styleBuild = new StringBuilder();
for (String styleLine : styleLines){
styleBuild.append(styleLine); //.append("\n");
}
HTMLReportRenderer.appendInlineCss (doc, styleBuild);
}
if (extension != null && extension.getScriptURL() != null && !isExport)
{
script jslink = new script();
jslink.setLanguage("javascript");
jslink.setSrc(extension.getScriptURL());
doc.appendHead(jslink);
}
appendStyles(doc, isExport);
appendScripts (doc, isExport);
//FIXME Better implementation of Javascript
doc.appendHead("<script type=\"text/javascript\" charset=\"utf8\" src=\"//cdnjs.cloudflare.com/ajax/libs/moment.js/2.8.4/moment.min.js\"></script>");
doc.appendHead("<script type=\"text/javascript\" charset=\"utf8\" src=\"//cdn.datatables.net/plug-ins/1.10.15/sorting/datetime-moment.js\"></script>");
if (extension != null && !isExport){
extension.setWebAttribute(doc.getBody());
}
}
if (doc != null)
{
MPrintFormatItem item = null;
int printColIndex = -1;
for(int col = 0; col < columns.size(); col++)
{
Object colobj = columns.get(col);
if (colobj instanceof MPrintFormatItem)
item = (MPrintFormatItem) colobj;
else if (colobj instanceof InstanceAttributeColumn)
item = ((InstanceAttributeColumn) colobj).getPrintFormatItem();
if(item != null)
{
printColIndex++;
HTMLReportRenderer.addCssInfo(printFormat, item, printColIndex, mapCssInfo);
}
}
HTMLReportRenderer.appendInlineCss(doc, mapCssInfo);
StringBuilder styleBuild = new StringBuilder();
MPrintTableFormat tf = printFormat.getTableFormat();
HTMLReportRenderer.CSSInfo cssInfo = new HTMLReportRenderer.CSSInfo(tf.getPageHeader_Font(), tf.getPageHeaderFG_Color());
if (cssPrefix != null) {
if (parameterTable != null)
styleBuild.append("."+cssPrefix + "-parameter-table th").append(cssInfo.getCssRule());
styleBuild.append("."+cssPrefix + "-table th").append(cssInfo.getCssRule());
}
else {
if (parameterTable != null)
styleBuild.append("parameter-table th").append(cssInfo.getCssRule());
styleBuild.append("table th").append(cssInfo.getCssRule());
}
cssInfo = new HTMLReportRenderer.CSSInfo(tf.getParameter_Font(), tf.getParameter_Color());
styleBuild.append(".tr-parameter td").append(cssInfo.getCssRule());
cssInfo = new HTMLReportRenderer.CSSInfo(tf.getFunct_Font(), tf.getFunctFG_Color());
styleBuild.append(".tr-function td").append(cssInfo.getCssRule());
MPrintFont printFont = MPrintFont.get(printFormat.getAD_PrintFont_ID());
Font base = printFont.getFont();
Font newFont = new Font(base.getName(), Font.PLAIN, base.getSize()-1);
cssInfo = new HTMLReportRenderer.CSSInfo(newFont, null);
styleBuild.append(".tr-level-1 td").append(cssInfo.getCssRule());
newFont = new Font(base.getName(), Font.PLAIN, base.getSize()-2);
cssInfo = new HTMLReportRenderer.CSSInfo(newFont, null);
styleBuild.append(".tr-level-2 td").append(cssInfo.getCssRule());
styleBuild = new StringBuilder(styleBuild.toString().replaceAll(";", "!important;"));
HTMLReportRenderer.appendInlineCss (doc, styleBuild);
w.print(doc.toString());
w.print("<div class='"+cssPrefix+"-flex-container'>");
String paraWrapId = null;
if (parameterTable != null) {
paraWrapId = cssPrefix + "-para-table-wrap";
w.print("<details id='" + paraWrapId + "' open=true style='cursor:pointer'>");
w.print("<summary style='cursor:pointer'>"+Msg.getMsg(Env.getCtx(), "Parameter")+"</summary>");
w.print(HTMLReportRenderer.compress(parameterTable.toString(), minify));
tr tr = new tr();
tr.setClass("tr-parameter");
MQuery query = reportEngineQuery;
if (reportEngineQuery.getReportProcessQuery() != null)
query = reportEngineQuery.getReportProcessQuery();
for (int r = 0; r < query.getRestrictionCount(); r++)
{
if (r > 0) {
tr = new tr();
tr.setClass("tr-parameter");
}
td td = new td();
tr.addElement(td);
td.addElement(query.getInfoName(r));
td = new td();
tr.addElement(td);
td.addElement(query.getInfoOperator(r));
td = new td();
tr.addElement(td);
td.addElement(query.getInfoDisplayAll(r));
w.print(HTMLReportRenderer.compress(tr.toString(), minify));
}
w.print("</table>");
w.print("</details>");
}
StringBuilder tableWrapDiv = new StringBuilder();
tableWrapDiv.append("<div class='").append(cssPrefix).append("-table-wrap' ");
if (paraWrapId != null) {
String paraWrapGet = "document.getElementById(\""+paraWrapId+"\")";
tableWrapDiv.append("onscroll='setTimeout(() => {if (this.scrollTop > 0) ")
.append(" if(").append(paraWrapGet).append(".open) ")
.append(paraWrapGet).append(".open=false;}, 100)'");
}
tableWrapDiv.append(" >");
w.print(HTMLReportRenderer.compress(tableWrapDiv.toString(), minify));
w.print(HTMLReportRenderer.compress(table.toString(), minify));
}
w.print("<tfoot>");
tr tfoot = new tr();
for (int col = 0; col < printFormat.getItemCount(); col++)
{
MPrintFormatItem item = printFormat.getItem(col);
if (item.isPrinted())
{
th th = new th();
tfoot.addElement(th);
th.setTagText(item.getPrintName(language));
}
}
tfoot.output(w);
w.print("</tfoot>");
thead thead = new thead();
tbody tbody = new tbody();
tbody.setNeedClosingTag(false);
Boolean [] colSuppressRepeats = layout == null || layout.colSuppressRepeats == null? LayoutEngine.getColSuppressRepeats(printFormat):layout.colSuppressRepeats;
Object [] preValues = null;
if (colSuppressRepeats != null){
preValues = new Object [colSuppressRepeats.length];
}
int printColIndex = -1;
HashMap<Integer, th> suppressMap = new HashMap<>();
// for all rows (-1 = header row)
for (int row = -1; row < printData.getRowCount(); row++)
{
tr tr = new tr();
if (row != -1)
{
printData.setRowIndex(row);
if(printData.isFunctionRow())
continue;
if (extension != null && !isExport)
{
extension.extendRowElement(tr, printData);
}
if (printData.isFunctionRow()) {
tr.setClass(cssPrefix + "-functionrow");
} else if ( row < printData.getRowCount() && printData.isFunctionRow(row+1)) {
tr.setClass(cssPrefix + "-lastgrouprow");
}
// add row to table body
//tbody.addElement(tr);
} else {
// add row to table header
thead.addElement(tr);
}
printColIndex = -1;
// for all columns
for (int col = 0; col < columns.size(); col++)
{
Object colObj = columns.get(col);
MPrintFormatItem item = null;
InstanceAttributeColumn instanceAttributeColumn = null;
if (colObj instanceof MPrintFormatItem)
{
item = (MPrintFormatItem) colObj;
}
else if (colObj instanceof InstanceAttributeColumn)
{
instanceAttributeColumn = (InstanceAttributeColumn) colObj;
item = instanceAttributeColumn.getPrintFormatItem();
}
if (item != null)
{
printColIndex++;
// header row
if (row == -1)
{
th th = new th();
tr.addElement(th);
String columnHeader = instanceAttributeColumn != null ? instanceAttributeColumn.getName() : item.getPrintName(language);
th.addElement(Util.maskHTML(columnHeader));
if (cssPrefix != null && instanceAttributeColumn == null)
{
MColumn column = MColumn.get(Env.getCtx(), item.getAD_Column_ID());
if (column != null && column.getAD_Column_ID() > 0)
{
if (DisplayType.isNumeric(column.getAD_Reference_ID()))
{
th.setClass(cssPrefix + "-number");
}
}
}
if (item.isSuppressNull())
{
suppressMap.put(printColIndex, th);
th.setID("report-th-"+printColIndex);
}
// Calculate DateTables Options
if(isDataTableFunctionColumn(item)) {
if(item.isOrderBy())
dataTableOptions.addPrintColumnIndex(FunctionTypes.ORDER_BY, item.isDesc() ? dataTableOptions.DESC_OFFSET + printColIndex : printColIndex);
if(item.isGroupBy())
dataTableOptions.addPrintColumnIndex(FunctionTypes.GROUP_BY, printColIndex);
if(item.isSummarized())
dataTableOptions.addPrintColumnIndex(FunctionTypes.SUM, printColIndex);
if(item.isCounted())
dataTableOptions.addPrintColumnIndex(FunctionTypes.COUNT, printColIndex);
if(item.isMinCalc())
dataTableOptions.addPrintColumnIndex(FunctionTypes.MIN, printColIndex);
if(item.isMaxCalc())
dataTableOptions.addPrintColumnIndex(FunctionTypes.MAX, printColIndex);
if(item.isAveraged())
dataTableOptions.addPrintColumnIndex(FunctionTypes.AVG, printColIndex);
if(item.isDeviationCalc())
dataTableOptions.addPrintColumnIndex(FunctionTypes.DEVIATION, printColIndex);
if(item.isVarianceCalc())
dataTableOptions.addPrintColumnIndex(FunctionTypes.VARIANCE, printColIndex);
}
if(item.getAD_Column_ID() > 0) {
MColumn column = MColumn.get(item.getAD_Column_ID());
String description = column.get_Translation(MElement.COLUMNNAME_Description,language.getAD_Language());
if(!Util.isEmpty(description)) {
th.addAttribute("title", description);
}
}
}
else
{
td td = new td();
tr.addElement(td);
MStyle style = item.getAD_FieldStyle_ID() > 0 ? MStyle.get(Env.getCtx(), item.getAD_FieldStyle_ID()) : null;
Object obj = instanceAttributeColumn != null ? instanceAttributeColumn.getPrintDataElement(row)
: printData.getNodeByPrintFormatItemId(item.getAD_PrintFormatItem_ID());
if (obj == null || !ReportEngine.isDisplayPFItem(printData, item)){
td.addElement("&nbsp;");
if (colSuppressRepeats != null && colSuppressRepeats[printColIndex]){
preValues[printColIndex] = null;
}
if (item.isSuppressNull() && obj != null && suppressMap.containsKey(printColIndex))
suppressMap.remove(printColIndex);
}
else if (obj instanceof PrintDataElement)
{
PrintDataElement pde = (PrintDataElement) obj;
String value = pde.getValueDisplay(language); // formatted
if (colSuppressRepeats != null && colSuppressRepeats[printColIndex]){
if (value.equals(preValues[printColIndex])){
td.addElement("&nbsp;");
continue;
}else{
preValues[printColIndex] = value;
}
}
if (item.isSuppressNull() && obj != null && suppressMap.containsKey(printColIndex))
suppressMap.remove(printColIndex);
if (pde.getColumnName().endsWith("_ID") && extension != null && !isExport)
{
boolean isZoom = false;
if (item.getColumnName().equals("Record_ID")) {
Object tablePDE = printData.getNode("AD_Table_ID");
if (tablePDE != null && tablePDE instanceof PrintDataElement) {
int tableID = -1;
try {
tableID = Integer.parseInt(((PrintDataElement)tablePDE).getValueAsString());
} catch (Exception e) {
tableID = -1;
}
if (tableID > 0) {
MTable mTable = MTable.get(Env.getCtx(), tableID);
String tableName = mTable.getTableName();
value = reportEngine.getIdentifier(mTable, tableName, Integer.parseInt(value));
String foreignColumnName = tableName + "_ID";
pde.setForeignColumnName(foreignColumnName);
isZoom = true;
}
}
} else {
isZoom = true;
}
if (isZoom) {
// check permission on the zoomed window
MTable mTable = MTable.get(Env.getCtx(), pde.getForeignColumnName().substring(0, pde.getForeignColumnName().length()-3));
int Record_ID = -1;
try {
Record_ID = Integer.parseInt(pde.getValueAsString());
} catch (Exception e) {
Record_ID = -1;
}
Boolean canAccess = null;
if (Record_ID >= 0 && mTable != null) {
int AD_Window_ID = Env.getZoomWindowID(mTable.get_ID(), Record_ID);
canAccess = MRole.getDefault().getWindowAccess(AD_Window_ID);
}
if (canAccess == null) {
isZoom = false;
}
}
if (isZoom) {
//link for column
a href = new a("javascript:void(0)");
href.setID(pde.getColumnName() + "_" + row + "_a");
td.addElement(href);
href.addElement(Util.maskHTML(value));
if (cssPrefix != null)
href.setClass(cssPrefix + "-href");
// Set Style
if(style != null && style.isWrapWithSpan())
HTMLReportRenderer.setStyle(printData, href, style);
else
HTMLReportRenderer.setStyle(printData, td, style);
extension.extendIDColumn(row, td, href, pde);
} else {
// Set Style
if(style != null && style.isWrapWithSpan()) {
span span = new span();
HTMLReportRenderer.setStyle(printData, span, style);
span.addElement(Util.maskHTML(value));
td.addElement(span);
}
else {
HTMLReportRenderer.setStyle(printData, td, style);
td.addElement(Util.maskHTML(value));
}
}
}
else
{
// Set Style
if(style != null && style.isWrapWithSpan()) {
span span = new span();
HTMLReportRenderer.setStyle(printData, span, style);
span.addElement(Util.maskHTML(value));
td.addElement(span);
}
else {
HTMLReportRenderer.setStyle(printData, td, style);
td.addElement(Util.maskHTML(value));
}
}
if (cssPrefix != null)
{
if (DisplayType.isNumeric(pde.getDisplayType()))
td.setClass(cssPrefix + "-number");
else if (DisplayType.isDate(pde.getDisplayType()))
td.setClass(cssPrefix + "-date");
else
td.setClass(cssPrefix + "-text");
}
//just run with on record
if (row == 0)
HTMLReportRenderer.addCssInfo(printFormat, item, printColIndex, mapCssInfo);
}
else if (obj instanceof PrintData)
{
// ignore contained Data
}
else
log.log(Level.SEVERE, "Element not PrintData(Element) " + obj.getClass());
}
} // printed
} // for all columns
dataTableOptions.setPrintColLastIndex(printColIndex);
/* output table header */
if (row == -1){
w.print(HTMLReportRenderer.compress(thead.toString(), minify));
// output open of tbody
w.print(HTMLReportRenderer.compress(tbody.toString(), minify));
}else{
// output row by row
w.print(HTMLReportRenderer.compress(tr.toString(), minify));
}
} // for all rows
w.print("</tbody>");
w.print("</table>");
if (suppressMap.size() > 0)
{
StringBuilder st = new StringBuilder();
for(th t : suppressMap.values())
{
if (st.length() > 0)
st.append(",");
st.append("#").append(t.getAttribute("id"));
}
st.append(" {\n\t\tdisplay:none;\n\t}");
style styleTag = new style();
styleTag.addElement(st.toString());
w.print(HTMLReportRenderer.compress(styleTag.toString(), minify));
}
if (!onlyTable)
{
w.print("</div>");
w.print("</div>");
String dataTableOptionString = dataTableOptions.getDataTableOptions("~./web/js");
if( dataTableOptionString != null ) {
w.print("<script type=\"text/javascript\"> ");
w.print(HTMLReportRenderer.compress(
"""
class NumberParser {\s\
constructor(locale) {\
const parts = new Intl.NumberFormat(locale).formatToParts(12345.6);\s\
const numerals = [...new Intl.NumberFormat(locale, {useGrouping: false}).format(9876543210)].reverse();\s\
const index = new Map(numerals.map((d, i) => [d, i]));\s\
let groupValue = parts.find(d => d.type === "group").value;\
this._group = new RegExp(`[${groupValue.charCodeAt(0)==160 ? '&nbsp;' : groupValue}]`, "g");\s\
this._decimal = new RegExp(`[${parts.find(d => d.type === "decimal").value}]`);\s\
this._numeral = new RegExp(`[${numerals.join("")}]`, "g");\s\
\
this._index = d => index.get(d); }\s\
parse(string) {\s\
let retValue = (string = string.trim()\s\
.replace(this._group, "")\s\
.replace(this._decimal, ".")\s\
.replace(this._numeral, this._index)) ? +string : 0;\s\
return Number.isNaN(retValue) ? 0 : retValue;\
} }
""",true));
String jsDataTables = "$(document).ready(function() { "
+ " let t = $('#"+JS_DATA_IDENTIFIER+"').DataTable( " + dataTableOptionString + " ); "
+ " });"
+ " $('#"+JS_DATA_IDENTIFIER+" tfoot th').each(function () {\r\n"
+ " var title = $(this).text();\r\n"
+ " $(this).html('<input type=\"text\" placeholder=\"Search ' + title + '\" />');\r\n" //placeholder=\"Search ' + title + '\"
+ " }); " ;
w.print(jsDataTables);
w.print("</script>");
}
w.print("</body>");
w.print("</html>");
}
w.flush();
w.close();
}
catch (Exception e)
{
log.log(Level.SEVERE, e.getMessage(), e);
throw new AdempiereException(e);
}
} // createHTML
/**
* Is PrintFormat Item Function for DataTables
* @param item
* @return
*/
private boolean isDataTableFunctionColumn(MPrintFormatItem item) {
if(item.isOrderBy()
|| item.isGroupBy()
|| item.isSummarized()
|| item.isCounted()
|| item.isMinCalc()
|| item.isAveraged()
|| item.isDeviationCalc()
|| item.isMaxCalc()
|| item.isVarianceCalc())
return true;
return false;
}
/**
* If isExport, embed script content, otherwise embed script url
* @param doc
* @param isExport
* @throws IOException
* @throws URISyntaxException
*/
private void appendScripts (XhtmlDocument doc, boolean isExport) throws IOException, URISyntaxException{
List<String> urls = Arrays.asList("~./js/datatables/jquery.min.js","~./js/datatables/jquery.floatThead.min.js"
,"~./js/datatables/datatables.js","~./js/datatables/jquery.dataTables.min.js","~./js/datatables/dataTables.rowGroup.min.js");
if (isExport){
// embed script by content
for (String extraScriptPath : urls){
URL url = getClass().getResource(extraScriptPath.replace("~./", "/web/"));
appendInlineScriptContent (doc, readResource(url));
}
} else {
// embed script by link
for (String extraScriptUrl : urls){
embedScriptLink (doc, Executions.encodeURL(extraScriptUrl));
}
}
}
/**
* If isExport, embed css content, otherwise embed css url
* @param doc
* @param isExport
* @throws IOException
* @throws URISyntaxException
*/
private void appendStyles (XhtmlDocument doc, boolean isExport) throws IOException, URISyntaxException{
List<String> urls = Arrays.asList("~./js/datatables/datatables.css");
if (isExport){
// embed css by content
for (String extraStylePath : urls){
URL url = getClass().getResource(extraStylePath.replace("~./", "/web/"));
HTMLReportRenderer.appendInlineCss(doc, readResource(url));
}
} else {
// embed css by link
for (String extraStyleUrl : urls){
embedStyleLink (doc, Executions.encodeURL(extraStyleUrl));
}
}
}
/**
* Read contents from URL
* @param url
* @return contents from URL
* @throws IOException
*/
private StringBuilder readResource(URL url) throws IOException {
StringBuilder builder = new StringBuilder();
InputStream is = url.openStream();
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
String line;
while ((line = reader.readLine()) != null) {
builder.append(line);
}
reader.close();
return builder;
}
/**
* Embed script url into head tag
* @param doc
* @param scriptUrl
*/
protected void embedScriptLink (XhtmlDocument doc, String scriptUrl){
script jslink = new script();
jslink.setLanguage("javascript");
jslink.setSrc(scriptUrl);
doc.appendHead(jslink);
}
/**
* Embed css url into head tag
* @param doc
* @param scriptUrl
*/
protected void embedStyleLink (XhtmlDocument doc, String styleUrl){
link csslink = new link();
csslink.setType("text/css");
csslink.setRel("stylesheet");
csslink.setHref(styleUrl);
doc.appendHead(csslink);
}
/**
* Embed script content into head tag
* @param doc
* @param buildScriptContent
*/
private void appendInlineScriptContent (XhtmlDocument doc, StringBuilder buildScriptContent){
if (buildScriptContent.length() > 0){
buildScriptContent.insert(0, "<script type=\"text/javascript\">\n");
buildScriptContent.append("\n</script>");
doc.appendHead(buildScriptContent.toString());
}
}
}

View File

@ -0,0 +1,141 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.zk.datatable;
import java.io.File;
import java.io.Writer;
import org.compiere.print.IHTMLExtension;
import org.compiere.util.Language;
import org.idempiere.print.renderer.IReportRendererConfiguration;
public class DatatableReportRendererConfiguration implements IReportRendererConfiguration {
public static final String ID = "Datatables";
public static final String FILE_EXTENSION = "datatables.html";
private boolean onlyTable;
private IHTMLExtension extension;
private boolean isExport;
private File file;
private Writer writer;
private Language language;
public DatatableReportRendererConfiguration() {
}
/**
* Is only generate html table instead of full html content
* @return true if only generate html table
*/
public boolean isOnlyTable() {
return onlyTable;
}
/**
* Set only generate html table instead of full html content
* @param onlyTable
*/
public DatatableReportRendererConfiguration setOnlyTable(boolean onlyTable) {
this.onlyTable = onlyTable;
return this;
}
/**
* Get html extension
*/
public IHTMLExtension getExtension() {
return extension;
}
/**
* Set html extension
* @param extension
*/
public DatatableReportRendererConfiguration setExtension(IHTMLExtension extension) {
this.extension = extension;
return this;
}
/**
* Is for export or preview
* @return true for export
*/
public boolean isExport() {
return isExport;
}
/**
* Set for export or preview
* @param isExport
*/
public DatatableReportRendererConfiguration setExport(boolean isExport) {
this.isExport = isExport;
return this;
}
@Override
public File getOutputFile() {
return file;
}
/**
* Set output file
* @param file
*/
public DatatableReportRendererConfiguration setOutputFile(File file) {
this.file = file;
return this;
}
@Override
public Writer getOutputWriter() {
return writer;
}
/**
* Set output writer
* @param writer
*/
public DatatableReportRendererConfiguration setOutputWriter(Writer writer) {
this.writer = writer;
return this;
}
/**
* Set content language
* @param language
*/
public DatatableReportRendererConfiguration setLanguage(Language language) {
this.language = language;
return this;
}
/**
* Get content language
* @return language
*/
public Language getLanguage() {
return language;
}
}

View File

@ -0,0 +1,112 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
package org.idempiere.zk.datatable;
import java.io.File;
import java.util.logging.Level;
import org.adempiere.base.Core;
import org.adempiere.webui.report.HTMLExtension;
import org.adempiere.webui.window.ZkReportViewer;
import org.compiere.print.ReportEngine;
import org.compiere.tools.FileUtil;
import org.compiere.util.CLogger;
import org.idempiere.print.renderer.IReportRenderer;
import org.idempiere.print.renderer.IReportRendererConfiguration;
import org.idempiere.ui.zk.report.IReportViewerRenderer;
import org.osgi.service.component.annotations.Component;
import org.zkoss.util.media.AMedia;
import org.zkoss.zk.ui.Executions;
import com.google.common.net.MediaType;
@Component(service = IReportViewerRenderer.class, immediate = true)
public class DatatableReportViewerRenderer implements IReportViewerRenderer {
private static final CLogger log = CLogger.getCLogger(DatatableReportViewerRenderer.class);
public DatatableReportViewerRenderer() {
}
@Override
public String getId() {
return DatatableReportRendererConfiguration.ID;
}
@Override
public String getExportLabel() {
return getId();
}
@Override
public String getContentType() {
return MediaType.HTML_UTF_8.toString();
}
@Override
public String getFileExtension() {
return DatatableReportRendererConfiguration.FILE_EXTENSION;
}
@Override
public boolean isExport() {
return true;
}
@Override
public boolean isPreview(boolean roleCanExport) {
return true;
}
@Override
public AMedia renderMedia(ZkReportViewer viewer, boolean export) {
ReportEngine reportEngine = viewer.getReportEngine();
try {
String path = System.getProperty("java.io.tmpdir");
String prefix = makePrefix(reportEngine.getName());
if (prefix.length() < 3)
prefix += "_".repeat(3-prefix.length());
if (log.isLoggable(Level.FINE)) log.log(Level.FINE, "Path="+path + " Prefix="+prefix);
File file = FileUtil.createTempFile(prefix, "."+getFileExtension(), new File(path));
String contextPath = Executions.getCurrent().getContextPath();
IReportRenderer<IReportRendererConfiguration> renderer = Core.getReportRenderer(getId());
DatatableReportRendererConfiguration config = new DatatableReportRendererConfiguration()
.setLanguage(reportEngine.getPrintFormat().getLanguage())
.setOutputFile(file)
.setExport(export)
.setExtension(new HTMLExtension(contextPath, "rp", viewer.getUuid()));
renderer.renderReport(reportEngine, config);
return new AMedia(file.getName(), getFileExtension(), getContentType(), file, false);
} catch (Exception e) {
if (e instanceof RuntimeException)
throw (RuntimeException)e;
else
throw new RuntimeException(e);
}
}
@Override
public boolean isSameContentForExportAndPreview() {
return false;
}
}

View File

@ -0,0 +1,26 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
**********************************************************************/
/**
* Provide classes for datatables report viewer renderer
*/
package org.idempiere.zk.datatable;

View File

@ -0,0 +1,28 @@
/*!
SpryMedia Ltd.
This source file is free software, available under the following license:
MIT license - http://datatables.net/license/mit
This source file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
For details please refer to: http://www.datatables.net
RowGroup 1.2.0
©2017-2022 SpryMedia Ltd - datatables.net/license
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(b,c,d){b instanceof String&&(b=String(b));for(var g=b.length,e=0;e<g;e++){var k=b[e];if(c.call(d,k,e,b))return{i:e,v:k}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,d){if(b==Array.prototype||b==Object.prototype)return b;b[c]=d.value;return b};$jscomp.getGlobal=function(b){b=["object"==typeof globalThis&&globalThis,b,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var c=0;c<b.length;++c){var d=b[c];if(d&&d.Math==Math)return d}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(b,c){var d=$jscomp.propertyToPolyfillSymbol[c];if(null==d)return b[c];d=b[d];return void 0!==d?d:b[c]};
$jscomp.polyfill=function(b,c,d,g){c&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(b,c,d,g):$jscomp.polyfillUnisolated(b,c,d,g))};$jscomp.polyfillUnisolated=function(b,c,d,g){d=$jscomp.global;b=b.split(".");for(g=0;g<b.length-1;g++){var e=b[g];if(!(e in d))return;d=d[e]}b=b[b.length-1];g=d[b];c=c(g);c!=g&&null!=c&&$jscomp.defineProperty(d,b,{configurable:!0,writable:!0,value:c})};
$jscomp.polyfillIsolated=function(b,c,d,g){var e=b.split(".");b=1===e.length;g=e[0];g=!b&&g in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var k=0;k<e.length-1;k++){var a=e[k];if(!(a in g))return;g=g[a]}e=e[e.length-1];d=$jscomp.IS_SYMBOL_NATIVE&&"es6"===d?g[e]:null;c=c(d);null!=c&&(b?$jscomp.defineProperty($jscomp.polyfills,e,{configurable:!0,writable:!0,value:c}):c!==d&&($jscomp.propertyToPolyfillSymbol[e]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(e):$jscomp.POLYFILL_PREFIX+e,e=
$jscomp.propertyToPolyfillSymbol[e],$jscomp.defineProperty(g,e,{configurable:!0,writable:!0,value:c})))};$jscomp.polyfill("Array.prototype.find",function(b){return b?b:function(c,d){return $jscomp.findInternal(this,c,d).v}},"es6","es3");
(function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(c){return b(c,window,document)}):"object"===typeof exports?module.exports=function(c,d){c||(c=window);d&&d.fn.dataTable||(d=require("datatables.net")(c,d).$);return b(d,c,c.document)}:b(jQuery,window,document)})(function(b,c,d,g){var e=b.fn.dataTable,k=function(a,f){if(!e.versionCheck||!e.versionCheck("1.10.8"))throw"RowGroup requires DataTables 1.10.8 or newer";this.c=b.extend(!0,{},e.defaults.rowGroup,
k.defaults,f);this.s={dt:new e.Api(a)};this.dom={};a=this.s.dt.settings()[0];if(f=a.rowGroup)return f;a.rowGroup=this;this._constructor()};b.extend(k.prototype,{dataSrc:function(a){if(a===g)return this.c.dataSrc;var f=this.s.dt;this.c.dataSrc=a;b(f.table().node()).triggerHandler("rowgroup-datasrc.dt",[f,a]);return this},disable:function(){this.c.enable=!1;return this},enable:function(a){if(!1===a)return this.disable();this.c.enable=!0;return this},enabled:function(){return this.c.enable},_constructor:function(){var a=
this,f=this.s.dt,h=f.settings()[0];f.on("draw.dtrg",function(m,r){a.c.enable&&h===r&&a._draw()});f.on("column-visibility.dt.dtrg responsive-resize.dt.dtrg",function(){a._adjustColspan()});f.on("destroy",function(){f.off(".dtrg")})},_adjustColspan:function(){b("tr."+this.c.className,this.s.dt.table().body()).find("td:visible").attr("colspan",this._colspan())},_colspan:function(){return this.s.dt.columns().visible().reduce(function(a,f){return a+f},0)},_draw:function(){var a=this._group(0,this.s.dt.rows({page:"current"}).indexes());
this._groupDisplay(0,a)},_group:function(a,f){for(var h=Array.isArray(this.c.dataSrc)?this.c.dataSrc:[this.c.dataSrc],m=e.ext.oApi._fnGetObjectDataFn(h[a]),r=this.s.dt,n,q,p=[],l=0,t=f.length;l<t;l++){var u=f[l];n=r.row(u).data();n=m(n);if(null===n||n===g)n=this.c.emptyDataGroup;if(q===g||n!==q)p.push({dataPoint:n,rows:[]}),q=n;p[p.length-1].rows.push(u)}if(h[a+1]!==g)for(l=0,t=p.length;l<t;l++)p[l].children=this._group(a+1,p[l].rows);return p},_groupDisplay:function(a,f){for(var h=this.s.dt,m,r=
0,n=f.length;r<n;r++){var q=f[r],p=q.dataPoint,l=q.rows;this.c.startRender&&(m=this.c.startRender.call(this,h.rows(l),p,a),(m=this._rowWrap(m,this.c.startClassName,a))&&m.insertBefore(h.row(l[0]).node()));this.c.endRender&&(m=this.c.endRender.call(this,h.rows(l),p,a),(m=this._rowWrap(m,this.c.endClassName,a))&&m.insertAfter(h.row(l[l.length-1]).node()));q.children&&this._groupDisplay(a+1,q.children)}},_rowWrap:function(a,f,h){if(null===a||""===a)a=this.c.emptyDataGroup;return a===g||null===a?null:
("object"===typeof a&&a.nodeName&&"tr"===a.nodeName.toLowerCase()?b(a):a instanceof b&&a.length&&"tr"===a[0].nodeName.toLowerCase()?a:b("<tr/>").append(b("<th/>").attr("colspan",this._colspan()).attr("scope","row").append(a))).addClass(this.c.className).addClass(f).addClass("dtrg-level-"+h)}});k.defaults={className:"dtrg-group",dataSrc:0,emptyDataGroup:"No group",enable:!0,endClassName:"dtrg-end",endRender:null,startClassName:"dtrg-start",startRender:function(a,f){return f}};k.version="1.2.0";b.fn.dataTable.RowGroup=
k;b.fn.DataTable.RowGroup=k;e.Api.register("rowGroup()",function(){return this});e.Api.register("rowGroup().disable()",function(){return this.iterator("table",function(a){a.rowGroup&&a.rowGroup.enable(!1)})});e.Api.register("rowGroup().enable()",function(a){return this.iterator("table",function(f){f.rowGroup&&f.rowGroup.enable(a===g?!0:a)})});e.Api.register("rowGroup().enabled()",function(){var a=this.context;return a.length&&a[0].rowGroup?a[0].rowGroup.enabled():!1});e.Api.register("rowGroup().dataSrc()",
function(a){return a===g?this.context[0].rowGroup.dataSrc():this.iterator("table",function(f){f.rowGroup&&f.rowGroup.dataSrc(a)})});b(d).on("preInit.dt.dtrg",function(a,f,h){"dt"===a.namespace&&(a=f.oInit.rowGroup,h=e.defaults.rowGroup,a||h)&&(h=b.extend({},h,a),!1!==a&&new k(f,h))});return k});

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,521 @@
/*
* This combined file was created by the DataTables downloader builder:
* https://datatables.net/download
*
* To rebuild or modify this file with the latest versions of the included
* software please visit:
* https://datatables.net/download/#dt/dt-1.12.1/b-2.2.3/b-colvis-2.2.3/cr-1.5.6/fh-3.2.4/sp-2.0.2
*
* Included libraries:
* DataTables 1.12.1, Buttons 2.2.3, Column visibility 2.2.3, ColReorder 1.5.6, FixedHeader 3.2.4, SearchPanes 2.0.2
*/
/*!
SpryMedia Ltd.
This source file is free software, available under the following license:
MIT license - http://datatables.net/license
This source file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
For details please refer to: http://www.datatables.net
DataTables 1.12.1
©2008-2022 SpryMedia Ltd - datatables.net/license
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(l,y,A){l instanceof String&&(l=String(l));for(var q=l.length,E=0;E<q;E++){var P=l[E];if(y.call(A,P,E,l))return{i:E,v:P}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(l,y,A){if(l==Array.prototype||l==Object.prototype)return l;l[y]=A.value;return l};$jscomp.getGlobal=function(l){l=["object"==typeof globalThis&&globalThis,l,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var y=0;y<l.length;++y){var A=l[y];if(A&&A.Math==Math)return A}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(l,y){var A=$jscomp.propertyToPolyfillSymbol[y];if(null==A)return l[y];A=l[A];return void 0!==A?A:l[y]};
$jscomp.polyfill=function(l,y,A,q){y&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(l,y,A,q):$jscomp.polyfillUnisolated(l,y,A,q))};$jscomp.polyfillUnisolated=function(l,y,A,q){A=$jscomp.global;l=l.split(".");for(q=0;q<l.length-1;q++){var E=l[q];if(!(E in A))return;A=A[E]}l=l[l.length-1];q=A[l];y=y(q);y!=q&&null!=y&&$jscomp.defineProperty(A,l,{configurable:!0,writable:!0,value:y})};
$jscomp.polyfillIsolated=function(l,y,A,q){var E=l.split(".");l=1===E.length;q=E[0];q=!l&&q in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var P=0;P<E.length-1;P++){var la=E[P];if(!(la in q))return;q=q[la]}E=E[E.length-1];A=$jscomp.IS_SYMBOL_NATIVE&&"es6"===A?q[E]:null;y=y(A);null!=y&&(l?$jscomp.defineProperty($jscomp.polyfills,E,{configurable:!0,writable:!0,value:y}):y!==A&&($jscomp.propertyToPolyfillSymbol[E]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(E):$jscomp.POLYFILL_PREFIX+E,
E=$jscomp.propertyToPolyfillSymbol[E],$jscomp.defineProperty(q,E,{configurable:!0,writable:!0,value:y})))};$jscomp.polyfill("Array.prototype.find",function(l){return l?l:function(y,A){return $jscomp.findInternal(this,y,A).v}},"es6","es3");
(function(l){"function"===typeof define&&define.amd?define(["jquery"],function(y){return l(y,window,document)}):"object"===typeof exports?module.exports=function(y,A){y||(y=window);A||(A="undefined"!==typeof window?require("jquery"):require("jquery")(y));return l(A,y,y.document)}:window.DataTable=l(jQuery,window,document)})(function(l,y,A,q){function E(a){var b,c,d={};l.each(a,function(e,h){(b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" ")&&(c=e.replace(b[0],
b[2].toLowerCase()),d[c]=e,"o"===b[1]&&E(a[e]))});a._hungarianMap=d}function P(a,b,c){a._hungarianMap||E(a);var d;l.each(b,function(e,h){d=a._hungarianMap[e];d===q||!c&&b[d]!==q||("o"===d.charAt(0)?(b[d]||(b[d]={}),l.extend(!0,b[d],b[e]),P(a[d],b[d],c)):b[d]=b[e])})}function la(a){var b=u.defaults.oLanguage,c=b.sDecimal;c&&bb(c);if(a){var d=a.sZeroRecords;!a.sEmptyTable&&d&&"No data available in table"===b.sEmptyTable&&Y(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&d&&"Loading..."===b.sLoadingRecords&&
Y(a,a,"sZeroRecords","sLoadingRecords");a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&c!==a&&bb(a)}}function Db(a){S(a,"ordering","bSort");S(a,"orderMulti","bSortMulti");S(a,"orderClasses","bSortClasses");S(a,"orderCellsTop","bSortCellsTop");S(a,"order","aaSorting");S(a,"orderFixed","aaSortingFixed");S(a,"paging","bPaginate");S(a,"pagingType","sPaginationType");S(a,"pageLength","iDisplayLength");S(a,"searching","bFilter");"boolean"===typeof a.sScrollX&&(a.sScrollX=a.sScrollX?"100%":
"");"boolean"===typeof a.scrollX&&(a.scrollX=a.scrollX?"100%":"");if(a=a.aoSearchCols)for(var b=0,c=a.length;b<c;b++)a[b]&&P(u.models.oSearch,a[b])}function Eb(a){S(a,"orderable","bSortable");S(a,"orderData","aDataSort");S(a,"orderSequence","asSorting");S(a,"orderDataType","sortDataType");var b=a.aDataSort;"number"!==typeof b||Array.isArray(b)||(a.aDataSort=[b])}function Fb(a){if(!u.__browser){var b={};u.__browser=b;var c=l("<div/>").css({position:"fixed",top:0,left:-1*l(y).scrollLeft(),height:1,
width:1,overflow:"hidden"}).append(l("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(l("<div/>").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}l.extend(a.oBrowser,u.__browser);a.oScroll.iBarWidth=u.__browser.barWidth}
function Gb(a,b,c,d,e,h){var f=!1;if(c!==q){var g=c;f=!0}for(;d!==e;)a.hasOwnProperty(d)&&(g=f?b(g,a[d],d,a):a[d],f=!0,d+=h);return g}function cb(a,b){var c=u.defaults.column,d=a.aoColumns.length;c=l.extend({},u.models.oColumn,c,{nTh:b?b:A.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=l.extend({},u.models.oSearch,c[d]);Ia(a,d,l(b).data())}function Ia(a,b,c){b=a.aoColumns[b];
var d=a.oClasses,e=l(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var h=(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);h&&(b.sWidthOrig=h[1])}c!==q&&null!==c&&(Eb(c),P(u.defaults.column,c,!0),c.mDataProp===q||c.mData||(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),c.sClass&&e.addClass(c.sClass),h=b.sClass,l.extend(b,c),Y(b,c,"sWidth","sWidthOrig"),h!==b.sClass&&(b.sClass=h+" "+b.sClass),c.iDataSort!==q&&(b.aDataSort=[c.iDataSort]),
Y(b,c,"aDataSort"));var f=b.mData,g=ma(f),k=b.mRender?ma(b.mRender):null;c=function(m){return"string"===typeof m&&-1!==m.indexOf("@")};b._bAttrSrc=l.isPlainObject(f)&&(c(f.sort)||c(f.type)||c(f.filter));b._setter=null;b.fnGetData=function(m,n,p){var t=g(m,n,q,p);return k&&n?k(t,n,m,p):t};b.fnSetData=function(m,n,p){return ha(f)(m,n,p)};"number"!==typeof f&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==l.inArray("asc",b.asSorting);c=-1!==l.inArray("desc",
b.asSorting);b.bSortable&&(a||c)?a&&!c?(b.sSortingClass=d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI):(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI="")}function sa(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;db(a);for(var c=0,d=b.length;c<d;c++)b[c].nTh.style.width=b[c].sWidth}b=a.oScroll;""===b.sY&&""===b.sX||Ja(a);F(a,null,"column-sizing",
[a])}function ta(a,b){a=Ka(a,"bVisible");return"number"===typeof a[b]?a[b]:null}function ua(a,b){a=Ka(a,"bVisible");b=l.inArray(b,a);return-1!==b?b:null}function na(a){var b=0;l.each(a.aoColumns,function(c,d){d.bVisible&&"none"!==l(d.nTh).css("display")&&b++});return b}function Ka(a,b){var c=[];l.map(a.aoColumns,function(d,e){d[b]&&c.push(e)});return c}function eb(a){var b=a.aoColumns,c=a.aoData,d=u.ext.type.detect,e,h,f;var g=0;for(e=b.length;g<e;g++){var k=b[g];var m=[];if(!k.sType&&k._sManualType)k.sType=
k._sManualType;else if(!k.sType){var n=0;for(h=d.length;n<h;n++){var p=0;for(f=c.length;p<f;p++){m[p]===q&&(m[p]=T(a,p,g,"type"));var t=d[n](m[p],a);if(!t&&n!==d.length-1)break;if("html"===t&&!aa(m[p]))break}if(t){k.sType=t;break}}k.sType||(k.sType="string")}}}function Hb(a,b,c,d){var e,h,f,g=a.aoColumns;if(b)for(e=b.length-1;0<=e;e--){var k=b[e];var m=k.target!==q?k.target:k.targets!==q?k.targets:k.aTargets;Array.isArray(m)||(m=[m]);var n=0;for(h=m.length;n<h;n++)if("number"===typeof m[n]&&0<=m[n]){for(;g.length<=
m[n];)cb(a);d(m[n],k)}else if("number"===typeof m[n]&&0>m[n])d(g.length+m[n],k);else if("string"===typeof m[n]){var p=0;for(f=g.length;p<f;p++)("_all"==m[n]||l(g[p].nTh).hasClass(m[n]))&&d(p,k)}}if(c)for(e=0,a=c.length;e<a;e++)d(e,c[e])}function ia(a,b,c,d){var e=a.aoData.length,h=l.extend(!0,{},u.models.oRow,{src:c?"dom":"data",idx:e});h._aData=b;a.aoData.push(h);for(var f=a.aoColumns,g=0,k=f.length;g<k;g++)f[g].sType=null;a.aiDisplayMaster.push(e);b=a.rowIdFn(b);b!==q&&(a.aIds[b]=h);!c&&a.oFeatures.bDeferRender||
fb(a,e,c,d);return e}function La(a,b){var c;b instanceof l||(b=l(b));return b.map(function(d,e){c=gb(a,e);return ia(a,c.data,e,c.cells)})}function T(a,b,c,d){"search"===d?d="filter":"order"===d&&(d="sort");var e=a.iDraw,h=a.aoColumns[c],f=a.aoData[b]._aData,g=h.sDefaultContent,k=h.fnGetData(f,d,{settings:a,row:b,col:c});if(k===q)return a.iDrawError!=e&&null===g&&(ea(a,0,"Requested unknown parameter "+("function"==typeof h.mData?"{function}":"'"+h.mData+"'")+" for row "+b+", column "+c,4),a.iDrawError=
e),g;if((k===f||null===k)&&null!==g&&d!==q)k=g;else if("function"===typeof k)return k.call(f);if(null===k&&"display"===d)return"";"filter"===d&&(a=u.ext.type.search,a[h.sType]&&(k=a[h.sType](k)));return k}function Ib(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d,{settings:a,row:b,col:c})}function hb(a){return l.map(a.match(/(\\.|[^\.])+/g)||[""],function(b){return b.replace(/\\\./g,".")})}function ib(a){return U(a.aoData,"_aData")}function Ma(a){a.aoData.length=0;a.aiDisplayMaster.length=
0;a.aiDisplay.length=0;a.aIds={}}function Na(a,b,c){for(var d=-1,e=0,h=a.length;e<h;e++)a[e]==b?d=e:a[e]>b&&a[e]--; -1!=d&&c===q&&a.splice(d,1)}function va(a,b,c,d){var e=a.aoData[b],h,f=function(k,m){for(;k.childNodes.length;)k.removeChild(k.firstChild);k.innerHTML=T(a,b,m,"display")};if("dom"!==c&&(c&&"auto"!==c||"dom"!==e.src)){var g=e.anCells;if(g)if(d!==q)f(g[d],d);else for(c=0,h=g.length;c<h;c++)f(g[c],c)}else e._aData=gb(a,e,d,d===q?q:e._aData).data;e._aSortData=null;e._aFilterData=null;f=
a.aoColumns;if(d!==q)f[d].sType=null;else{c=0;for(h=f.length;c<h;c++)f[c].sType=null;jb(a,e)}}function gb(a,b,c,d){var e=[],h=b.firstChild,f,g=0,k,m=a.aoColumns,n=a._rowReadObject;d=d!==q?d:n?{}:[];var p=function(x,w){if("string"===typeof x){var r=x.indexOf("@");-1!==r&&(r=x.substring(r+1),ha(x)(d,w.getAttribute(r)))}},t=function(x){if(c===q||c===g)f=m[g],k=x.innerHTML.trim(),f&&f._bAttrSrc?(ha(f.mData._)(d,k),p(f.mData.sort,x),p(f.mData.type,x),p(f.mData.filter,x)):n?(f._setter||(f._setter=ha(f.mData)),
f._setter(d,k)):d[g]=k;g++};if(h)for(;h;){var v=h.nodeName.toUpperCase();if("TD"==v||"TH"==v)t(h),e.push(h);h=h.nextSibling}else for(e=b.anCells,h=0,v=e.length;h<v;h++)t(e[h]);(b=b.firstChild?b:b.nTr)&&(b=b.getAttribute("id"))&&ha(a.rowId)(d,b);return{data:d,cells:e}}function fb(a,b,c,d){var e=a.aoData[b],h=e._aData,f=[],g,k;if(null===e.nTr){var m=c||A.createElement("tr");e.nTr=m;e.anCells=f;m._DT_RowIndex=b;jb(a,e);var n=0;for(g=a.aoColumns.length;n<g;n++){var p=a.aoColumns[n];e=(k=c?!1:!0)?A.createElement(p.sCellType):
d[n];e._DT_CellIndex={row:b,column:n};f.push(e);if(k||!(!p.mRender&&p.mData===n||l.isPlainObject(p.mData)&&p.mData._===n+".display"))e.innerHTML=T(a,b,n,"display");p.sClass&&(e.className+=" "+p.sClass);p.bVisible&&!c?m.appendChild(e):!p.bVisible&&c&&e.parentNode.removeChild(e);p.fnCreatedCell&&p.fnCreatedCell.call(a.oInstance,e,T(a,b,n),h,b,n)}F(a,"aoRowCreatedCallback",null,[m,h,b,f])}}function jb(a,b){var c=b.nTr,d=b._aData;if(c){if(a=a.rowIdFn(d))c.id=a;d.DT_RowClass&&(a=d.DT_RowClass.split(" "),
b.__rowc=b.__rowc?Oa(b.__rowc.concat(a)):a,l(c).removeClass(b.__rowc.join(" ")).addClass(d.DT_RowClass));d.DT_RowAttr&&l(c).attr(d.DT_RowAttr);d.DT_RowData&&l(c).data(d.DT_RowData)}}function Jb(a){var b,c,d=a.nTHead,e=a.nTFoot,h=0===l("th, td",d).length,f=a.oClasses,g=a.aoColumns;h&&(c=l("<tr/>").appendTo(d));var k=0;for(b=g.length;k<b;k++){var m=g[k];var n=l(m.nTh).addClass(m.sClass);h&&n.appendTo(c);a.oFeatures.bSort&&(n.addClass(m.sSortingClass),!1!==m.bSortable&&(n.attr("tabindex",a.iTabIndex).attr("aria-controls",
a.sTableId),kb(a,m.nTh,k)));m.sTitle!=n[0].innerHTML&&n.html(m.sTitle);lb(a,"header")(a,n,m,f)}h&&wa(a.aoHeader,d);l(d).children("tr").children("th, td").addClass(f.sHeaderTH);l(e).children("tr").children("th, td").addClass(f.sFooterTH);if(null!==e)for(a=a.aoFooter[0],k=0,b=a.length;k<b;k++)m=g[k],m.nTf=a[k].cell,m.sClass&&l(m.nTf).addClass(m.sClass)}function xa(a,b,c){var d,e,h=[],f=[],g=a.aoColumns.length;if(b){c===q&&(c=!1);var k=0;for(d=b.length;k<d;k++){h[k]=b[k].slice();h[k].nTr=b[k].nTr;for(e=
g-1;0<=e;e--)a.aoColumns[e].bVisible||c||h[k].splice(e,1);f.push([])}k=0;for(d=h.length;k<d;k++){if(a=h[k].nTr)for(;e=a.firstChild;)a.removeChild(e);e=0;for(b=h[k].length;e<b;e++){var m=g=1;if(f[k][e]===q){a.appendChild(h[k][e].cell);for(f[k][e]=1;h[k+g]!==q&&h[k][e].cell==h[k+g][e].cell;)f[k+g][e]=1,g++;for(;h[k][e+m]!==q&&h[k][e].cell==h[k][e+m].cell;){for(c=0;c<g;c++)f[k+c][e+m]=1;m++}l(h[k][e].cell).attr("rowspan",g).attr("colspan",m)}}}}}function ja(a,b){var c="ssp"==Q(a),d=a.iInitDisplayStart;
d!==q&&-1!==d&&(a._iDisplayStart=c?d:d>=a.fnRecordsDisplay()?0:d,a.iInitDisplayStart=-1);c=F(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==l.inArray(!1,c))V(a,!1);else{c=[];var e=0;d=a.asStripeClasses;var h=d.length,f=a.oLanguage,g="ssp"==Q(a),k=a.aiDisplay,m=a._iDisplayStart,n=a.fnDisplayEnd();a.bDrawing=!0;if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,V(a,!1);else if(!g)a.iDraw++;else if(!a.bDestroying&&!b){Kb(a);return}if(0!==k.length)for(b=g?a.aoData.length:n,f=g?0:m;f<b;f++){g=k[f];var p=a.aoData[g];
null===p.nTr&&fb(a,g);var t=p.nTr;if(0!==h){var v=d[e%h];p._sRowStripe!=v&&(l(t).removeClass(p._sRowStripe).addClass(v),p._sRowStripe=v)}F(a,"aoRowCallback",null,[t,p._aData,e,f,g]);c.push(t);e++}else e=f.sZeroRecords,1==a.iDraw&&"ajax"==Q(a)?e=f.sLoadingRecords:f.sEmptyTable&&0===a.fnRecordsTotal()&&(e=f.sEmptyTable),c[0]=l("<tr/>",{"class":h?d[0]:""}).append(l("<td />",{valign:"top",colSpan:na(a),"class":a.oClasses.sRowEmpty}).html(e))[0];F(a,"aoHeaderCallback","header",[l(a.nTHead).children("tr")[0],
ib(a),m,n,k]);F(a,"aoFooterCallback","footer",[l(a.nTFoot).children("tr")[0],ib(a),m,n,k]);d=l(a.nTBody);d.children().detach();d.append(l(c));F(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function ka(a,b){var c=a.oFeatures,d=c.bFilter;c.bSort&&Lb(a);d?ya(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;ja(a);a._drawHold=!1}function Mb(a){var b=a.oClasses,c=l(a.nTable);c=l("<div/>").insertBefore(c);var d=a.oFeatures,
e=l("<div/>",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var h=a.sDom.split(""),f,g,k,m,n,p,t=0;t<h.length;t++){f=null;g=h[t];if("<"==g){k=l("<div/>")[0];m=h[t+1];if("'"==m||'"'==m){n="";for(p=2;h[t+p]!=m;)n+=h[t+p],p++;"H"==n?n=b.sJUIHeader:"F"==n&&(n=b.sJUIFooter);-1!=n.indexOf(".")?(m=n.split("."),k.id=m[0].substr(1,m[0].length-1),k.className=m[1]):"#"==n.charAt(0)?k.id=n.substr(1,
n.length-1):k.className=n;t+=p}e.append(k);e=l(k)}else if(">"==g)e=e.parent();else if("l"==g&&d.bPaginate&&d.bLengthChange)f=Nb(a);else if("f"==g&&d.bFilter)f=Ob(a);else if("r"==g&&d.bProcessing)f=Pb(a);else if("t"==g)f=Qb(a);else if("i"==g&&d.bInfo)f=Rb(a);else if("p"==g&&d.bPaginate)f=Sb(a);else if(0!==u.ext.feature.length)for(k=u.ext.feature,p=0,m=k.length;p<m;p++)if(g==k[p].cFeature){f=k[p].fnInit(a);break}f&&(k=a.aanFeatures,k[g]||(k[g]=[]),k[g].push(f),e.append(f))}c.replaceWith(e);a.nHolding=
null}function wa(a,b){b=l(b).children("tr");var c,d,e;a.splice(0,a.length);var h=0;for(e=b.length;h<e;h++)a.push([]);h=0;for(e=b.length;h<e;h++){var f=b[h];for(c=f.firstChild;c;){if("TD"==c.nodeName.toUpperCase()||"TH"==c.nodeName.toUpperCase()){var g=1*c.getAttribute("colspan");var k=1*c.getAttribute("rowspan");g=g&&0!==g&&1!==g?g:1;k=k&&0!==k&&1!==k?k:1;var m=0;for(d=a[h];d[m];)m++;var n=m;var p=1===g?!0:!1;for(d=0;d<g;d++)for(m=0;m<k;m++)a[h+m][n+d]={cell:c,unique:p},a[h+m].nTr=f}c=c.nextSibling}}}
function Pa(a,b,c){var d=[];c||(c=a.aoHeader,b&&(c=[],wa(c,b)));b=0;for(var e=c.length;b<e;b++)for(var h=0,f=c[b].length;h<f;h++)!c[b][h].unique||d[h]&&a.bSortCellsTop||(d[h]=c[b][h].cell);return d}function Qa(a,b,c){F(a,"aoServerParams","serverParams",[b]);if(b&&Array.isArray(b)){var d={},e=/(.*?)\[\]$/;l.each(b,function(n,p){(n=p.name.match(e))?(n=n[0],d[n]||(d[n]=[]),d[n].push(p.value)):d[p.name]=p.value});b=d}var h=a.ajax,f=a.oInstance,g=function(n){var p=a.jqXHR?a.jqXHR.status:null;if(null===
n||"number"===typeof p&&204==p)n={},za(a,n,[]);(p=n.error||n.sError)&&ea(a,0,p);a.json=n;F(a,null,"xhr",[a,n,a.jqXHR]);c(n)};if(l.isPlainObject(h)&&h.data){var k=h.data;var m="function"===typeof k?k(b,a):k;b="function"===typeof k&&m?m:l.extend(!0,b,m);delete h.data}m={data:b,success:g,dataType:"json",cache:!1,type:a.sServerMethod,error:function(n,p,t){t=F(a,null,"xhr",[a,null,a.jqXHR]);-1===l.inArray(!0,t)&&("parsererror"==p?ea(a,0,"Invalid JSON response",1):4===n.readyState&&ea(a,0,"Ajax error",
7));V(a,!1)}};a.oAjaxData=b;F(a,null,"preXhr",[a,b]);a.fnServerData?a.fnServerData.call(f,a.sAjaxSource,l.map(b,function(n,p){return{name:p,value:n}}),g,a):a.sAjaxSource||"string"===typeof h?a.jqXHR=l.ajax(l.extend(m,{url:h||a.sAjaxSource})):"function"===typeof h?a.jqXHR=h.call(f,b,g,a):(a.jqXHR=l.ajax(l.extend(m,h)),h.data=k)}function Kb(a){a.iDraw++;V(a,!0);Qa(a,Tb(a),function(b){Ub(a,b)})}function Tb(a){var b=a.aoColumns,c=b.length,d=a.oFeatures,e=a.oPreviousSearch,h=a.aoPreSearchCols,f=[],g=oa(a);
var k=a._iDisplayStart;var m=!1!==d.bPaginate?a._iDisplayLength:-1;var n=function(x,w){f.push({name:x,value:w})};n("sEcho",a.iDraw);n("iColumns",c);n("sColumns",U(b,"sName").join(","));n("iDisplayStart",k);n("iDisplayLength",m);var p={draw:a.iDraw,columns:[],order:[],start:k,length:m,search:{value:e.sSearch,regex:e.bRegex}};for(k=0;k<c;k++){var t=b[k];var v=h[k];m="function"==typeof t.mData?"function":t.mData;p.columns.push({data:m,name:t.sName,searchable:t.bSearchable,orderable:t.bSortable,search:{value:v.sSearch,
regex:v.bRegex}});n("mDataProp_"+k,m);d.bFilter&&(n("sSearch_"+k,v.sSearch),n("bRegex_"+k,v.bRegex),n("bSearchable_"+k,t.bSearchable));d.bSort&&n("bSortable_"+k,t.bSortable)}d.bFilter&&(n("sSearch",e.sSearch),n("bRegex",e.bRegex));d.bSort&&(l.each(g,function(x,w){p.order.push({column:w.col,dir:w.dir});n("iSortCol_"+x,w.col);n("sSortDir_"+x,w.dir)}),n("iSortingCols",g.length));b=u.ext.legacy.ajax;return null===b?a.sAjaxSource?f:p:b?f:p}function Ub(a,b){var c=function(f,g){return b[f]!==q?b[f]:b[g]},
d=za(a,b),e=c("sEcho","draw"),h=c("iTotalRecords","recordsTotal");c=c("iTotalDisplayRecords","recordsFiltered");if(e!==q){if(1*e<a.iDraw)return;a.iDraw=1*e}d||(d=[]);Ma(a);a._iRecordsTotal=parseInt(h,10);a._iRecordsDisplay=parseInt(c,10);e=0;for(h=d.length;e<h;e++)ia(a,d[e]);a.aiDisplay=a.aiDisplayMaster.slice();ja(a,!0);a._bInitComplete||Ra(a,b);V(a,!1)}function za(a,b,c){a=l.isPlainObject(a.ajax)&&a.ajax.dataSrc!==q?a.ajax.dataSrc:a.sAjaxDataProp;if(!c)return"data"===a?b.aaData||b[a]:""!==a?ma(a)(b):
b;ha(a)(b,c)}function Ob(a){var b=a.oClasses,c=a.sTableId,d=a.oLanguage,e=a.oPreviousSearch,h=a.aanFeatures,f='<input type="search" class="'+b.sFilterInput+'"/>',g=d.sSearch;g=g.match(/_INPUT_/)?g.replace("_INPUT_",f):g+f;b=l("<div/>",{id:h.f?null:c+"_filter","class":b.sFilter}).append(l("<label/>").append(g));var k=function(n){var p=this.value?this.value:"";e.return&&"Enter"!==n.key||p==e.sSearch||(ya(a,{sSearch:p,bRegex:e.bRegex,bSmart:e.bSmart,bCaseInsensitive:e.bCaseInsensitive,"return":e.return}),
a._iDisplayStart=0,ja(a))};h=null!==a.searchDelay?a.searchDelay:"ssp"===Q(a)?400:0;var m=l("input",b).val(e.sSearch).attr("placeholder",d.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",h?mb(k,h):k).on("mouseup",function(n){setTimeout(function(){k.call(m[0],n)},10)}).on("keypress.DT",function(n){if(13==n.keyCode)return!1}).attr("aria-controls",c);l(a.nTable).on("search.dt.DT",function(n,p){if(a===p)try{m[0]!==A.activeElement&&m.val(e.sSearch)}catch(t){}});return b[0]}function ya(a,
b,c){var d=a.oPreviousSearch,e=a.aoPreSearchCols,h=function(g){d.sSearch=g.sSearch;d.bRegex=g.bRegex;d.bSmart=g.bSmart;d.bCaseInsensitive=g.bCaseInsensitive;d.return=g.return},f=function(g){return g.bEscapeRegex!==q?!g.bEscapeRegex:g.bRegex};eb(a);if("ssp"!=Q(a)){Vb(a,b.sSearch,c,f(b),b.bSmart,b.bCaseInsensitive,b.return);h(b);for(b=0;b<e.length;b++)Wb(a,e[b].sSearch,b,f(e[b]),e[b].bSmart,e[b].bCaseInsensitive);Xb(a)}else h(b);a.bFiltered=!0;F(a,null,"search",[a])}function Xb(a){for(var b=u.ext.search,
c=a.aiDisplay,d,e,h=0,f=b.length;h<f;h++){for(var g=[],k=0,m=c.length;k<m;k++)e=c[k],d=a.aoData[e],b[h](a,d._aFilterData,e,d._aData,k)&&g.push(e);c.length=0;l.merge(c,g)}}function Wb(a,b,c,d,e,h){if(""!==b){var f=[],g=a.aiDisplay;d=nb(b,d,e,h);for(e=0;e<g.length;e++)b=a.aoData[g[e]]._aFilterData[c],d.test(b)&&f.push(g[e]);a.aiDisplay=f}}function Vb(a,b,c,d,e,h){e=nb(b,d,e,h);var f=a.oPreviousSearch.sSearch,g=a.aiDisplayMaster;h=[];0!==u.ext.search.length&&(c=!0);var k=Yb(a);if(0>=b.length)a.aiDisplay=
g.slice();else{if(k||c||d||f.length>b.length||0!==b.indexOf(f)||a.bSorted)a.aiDisplay=g.slice();b=a.aiDisplay;for(c=0;c<b.length;c++)e.test(a.aoData[b[c]]._sFilterRow)&&h.push(b[c]);a.aiDisplay=h}}function nb(a,b,c,d){a=b?a:ob(a);c&&(a="^(?=.*?"+l.map(a.match(/"[^"]+"|[^ ]+/g)||[""],function(e){if('"'===e.charAt(0)){var h=e.match(/^"(.*)"$/);e=h?h[1]:e}return e.replace('"',"")}).join(")(?=.*?")+").*$");return new RegExp(a,d?"i":"")}function Yb(a){var b=a.aoColumns,c,d;var e=!1;var h=0;for(c=a.aoData.length;h<
c;h++){var f=a.aoData[h];if(!f._aFilterData){var g=[];e=0;for(d=b.length;e<d;e++){var k=b[e];k.bSearchable?(k=T(a,h,e,"filter"),null===k&&(k=""),"string"!==typeof k&&k.toString&&(k=k.toString())):k="";k.indexOf&&-1!==k.indexOf("&")&&(Sa.innerHTML=k,k=Bc?Sa.textContent:Sa.innerText);k.replace&&(k=k.replace(/[\r\n\u2028]/g,""));g.push(k)}f._aFilterData=g;f._sFilterRow=g.join(" ");e=!0}}return e}function Zb(a){return{search:a.sSearch,smart:a.bSmart,regex:a.bRegex,caseInsensitive:a.bCaseInsensitive}}
function $b(a){return{sSearch:a.search,bSmart:a.smart,bRegex:a.regex,bCaseInsensitive:a.caseInsensitive}}function Rb(a){var b=a.sTableId,c=a.aanFeatures.i,d=l("<div/>",{"class":a.oClasses.sInfo,id:c?null:b+"_info"});c||(a.aoDrawCallback.push({fn:ac,sName:"information"}),d.attr("role","status").attr("aria-live","polite"),l(a.nTable).attr("aria-describedby",b+"_info"));return d[0]}function ac(a){var b=a.aanFeatures.i;if(0!==b.length){var c=a.oLanguage,d=a._iDisplayStart+1,e=a.fnDisplayEnd(),h=a.fnRecordsTotal(),
f=a.fnRecordsDisplay(),g=f?c.sInfo:c.sInfoEmpty;f!==h&&(g+=" "+c.sInfoFiltered);g+=c.sInfoPostFix;g=bc(a,g);c=c.fnInfoCallback;null!==c&&(g=c.call(a.oInstance,a,d,e,h,f,g));l(b).html(g)}}function bc(a,b){var c=a.fnFormatNumber,d=a._iDisplayStart+1,e=a._iDisplayLength,h=a.fnRecordsDisplay(),f=-1===e;return b.replace(/_START_/g,c.call(a,d)).replace(/_END_/g,c.call(a,a.fnDisplayEnd())).replace(/_MAX_/g,c.call(a,a.fnRecordsTotal())).replace(/_TOTAL_/g,c.call(a,h)).replace(/_PAGE_/g,c.call(a,f?1:Math.ceil(d/
e))).replace(/_PAGES_/g,c.call(a,f?1:Math.ceil(h/e)))}function Aa(a){var b=a.iInitDisplayStart,c=a.aoColumns;var d=a.oFeatures;var e=a.bDeferLoading;if(a.bInitialised){Mb(a);Jb(a);xa(a,a.aoHeader);xa(a,a.aoFooter);V(a,!0);d.bAutoWidth&&db(a);var h=0;for(d=c.length;h<d;h++){var f=c[h];f.sWidth&&(f.nTh.style.width=K(f.sWidth))}F(a,null,"preInit",[a]);ka(a);c=Q(a);if("ssp"!=c||e)"ajax"==c?Qa(a,[],function(g){var k=za(a,g);for(h=0;h<k.length;h++)ia(a,k[h]);a.iInitDisplayStart=b;ka(a);V(a,!1);Ra(a,g)},
a):(V(a,!1),Ra(a))}else setTimeout(function(){Aa(a)},200)}function Ra(a,b){a._bInitComplete=!0;(b||a.oInit.aaData)&&sa(a);F(a,null,"plugin-init",[a,b]);F(a,"aoInitComplete","init",[a,b])}function pb(a,b){b=parseInt(b,10);a._iDisplayLength=b;qb(a);F(a,null,"length",[a,b])}function Nb(a){var b=a.oClasses,c=a.sTableId,d=a.aLengthMenu,e=Array.isArray(d[0]),h=e?d[0]:d;d=e?d[1]:d;e=l("<select/>",{name:c+"_length","aria-controls":c,"class":b.sLengthSelect});for(var f=0,g=h.length;f<g;f++)e[0][f]=new Option("number"===
typeof d[f]?a.fnFormatNumber(d[f]):d[f],h[f]);var k=l("<div><label/></div>").addClass(b.sLength);a.aanFeatures.l||(k[0].id=c+"_length");k.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));l("select",k).val(a._iDisplayLength).on("change.DT",function(m){pb(a,l(this).val());ja(a)});l(a.nTable).on("length.dt.DT",function(m,n,p){a===n&&l("select",k).val(p)});return k[0]}function Sb(a){var b=a.sPaginationType,c=u.ext.pager[b],d="function"===typeof c,e=function(f){ja(f)};b=l("<div/>").addClass(a.oClasses.sPaging+
b)[0];var h=a.aanFeatures;d||c.fnInit(a,b,e);h.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(f){if(d){var g=f._iDisplayStart,k=f._iDisplayLength,m=f.fnRecordsDisplay(),n=-1===k;g=n?0:Math.ceil(g/k);k=n?1:Math.ceil(m/k);m=c(g,k);var p;n=0;for(p=h.p.length;n<p;n++)lb(f,"pageButton")(f,h.p[n],n,m,g,k)}else c.fnUpdate(f,e)},sName:"pagination"}));return b}function Ta(a,b,c){var d=a._iDisplayStart,e=a._iDisplayLength,h=a.fnRecordsDisplay();0===h||-1===e?d=0:"number"===typeof b?(d=b*
e,d>h&&(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==b?d+e<h&&(d+=e):"last"==b?d=Math.floor((h-1)/e)*e:ea(a,0,"Unknown paging action: "+b,5);b=a._iDisplayStart!==d;a._iDisplayStart=d;b&&(F(a,null,"page",[a]),c&&ja(a));return b}function Pb(a){return l("<div/>",{id:a.aanFeatures.r?null:a.sTableId+"_processing","class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).append("<div><div></div><div></div><div></div><div></div></div>").insertBefore(a.nTable)[0]}function V(a,
b){a.oFeatures.bProcessing&&l(a.aanFeatures.r).css("display",b?"block":"none");F(a,null,"processing",[a,b])}function Qb(a){var b=l(a.nTable),c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY,h=a.oClasses,f=b.children("caption"),g=f.length?f[0]._captionSide:null,k=l(b[0].cloneNode(!1)),m=l(b[0].cloneNode(!1)),n=b.children("tfoot");n.length||(n=null);k=l("<div/>",{"class":h.sScrollWrapper}).append(l("<div/>",{"class":h.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,
width:d?d?K(d):null:"100%"}).append(l("<div/>",{"class":h.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner||"100%"}).append(k.removeAttr("id").css("margin-left",0).append("top"===g?f:null).append(b.children("thead"))))).append(l("<div/>",{"class":h.sScrollBody}).css({position:"relative",overflow:"auto",width:d?K(d):null}).append(b));n&&k.append(l("<div/>",{"class":h.sScrollFoot}).css({overflow:"hidden",border:0,width:d?d?K(d):null:"100%"}).append(l("<div/>",{"class":h.sScrollFootInner}).append(m.removeAttr("id").css("margin-left",
0).append("bottom"===g?f:null).append(b.children("tfoot")))));b=k.children();var p=b[0];h=b[1];var t=n?b[2]:null;if(d)l(h).on("scroll.DT",function(v){v=this.scrollLeft;p.scrollLeft=v;n&&(t.scrollLeft=v)});l(h).css("max-height",e);c.bCollapse||l(h).css("height",e);a.nScrollHead=p;a.nScrollBody=h;a.nScrollFoot=t;a.aoDrawCallback.push({fn:Ja,sName:"scrolling"});return k[0]}function Ja(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY;b=b.iBarWidth;var h=l(a.nScrollHead),f=h[0].style,g=h.children("div"),k=
g[0].style,m=g.children("table");g=a.nScrollBody;var n=l(g),p=g.style,t=l(a.nScrollFoot).children("div"),v=t.children("table"),x=l(a.nTHead),w=l(a.nTable),r=w[0],C=r.style,G=a.nTFoot?l(a.nTFoot):null,ba=a.oBrowser,L=ba.bScrollOversize;U(a.aoColumns,"nTh");var O=[],I=[],H=[],fa=[],Z,Ba=function(D){D=D.style;D.paddingTop="0";D.paddingBottom="0";D.borderTopWidth="0";D.borderBottomWidth="0";D.height=0};var X=g.scrollHeight>g.clientHeight;if(a.scrollBarVis!==X&&a.scrollBarVis!==q)a.scrollBarVis=X,sa(a);
else{a.scrollBarVis=X;w.children("thead, tfoot").remove();if(G){X=G.clone().prependTo(w);var ca=G.find("tr");var Ca=X.find("tr");X.find("[id]").removeAttr("id")}var Ua=x.clone().prependTo(w);x=x.find("tr");X=Ua.find("tr");Ua.find("th, td").removeAttr("tabindex");Ua.find("[id]").removeAttr("id");c||(p.width="100%",h[0].style.width="100%");l.each(Pa(a,Ua),function(D,W){Z=ta(a,D);W.style.width=a.aoColumns[Z].sWidth});G&&da(function(D){D.style.width=""},Ca);h=w.outerWidth();""===c?(C.width="100%",L&&
(w.find("tbody").height()>g.offsetHeight||"scroll"==n.css("overflow-y"))&&(C.width=K(w.outerWidth()-b)),h=w.outerWidth()):""!==d&&(C.width=K(d),h=w.outerWidth());da(Ba,X);da(function(D){var W=y.getComputedStyle?y.getComputedStyle(D).width:K(l(D).width());H.push(D.innerHTML);O.push(W)},X);da(function(D,W){D.style.width=O[W]},x);l(X).css("height",0);G&&(da(Ba,Ca),da(function(D){fa.push(D.innerHTML);I.push(K(l(D).css("width")))},Ca),da(function(D,W){D.style.width=I[W]},ca),l(Ca).height(0));da(function(D,
W){D.innerHTML='<div class="dataTables_sizing">'+H[W]+"</div>";D.childNodes[0].style.height="0";D.childNodes[0].style.overflow="hidden";D.style.width=O[W]},X);G&&da(function(D,W){D.innerHTML='<div class="dataTables_sizing">'+fa[W]+"</div>";D.childNodes[0].style.height="0";D.childNodes[0].style.overflow="hidden";D.style.width=I[W]},Ca);Math.round(w.outerWidth())<Math.round(h)?(ca=g.scrollHeight>g.offsetHeight||"scroll"==n.css("overflow-y")?h+b:h,L&&(g.scrollHeight>g.offsetHeight||"scroll"==n.css("overflow-y"))&&
(C.width=K(ca-b)),""!==c&&""===d||ea(a,1,"Possible column misalignment",6)):ca="100%";p.width=K(ca);f.width=K(ca);G&&(a.nScrollFoot.style.width=K(ca));!e&&L&&(p.height=K(r.offsetHeight+b));c=w.outerWidth();m[0].style.width=K(c);k.width=K(c);d=w.height()>g.clientHeight||"scroll"==n.css("overflow-y");e="padding"+(ba.bScrollbarLeft?"Left":"Right");k[e]=d?b+"px":"0px";G&&(v[0].style.width=K(c),t[0].style.width=K(c),t[0].style[e]=d?b+"px":"0px");w.children("colgroup").insertBefore(w.children("thead"));
n.trigger("scroll");!a.bSorted&&!a.bFiltered||a._drawHold||(g.scrollTop=0)}}function da(a,b,c){for(var d=0,e=0,h=b.length,f,g;e<h;){f=b[e].firstChild;for(g=c?c[e].firstChild:null;f;)1===f.nodeType&&(c?a(f,g,d):a(f,d),d++),f=f.nextSibling,g=c?g.nextSibling:null;e++}}function db(a){var b=a.nTable,c=a.aoColumns,d=a.oScroll,e=d.sY,h=d.sX,f=d.sXInner,g=c.length,k=Ka(a,"bVisible"),m=l("th",a.nTHead),n=b.getAttribute("width"),p=b.parentNode,t=!1,v,x=a.oBrowser;d=x.bScrollOversize;(v=b.style.width)&&-1!==
v.indexOf("%")&&(n=v);for(v=0;v<k.length;v++){var w=c[k[v]];null!==w.sWidth&&(w.sWidth=cc(w.sWidthOrig,p),t=!0)}if(d||!t&&!h&&!e&&g==na(a)&&g==m.length)for(v=0;v<g;v++)k=ta(a,v),null!==k&&(c[k].sWidth=K(m.eq(v).width()));else{g=l(b).clone().css("visibility","hidden").removeAttr("id");g.find("tbody tr").remove();var r=l("<tr/>").appendTo(g.find("tbody"));g.find("thead, tfoot").remove();g.append(l(a.nTHead).clone()).append(l(a.nTFoot).clone());g.find("tfoot th, tfoot td").css("width","");m=Pa(a,g.find("thead")[0]);
for(v=0;v<k.length;v++)w=c[k[v]],m[v].style.width=null!==w.sWidthOrig&&""!==w.sWidthOrig?K(w.sWidthOrig):"",w.sWidthOrig&&h&&l(m[v]).append(l("<div/>").css({width:w.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(a.aoData.length)for(v=0;v<k.length;v++)t=k[v],w=c[t],l(dc(a,t)).clone(!1).append(w.sContentPadding).appendTo(r);l("[name]",g).removeAttr("name");w=l("<div/>").css(h||e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(g).appendTo(p);h&&f?g.width(f):h?
(g.css("width","auto"),g.removeAttr("width"),g.width()<p.clientWidth&&n&&g.width(p.clientWidth)):e?g.width(p.clientWidth):n&&g.width(n);for(v=e=0;v<k.length;v++)p=l(m[v]),f=p.outerWidth()-p.width(),p=x.bBounding?Math.ceil(m[v].getBoundingClientRect().width):p.outerWidth(),e+=p,c[k[v]].sWidth=K(p-f);b.style.width=K(e);w.remove()}n&&(b.style.width=K(n));!n&&!h||a._reszEvt||(b=function(){l(y).on("resize.DT-"+a.sInstance,mb(function(){sa(a)}))},d?setTimeout(b,1E3):b(),a._reszEvt=!0)}function cc(a,b){if(!a)return 0;
a=l("<div/>").css("width",K(a)).appendTo(b||A.body);b=a[0].offsetWidth;a.remove();return b}function dc(a,b){var c=ec(a,b);if(0>c)return null;var d=a.aoData[c];return d.nTr?d.anCells[b]:l("<td/>").html(T(a,c,b,"display"))[0]}function ec(a,b){for(var c,d=-1,e=-1,h=0,f=a.aoData.length;h<f;h++)c=T(a,h,b,"display")+"",c=c.replace(Cc,""),c=c.replace(/&nbsp;/g," "),c.length>d&&(d=c.length,e=h);return e}function K(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function oa(a){var b=
[],c=a.aoColumns;var d=a.aaSortingFixed;var e=l.isPlainObject(d);var h=[];var f=function(n){n.length&&!Array.isArray(n[0])?h.push(n):l.merge(h,n)};Array.isArray(d)&&f(d);e&&d.pre&&f(d.pre);f(a.aaSorting);e&&d.post&&f(d.post);for(a=0;a<h.length;a++){var g=h[a][0];f=c[g].aDataSort;d=0;for(e=f.length;d<e;d++){var k=f[d];var m=c[k].sType||"string";h[a]._idx===q&&(h[a]._idx=l.inArray(h[a][1],c[k].asSorting));b.push({src:g,col:k,dir:h[a][1],index:h[a]._idx,type:m,formatter:u.ext.type.order[m+"-pre"]})}}return b}
function Lb(a){var b,c=[],d=u.ext.type.order,e=a.aoData,h=0,f=a.aiDisplayMaster;eb(a);var g=oa(a);var k=0;for(b=g.length;k<b;k++){var m=g[k];m.formatter&&h++;fc(a,m.col)}if("ssp"!=Q(a)&&0!==g.length){k=0;for(b=f.length;k<b;k++)c[f[k]]=k;h===g.length?f.sort(function(n,p){var t,v=g.length,x=e[n]._aSortData,w=e[p]._aSortData;for(t=0;t<v;t++){var r=g[t];var C=x[r.col];var G=w[r.col];C=C<G?-1:C>G?1:0;if(0!==C)return"asc"===r.dir?C:-C}C=c[n];G=c[p];return C<G?-1:C>G?1:0}):f.sort(function(n,p){var t,v=g.length,
x=e[n]._aSortData,w=e[p]._aSortData;for(t=0;t<v;t++){var r=g[t];var C=x[r.col];var G=w[r.col];r=d[r.type+"-"+r.dir]||d["string-"+r.dir];C=r(C,G);if(0!==C)return C}C=c[n];G=c[p];return C<G?-1:C>G?1:0})}a.bSorted=!0}function gc(a){var b=a.aoColumns,c=oa(a);a=a.oLanguage.oAria;for(var d=0,e=b.length;d<e;d++){var h=b[d];var f=h.asSorting;var g=h.ariaTitle||h.sTitle.replace(/<.*?>/g,"");var k=h.nTh;k.removeAttribute("aria-sort");h.bSortable&&(0<c.length&&c[0].col==d?(k.setAttribute("aria-sort","asc"==
c[0].dir?"ascending":"descending"),h=f[c[0].index+1]||f[0]):h=f[0],g+="asc"===h?a.sSortAscending:a.sSortDescending);k.setAttribute("aria-label",g)}}function rb(a,b,c,d){var e=a.aaSorting,h=a.aoColumns[b].asSorting,f=function(g,k){var m=g._idx;m===q&&(m=l.inArray(g[1],h));return m+1<h.length?m+1:k?null:0};"number"===typeof e[0]&&(e=a.aaSorting=[e]);c&&a.oFeatures.bSortMulti?(c=l.inArray(b,U(e,"0")),-1!==c?(b=f(e[c],!0),null===b&&1===e.length&&(b=0),null===b?e.splice(c,1):(e[c][1]=h[b],e[c]._idx=b)):
(e.push([b,h[0],0]),e[e.length-1]._idx=0)):e.length&&e[0][0]==b?(b=f(e[0]),e.length=1,e[0][1]=h[b],e[0]._idx=b):(e.length=0,e.push([b,h[0]]),e[0]._idx=0);ka(a);"function"==typeof d&&d(a)}function kb(a,b,c,d){var e=a.aoColumns[c];sb(b,{},function(h){!1!==e.bSortable&&(a.oFeatures.bProcessing?(V(a,!0),setTimeout(function(){rb(a,c,h.shiftKey,d);"ssp"!==Q(a)&&V(a,!1)},0)):rb(a,c,h.shiftKey,d))})}function Va(a){var b=a.aLastSort,c=a.oClasses.sSortColumn,d=oa(a),e=a.oFeatures,h;if(e.bSort&&e.bSortClasses){e=
0;for(h=b.length;e<h;e++){var f=b[e].src;l(U(a.aoData,"anCells",f)).removeClass(c+(2>e?e+1:3))}e=0;for(h=d.length;e<h;e++)f=d[e].src,l(U(a.aoData,"anCells",f)).addClass(c+(2>e?e+1:3))}a.aLastSort=d}function fc(a,b){var c=a.aoColumns[b],d=u.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,ua(a,b)));for(var h,f=u.ext.type.order[c.sType+"-pre"],g=0,k=a.aoData.length;g<k;g++)if(c=a.aoData[g],c._aSortData||(c._aSortData=[]),!c._aSortData[b]||d)h=d?e[g]:T(a,g,b,"sort"),c._aSortData[b]=f?f(h):h}
function Da(a){if(!a._bLoadingState){var b={time:+new Date,start:a._iDisplayStart,length:a._iDisplayLength,order:l.extend(!0,[],a.aaSorting),search:Zb(a.oPreviousSearch),columns:l.map(a.aoColumns,function(c,d){return{visible:c.bVisible,search:Zb(a.aoPreSearchCols[d])}})};a.oSavedState=b;F(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.oFeatures.bStateSave&&!a.bDestroying&&a.fnStateSaveCallback.call(a.oInstance,a,b)}}function hc(a,b,c){if(a.oFeatures.bStateSave)return b=a.fnStateLoadCallback.call(a.oInstance,
a,function(d){tb(a,d,c)}),b!==q&&tb(a,b,c),!0;c()}function tb(a,b,c){var d,e=a.aoColumns;a._bLoadingState=!0;var h=a._bInitComplete?new u.Api(a):null;if(b&&b.time){var f=F(a,"aoStateLoadParams","stateLoadParams",[a,b]);if(-1!==l.inArray(!1,f))a._bLoadingState=!1;else if(f=a.iStateDuration,0<f&&b.time<+new Date-1E3*f)a._bLoadingState=!1;else if(b.columns&&e.length!==b.columns.length)a._bLoadingState=!1;else{a.oLoadedState=l.extend(!0,{},b);b.length!==q&&(h?h.page.len(b.length):a._iDisplayLength=b.length);
b.start!==q&&(null===h?(a._iDisplayStart=b.start,a.iInitDisplayStart=b.start):Ta(a,b.start/a._iDisplayLength));b.order!==q&&(a.aaSorting=[],l.each(b.order,function(k,m){a.aaSorting.push(m[0]>=e.length?[0,m[1]]:m)}));b.search!==q&&l.extend(a.oPreviousSearch,$b(b.search));if(b.columns){f=0;for(d=b.columns.length;f<d;f++){var g=b.columns[f];g.visible!==q&&(h?h.column(f).visible(g.visible,!1):e[f].bVisible=g.visible);g.search!==q&&l.extend(a.aoPreSearchCols[f],$b(g.search))}h&&h.columns.adjust()}a._bLoadingState=
!1;F(a,"aoStateLoaded","stateLoaded",[a,b])}}else a._bLoadingState=!1;c()}function Wa(a){var b=u.settings;a=l.inArray(a,U(b,"nTable"));return-1!==a?b[a]:null}function ea(a,b,c,d){c="DataTables warning: "+(a?"table id="+a.sTableId+" - ":"")+c;d&&(c+=". For more information about this error, please see http://datatables.net/tn/"+d);if(b)y.console&&console.log&&console.log(c);else if(b=u.ext,b=b.sErrMode||b.errMode,a&&F(a,null,"error",[a,d,c]),"alert"==b)alert(c);else{if("throw"==b)throw Error(c);"function"==
typeof b&&b(a,d,c)}}function Y(a,b,c,d){Array.isArray(c)?l.each(c,function(e,h){Array.isArray(h)?Y(a,b,h[0],h[1]):Y(a,b,h)}):(d===q&&(d=c),b[c]!==q&&(a[d]=b[c]))}function ub(a,b,c){var d;for(d in b)if(b.hasOwnProperty(d)){var e=b[d];l.isPlainObject(e)?(l.isPlainObject(a[d])||(a[d]={}),l.extend(!0,a[d],e)):c&&"data"!==d&&"aaData"!==d&&Array.isArray(e)?a[d]=e.slice():a[d]=e}return a}function sb(a,b,c){l(a).on("click.DT",b,function(d){l(a).trigger("blur");c(d)}).on("keypress.DT",b,function(d){13===d.which&&
(d.preventDefault(),c(d))}).on("selectstart.DT",function(){return!1})}function R(a,b,c,d){c&&a[b].push({fn:c,sName:d})}function F(a,b,c,d){var e=[];b&&(e=l.map(a[b].slice().reverse(),function(h,f){return h.fn.apply(a.oInstance,d)}));null!==c&&(b=l.Event(c+".dt"),l(a.nTable).trigger(b,d),e.push(b.result));return e}function qb(a){var b=a._iDisplayStart,c=a.fnDisplayEnd(),d=a._iDisplayLength;b>=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function lb(a,b){a=a.renderer;var c=u.ext.renderer[b];
return l.isPlainObject(a)&&a[b]?c[a[b]]||c._:"string"===typeof a?c[a]||c._:c._}function Q(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function Ea(a,b){var c=ic.numbers_length,d=Math.floor(c/2);b<=c?a=pa(0,b):a<=d?(a=pa(0,c-2),a.push("ellipsis"),a.push(b-1)):(a>=b-1-d?a=pa(b-(c-2),b):(a=pa(a-d+2,a+d-1),a.push("ellipsis"),a.push(b-1)),a.splice(0,0,"ellipsis"),a.splice(0,0,0));a.DT_el="span";return a}function bb(a){l.each({num:function(b){return Xa(b,a)},"num-fmt":function(b){return Xa(b,
a,vb)},"html-num":function(b){return Xa(b,a,Ya)},"html-num-fmt":function(b){return Xa(b,a,Ya,vb)}},function(b,c){M.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(M.type.search[b+a]=M.type.search.html)})}function jc(a,b,c,d,e){return y.moment?a[b](e):y.luxon?a[c](e):d?a[d](e):a}function Za(a,b,c){if(y.moment){var d=y.moment.utc(a,b,c,!0);if(!d.isValid())return null}else if(y.luxon){d=b?y.luxon.DateTime.fromFormat(a,b):y.luxon.DateTime.fromISO(a);if(!d.isValid)return null;d.setLocale(c)}else b?(kc||
alert("DataTables warning: Formatted date without Moment.js or Luxon - https://datatables.net/tn/17"),kc=!0):d=new Date(a);return d}function wb(a){return function(b,c,d,e){0===arguments.length?(d="en",b=c=null):1===arguments.length?(d="en",c=b,b=null):2===arguments.length&&(d=c,c=b,b=null);var h="datetime-"+c;u.ext.type.order[h]||(u.ext.type.detect.unshift(function(f){return f===h?h:!1}),u.ext.type.order[h+"-asc"]=function(f,g){f=f.valueOf();g=g.valueOf();return f===g?0:f<g?-1:1},u.ext.type.order[h+
"-desc"]=function(f,g){f=f.valueOf();g=g.valueOf();return f===g?0:f>g?-1:1});return function(f,g){if(null===f||f===q)"--now"===e?(f=new Date,f=new Date(Date.UTC(f.getFullYear(),f.getMonth(),f.getDate(),f.getHours(),f.getMinutes(),f.getSeconds()))):f="";if("type"===g)return h;if(""===f)return"sort"!==g?"":Za("0000-01-01 00:00:00",null,d);if(null!==c&&b===c&&"sort"!==g&&"type"!==g&&!(f instanceof Date))return f;var k=Za(f,b,d);if(null===k)return f;if("sort"===g)return k;f=null===c?jc(k,"toDate","toJSDate",
"")[a]():jc(k,"format","toFormat","toISOString",c);return"display"===g?$a(f):f}}}function lc(a){return function(){var b=[Wa(this[u.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return u.ext.internal[a].apply(this,b)}}var u=function(a,b){if(this instanceof u)return l(a).DataTable(b);b=a;this.$=function(f,g){return this.api(!0).$(f,g)};this._=function(f,g){return this.api(!0).rows(f,g).data()};this.api=function(f){return f?new B(Wa(this[M.iApiIndex])):new B(this)};this.fnAddData=function(f,
g){var k=this.api(!0);f=Array.isArray(f)&&(Array.isArray(f[0])||l.isPlainObject(f[0]))?k.rows.add(f):k.row.add(f);(g===q||g)&&k.draw();return f.flatten().toArray()};this.fnAdjustColumnSizing=function(f){var g=this.api(!0).columns.adjust(),k=g.settings()[0],m=k.oScroll;f===q||f?g.draw(!1):(""!==m.sX||""!==m.sY)&&Ja(k)};this.fnClearTable=function(f){var g=this.api(!0).clear();(f===q||f)&&g.draw()};this.fnClose=function(f){this.api(!0).row(f).child.hide()};this.fnDeleteRow=function(f,g,k){var m=this.api(!0);
f=m.rows(f);var n=f.settings()[0],p=n.aoData[f[0][0]];f.remove();g&&g.call(this,n,p);(k===q||k)&&m.draw();return p};this.fnDestroy=function(f){this.api(!0).destroy(f)};this.fnDraw=function(f){this.api(!0).draw(f)};this.fnFilter=function(f,g,k,m,n,p){n=this.api(!0);null===g||g===q?n.search(f,k,m,p):n.column(g).search(f,k,m,p);n.draw()};this.fnGetData=function(f,g){var k=this.api(!0);if(f!==q){var m=f.nodeName?f.nodeName.toLowerCase():"";return g!==q||"td"==m||"th"==m?k.cell(f,g).data():k.row(f).data()||
null}return k.data().toArray()};this.fnGetNodes=function(f){var g=this.api(!0);return f!==q?g.row(f).node():g.rows().nodes().flatten().toArray()};this.fnGetPosition=function(f){var g=this.api(!0),k=f.nodeName.toUpperCase();return"TR"==k?g.row(f).index():"TD"==k||"TH"==k?(f=g.cell(f).index(),[f.row,f.columnVisible,f.column]):null};this.fnIsOpen=function(f){return this.api(!0).row(f).child.isShown()};this.fnOpen=function(f,g,k){return this.api(!0).row(f).child(g,k).show().child()[0]};this.fnPageChange=
function(f,g){f=this.api(!0).page(f);(g===q||g)&&f.draw(!1)};this.fnSetColumnVis=function(f,g,k){f=this.api(!0).column(f).visible(g);(k===q||k)&&f.columns.adjust().draw()};this.fnSettings=function(){return Wa(this[M.iApiIndex])};this.fnSort=function(f){this.api(!0).order(f).draw()};this.fnSortListener=function(f,g,k){this.api(!0).order.listener(f,g,k)};this.fnUpdate=function(f,g,k,m,n){var p=this.api(!0);k===q||null===k?p.row(g).data(f):p.cell(g,k).data(f);(n===q||n)&&p.columns.adjust();(m===q||m)&&
p.draw();return 0};this.fnVersionCheck=M.fnVersionCheck;var c=this,d=b===q,e=this.length;d&&(b={});this.oApi=this.internal=M.internal;for(var h in u.ext.internal)h&&(this[h]=lc(h));this.each(function(){var f={},g=1<e?ub(f,b,!0):b,k=0,m;f=this.getAttribute("id");var n=!1,p=u.defaults,t=l(this);if("table"!=this.nodeName.toLowerCase())ea(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{Db(p);Eb(p.column);P(p,p,!0);P(p.column,p.column,!0);P(p,l.extend(g,t.data()),!0);var v=u.settings;
k=0;for(m=v.length;k<m;k++){var x=v[k];if(x.nTable==this||x.nTHead&&x.nTHead.parentNode==this||x.nTFoot&&x.nTFoot.parentNode==this){var w=g.bRetrieve!==q?g.bRetrieve:p.bRetrieve;if(d||w)return x.oInstance;if(g.bDestroy!==q?g.bDestroy:p.bDestroy){x.oInstance.fnDestroy();break}else{ea(x,0,"Cannot reinitialise DataTable",3);return}}if(x.sTableId==this.id){v.splice(k,1);break}}if(null===f||""===f)this.id=f="DataTables_Table_"+u.ext._unique++;var r=l.extend(!0,{},u.models.oSettings,{sDestroyWidth:t[0].style.width,
sInstance:f,sTableId:f});r.nTable=this;r.oApi=c.internal;r.oInit=g;v.push(r);r.oInstance=1===c.length?c:t.dataTable();Db(g);la(g.oLanguage);g.aLengthMenu&&!g.iDisplayLength&&(g.iDisplayLength=Array.isArray(g.aLengthMenu[0])?g.aLengthMenu[0][0]:g.aLengthMenu[0]);g=ub(l.extend(!0,{},p),g);Y(r.oFeatures,g,"bPaginate bLengthChange bFilter bSort bSortMulti bInfo bProcessing bAutoWidth bSortClasses bServerSide bDeferRender".split(" "));Y(r,g,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod",
"aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]);Y(r.oScroll,g,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]);Y(r.oLanguage,g,"fnInfoCallback");
R(r,"aoDrawCallback",g.fnDrawCallback,"user");R(r,"aoServerParams",g.fnServerParams,"user");R(r,"aoStateSaveParams",g.fnStateSaveParams,"user");R(r,"aoStateLoadParams",g.fnStateLoadParams,"user");R(r,"aoStateLoaded",g.fnStateLoaded,"user");R(r,"aoRowCallback",g.fnRowCallback,"user");R(r,"aoRowCreatedCallback",g.fnCreatedRow,"user");R(r,"aoHeaderCallback",g.fnHeaderCallback,"user");R(r,"aoFooterCallback",g.fnFooterCallback,"user");R(r,"aoInitComplete",g.fnInitComplete,"user");R(r,"aoPreDrawCallback",
g.fnPreDrawCallback,"user");r.rowIdFn=ma(g.rowId);Fb(r);var C=r.oClasses;l.extend(C,u.ext.classes,g.oClasses);t.addClass(C.sTable);r.iInitDisplayStart===q&&(r.iInitDisplayStart=g.iDisplayStart,r._iDisplayStart=g.iDisplayStart);null!==g.iDeferLoading&&(r.bDeferLoading=!0,f=Array.isArray(g.iDeferLoading),r._iRecordsDisplay=f?g.iDeferLoading[0]:g.iDeferLoading,r._iRecordsTotal=f?g.iDeferLoading[1]:g.iDeferLoading);var G=r.oLanguage;l.extend(!0,G,g.oLanguage);G.sUrl?(l.ajax({dataType:"json",url:G.sUrl,
success:function(I){P(p.oLanguage,I);la(I);l.extend(!0,G,I,r.oInit.oLanguage);F(r,null,"i18n",[r]);Aa(r)},error:function(){Aa(r)}}),n=!0):F(r,null,"i18n",[r]);null===g.asStripeClasses&&(r.asStripeClasses=[C.sStripeOdd,C.sStripeEven]);f=r.asStripeClasses;var ba=t.children("tbody").find("tr").eq(0);-1!==l.inArray(!0,l.map(f,function(I,H){return ba.hasClass(I)}))&&(l("tbody tr",this).removeClass(f.join(" ")),r.asDestroyStripes=f.slice());f=[];v=this.getElementsByTagName("thead");0!==v.length&&(wa(r.aoHeader,
v[0]),f=Pa(r));if(null===g.aoColumns)for(v=[],k=0,m=f.length;k<m;k++)v.push(null);else v=g.aoColumns;k=0;for(m=v.length;k<m;k++)cb(r,f?f[k]:null);Hb(r,g.aoColumnDefs,v,function(I,H){Ia(r,I,H)});if(ba.length){var L=function(I,H){return null!==I.getAttribute("data-"+H)?H:null};l(ba[0]).children("th, td").each(function(I,H){var fa=r.aoColumns[I];if(fa.mData===I){var Z=L(H,"sort")||L(H,"order");H=L(H,"filter")||L(H,"search");if(null!==Z||null!==H)fa.mData={_:I+".display",sort:null!==Z?I+".@data-"+Z:q,
type:null!==Z?I+".@data-"+Z:q,filter:null!==H?I+".@data-"+H:q},Ia(r,I)}})}var O=r.oFeatures;f=function(){if(g.aaSorting===q){var I=r.aaSorting;k=0;for(m=I.length;k<m;k++)I[k][1]=r.aoColumns[k].asSorting[0]}Va(r);O.bSort&&R(r,"aoDrawCallback",function(){if(r.bSorted){var Z=oa(r),Ba={};l.each(Z,function(X,ca){Ba[ca.src]=ca.dir});F(r,null,"order",[r,Z,Ba]);gc(r)}});R(r,"aoDrawCallback",function(){(r.bSorted||"ssp"===Q(r)||O.bDeferRender)&&Va(r)},"sc");I=t.children("caption").each(function(){this._captionSide=
l(this).css("caption-side")});var H=t.children("thead");0===H.length&&(H=l("<thead/>").appendTo(t));r.nTHead=H[0];var fa=t.children("tbody");0===fa.length&&(fa=l("<tbody/>").insertAfter(H));r.nTBody=fa[0];H=t.children("tfoot");0===H.length&&0<I.length&&(""!==r.oScroll.sX||""!==r.oScroll.sY)&&(H=l("<tfoot/>").appendTo(t));0===H.length||0===H.children().length?t.addClass(C.sNoFooter):0<H.length&&(r.nTFoot=H[0],wa(r.aoFooter,r.nTFoot));if(g.aaData)for(k=0;k<g.aaData.length;k++)ia(r,g.aaData[k]);else(r.bDeferLoading||
"dom"==Q(r))&&La(r,l(r.nTBody).children("tr"));r.aiDisplay=r.aiDisplayMaster.slice();r.bInitialised=!0;!1===n&&Aa(r)};R(r,"aoDrawCallback",Da,"state_save");g.bStateSave?(O.bStateSave=!0,hc(r,g,f)):f()}});c=null;return this},M,z,J,xb={},mc=/[\r\n\u2028]/g,Ya=/<.*?>/g,Dc=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,Ec=/(\/|\.|\*|\+|\?|\||\(|\)|\[|\]|\{|\}|\\|\$|\^|\-)/g,vb=/['\u00A0,$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,aa=function(a){return a&&!0!==a&&"-"!==
a?!1:!0},nc=function(a){var b=parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},oc=function(a,b){xb[b]||(xb[b]=new RegExp(ob(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(xb[b],"."):a},yb=function(a,b,c){var d="string"===typeof a;if(aa(a))return!0;b&&d&&(a=oc(a,b));c&&d&&(a=a.replace(vb,""));return!isNaN(parseFloat(a))&&isFinite(a)},pc=function(a,b,c){return aa(a)?!0:aa(a)||"string"===typeof a?yb(a.replace(Ya,""),b,c)?!0:null:null},U=function(a,b,c){var d=[],e=0,h=a.length;
if(c!==q)for(;e<h;e++)a[e]&&a[e][b]&&d.push(a[e][b][c]);else for(;e<h;e++)a[e]&&d.push(a[e][b]);return d},Fa=function(a,b,c,d){var e=[],h=0,f=b.length;if(d!==q)for(;h<f;h++)a[b[h]][c]&&e.push(a[b[h]][c][d]);else for(;h<f;h++)e.push(a[b[h]][c]);return e},pa=function(a,b){var c=[];if(b===q){b=0;var d=a}else d=b,b=a;for(a=b;a<d;a++)c.push(a);return c},qc=function(a){for(var b=[],c=0,d=a.length;c<d;c++)a[c]&&b.push(a[c]);return b},Oa=function(a){a:{if(!(2>a.length)){var b=a.slice().sort();for(var c=b[0],
d=1,e=b.length;d<e;d++){if(b[d]===c){b=!1;break a}c=b[d]}}b=!0}if(b)return a.slice();b=[];e=a.length;var h,f=0;d=0;a:for(;d<e;d++){c=a[d];for(h=0;h<f;h++)if(b[h]===c)continue a;b.push(c);f++}return b},rc=function(a,b){if(Array.isArray(b))for(var c=0;c<b.length;c++)rc(a,b[c]);else a.push(b);return a},sc=function(a,b){b===q&&(b=0);return-1!==this.indexOf(a,b)};Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});Array.prototype.includes||(Array.prototype.includes=
sc);String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")});String.prototype.includes||(String.prototype.includes=sc);u.util={throttle:function(a,b){var c=b!==q?b:200,d,e;return function(){var h=this,f=+new Date,g=arguments;d&&f<d+c?(clearTimeout(e),e=setTimeout(function(){d=q;a.apply(h,g)},c)):(d=f,a.apply(h,g))}},escapeRegex:function(a){return a.replace(Ec,"\\$1")},set:function(a){if(l.isPlainObject(a))return u.util.set(a._);if(null===
a)return function(){};if("function"===typeof a)return function(c,d,e){a(c,"set",d,e)};if("string"!==typeof a||-1===a.indexOf(".")&&-1===a.indexOf("[")&&-1===a.indexOf("("))return function(c,d){c[a]=d};var b=function(c,d,e){e=hb(e);var h=e[e.length-1];for(var f,g,k=0,m=e.length-1;k<m;k++){if("__proto__"===e[k]||"constructor"===e[k])throw Error("Cannot set prototype values");f=e[k].match(Ga);g=e[k].match(qa);if(f){e[k]=e[k].replace(Ga,"");c[e[k]]=[];h=e.slice();h.splice(0,k+1);f=h.join(".");if(Array.isArray(d))for(g=
0,m=d.length;g<m;g++)h={},b(h,d[g],f),c[e[k]].push(h);else c[e[k]]=d;return}g&&(e[k]=e[k].replace(qa,""),c=c[e[k]](d));if(null===c[e[k]]||c[e[k]]===q)c[e[k]]={};c=c[e[k]]}if(h.match(qa))c[h.replace(qa,"")](d);else c[h.replace(Ga,"")]=d};return function(c,d){return b(c,d,a)}},get:function(a){if(l.isPlainObject(a)){var b={};l.each(a,function(d,e){e&&(b[d]=u.util.get(e))});return function(d,e,h,f){var g=b[e]||b._;return g!==q?g(d,e,h,f):d}}if(null===a)return function(d){return d};if("function"===typeof a)return function(d,
e,h,f){return a(d,e,h,f)};if("string"!==typeof a||-1===a.indexOf(".")&&-1===a.indexOf("[")&&-1===a.indexOf("("))return function(d,e){return d[a]};var c=function(d,e,h){if(""!==h){var f=hb(h);for(var g=0,k=f.length;g<k;g++){h=f[g].match(Ga);var m=f[g].match(qa);if(h){f[g]=f[g].replace(Ga,"");""!==f[g]&&(d=d[f[g]]);m=[];f.splice(0,g+1);f=f.join(".");if(Array.isArray(d))for(g=0,k=d.length;g<k;g++)m.push(c(d[g],e,f));d=h[0].substring(1,h[0].length-1);d=""===d?m:m.join(d);break}else if(m){f[g]=f[g].replace(qa,
"");d=d[f[g]]();continue}if(null===d||d[f[g]]===q)return q;d=d[f[g]]}}return d};return function(d,e){return c(d,e,a)}}};var S=function(a,b,c){a[b]!==q&&(a[c]=a[b])},Ga=/\[.*?\]$/,qa=/\(\)$/,ma=u.util.get,ha=u.util.set,ob=u.util.escapeRegex,Sa=l("<div>")[0],Bc=Sa.textContent!==q,Cc=/<.*?>/g,mb=u.util.throttle,tc=[],N=Array.prototype,Fc=function(a){var b,c=u.settings,d=l.map(c,function(h,f){return h.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase()){var e=
l.inArray(a,d);return-1!==e?[c[e]]:null}if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===typeof a?b=l(a):a instanceof l&&(b=a)}else return[];if(b)return b.map(function(h){e=l.inArray(this,d);return-1!==e?c[e]:null}).toArray()};var B=function(a,b){if(!(this instanceof B))return new B(a,b);var c=[],d=function(f){(f=Fc(f))&&c.push.apply(c,f)};if(Array.isArray(a))for(var e=0,h=a.length;e<h;e++)d(a[e]);else d(a);this.context=Oa(c);b&&l.merge(this,b);this.selector={rows:null,
cols:null,opts:null};B.extend(this,this,tc)};u.Api=B;l.extend(B.prototype,{any:function(){return 0!==this.count()},concat:N.concat,context:[],count:function(){return this.flatten().length},each:function(a){for(var b=0,c=this.length;b<c;b++)a.call(this,this[b],b,this);return this},eq:function(a){var b=this.context;return b.length>a?new B(b[a],this[a]):null},filter:function(a){var b=[];if(N.filter)b=N.filter.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)a.call(this,this[c],c,this)&&b.push(this[c]);
return new B(this.context,b)},flatten:function(){var a=[];return new B(this.context,a.concat.apply(a,this.toArray()))},join:N.join,indexOf:N.indexOf||function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1},iterator:function(a,b,c,d){var e=[],h,f,g=this.context,k,m=this.selector;"string"===typeof a&&(d=c,c=b,b=a,a=!1);var n=0;for(h=g.length;n<h;n++){var p=new B(g[n]);if("table"===b){var t=c.call(p,g[n],n);t!==q&&e.push(t)}else if("columns"===b||"rows"===b)t=c.call(p,g[n],
this[n],n),t!==q&&e.push(t);else if("column"===b||"column-rows"===b||"row"===b||"cell"===b){var v=this[n];"column-rows"===b&&(k=ab(g[n],m.opts));var x=0;for(f=v.length;x<f;x++)t=v[x],t="cell"===b?c.call(p,g[n],t.row,t.column,n,x):c.call(p,g[n],t,n,x,k),t!==q&&e.push(t)}}return e.length||d?(a=new B(g,a?e.concat.apply([],e):e),b=a.selector,b.rows=m.rows,b.cols=m.cols,b.opts=m.opts,a):this},lastIndexOf:N.lastIndexOf||function(a,b){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,
map:function(a){var b=[];if(N.map)b=N.map.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)b.push(a.call(this,this[c],c));return new B(this.context,b)},pluck:function(a){var b=u.util.get(a);return this.map(function(c){return b(c)})},pop:N.pop,push:N.push,reduce:N.reduce||function(a,b){return Gb(this,a,b,0,this.length,1)},reduceRight:N.reduceRight||function(a,b){return Gb(this,a,b,this.length-1,-1,-1)},reverse:N.reverse,selector:null,shift:N.shift,slice:function(){return new B(this.context,
this)},sort:N.sort,splice:N.splice,toArray:function(){return N.slice.call(this)},to$:function(){return l(this)},toJQuery:function(){return l(this)},unique:function(){return new B(this.context,Oa(this))},unshift:N.unshift});B.extend=function(a,b,c){if(c.length&&b&&(b instanceof B||b.__dt_wrapper)){var d,e=function(g,k,m){return function(){var n=k.apply(g,arguments);B.extend(n,n,m.methodExt);return n}};var h=0;for(d=c.length;h<d;h++){var f=c[h];b[f.name]="function"===f.type?e(a,f.val,f):"object"===
f.type?{}:f.val;b[f.name].__dt_wrapper=!0;B.extend(a,b[f.name],f.propExt)}}};B.register=z=function(a,b){if(Array.isArray(a))for(var c=0,d=a.length;c<d;c++)B.register(a[c],b);else{d=a.split(".");var e=tc,h;a=0;for(c=d.length;a<c;a++){var f=(h=-1!==d[a].indexOf("()"))?d[a].replace("()",""):d[a];a:{var g=0;for(var k=e.length;g<k;g++)if(e[g].name===f){g=e[g];break a}g=null}g||(g={name:f,val:{},methodExt:[],propExt:[],type:"object"},e.push(g));a===c-1?(g.val=b,g.type="function"===typeof b?"function":l.isPlainObject(b)?
"object":"other"):e=h?g.methodExt:g.propExt}}};B.registerPlural=J=function(a,b,c){B.register(a,c);B.register(b,function(){var d=c.apply(this,arguments);return d===this?this:d instanceof B?d.length?Array.isArray(d[0])?new B(d.context,d[0]):d[0]:q:d})};var uc=function(a,b){if(Array.isArray(a))return l.map(a,function(d){return uc(d,b)});if("number"===typeof a)return[b[a]];var c=l.map(b,function(d,e){return d.nTable});return l(c).filter(a).map(function(d){d=l.inArray(this,c);return b[d]}).toArray()};
z("tables()",function(a){return a!==q&&null!==a?new B(uc(a,this.context)):this});z("table()",function(a){a=this.tables(a);var b=a.context;return b.length?new B(b[0]):a});J("tables().nodes()","table().node()",function(){return this.iterator("table",function(a){return a.nTable},1)});J("tables().body()","table().body()",function(){return this.iterator("table",function(a){return a.nTBody},1)});J("tables().header()","table().header()",function(){return this.iterator("table",function(a){return a.nTHead},
1)});J("tables().footer()","table().footer()",function(){return this.iterator("table",function(a){return a.nTFoot},1)});J("tables().containers()","table().container()",function(){return this.iterator("table",function(a){return a.nTableWrapper},1)});z("draw()",function(a){return this.iterator("table",function(b){"page"===a?ja(b):("string"===typeof a&&(a="full-hold"===a?!1:!0),ka(b,!1===a))})});z("page()",function(a){return a===q?this.page.info().page:this.iterator("table",function(b){Ta(b,a)})});z("page.info()",
function(a){if(0===this.context.length)return q;a=this.context[0];var b=a._iDisplayStart,c=a.oFeatures.bPaginate?a._iDisplayLength:-1,d=a.fnRecordsDisplay(),e=-1===c;return{page:e?0:Math.floor(b/c),pages:e?1:Math.ceil(d/c),start:b,end:a.fnDisplayEnd(),length:c,recordsTotal:a.fnRecordsTotal(),recordsDisplay:d,serverSide:"ssp"===Q(a)}});z("page.len()",function(a){return a===q?0!==this.context.length?this.context[0]._iDisplayLength:q:this.iterator("table",function(b){pb(b,a)})});var vc=function(a,b,
c){if(c){var d=new B(a);d.one("draw",function(){c(d.ajax.json())})}if("ssp"==Q(a))ka(a,b);else{V(a,!0);var e=a.jqXHR;e&&4!==e.readyState&&e.abort();Qa(a,[],function(h){Ma(a);h=za(a,h);for(var f=0,g=h.length;f<g;f++)ia(a,h[f]);ka(a,b);V(a,!1)})}};z("ajax.json()",function(){var a=this.context;if(0<a.length)return a[0].json});z("ajax.params()",function(){var a=this.context;if(0<a.length)return a[0].oAjaxData});z("ajax.reload()",function(a,b){return this.iterator("table",function(c){vc(c,!1===b,a)})});
z("ajax.url()",function(a){var b=this.context;if(a===q){if(0===b.length)return q;b=b[0];return b.ajax?l.isPlainObject(b.ajax)?b.ajax.url:b.ajax:b.sAjaxSource}return this.iterator("table",function(c){l.isPlainObject(c.ajax)?c.ajax.url=a:c.ajax=a})});z("ajax.url().load()",function(a,b){return this.iterator("table",function(c){vc(c,!1===b,a)})});var zb=function(a,b,c,d,e){var h=[],f,g,k;var m=typeof b;b&&"string"!==m&&"function"!==m&&b.length!==q||(b=[b]);m=0;for(g=b.length;m<g;m++){var n=b[m]&&b[m].split&&
!b[m].match(/[\[\(:]/)?b[m].split(","):[b[m]];var p=0;for(k=n.length;p<k;p++)(f=c("string"===typeof n[p]?n[p].trim():n[p]))&&f.length&&(h=h.concat(f))}a=M.selector[a];if(a.length)for(m=0,g=a.length;m<g;m++)h=a[m](d,e,h);return Oa(h)},Ab=function(a){a||(a={});a.filter&&a.search===q&&(a.search=a.filter);return l.extend({search:"none",order:"current",page:"all"},a)},Bb=function(a){for(var b=0,c=a.length;b<c;b++)if(0<a[b].length)return a[0]=a[b],a[0].length=1,a.length=1,a.context=[a.context[b]],a;a.length=
0;return a},ab=function(a,b){var c=[],d=a.aiDisplay;var e=a.aiDisplayMaster;var h=b.search;var f=b.order;b=b.page;if("ssp"==Q(a))return"removed"===h?[]:pa(0,e.length);if("current"==b)for(f=a._iDisplayStart,a=a.fnDisplayEnd();f<a;f++)c.push(d[f]);else if("current"==f||"applied"==f)if("none"==h)c=e.slice();else if("applied"==h)c=d.slice();else{if("removed"==h){var g={};f=0;for(a=d.length;f<a;f++)g[d[f]]=null;c=l.map(e,function(k){return g.hasOwnProperty(k)?null:k})}}else if("index"==f||"original"==
f)for(f=0,a=a.aoData.length;f<a;f++)"none"==h?c.push(f):(e=l.inArray(f,d),(-1===e&&"removed"==h||0<=e&&"applied"==h)&&c.push(f));return c},Gc=function(a,b,c){var d;return zb("row",b,function(e){var h=nc(e),f=a.aoData;if(null!==h&&!c)return[h];d||(d=ab(a,c));if(null!==h&&-1!==l.inArray(h,d))return[h];if(null===e||e===q||""===e)return d;if("function"===typeof e)return l.map(d,function(k){var m=f[k];return e(k,m._aData,m.nTr)?k:null});if(e.nodeName){h=e._DT_RowIndex;var g=e._DT_CellIndex;if(h!==q)return f[h]&&
f[h].nTr===e?[h]:[];if(g)return f[g.row]&&f[g.row].nTr===e.parentNode?[g.row]:[];h=l(e).closest("*[data-dt-row]");return h.length?[h.data("dt-row")]:[]}if("string"===typeof e&&"#"===e.charAt(0)&&(h=a.aIds[e.replace(/^#/,"")],h!==q))return[h.idx];h=qc(Fa(a.aoData,d,"nTr"));return l(h).filter(e).map(function(){return this._DT_RowIndex}).toArray()},a,c)};z("rows()",function(a,b){a===q?a="":l.isPlainObject(a)&&(b=a,a="");b=Ab(b);var c=this.iterator("table",function(d){return Gc(d,a,b)},1);c.selector.rows=
a;c.selector.opts=b;return c});z("rows().nodes()",function(){return this.iterator("row",function(a,b){return a.aoData[b].nTr||q},1)});z("rows().data()",function(){return this.iterator(!0,"rows",function(a,b){return Fa(a.aoData,b,"_aData")},1)});J("rows().cache()","row().cache()",function(a){return this.iterator("row",function(b,c){b=b.aoData[c];return"search"===a?b._aFilterData:b._aSortData},1)});J("rows().invalidate()","row().invalidate()",function(a){return this.iterator("row",function(b,c){va(b,
c,a)})});J("rows().indexes()","row().index()",function(){return this.iterator("row",function(a,b){return b},1)});J("rows().ids()","row().id()",function(a){for(var b=[],c=this.context,d=0,e=c.length;d<e;d++)for(var h=0,f=this[d].length;h<f;h++){var g=c[d].rowIdFn(c[d].aoData[this[d][h]]._aData);b.push((!0===a?"#":"")+g)}return new B(c,b)});J("rows().remove()","row().remove()",function(){var a=this;this.iterator("row",function(b,c,d){var e=b.aoData,h=e[c],f,g;e.splice(c,1);var k=0;for(f=e.length;k<
f;k++){var m=e[k];var n=m.anCells;null!==m.nTr&&(m.nTr._DT_RowIndex=k);if(null!==n)for(m=0,g=n.length;m<g;m++)n[m]._DT_CellIndex.row=k}Na(b.aiDisplayMaster,c);Na(b.aiDisplay,c);Na(a[d],c,!1);0<b._iRecordsDisplay&&b._iRecordsDisplay--;qb(b);c=b.rowIdFn(h._aData);c!==q&&delete b.aIds[c]});this.iterator("table",function(b){for(var c=0,d=b.aoData.length;c<d;c++)b.aoData[c].idx=c});return this});z("rows.add()",function(a){var b=this.iterator("table",function(d){var e,h=[];var f=0;for(e=a.length;f<e;f++){var g=
a[f];g.nodeName&&"TR"===g.nodeName.toUpperCase()?h.push(La(d,g)[0]):h.push(ia(d,g))}return h},1),c=this.rows(-1);c.pop();l.merge(c,b);return c});z("row()",function(a,b){return Bb(this.rows(a,b))});z("row().data()",function(a){var b=this.context;if(a===q)return b.length&&this.length?b[0].aoData[this[0]]._aData:q;var c=b[0].aoData[this[0]];c._aData=a;Array.isArray(a)&&c.nTr&&c.nTr.id&&ha(b[0].rowId)(a,c.nTr.id);va(b[0],this[0],"data");return this});z("row().node()",function(){var a=this.context;return a.length&&
this.length?a[0].aoData[this[0]].nTr||null:null});z("row.add()",function(a){a instanceof l&&a.length&&(a=a[0]);var b=this.iterator("table",function(c){return a.nodeName&&"TR"===a.nodeName.toUpperCase()?La(c,a)[0]:ia(c,a)});return this.row(b[0])});l(A).on("plugin-init.dt",function(a,b){a=new B(b);a.on("stateSaveParams",function(d,e,h){d=e.rowIdFn;e=e.aoData;for(var f=[],g=0;g<e.length;g++)e[g]._detailsShow&&f.push("#"+d(e[g]._aData));h.childRows=f});var c=a.state.loaded();c&&c.childRows&&a.rows(l.map(c.childRows,
function(d){return d.replace(/:/g,"\\:")})).every(function(){F(b,null,"requestChild",[this])})});var Hc=function(a,b,c,d){var e=[],h=function(f,g){if(Array.isArray(f)||f instanceof l)for(var k=0,m=f.length;k<m;k++)h(f[k],g);else f.nodeName&&"tr"===f.nodeName.toLowerCase()?e.push(f):(k=l("<tr><td></td></tr>").addClass(g),l("td",k).addClass(g).html(f)[0].colSpan=na(a),e.push(k[0]))};h(c,d);b._details&&b._details.detach();b._details=l(e);b._detailsShow&&b._details.insertAfter(b.nTr)},wc=u.util.throttle(function(a){Da(a[0])},
500),Cb=function(a,b){var c=a.context;c.length&&(a=c[0].aoData[b!==q?b:a[0]])&&a._details&&(a._details.remove(),a._detailsShow=q,a._details=q,l(a.nTr).removeClass("dt-hasChild"),wc(c))},xc=function(a,b){var c=a.context;if(c.length&&a.length){var d=c[0].aoData[a[0]];d._details&&((d._detailsShow=b)?(d._details.insertAfter(d.nTr),l(d.nTr).addClass("dt-hasChild")):(d._details.detach(),l(d.nTr).removeClass("dt-hasChild")),F(c[0],null,"childRow",[b,a.row(a[0])]),Ic(c[0]),wc(c))}},Ic=function(a){var b=new B(a),
c=a.aoData;b.off("draw.dt.DT_details column-sizing.dt.DT_details destroy.dt.DT_details");0<U(c,"_details").length&&(b.on("draw.dt.DT_details",function(d,e){a===e&&b.rows({page:"current"}).eq(0).each(function(h){h=c[h];h._detailsShow&&h._details.insertAfter(h.nTr)})}),b.on("column-sizing.dt.DT_details",function(d,e,h,f){if(a===e)for(e=na(e),h=0,f=c.length;h<f;h++)d=c[h],d._details&&d._details.children("td[colspan]").attr("colspan",e)}),b.on("destroy.dt.DT_details",function(d,e){if(a===e)for(d=0,e=
c.length;d<e;d++)c[d]._details&&Cb(b,d)}))};z("row().child()",function(a,b){var c=this.context;if(a===q)return c.length&&this.length?c[0].aoData[this[0]]._details:q;!0===a?this.child.show():!1===a?Cb(this):c.length&&this.length&&Hc(c[0],c[0].aoData[this[0]],a,b);return this});z(["row().child.show()","row().child().show()"],function(a){xc(this,!0);return this});z(["row().child.hide()","row().child().hide()"],function(){xc(this,!1);return this});z(["row().child.remove()","row().child().remove()"],function(){Cb(this);
return this});z("row().child.isShown()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]]._detailsShow||!1:!1});var Jc=/^([^:]+):(name|visIdx|visible)$/,yc=function(a,b,c,d,e){c=[];d=0;for(var h=e.length;d<h;d++)c.push(T(a,e[d],b));return c},Kc=function(a,b,c){var d=a.aoColumns,e=U(d,"sName"),h=U(d,"nTh");return zb("column",b,function(f){var g=nc(f);if(""===f)return pa(d.length);if(null!==g)return[0<=g?g:d.length+g];if("function"===typeof f){var k=ab(a,c);return l.map(d,
function(p,t){return f(t,yc(a,t,0,0,k),h[t])?t:null})}var m="string"===typeof f?f.match(Jc):"";if(m)switch(m[2]){case "visIdx":case "visible":g=parseInt(m[1],10);if(0>g){var n=l.map(d,function(p,t){return p.bVisible?t:null});return[n[n.length+g]]}return[ta(a,g)];case "name":return l.map(e,function(p,t){return p===m[1]?t:null});default:return[]}if(f.nodeName&&f._DT_CellIndex)return[f._DT_CellIndex.column];g=l(h).filter(f).map(function(){return l.inArray(this,h)}).toArray();if(g.length||!f.nodeName)return g;
g=l(f).closest("*[data-dt-column]");return g.length?[g.data("dt-column")]:[]},a,c)};z("columns()",function(a,b){a===q?a="":l.isPlainObject(a)&&(b=a,a="");b=Ab(b);var c=this.iterator("table",function(d){return Kc(d,a,b)},1);c.selector.cols=a;c.selector.opts=b;return c});J("columns().header()","column().header()",function(a,b){return this.iterator("column",function(c,d){return c.aoColumns[d].nTh},1)});J("columns().footer()","column().footer()",function(a,b){return this.iterator("column",function(c,
d){return c.aoColumns[d].nTf},1)});J("columns().data()","column().data()",function(){return this.iterator("column-rows",yc,1)});J("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},1)});J("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(b,c,d,e,h){return Fa(b.aoData,h,"search"===a?"_aFilterData":"_aSortData",c)},1)});J("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",
function(a,b,c,d,e){return Fa(a.aoData,e,"anCells",b)},1)});J("columns().visible()","column().visible()",function(a,b){var c=this,d=this.iterator("column",function(e,h){if(a===q)return e.aoColumns[h].bVisible;var f=e.aoColumns,g=f[h],k=e.aoData,m;if(a!==q&&g.bVisible!==a){if(a){var n=l.inArray(!0,U(f,"bVisible"),h+1);f=0;for(m=k.length;f<m;f++){var p=k[f].nTr;e=k[f].anCells;p&&p.insertBefore(e[h],e[n]||null)}}else l(U(e.aoData,"anCells",h)).detach();g.bVisible=a}});a!==q&&this.iterator("table",function(e){xa(e,
e.aoHeader);xa(e,e.aoFooter);e.aiDisplay.length||l(e.nTBody).find("td[colspan]").attr("colspan",na(e));Da(e);c.iterator("column",function(h,f){F(h,null,"column-visibility",[h,f,a,b])});(b===q||b)&&c.columns.adjust()});return d});J("columns().indexes()","column().index()",function(a){return this.iterator("column",function(b,c){return"visible"===a?ua(b,c):c},1)});z("columns.adjust()",function(){return this.iterator("table",function(a){sa(a)},1)});z("column.index()",function(a,b){if(0!==this.context.length){var c=
this.context[0];if("fromVisible"===a||"toData"===a)return ta(c,b);if("fromData"===a||"toVisible"===a)return ua(c,b)}});z("column()",function(a,b){return Bb(this.columns(a,b))});var Lc=function(a,b,c){var d=a.aoData,e=ab(a,c),h=qc(Fa(d,e,"anCells")),f=l(rc([],h)),g,k=a.aoColumns.length,m,n,p,t,v,x;return zb("cell",b,function(w){var r="function"===typeof w;if(null===w||w===q||r){m=[];n=0;for(p=e.length;n<p;n++)for(g=e[n],t=0;t<k;t++)v={row:g,column:t},r?(x=d[g],w(v,T(a,g,t),x.anCells?x.anCells[t]:null)&&
m.push(v)):m.push(v);return m}if(l.isPlainObject(w))return w.column!==q&&w.row!==q&&-1!==l.inArray(w.row,e)?[w]:[];r=f.filter(w).map(function(C,G){return{row:G._DT_CellIndex.row,column:G._DT_CellIndex.column}}).toArray();if(r.length||!w.nodeName)return r;x=l(w).closest("*[data-dt-row]");return x.length?[{row:x.data("dt-row"),column:x.data("dt-column")}]:[]},a,c)};z("cells()",function(a,b,c){l.isPlainObject(a)&&(a.row===q?(c=a,a=null):(c=b,b=null));l.isPlainObject(b)&&(c=b,b=null);if(null===b||b===
q)return this.iterator("table",function(n){return Lc(n,a,Ab(c))});var d=c?{page:c.page,order:c.order,search:c.search}:{},e=this.columns(b,d),h=this.rows(a,d),f,g,k,m;d=this.iterator("table",function(n,p){n=[];f=0;for(g=h[p].length;f<g;f++)for(k=0,m=e[p].length;k<m;k++)n.push({row:h[p][f],column:e[p][k]});return n},1);d=c&&c.selected?this.cells(d,c):d;l.extend(d.selector,{cols:b,rows:a,opts:c});return d});J("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(a,b,c){return(a=
a.aoData[b])&&a.anCells?a.anCells[c]:q},1)});z("cells().data()",function(){return this.iterator("cell",function(a,b,c){return T(a,b,c)},1)});J("cells().cache()","cell().cache()",function(a){a="search"===a?"_aFilterData":"_aSortData";return this.iterator("cell",function(b,c,d){return b.aoData[c][a][d]},1)});J("cells().render()","cell().render()",function(a){return this.iterator("cell",function(b,c,d){return T(b,c,d,a)},1)});J("cells().indexes()","cell().index()",function(){return this.iterator("cell",
function(a,b,c){return{row:b,column:c,columnVisible:ua(a,c)}},1)});J("cells().invalidate()","cell().invalidate()",function(a){return this.iterator("cell",function(b,c,d){va(b,c,a,d)})});z("cell()",function(a,b,c){return Bb(this.cells(a,b,c))});z("cell().data()",function(a){var b=this.context,c=this[0];if(a===q)return b.length&&c.length?T(b[0],c[0].row,c[0].column):q;Ib(b[0],c[0].row,c[0].column,a);va(b[0],c[0].row,"data",c[0].column);return this});z("order()",function(a,b){var c=this.context;if(a===
q)return 0!==c.length?c[0].aaSorting:q;"number"===typeof a?a=[[a,b]]:a.length&&!Array.isArray(a[0])&&(a=Array.prototype.slice.call(arguments));return this.iterator("table",function(d){d.aaSorting=a.slice()})});z("order.listener()",function(a,b,c){return this.iterator("table",function(d){kb(d,a,b,c)})});z("order.fixed()",function(a){if(!a){var b=this.context;b=b.length?b[0].aaSortingFixed:q;return Array.isArray(b)?{pre:b}:b}return this.iterator("table",function(c){c.aaSortingFixed=l.extend(!0,{},a)})});
z(["columns().order()","column().order()"],function(a){var b=this;return this.iterator("table",function(c,d){var e=[];l.each(b[d],function(h,f){e.push([f,a])});c.aaSorting=e})});z("search()",function(a,b,c,d){var e=this.context;return a===q?0!==e.length?e[0].oPreviousSearch.sSearch:q:this.iterator("table",function(h){h.oFeatures.bFilter&&ya(h,l.extend({},h.oPreviousSearch,{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),1)})});J("columns().search()","column().search()",
function(a,b,c,d){return this.iterator("column",function(e,h){var f=e.aoPreSearchCols;if(a===q)return f[h].sSearch;e.oFeatures.bFilter&&(l.extend(f[h],{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),ya(e,e.oPreviousSearch,1))})});z("state()",function(){return this.context.length?this.context[0].oSavedState:null});z("state.clear()",function(){return this.iterator("table",function(a){a.fnStateSaveCallback.call(a.oInstance,a,{})})});z("state.loaded()",function(){return this.context.length?
this.context[0].oLoadedState:null});z("state.save()",function(){return this.iterator("table",function(a){Da(a)})});u.versionCheck=u.fnVersionCheck=function(a){var b=u.version.split(".");a=a.split(".");for(var c,d,e=0,h=a.length;e<h;e++)if(c=parseInt(b[e],10)||0,d=parseInt(a[e],10)||0,c!==d)return c>d;return!0};u.isDataTable=u.fnIsDataTable=function(a){var b=l(a).get(0),c=!1;if(a instanceof u.Api)return!0;l.each(u.settings,function(d,e){d=e.nScrollHead?l("table",e.nScrollHead)[0]:null;var h=e.nScrollFoot?
l("table",e.nScrollFoot)[0]:null;if(e.nTable===b||d===b||h===b)c=!0});return c};u.tables=u.fnTables=function(a){var b=!1;l.isPlainObject(a)&&(b=a.api,a=a.visible);var c=l.map(u.settings,function(d){if(!a||a&&l(d.nTable).is(":visible"))return d.nTable});return b?new B(c):c};u.camelToHungarian=P;z("$()",function(a,b){b=this.rows(b).nodes();b=l(b);return l([].concat(b.filter(a).toArray(),b.find(a).toArray()))});l.each(["on","one","off"],function(a,b){z(b+"()",function(){var c=Array.prototype.slice.call(arguments);
c[0]=l.map(c[0].split(/\s/),function(e){return e.match(/\.dt\b/)?e:e+".dt"}).join(" ");var d=l(this.tables().nodes());d[b].apply(d,c);return this})});z("clear()",function(){return this.iterator("table",function(a){Ma(a)})});z("settings()",function(){return new B(this.context,this.context)});z("init()",function(){var a=this.context;return a.length?a[0].oInit:null});z("data()",function(){return this.iterator("table",function(a){return U(a.aoData,"_aData")}).flatten()});z("destroy()",function(a){a=a||
!1;return this.iterator("table",function(b){var c=b.oClasses,d=b.nTable,e=b.nTBody,h=b.nTHead,f=b.nTFoot,g=l(d);e=l(e);var k=l(b.nTableWrapper),m=l.map(b.aoData,function(p){return p.nTr}),n;b.bDestroying=!0;F(b,"aoDestroyCallback","destroy",[b]);a||(new B(b)).columns().visible(!0);k.off(".DT").find(":not(tbody *)").off(".DT");l(y).off(".DT-"+b.sInstance);d!=h.parentNode&&(g.children("thead").detach(),g.append(h));f&&d!=f.parentNode&&(g.children("tfoot").detach(),g.append(f));b.aaSorting=[];b.aaSortingFixed=
[];Va(b);l(m).removeClass(b.asStripeClasses.join(" "));l("th, td",h).removeClass(c.sSortable+" "+c.sSortableAsc+" "+c.sSortableDesc+" "+c.sSortableNone);e.children().detach();e.append(m);h=b.nTableWrapper.parentNode;f=a?"remove":"detach";g[f]();k[f]();!a&&h&&(h.insertBefore(d,b.nTableReinsertBefore),g.css("width",b.sDestroyWidth).removeClass(c.sTable),(n=b.asDestroyStripes.length)&&e.children().each(function(p){l(this).addClass(b.asDestroyStripes[p%n])}));c=l.inArray(b,u.settings);-1!==c&&u.settings.splice(c,
1)})});l.each(["column","row","cell"],function(a,b){z(b+"s().every()",function(c){var d=this.selector.opts,e=this;return this.iterator(b,function(h,f,g,k,m){c.call(e[b](f,"cell"===b?g:d,"cell"===b?d:q),f,g,k,m)})})});z("i18n()",function(a,b,c){var d=this.context[0];a=ma(a)(d.oLanguage);a===q&&(a=b);c!==q&&l.isPlainObject(a)&&(a=a[c]!==q?a[c]:a._);return a.replace("%d",c)});u.version="1.12.1";u.settings=[];u.models={};u.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0,"return":!1};
u.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1};u.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,
sWidth:null,sWidthOrig:null};u.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,
this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+a.sInstance+"_"+location.pathname))}catch(b){return{}}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+
a.sInstance+"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",
sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:l.extend({},u.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"};E(u.defaults);
u.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};E(u.defaults.column);u.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,
bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],
aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,jqXHR:null,json:q,oAjaxData:q,fnServerData:null,aoServerParams:[],sServerMethod:null,
fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==Q(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==Q(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=this._iDisplayLength,b=this._iDisplayStart,c=b+
a,d=this.aiDisplay.length,e=this.oFeatures,h=e.bPaginate;return e.bServerSide?!1===h||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!h||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};u.ext=M={buttons:{},classes:{},build:"dt/dt-1.12.1/b-2.2.3/b-colvis-2.2.3/cr-1.5.6/fh-3.2.4/sp-2.0.2",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],
search:{},order:{}},_unique:0,fnVersionCheck:u.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:u.version};l.extend(M,{afnFiltering:M.search,aTypes:M.type.detect,ofnSearch:M.type.search,oSort:M.type.order,afnSortData:M.order,aoFeatures:M.feature,oApi:M.internal,oStdClasses:M.classes,oPagination:M.pager});l.extend(u.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",
sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_desc_disabled",sSortableDesc:"sorting_asc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",
sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var ic=u.ext.pager;l.extend(ic,{simple:function(a,b){return["previous","next"]},full:function(a,b){return["first","previous","next","last"]},numbers:function(a,b){return[Ea(a,b)]},simple_numbers:function(a,b){return["previous",
Ea(a,b),"next"]},full_numbers:function(a,b){return["first","previous",Ea(a,b),"next","last"]},first_last_numbers:function(a,b){return["first",Ea(a,b),"last"]},_numbers:Ea,numbers_length:7});l.extend(!0,u.ext.renderer,{pageButton:{_:function(a,b,c,d,e,h){var f=a.oClasses,g=a.oLanguage.oPaginate,k=a.oLanguage.oAria.paginate||{},m,n,p=0,t=function(x,w){var r,C=f.sPageButtonDisabled,G=function(I){Ta(a,I.data.action,!0)};var ba=0;for(r=w.length;ba<r;ba++){var L=w[ba];if(Array.isArray(L)){var O=l("<"+(L.DT_el||
"div")+"/>").appendTo(x);t(O,L)}else{m=null;n=L;O=a.iTabIndex;switch(L){case "ellipsis":x.append('<span class="ellipsis">&#x2026;</span>');break;case "first":m=g.sFirst;0===e&&(O=-1,n+=" "+C);break;case "previous":m=g.sPrevious;0===e&&(O=-1,n+=" "+C);break;case "next":m=g.sNext;if(0===h||e===h-1)O=-1,n+=" "+C;break;case "last":m=g.sLast;if(0===h||e===h-1)O=-1,n+=" "+C;break;default:m=a.fnFormatNumber(L+1),n=e===L?f.sPageButtonActive:""}null!==m&&(O=l("<a>",{"class":f.sPageButton+" "+n,"aria-controls":a.sTableId,
"aria-label":k[L],"data-dt-idx":p,tabindex:O,id:0===c&&"string"===typeof L?a.sTableId+"_"+L:null}).html(m).appendTo(x),sb(O,{action:L},G),p++)}}};try{var v=l(b).find(A.activeElement).data("dt-idx")}catch(x){}t(l(b).empty(),d);v!==q&&l(b).find("[data-dt-idx="+v+"]").trigger("focus")}}});l.extend(u.ext.type.detect,[function(a,b){b=b.oLanguage.sDecimal;return yb(a,b)?"num"+b:null},function(a,b){if(a&&!(a instanceof Date)&&!Dc.test(a))return null;b=Date.parse(a);return null!==b&&!isNaN(b)||aa(a)?"date":
null},function(a,b){b=b.oLanguage.sDecimal;return yb(a,b,!0)?"num-fmt"+b:null},function(a,b){b=b.oLanguage.sDecimal;return pc(a,b)?"html-num"+b:null},function(a,b){b=b.oLanguage.sDecimal;return pc(a,b,!0)?"html-num-fmt"+b:null},function(a,b){return aa(a)||"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);l.extend(u.ext.type.search,{html:function(a){return aa(a)?a:"string"===typeof a?a.replace(mc," ").replace(Ya,""):""},string:function(a){return aa(a)?a:"string"===typeof a?a.replace(mc," "):
a}});var Xa=function(a,b,c,d){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=oc(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};l.extend(M.type.order,{"date-pre":function(a){a=Date.parse(a);return isNaN(a)?-Infinity:a},"html-pre":function(a){return aa(a)?"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return aa(a)?"":"string"===typeof a?a.toLowerCase():a.toString?a.toString():""},"string-asc":function(a,b){return a<b?-1:a>b?1:0},"string-desc":function(a,
b){return a<b?1:a>b?-1:0}});bb("");l.extend(!0,u.ext.renderer,{header:{_:function(a,b,c,d){l(a.nTable).on("order.dt.DT",function(e,h,f,g){a===h&&(e=c.idx,b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass("asc"==g[e]?d.sSortAsc:"desc"==g[e]?d.sSortDesc:c.sSortingClass))})},jqueryui:function(a,b,c,d){l("<div/>").addClass(d.sSortJUIWrapper).append(b.contents()).append(l("<span/>").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);l(a.nTable).on("order.dt.DT",function(e,h,f,g){a===h&&(e=c.idx,
b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass("asc"==g[e]?d.sSortAsc:"desc"==g[e]?d.sSortDesc:c.sSortingClass),b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass("asc"==g[e]?d.sSortJUIAsc:"desc"==g[e]?d.sSortJUIDesc:c.sSortingClassJUI))})}}});var $a=function(a){Array.isArray(a)&&(a=a.join(","));return"string"===typeof a?a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,
"&quot;"):a},kc=!1,zc=",",Ac=".";if(Intl)try{for(var Ha=(new Intl.NumberFormat).formatToParts(100000.1),ra=0;ra<Ha.length;ra++)"group"===Ha[ra].type?zc=Ha[ra].value:"decimal"===Ha[ra].type&&(Ac=Ha[ra].value)}catch(a){}u.datetime=function(a,b){var c="datetime-detect-"+a;b||(b="en");u.ext.type.order[c]||(u.ext.type.detect.unshift(function(d){var e=Za(d,a,b);return""===d||e?c:!1}),u.ext.type.order[c+"-pre"]=function(d){return Za(d,a,b)||0})};u.render={date:wb("toLocaleDateString"),datetime:wb("toLocaleString"),
time:wb("toLocaleTimeString"),number:function(a,b,c,d,e){if(null===a||a===q)a=zc;if(null===b||b===q)b=Ac;return{display:function(h){if("number"!==typeof h&&"string"!==typeof h||""===h||null===h)return h;var f=0>h?"-":"",g=parseFloat(h);if(isNaN(g))return $a(h);g=g.toFixed(c);h=Math.abs(g);g=parseInt(h,10);h=c?b+(h-g).toFixed(c).substring(2):"";0===g&&0===parseFloat(h)&&(f="");return f+(d||"")+g.toString().replace(/\B(?=(\d{3})+(?!\d))/g,a)+h+(e||"")}}},text:function(){return{display:$a,filter:$a}}};
l.extend(u.ext.internal,{_fnExternApiFunc:lc,_fnBuildAjax:Qa,_fnAjaxUpdate:Kb,_fnAjaxParameters:Tb,_fnAjaxUpdateDraw:Ub,_fnAjaxDataSrc:za,_fnAddColumn:cb,_fnColumnOptions:Ia,_fnAdjustColumnSizing:sa,_fnVisibleToColumnIndex:ta,_fnColumnIndexToVisible:ua,_fnVisbleColumns:na,_fnGetColumns:Ka,_fnColumnTypes:eb,_fnApplyColumnDefs:Hb,_fnHungarianMap:E,_fnCamelToHungarian:P,_fnLanguageCompat:la,_fnBrowserDetect:Fb,_fnAddData:ia,_fnAddTr:La,_fnNodeToDataIndex:function(a,b){return b._DT_RowIndex!==q?b._DT_RowIndex:
null},_fnNodeToColumnIndex:function(a,b,c){return l.inArray(c,a.aoData[b].anCells)},_fnGetCellData:T,_fnSetCellData:Ib,_fnSplitObjNotation:hb,_fnGetObjectDataFn:ma,_fnSetObjectDataFn:ha,_fnGetDataMaster:ib,_fnClearTable:Ma,_fnDeleteIndex:Na,_fnInvalidate:va,_fnGetRowElements:gb,_fnCreateTr:fb,_fnBuildHead:Jb,_fnDrawHead:xa,_fnDraw:ja,_fnReDraw:ka,_fnAddOptionsHtml:Mb,_fnDetectHeader:wa,_fnGetUniqueThs:Pa,_fnFeatureHtmlFilter:Ob,_fnFilterComplete:ya,_fnFilterCustom:Xb,_fnFilterColumn:Wb,_fnFilter:Vb,
_fnFilterCreateSearch:nb,_fnEscapeRegex:ob,_fnFilterData:Yb,_fnFeatureHtmlInfo:Rb,_fnUpdateInfo:ac,_fnInfoMacros:bc,_fnInitialise:Aa,_fnInitComplete:Ra,_fnLengthChange:pb,_fnFeatureHtmlLength:Nb,_fnFeatureHtmlPaginate:Sb,_fnPageChange:Ta,_fnFeatureHtmlProcessing:Pb,_fnProcessingDisplay:V,_fnFeatureHtmlTable:Qb,_fnScrollDraw:Ja,_fnApplyToChildren:da,_fnCalculateColumnWidths:db,_fnThrottle:mb,_fnConvertToWidth:cc,_fnGetWidestNode:dc,_fnGetMaxLenString:ec,_fnStringToCss:K,_fnSortFlatten:oa,_fnSort:Lb,
_fnSortAria:gc,_fnSortListener:rb,_fnSortAttachListener:kb,_fnSortingClasses:Va,_fnSortData:fc,_fnSaveState:Da,_fnLoadState:hc,_fnImplementState:tb,_fnSettingsFromNode:Wa,_fnLog:ea,_fnMap:Y,_fnBindAction:sb,_fnCallbackReg:R,_fnCallbackFire:F,_fnLengthOverflow:qb,_fnRenderer:lb,_fnDataSource:Q,_fnRowAttributes:jb,_fnExtend:ub,_fnCalculateEnd:function(){}});l.fn.dataTable=u;u.$=l;l.fn.dataTableSettings=u.settings;l.fn.dataTableExt=u.ext;l.fn.DataTable=function(a){return l(this).dataTable(a).api()};
l.each(u,function(a,b){l.fn.DataTable[a]=b});return u});
/*!
DataTables styling integration
©2018 SpryMedia Ltd - datatables.net/license
*/
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);b&&b.fn.dataTable||(b=require("datatables.net")(a,b).$);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c,a,b,d){return c.fn.dataTable});
/*!
Buttons for DataTables 2.2.3
©2016-2022 SpryMedia Ltd - datatables.net/license
*/
(function(d){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(A){return d(A,window,document)}):"object"===typeof exports?module.exports=function(A,C){A||(A=window);C&&C.fn.dataTable||(C=require("datatables.net")(A,C).$);return d(C,A,A.document)}:d(jQuery,window,document)})(function(d,A,C,p){function I(a,b,c){d.fn.animate?a.stop().fadeIn(b,c):(a.css("display","block"),c&&c.call(a))}function J(a,b,c){d.fn.animate?a.stop().fadeOut(b,c):(a.css("display","none"),c&&c.call(a))}
function L(a,b){a=new u.Api(a);b=b?b:a.init().buttons||u.defaults.buttons;return(new x(a,b)).container()}var u=d.fn.dataTable,O=0,P=0,D=u.ext.buttons,x=function(a,b){if(!(this instanceof x))return function(c){return(new x(c,a)).container()};"undefined"===typeof b&&(b={});!0===b&&(b={});Array.isArray(b)&&(b={buttons:b});this.c=d.extend(!0,{},x.defaults,b);b.buttons&&(this.c.buttons=b.buttons);this.s={dt:new u.Api(a),buttons:[],listenKeys:"",namespace:"dtb"+O++};this.dom={container:d("<"+this.c.dom.container.tag+
"/>").addClass(this.c.dom.container.className)};this._constructor()};d.extend(x.prototype,{action:function(a,b){a=this._nodeToButton(a);if(b===p)return a.conf.action;a.conf.action=b;return this},active:function(a,b){var c=this._nodeToButton(a);a=this.c.dom.button.active;c=d(c.node);if(b===p)return c.hasClass(a);c.toggleClass(a,b===p?!0:b);return this},add:function(a,b,c){var e=this.s.buttons;if("string"===typeof b){b=b.split("-");var h=this.s;e=0;for(var f=b.length-1;e<f;e++)h=h.buttons[1*b[e]];e=
h.buttons;b=1*b[b.length-1]}this._expandButton(e,a,a!==p?a.split:p,(a===p||a.split===p||0===a.split.length)&&h!==p,!1,b);c!==p&&!0!==c||this._draw();return this},collectionRebuild:function(a,b){a=this._nodeToButton(a);if(b!==p){var c;for(c=a.buttons.length-1;0<=c;c--)this.remove(a.buttons[c].node);for(c=0;c<b.length;c++){var e=b[c];this._expandButton(a.buttons,e,e!==p&&e.config!==p&&e.config.split!==p,!0,e.parentConf!==p&&e.parentConf.split!==p,c,e.parentConf)}}this._draw(a.collection,a.buttons)},
container:function(){return this.dom.container},disable:function(a){a=this._nodeToButton(a);d(a.node).addClass(this.c.dom.button.disabled).attr("disabled",!0);return this},destroy:function(){d("body").off("keyup."+this.s.namespace);var a=this.s.buttons.slice(),b;var c=0;for(b=a.length;c<b;c++)this.remove(a[c].node);this.dom.container.remove();a=this.s.dt.settings()[0];c=0;for(b=a.length;c<b;c++)if(a.inst===this){a.splice(c,1);break}return this},enable:function(a,b){if(!1===b)return this.disable(a);
a=this._nodeToButton(a);d(a.node).removeClass(this.c.dom.button.disabled).removeAttr("disabled");return this},index:function(a,b,c){b||(b="",c=this.s.buttons);for(var e=0,h=c.length;e<h;e++){var f=c[e].buttons;if(c[e].node===a)return b+e;if(f&&f.length&&(f=this.index(a,e+"-",f),null!==f))return f}return null},name:function(){return this.c.name},node:function(a){if(!a)return this.dom.container;a=this._nodeToButton(a);return d(a.node)},processing:function(a,b){var c=this.s.dt,e=this._nodeToButton(a);
if(b===p)return d(e.node).hasClass("processing");d(e.node).toggleClass("processing",b);d(c.table().node()).triggerHandler("buttons-processing.dt",[b,c.button(a),c,d(a),e.conf]);return this},remove:function(a){var b=this._nodeToButton(a),c=this._nodeToHost(a),e=this.s.dt;if(b.buttons.length)for(var h=b.buttons.length-1;0<=h;h--)this.remove(b.buttons[h].node);b.conf.destroying=!0;b.conf.destroy&&b.conf.destroy.call(e.button(a),e,d(a),b.conf);this._removeKey(b.conf);d(b.node).remove();a=d.inArray(b,
c);c.splice(a,1);return this},text:function(a,b){var c=this._nodeToButton(a);a=this.c.dom.collection.buttonLiner;a=c.inCollection&&a&&a.tag?a.tag:this.c.dom.buttonLiner.tag;var e=this.s.dt,h=d(c.node),f=function(g){return"function"===typeof g?g(e,h,c.conf):g};if(b===p)return f(c.conf.text);c.conf.text=b;a?h.children(a).eq(0).filter(":not(.dt-down-arrow)").html(f(b)):h.html(f(b));return this},_constructor:function(){var a=this,b=this.s.dt,c=b.settings()[0],e=this.c.buttons;c._buttons||(c._buttons=
[]);c._buttons.push({inst:this,name:this.c.name});for(var h=0,f=e.length;h<f;h++)this.add(e[h]);b.on("destroy",function(g,l){l===c&&a.destroy()});d("body").on("keyup."+this.s.namespace,function(g){if(!C.activeElement||C.activeElement===C.body){var l=String.fromCharCode(g.keyCode).toLowerCase();-1!==a.s.listenKeys.toLowerCase().indexOf(l)&&a._keypress(l,g)}})},_addKey:function(a){a.key&&(this.s.listenKeys+=d.isPlainObject(a.key)?a.key.key:a.key)},_draw:function(a,b){a||(a=this.dom.container,b=this.s.buttons);
a.children().detach();for(var c=0,e=b.length;c<e;c++)a.append(b[c].inserter),a.append(" "),b[c].buttons&&b[c].buttons.length&&this._draw(b[c].collection,b[c].buttons)},_expandButton:function(a,b,c,e,h,f,g){var l=this.s.dt,m=0,r=Array.isArray(b)?b:[b];b===p&&(r=Array.isArray(c)?c:[c]);c=0;for(var q=r.length;c<q;c++){var n=this._resolveExtends(r[c]);if(n)if(b=n.config!==p&&n.config.split?!0:!1,Array.isArray(n))this._expandButton(a,n,k!==p&&k.conf!==p?k.conf.split:p,e,g!==p&&g.split!==p,f,g);else{var k=
this._buildButton(n,e,n.split!==p||n.config!==p&&n.config.split!==p,h);if(k){f!==p&&null!==f?(a.splice(f,0,k),f++):a.push(k);if(k.conf.buttons||k.conf.split){k.collection=d("<"+(b?this.c.dom.splitCollection.tag:this.c.dom.collection.tag)+"/>");k.conf._collection=k.collection;if(k.conf.split)for(var t=0;t<k.conf.split.length;t++)"object"===typeof k.conf.split[t]&&(k.conf.split[t].parent=g,k.conf.split[t].collectionLayout===p&&(k.conf.split[t].collectionLayout=k.conf.collectionLayout),k.conf.split[t].dropup===
p&&(k.conf.split[t].dropup=k.conf.dropup),k.conf.split[t].fade===p&&(k.conf.split[t].fade=k.conf.fade));else d(k.node).append(d('<span class="dt-down-arrow">'+this.c.dom.splitDropdown.text+"</span>"));this._expandButton(k.buttons,k.conf.buttons,k.conf.split,!b,b,f,k.conf)}k.conf.parent=g;n.init&&n.init.call(l.button(k.node),l,d(k.node),n);m++}}}},_buildButton:function(a,b,c,e){var h=this.c.dom.button,f=this.c.dom.buttonLiner,g=this.c.dom.collection,l=this.c.dom.splitCollection,m=this.c.dom.splitDropdownButton,
r=this.s.dt,q=function(v){return"function"===typeof v?v(r,k,a):v};if(a.spacer){var n=d("<span></span>").addClass("dt-button-spacer "+a.style+" "+h.spacerClass).html(q(a.text));return{conf:a,node:n,inserter:n,buttons:[],inCollection:b,isSplit:c,inSplit:e,collection:null}}!c&&e&&l?h=m:!c&&b&&g.button&&(h=g.button);!c&&e&&l.buttonLiner?f=l.buttonLiner:!c&&b&&g.buttonLiner&&(f=g.buttonLiner);if(a.available&&!a.available(r,a)&&!a.hasOwnProperty("html"))return!1;if(a.hasOwnProperty("html"))var k=d(a.html);
else{var t=function(v,E,F,G){G.action.call(E.button(F),v,E,F,G);d(E.table().node()).triggerHandler("buttons-action.dt",[E.button(F),E,F,G])};g=a.tag||h.tag;var y=a.clickBlurs===p?!0:a.clickBlurs;k=d("<"+g+"/>").addClass(h.className).addClass(e?this.c.dom.splitDropdownButton.className:"").attr("tabindex",this.s.dt.settings()[0].iTabIndex).attr("aria-controls",this.s.dt.table().node().id).on("click.dtb",function(v){v.preventDefault();!k.hasClass(h.disabled)&&a.action&&t(v,r,k,a);y&&k.trigger("blur")}).on("keypress.dtb",
function(v){13===v.keyCode&&(v.preventDefault(),!k.hasClass(h.disabled)&&a.action&&t(v,r,k,a))});"a"===g.toLowerCase()&&k.attr("href","#");"button"===g.toLowerCase()&&k.attr("type","button");f.tag?(g=d("<"+f.tag+"/>").html(q(a.text)).addClass(f.className),"a"===f.tag.toLowerCase()&&g.attr("href","#"),k.append(g)):k.html(q(a.text));!1===a.enabled&&k.addClass(h.disabled);a.className&&k.addClass(a.className);a.titleAttr&&k.attr("title",q(a.titleAttr));a.attr&&k.attr(a.attr);a.namespace||(a.namespace=
".dt-button-"+P++);a.config!==p&&a.config.split&&(a.split=a.config.split)}f=(f=this.c.dom.buttonContainer)&&f.tag?d("<"+f.tag+"/>").addClass(f.className).append(k):k;this._addKey(a);this.c.buttonCreated&&(f=this.c.buttonCreated(a,f));if(c){n=d("<div/>").addClass(this.c.dom.splitWrapper.className);n.append(k);var w=d.extend(a,{text:this.c.dom.splitDropdown.text,className:this.c.dom.splitDropdown.className,closeButton:!1,attr:{"aria-haspopup":"dialog","aria-expanded":!1},align:this.c.dom.splitDropdown.align,
splitAlignClass:this.c.dom.splitDropdown.splitAlignClass});this._addKey(w);var B=function(v,E,F,G){D.split.action.call(E.button(d("div.dt-btn-split-wrapper")[0]),v,E,F,G);d(E.table().node()).triggerHandler("buttons-action.dt",[E.button(F),E,F,G]);F.attr("aria-expanded",!0)},z=d('<button class="'+this.c.dom.splitDropdown.className+' dt-button"><span class="dt-btn-split-drop-arrow">'+this.c.dom.splitDropdown.text+"</span></button>").on("click.dtb",function(v){v.preventDefault();v.stopPropagation();
z.hasClass(h.disabled)||B(v,r,z,w);y&&z.trigger("blur")}).on("keypress.dtb",function(v){13===v.keyCode&&(v.preventDefault(),z.hasClass(h.disabled)||B(v,r,z,w))});0===a.split.length&&z.addClass("dtb-hide-drop");n.append(z).attr(w.attr)}return{conf:a,node:c?n.get(0):k.get(0),inserter:c?n:f,buttons:[],inCollection:b,isSplit:c,inSplit:e,collection:null}},_nodeToButton:function(a,b){b||(b=this.s.buttons);for(var c=0,e=b.length;c<e;c++){if(b[c].node===a)return b[c];if(b[c].buttons.length){var h=this._nodeToButton(a,
b[c].buttons);if(h)return h}}},_nodeToHost:function(a,b){b||(b=this.s.buttons);for(var c=0,e=b.length;c<e;c++){if(b[c].node===a)return b;if(b[c].buttons.length){var h=this._nodeToHost(a,b[c].buttons);if(h)return h}}},_keypress:function(a,b){if(!b._buttonsHandled){var c=function(e){for(var h=0,f=e.length;h<f;h++){var g=e[h].conf,l=e[h].node;g.key&&(g.key===a?(b._buttonsHandled=!0,d(l).click()):!d.isPlainObject(g.key)||g.key.key!==a||g.key.shiftKey&&!b.shiftKey||g.key.altKey&&!b.altKey||g.key.ctrlKey&&
!b.ctrlKey||g.key.metaKey&&!b.metaKey||(b._buttonsHandled=!0,d(l).click()));e[h].buttons.length&&c(e[h].buttons)}};c(this.s.buttons)}},_removeKey:function(a){if(a.key){var b=d.isPlainObject(a.key)?a.key.key:a.key;a=this.s.listenKeys.split("");b=d.inArray(b,a);a.splice(b,1);this.s.listenKeys=a.join("")}},_resolveExtends:function(a){var b=this,c=this.s.dt,e,h=function(m){for(var r=0;!d.isPlainObject(m)&&!Array.isArray(m);){if(m===p)return;if("function"===typeof m){if(m=m.call(b,c,a),!m)return!1}else if("string"===
typeof m){if(!D[m])return{html:m};m=D[m]}r++;if(30<r)throw"Buttons: Too many iterations";}return Array.isArray(m)?m:d.extend({},m)};for(a=h(a);a&&a.extend;){if(!D[a.extend])throw"Cannot extend unknown button type: "+a.extend;var f=h(D[a.extend]);if(Array.isArray(f))return f;if(!f)return!1;var g=f.className;a.config!==p&&f.config!==p&&(a.config=d.extend({},f.config,a.config));a=d.extend({},f,a);g&&a.className!==g&&(a.className=g+" "+a.className);var l=a.postfixButtons;if(l){a.buttons||(a.buttons=[]);
g=0;for(e=l.length;g<e;g++)a.buttons.push(l[g]);a.postfixButtons=null}if(l=a.prefixButtons){a.buttons||(a.buttons=[]);g=0;for(e=l.length;g<e;g++)a.buttons.splice(g,0,l[g]);a.prefixButtons=null}a.extend=f.extend}return a},_popover:function(a,b,c,e){e=this.c;var h=!1,f=d.extend({align:"button-left",autoClose:!1,background:!0,backgroundClassName:"dt-button-background",closeButton:!0,contentClassName:e.dom.collection.className,collectionLayout:"",collectionTitle:"",dropup:!1,fade:400,popoverTitle:"",
rightAlignClassName:"dt-button-right",tag:e.dom.collection.tag},c),g=b.node(),l=function(){h=!0;J(d(".dt-button-collection"),f.fade,function(){d(this).detach()});d(b.buttons('[aria-haspopup="dialog"][aria-expanded="true"]').nodes()).attr("aria-expanded","false");d("div.dt-button-background").off("click.dtb-collection");x.background(!1,f.backgroundClassName,f.fade,g);d(A).off("resize.resize.dtb-collection");d("body").off(".dtb-collection");b.off("buttons-action.b-internal");b.off("destroy")};if(!1===
a)l();else{c=d(b.buttons('[aria-haspopup="dialog"][aria-expanded="true"]').nodes());c.length&&(g.closest("div.dt-button-collection").length&&(g=c.eq(0)),l());c=d(".dt-button",a).length;e="";3===c?e="dtb-b3":2===c?e="dtb-b2":1===c&&(e="dtb-b1");var m=d("<div/>").addClass("dt-button-collection").addClass(f.collectionLayout).addClass(f.splitAlignClass).addClass(e).css("display","none").attr({"aria-modal":!0,role:"dialog"});a=d(a).addClass(f.contentClassName).attr("role","menu").appendTo(m);g.attr("aria-expanded",
"true");g.parents("body")[0]!==C.body&&(g=C.body.lastChild);f.popoverTitle?m.prepend('<div class="dt-button-collection-title">'+f.popoverTitle+"</div>"):f.collectionTitle&&m.prepend('<div class="dt-button-collection-title">'+f.collectionTitle+"</div>");f.closeButton&&m.prepend('<div class="dtb-popover-close">x</div>').addClass("dtb-collection-closeable");I(m.insertAfter(g),f.fade);c=d(b.table().container());var r=m.css("position");if("container"===f.span||"dt-container"===f.align)g=g.parent(),m.css("width",
c.width());if("absolute"===r){var q=d(g[0].offsetParent);c=g.position();e=g.offset();var n=q.offset(),k=q.position(),t=A.getComputedStyle(q[0]);n.height=q.outerHeight();n.width=q.width()+parseFloat(t.paddingLeft);n.right=n.left+n.width;n.bottom=n.top+n.height;q=c.top+g.outerHeight();var y=c.left;m.css({top:q,left:y});t=A.getComputedStyle(m[0]);var w=m.offset();w.height=m.outerHeight();w.width=m.outerWidth();w.right=w.left+w.width;w.bottom=w.top+w.height;w.marginTop=parseFloat(t.marginTop);w.marginBottom=
parseFloat(t.marginBottom);f.dropup&&(q=c.top-w.height-w.marginTop-w.marginBottom);if("button-right"===f.align||m.hasClass(f.rightAlignClassName))y=c.left-w.width+g.outerWidth();if("dt-container"===f.align||"container"===f.align)y<c.left&&(y=-c.left),y+w.width>n.width&&(y=n.width-w.width);k.left+y+w.width>d(A).width()&&(y=d(A).width()-w.width-k.left);0>e.left+y&&(y=-e.left);k.top+q+w.height>d(A).height()+d(A).scrollTop()&&(q=c.top-w.height-w.marginTop-w.marginBottom);k.top+q<d(A).scrollTop()&&(q=
c.top+g.outerHeight());m.css({top:q,left:y})}else r=function(){var B=d(A).height()/2,z=m.height()/2;z>B&&(z=B);m.css("marginTop",-1*z)},r(),d(A).on("resize.dtb-collection",function(){r()});f.background&&x.background(!0,f.backgroundClassName,f.fade,f.backgroundHost||g);d("div.dt-button-background").on("click.dtb-collection",function(){});f.autoClose&&setTimeout(function(){b.on("buttons-action.b-internal",function(B,z,v,E){E[0]!==g[0]&&l()})},0);d(m).trigger("buttons-popover.dt");b.on("destroy",l);
setTimeout(function(){h=!1;d("body").on("click.dtb-collection",function(B){if(!h){var z=d.fn.addBack?"addBack":"andSelf",v=d(B.target).parent()[0];(!d(B.target).parents()[z]().filter(a).length&&!d(v).hasClass("dt-buttons")||d(B.target).hasClass("dt-button-background"))&&l()}}).on("keyup.dtb-collection",function(B){27===B.keyCode&&l()}).on("keydown.dtb-collection",function(B){var z=d("a, button",a),v=C.activeElement;9===B.keyCode&&(-1===z.index(v)?(z.first().focus(),B.preventDefault()):B.shiftKey?
v===z[0]&&(z.last().focus(),B.preventDefault()):v===z.last()[0]&&(z.first().focus(),B.preventDefault()))})},0)}}});x.background=function(a,b,c,e){c===p&&(c=400);e||(e=C.body);a?I(d("<div/>").addClass(b).css("display","none").insertAfter(e),c):J(d("div."+b),c,function(){d(this).removeClass(b).remove()})};x.instanceSelector=function(a,b){if(a===p||null===a)return d.map(b,function(f){return f.inst});var c=[],e=d.map(b,function(f){return f.name}),h=function(f){if(Array.isArray(f))for(var g=0,l=f.length;g<
l;g++)h(f[g]);else"string"===typeof f?-1!==f.indexOf(",")?h(f.split(",")):(f=d.inArray(f.trim(),e),-1!==f&&c.push(b[f].inst)):"number"===typeof f?c.push(b[f].inst):"object"===typeof f&&c.push(f)};h(a);return c};x.buttonSelector=function(a,b){for(var c=[],e=function(l,m,r){for(var q,n,k=0,t=m.length;k<t;k++)if(q=m[k])n=r!==p?r+k:k+"",l.push({node:q.node,name:q.conf.name,idx:n}),q.buttons&&e(l,q.buttons,n+"-")},h=function(l,m){var r,q=[];e(q,m.s.buttons);var n=d.map(q,function(k){return k.node});if(Array.isArray(l)||
l instanceof d)for(n=0,r=l.length;n<r;n++)h(l[n],m);else if(null===l||l===p||"*"===l)for(n=0,r=q.length;n<r;n++)c.push({inst:m,node:q[n].node});else if("number"===typeof l)m.s.buttons[l]&&c.push({inst:m,node:m.s.buttons[l].node});else if("string"===typeof l)if(-1!==l.indexOf(","))for(q=l.split(","),n=0,r=q.length;n<r;n++)h(q[n].trim(),m);else if(l.match(/^\d+(\-\d+)*$/))n=d.map(q,function(k){return k.idx}),c.push({inst:m,node:q[d.inArray(l,n)].node});else if(-1!==l.indexOf(":name"))for(l=l.replace(":name",
""),n=0,r=q.length;n<r;n++)q[n].name===l&&c.push({inst:m,node:q[n].node});else d(n).filter(l).each(function(){c.push({inst:m,node:this})});else"object"===typeof l&&l.nodeName&&(q=d.inArray(l,n),-1!==q&&c.push({inst:m,node:n[q]}))},f=0,g=a.length;f<g;f++)h(b,a[f]);return c};x.stripData=function(a,b){if("string"!==typeof a)return a;a=a.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");a=a.replace(/<!\-\-.*?\-\->/g,"");if(!b||b.stripHtml)a=a.replace(/<[^>]*>/g,"");if(!b||b.trim)a=a.replace(/^\s+|\s+$/g,
"");if(!b||b.stripNewlines)a=a.replace(/\n/g," ");if(!b||b.decodeEntities)M.innerHTML=a,a=M.value;return a};x.defaults={buttons:["copy","excel","csv","pdf","print"],name:"main",tabIndex:0,dom:{container:{tag:"div",className:"dt-buttons"},collection:{tag:"div",className:""},button:{tag:"button",className:"dt-button",active:"active",disabled:"disabled",spacerClass:""},buttonLiner:{tag:"span",className:""},split:{tag:"div",className:"dt-button-split"},splitWrapper:{tag:"div",className:"dt-btn-split-wrapper"},
splitDropdown:{tag:"button",text:"&#x25BC;",className:"dt-btn-split-drop",align:"split-right",splitAlignClass:"dt-button-split-left"},splitDropdownButton:{tag:"button",className:"dt-btn-split-drop-button dt-button"},splitCollection:{tag:"div",className:"dt-button-split-collection"}}};x.version="2.2.3";d.extend(D,{collection:{text:function(a){return a.i18n("buttons.collection","Collection")},className:"buttons-collection",closeButton:!1,init:function(a,b,c){b.attr("aria-expanded",!1)},action:function(a,
b,c,e){e._collection.parents("body").length?this.popover(!1,e):this.popover(e._collection,e);"keypress"===a.type&&d("a, button",e._collection).eq(0).focus()},attr:{"aria-haspopup":"dialog"}},split:{text:function(a){return a.i18n("buttons.split","Split")},className:"buttons-split",closeButton:!1,init:function(a,b,c){return b.attr("aria-expanded",!1)},action:function(a,b,c,e){this.popover(e._collection,e)},attr:{"aria-haspopup":"dialog"}},copy:function(a,b){if(D.copyHtml5)return"copyHtml5"},csv:function(a,
b){if(D.csvHtml5&&D.csvHtml5.available(a,b))return"csvHtml5"},excel:function(a,b){if(D.excelHtml5&&D.excelHtml5.available(a,b))return"excelHtml5"},pdf:function(a,b){if(D.pdfHtml5&&D.pdfHtml5.available(a,b))return"pdfHtml5"},pageLength:function(a){a=a.settings()[0].aLengthMenu;var b=[],c=[];if(Array.isArray(a[0]))b=a[0],c=a[1];else for(var e=0;e<a.length;e++){var h=a[e];d.isPlainObject(h)?(b.push(h.value),c.push(h.label)):(b.push(h),c.push(h))}return{extend:"collection",text:function(f){return f.i18n("buttons.pageLength",
{"-1":"Show all rows",_:"Show %d rows"},f.page.len())},className:"buttons-page-length",autoClose:!0,buttons:d.map(b,function(f,g){return{text:c[g],className:"button-page-length",action:function(l,m){m.page.len(f).draw()},init:function(l,m,r){var q=this;m=function(){q.active(l.page.len()===f)};l.on("length.dt"+r.namespace,m);m()},destroy:function(l,m,r){l.off("length.dt"+r.namespace)}}}),init:function(f,g,l){var m=this;f.on("length.dt"+l.namespace,function(){m.text(l.text)})},destroy:function(f,g,
l){f.off("length.dt"+l.namespace)}}},spacer:{style:"empty",spacer:!0,text:function(a){return a.i18n("buttons.spacer","")}}});u.Api.register("buttons()",function(a,b){b===p&&(b=a,a=p);this.selector.buttonGroup=a;var c=this.iterator(!0,"table",function(e){if(e._buttons)return x.buttonSelector(x.instanceSelector(a,e._buttons),b)},!0);c._groupSelector=a;return c});u.Api.register("button()",function(a,b){a=this.buttons(a,b);1<a.length&&a.splice(1,a.length);return a});u.Api.registerPlural("buttons().active()",
"button().active()",function(a){return a===p?this.map(function(b){return b.inst.active(b.node)}):this.each(function(b){b.inst.active(b.node,a)})});u.Api.registerPlural("buttons().action()","button().action()",function(a){return a===p?this.map(function(b){return b.inst.action(b.node)}):this.each(function(b){b.inst.action(b.node,a)})});u.Api.registerPlural("buttons().collectionRebuild()","button().collectionRebuild()",function(a){return this.each(function(b){for(var c=0;c<a.length;c++)"object"===typeof a[c]&&
(a[c].parentConf=b);b.inst.collectionRebuild(b.node,a)})});u.Api.register(["buttons().enable()","button().enable()"],function(a){return this.each(function(b){b.inst.enable(b.node,a)})});u.Api.register(["buttons().disable()","button().disable()"],function(){return this.each(function(a){a.inst.disable(a.node)})});u.Api.register("button().index()",function(){var a=null;this.each(function(b){b=b.inst.index(b.node);null!==b&&(a=b)});return a});u.Api.registerPlural("buttons().nodes()","button().node()",
function(){var a=d();d(this.each(function(b){a=a.add(b.inst.node(b.node))}));return a});u.Api.registerPlural("buttons().processing()","button().processing()",function(a){return a===p?this.map(function(b){return b.inst.processing(b.node)}):this.each(function(b){b.inst.processing(b.node,a)})});u.Api.registerPlural("buttons().text()","button().text()",function(a){return a===p?this.map(function(b){return b.inst.text(b.node)}):this.each(function(b){b.inst.text(b.node,a)})});u.Api.registerPlural("buttons().trigger()",
"button().trigger()",function(){return this.each(function(a){a.inst.node(a.node).trigger("click")})});u.Api.register("button().popover()",function(a,b){return this.map(function(c){return c.inst._popover(a,this.button(this[0].node),b)})});u.Api.register("buttons().containers()",function(){var a=d(),b=this._groupSelector;this.iterator(!0,"table",function(c){if(c._buttons){c=x.instanceSelector(b,c._buttons);for(var e=0,h=c.length;e<h;e++)a=a.add(c[e].container())}});return a});u.Api.register("buttons().container()",
function(){return this.containers().eq(0)});u.Api.register("button().add()",function(a,b,c){var e=this.context;e.length&&(e=x.instanceSelector(this._groupSelector,e[0]._buttons),e.length&&e[0].add(b,a,c));return this.button(this._groupSelector,a)});u.Api.register("buttons().destroy()",function(){this.pluck("inst").unique().each(function(a){a.destroy()});return this});u.Api.registerPlural("buttons().remove()","buttons().remove()",function(){this.each(function(a){a.inst.remove(a.node)});return this});
var H;u.Api.register("buttons.info()",function(a,b,c){var e=this;if(!1===a)return this.off("destroy.btn-info"),J(d("#datatables_buttons_info"),400,function(){d(this).remove()}),clearTimeout(H),H=null,this;H&&clearTimeout(H);d("#datatables_buttons_info").length&&d("#datatables_buttons_info").remove();a=a?"<h2>"+a+"</h2>":"";I(d('<div id="datatables_buttons_info" class="dt-button-info"/>').html(a).append(d("<div/>")["string"===typeof b?"html":"append"](b)).css("display","none").appendTo("body"));c!==
p&&0!==c&&(H=setTimeout(function(){e.buttons.info(!1)},c));this.on("destroy.btn-info",function(){e.buttons.info(!1)});return this});u.Api.register("buttons.exportData()",function(a){if(this.context.length)return Q(new u.Api(this.context[0]),a)});u.Api.register("buttons.exportInfo()",function(a){a||(a={});var b=a;var c="*"===b.filename&&"*"!==b.title&&b.title!==p&&null!==b.title&&""!==b.title?b.title:b.filename;"function"===typeof c&&(c=c());c===p||null===c?c=null:(-1!==c.indexOf("*")&&(c=c.replace("*",
d("head > title").text()).trim()),c=c.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,""),(b=K(b.extension))||(b=""),c+=b);b=K(a.title);b=null===b?null:-1!==b.indexOf("*")?b.replace("*",d("head > title").text()||"Exported data"):b;return{filename:c,title:b,messageTop:N(this,a.message||a.messageTop,"top"),messageBottom:N(this,a.messageBottom,"bottom")}});var K=function(a){return null===a||a===p?null:"function"===typeof a?a():a},N=function(a,b,c){b=K(b);if(null===b)return null;a=d("caption",a.table().container()).eq(0);
return"*"===b?a.css("caption-side")!==c?null:a.length?a.text():"":b},M=d("<textarea/>")[0],Q=function(a,b){var c=d.extend(!0,{},{rows:null,columns:"",modifier:{search:"applied",order:"applied"},orthogonal:"display",stripHtml:!0,stripNewlines:!0,decodeEntities:!0,trim:!0,format:{header:function(t){return x.stripData(t,c)},footer:function(t){return x.stripData(t,c)},body:function(t){return x.stripData(t,c)}},customizeData:null},b);b=a.columns(c.columns).indexes().map(function(t){var y=a.column(t).header();
return c.format.header(y.innerHTML,t,y)}).toArray();var e=a.table().footer()?a.columns(c.columns).indexes().map(function(t){var y=a.column(t).footer();return c.format.footer(y?y.innerHTML:"",t,y)}).toArray():null,h=d.extend({},c.modifier);a.select&&"function"===typeof a.select.info&&h.selected===p&&a.rows(c.rows,d.extend({selected:!0},h)).any()&&d.extend(h,{selected:!0});h=a.rows(c.rows,h).indexes().toArray();var f=a.cells(h,c.columns);h=f.render(c.orthogonal).toArray();f=f.nodes().toArray();for(var g=
b.length,l=[],m=0,r=0,q=0<g?h.length/g:0;r<q;r++){for(var n=[g],k=0;k<g;k++)n[k]=c.format.body(h[m],r,k,f[m]),m++;l[r]=n}b={header:b,footer:e,body:l};c.customizeData&&c.customizeData(b);return b};d.fn.dataTable.Buttons=x;d.fn.DataTable.Buttons=x;d(C).on("init.dt plugin-init.dt",function(a,b){"dt"===a.namespace&&(a=b.oInit.buttons||u.defaults.buttons)&&!b._buttons&&(new x(b,a)).container()});u.ext.feature.push({fnInit:L,cFeature:"B"});u.ext.features&&u.ext.features.register("buttons",L);return x});
/*!
DataTables styling wrapper for Buttons
©2018 SpryMedia Ltd - datatables.net/license
*/
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-dt","datatables.net-buttons"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);b&&b.fn.dataTable||(b=require("datatables.net-dt")(a,b).$);b.fn.dataTable.Buttons||require("datatables.net-buttons")(a,b);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c,a,b,d){return c.fn.dataTable});
/*!
Column visibility buttons for Buttons and DataTables.
2016 SpryMedia Ltd - datatables.net/license
*/
(function(h){"function"===typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(e){return h(e,window,document)}):"object"===typeof exports?module.exports=function(e,g){e||(e=window);g&&g.fn.dataTable||(g=require("datatables.net")(e,g).$);g.fn.dataTable.Buttons||require("datatables.net-buttons")(e,g);return h(g,e,e.document)}:h(jQuery,window,document)})(function(h,e,g,l){e=h.fn.dataTable;h.extend(e.ext.buttons,{colvis:function(b,a){var c=null,d={extend:"collection",
init:function(f,k){c=k},text:function(f){return f.i18n("buttons.colvis","Column visibility")},className:"buttons-colvis",closeButton:!1,buttons:[{extend:"columnsToggle",columns:a.columns,columnText:a.columnText}]};b.on("column-reorder.dt"+a.namespace,function(f,k,m){b.button(null,b.button(null,c).node()).collectionRebuild([{extend:"columnsToggle",columns:a.columns,columnText:a.columnText}])});return d},columnsToggle:function(b,a){return b.columns(a.columns).indexes().map(function(c){return{extend:"columnToggle",
columns:c,columnText:a.columnText}}).toArray()},columnToggle:function(b,a){return{extend:"columnVisibility",columns:a.columns,columnText:a.columnText}},columnsVisibility:function(b,a){return b.columns(a.columns).indexes().map(function(c){return{extend:"columnVisibility",columns:c,visibility:a.visibility,columnText:a.columnText}}).toArray()},columnVisibility:{columns:l,text:function(b,a,c){return c._columnText(b,c)},className:"buttons-columnVisibility",action:function(b,a,c,d){b=a.columns(d.columns);
a=b.visible();b.visible(d.visibility!==l?d.visibility:!(a.length&&a[0]))},init:function(b,a,c){var d=this;a.attr("data-cv-idx",c.columns);b.on("column-visibility.dt"+c.namespace,function(f,k){k.bDestroying||k.nTable!=b.settings()[0].nTable||d.active(b.column(c.columns).visible())}).on("column-reorder.dt"+c.namespace,function(f,k,m){c.destroying||1!==b.columns(c.columns).count()||(d.text(c._columnText(b,c)),d.active(b.column(c.columns).visible()))});this.active(b.column(c.columns).visible())},destroy:function(b,
a,c){b.off("column-visibility.dt"+c.namespace).off("column-reorder.dt"+c.namespace)},_columnText:function(b,a){var c=b.column(a.columns).index(),d=b.settings()[0].aoColumns[c].sTitle;d||(d=b.column(c).header().innerHTML);d=d.replace(/\n/g," ").replace(/<br\s*\/?>/gi," ").replace(/<select(.*?)<\/select>/g,"").replace(/<!\-\-.*?\-\->/g,"").replace(/<.*?>/g,"").replace(/^\s+|\s+$/g,"");return a.columnText?a.columnText(b,c,d):d}},colvisRestore:{className:"buttons-colvisRestore",text:function(b){return b.i18n("buttons.colvisRestore",
"Restore visibility")},init:function(b,a,c){c._visOriginal=b.columns().indexes().map(function(d){return b.column(d).visible()}).toArray()},action:function(b,a,c,d){a.columns().every(function(f){f=a.colReorder&&a.colReorder.transpose?a.colReorder.transpose(f,"toOriginal"):f;this.visible(d._visOriginal[f])})}},colvisGroup:{className:"buttons-colvisGroup",action:function(b,a,c,d){a.columns(d.show).visible(!0,!1);a.columns(d.hide).visible(!1,!1);a.columns.adjust()},show:[],hide:[]}});return e.Buttons});
/*!
SpryMedia Ltd.
This source file is free software, available under the following license:
MIT license - http://datatables.net/license/mit
This source file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
For details please refer to: http://www.datatables.net
ColReorder 1.5.6
©2010-2022 SpryMedia Ltd - datatables.net/license
*/
(function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(u){return e(u,window,document)}):"object"===typeof exports?module.exports=function(u,t){u||(u=window);t&&t.fn.dataTable||(t=require("datatables.net")(u,t).$);return e(t,u,u.document)}:e(jQuery,window,document)})(function(e,u,t,z){function y(a){for(var b=[],c=0,f=a.length;c<f;c++)b[a[c]]=c;return b}function v(a,b,c){b=a.splice(b,1)[0];a.splice(c,0,b)}function A(a,b,c){for(var f=[],h=0,g=a.childNodes.length;h<
g;h++)1==a.childNodes[h].nodeType&&f.push(a.childNodes[h]);b=f[b];null!==c?a.insertBefore(b,f[c]):a.appendChild(b)}var D=e.fn.dataTable;e.fn.dataTableExt.oApi.fnColReorder=function(a,b,c,f,h){var g,m,k=a.aoColumns.length;var p=function(w,x,E){if(w[x]&&"function"!==typeof w[x]){var B=w[x].split("."),C=B.shift();isNaN(1*C)||(w[x]=E[1*C]+"."+B.join("."))}};if(b!=c)if(0>b||b>=k)this.oApi._fnLog(a,1,"ColReorder 'from' index is out of bounds: "+b);else if(0>c||c>=k)this.oApi._fnLog(a,1,"ColReorder 'to' index is out of bounds: "+
c);else{var l=[];var d=0;for(g=k;d<g;d++)l[d]=d;v(l,b,c);var q=y(l);d=0;for(g=a.aaSorting.length;d<g;d++)a.aaSorting[d][0]=q[a.aaSorting[d][0]];if(null!==a.aaSortingFixed)for(d=0,g=a.aaSortingFixed.length;d<g;d++)a.aaSortingFixed[d][0]=q[a.aaSortingFixed[d][0]];d=0;for(g=k;d<g;d++){var n=a.aoColumns[d];l=0;for(m=n.aDataSort.length;l<m;l++)n.aDataSort[l]=q[n.aDataSort[l]];n.idx=q[n.idx]}e.each(a.aLastSort,function(w,x){a.aLastSort[w].src=q[x.src]});d=0;for(g=k;d<g;d++)n=a.aoColumns[d],"number"==typeof n.mData?
n.mData=q[n.mData]:e.isPlainObject(n.mData)&&(p(n.mData,"_",q),p(n.mData,"filter",q),p(n.mData,"sort",q),p(n.mData,"type",q));if(a.aoColumns[b].bVisible){p=this.oApi._fnColumnIndexToVisible(a,b);m=null;for(d=c<b?c:c+1;null===m&&d<k;)m=this.oApi._fnColumnIndexToVisible(a,d),d++;l=a.nTHead.getElementsByTagName("tr");d=0;for(g=l.length;d<g;d++)A(l[d],p,m);if(null!==a.nTFoot)for(l=a.nTFoot.getElementsByTagName("tr"),d=0,g=l.length;d<g;d++)A(l[d],p,m);d=0;for(g=a.aoData.length;d<g;d++)null!==a.aoData[d].nTr&&
A(a.aoData[d].nTr,p,m)}v(a.aoColumns,b,c);d=0;for(g=k;d<g;d++)a.oApi._fnColumnOptions(a,d,{});v(a.aoPreSearchCols,b,c);d=0;for(g=a.aoData.length;d<g;d++){m=a.aoData[d];if(n=m.anCells)for(v(n,b,c),l=0,p=n.length;l<p;l++)n[l]&&n[l]._DT_CellIndex&&(n[l]._DT_CellIndex.column=l);Array.isArray(m._aData)&&v(m._aData,b,c)}d=0;for(g=a.aoHeader.length;d<g;d++)v(a.aoHeader[d],b,c);if(null!==a.aoFooter)for(d=0,g=a.aoFooter.length;d<g;d++)v(a.aoFooter[d],b,c);(h||h===z)&&e.fn.dataTable.Api(a).rows().invalidate("data");
d=0;for(g=k;d<g;d++)e(a.aoColumns[d].nTh).off(".DT"),this.oApi._fnSortAttachListener(a,a.aoColumns[d].nTh,d);e(a.oInstance).trigger("column-reorder.dt",[a,{from:b,to:c,mapping:q,drop:f,iFrom:b,iTo:c,aiInvertMapping:q}])}};var r=function(a,b){a=(new e.fn.dataTable.Api(a)).settings()[0];if(a._colReorder)return a._colReorder;!0===b&&(b={});var c=e.fn.dataTable.camelToHungarian;c&&(c(r.defaults,r.defaults,!0),c(r.defaults,b||{}));this.s={dt:null,enable:null,init:e.extend(!0,{},r.defaults,b),fixed:0,fixedRight:0,
reorderCallback:null,mouse:{startX:-1,startY:-1,offsetX:-1,offsetY:-1,target:-1,targetIndex:-1,fromIndex:-1},aoTargets:[]};this.dom={drag:null,pointer:null};this.s.enable=this.s.init.bEnable;this.s.dt=a;this.s.dt._colReorder=this;this._fnConstruct();return this};e.extend(r.prototype,{fnEnable:function(a){if(!1===a)return fnDisable();this.s.enable=!0},fnDisable:function(){this.s.enable=!1},fnReset:function(){this._fnOrderColumns(this.fnOrder());return this},fnGetCurrentOrder:function(){return this.fnOrder()},
fnOrder:function(a,b){var c=[],f,h=this.s.dt.aoColumns;if(a===z){b=0;for(f=h.length;b<f;b++)c.push(h[b]._ColReorder_iOrigCol);return c}if(b){h=this.fnOrder();b=0;for(f=a.length;b<f;b++)c.push(e.inArray(a[b],h));a=c}this._fnOrderColumns(y(a));return this},fnTranspose:function(a,b){b||(b="toCurrent");var c=this.fnOrder(),f=this.s.dt.aoColumns;return"toCurrent"===b?Array.isArray(a)?e.map(a,function(h){return e.inArray(h,c)}):e.inArray(a,c):Array.isArray(a)?e.map(a,function(h){return f[h]._ColReorder_iOrigCol}):
f[a]._ColReorder_iOrigCol},_fnConstruct:function(){var a=this,b=this.s.dt.aoColumns.length,c=this.s.dt.nTable,f;this.s.init.iFixedColumns&&(this.s.fixed=this.s.init.iFixedColumns);this.s.init.iFixedColumnsLeft&&(this.s.fixed=this.s.init.iFixedColumnsLeft);this.s.fixedRight=this.s.init.iFixedColumnsRight?this.s.init.iFixedColumnsRight:0;this.s.init.fnReorderCallback&&(this.s.reorderCallback=this.s.init.fnReorderCallback);for(f=0;f<b;f++)f>this.s.fixed-1&&f<b-this.s.fixedRight&&this._fnMouseListener(f,
this.s.dt.aoColumns[f].nTh),this.s.dt.aoColumns[f]._ColReorder_iOrigCol=f;this.s.dt.oApi._fnCallbackReg(this.s.dt,"aoStateSaveParams",function(m,k){a._fnStateSave.call(a,k)},"ColReorder_State");this.s.dt.oApi._fnCallbackReg(this.s.dt,"aoStateLoadParams",function(m,k){a.s.dt._colReorder.fnOrder(k.ColReorder,!0)});var h=null;this.s.init.aiOrder&&(h=this.s.init.aiOrder.slice());this.s.dt.oLoadedState&&"undefined"!=typeof this.s.dt.oLoadedState.ColReorder&&this.s.dt.oLoadedState.ColReorder.length==this.s.dt.aoColumns.length&&
(h=this.s.dt.oLoadedState.ColReorder);if(h)if(a.s.dt._bInitComplete)b=y(h),a._fnOrderColumns.call(a,b);else{var g=!1;e(c).on("draw.dt.colReorder",function(){if(!a.s.dt._bInitComplete&&!g){g=!0;var m=y(h);a._fnOrderColumns.call(a,m)}})}else this._fnSetColumnIndexes();e(c).on("destroy.dt.colReorder",function(){e(c).off("destroy.dt.colReorder draw.dt.colReorder");e.each(a.s.dt.aoColumns,function(m,k){e(k.nTh).off(".ColReorder");e(k.nTh).removeAttr("data-column-index")});a.s.dt._colReorder=null;a.s=null})},
_fnOrderColumns:function(a){var b=!1;if(a.length!=this.s.dt.aoColumns.length)this.s.dt.oInstance.oApi._fnLog(this.s.dt,1,"ColReorder - array reorder does not match known number of columns. Skipping.");else{for(var c=0,f=a.length;c<f;c++){var h=e.inArray(c,a);c!=h&&(v(a,h,c),this.s.dt.oInstance.fnColReorder(h,c,!0,!1),b=!0)}this._fnSetColumnIndexes();b&&(e.fn.dataTable.Api(this.s.dt).rows().invalidate("data"),""===this.s.dt.oScroll.sX&&""===this.s.dt.oScroll.sY||this.s.dt.oInstance.fnAdjustColumnSizing(!1),
this.s.dt.oInstance.oApi._fnSaveState(this.s.dt),null!==this.s.reorderCallback&&this.s.reorderCallback.call(this))}},_fnStateSave:function(a){if(null!==this.s){var b,c,f=this.s.dt.aoColumns;a.ColReorder=[];if(a.aaSorting){for(b=0;b<a.aaSorting.length;b++)a.aaSorting[b][0]=f[a.aaSorting[b][0]]._ColReorder_iOrigCol;var h=e.extend(!0,[],a.aoSearchCols);b=0;for(c=f.length;b<c;b++){var g=f[b]._ColReorder_iOrigCol;a.aoSearchCols[g]=h[b];a.abVisCols[g]=f[b].bVisible;a.ColReorder.push(g)}}else if(a.order){for(b=
0;b<a.order.length;b++)a.order[b][0]=f[a.order[b][0]]._ColReorder_iOrigCol;h=e.extend(!0,[],a.columns);b=0;for(c=f.length;b<c;b++)g=f[b]._ColReorder_iOrigCol,a.columns[g]=h[b],a.ColReorder.push(g)}}},_fnMouseListener:function(a,b){var c=this;e(b).on("mousedown.ColReorder",function(f){c.s.enable&&1===f.which&&c._fnMouseDown.call(c,f,b)}).on("touchstart.ColReorder",function(f){c.s.enable&&c._fnMouseDown.call(c,f,b)})},_fnMouseDown:function(a,b){var c=this,f=e(a.target).closest("th, td").offset();b=
parseInt(e(b).attr("data-column-index"),10);b!==z&&(this.s.mouse.startX=this._fnCursorPosition(a,"pageX"),this.s.mouse.startY=this._fnCursorPosition(a,"pageY"),this.s.mouse.offsetX=this._fnCursorPosition(a,"pageX")-f.left,this.s.mouse.offsetY=this._fnCursorPosition(a,"pageY")-f.top,this.s.mouse.target=this.s.dt.aoColumns[b].nTh,this.s.mouse.targetIndex=b,this.s.mouse.fromIndex=b,this._fnRegions(),e(t).on("mousemove.ColReorder touchmove.ColReorder",function(h){c._fnMouseMove.call(c,h)}).on("mouseup.ColReorder touchend.ColReorder",
function(h){c._fnMouseUp.call(c,h)}))},_fnMouseMove:function(a){var b=this;if(null===this.dom.drag){if(5>Math.pow(Math.pow(this._fnCursorPosition(a,"pageX")-this.s.mouse.startX,2)+Math.pow(this._fnCursorPosition(a,"pageY")-this.s.mouse.startY,2),.5))return;this._fnCreateDragNode()}this.dom.drag.css({left:this._fnCursorPosition(a,"pageX")-this.s.mouse.offsetX,top:this._fnCursorPosition(a,"pageY")-this.s.mouse.offsetY});var c=this.s.mouse.toIndex;a=this._fnCursorPosition(a,"pageX");for(var f=function(d){for(;0<=
d;){d--;if(0>=d)return null;if(b.s.aoTargets[d+1].x!==b.s.aoTargets[d].x)return b.s.aoTargets[d]}},h=function(){for(var d=0;d<b.s.aoTargets.length-1;d++)if(b.s.aoTargets[d].x!==b.s.aoTargets[d+1].x)return b.s.aoTargets[d]},g=function(){for(var d=b.s.aoTargets.length-1;0<d;d--)if(b.s.aoTargets[d].x!==b.s.aoTargets[d-1].x)return b.s.aoTargets[d]},m=1;m<this.s.aoTargets.length;m++){var k=f(m);k||(k=h());var p=k.x+(this.s.aoTargets[m].x-k.x)/2;if(this._fnIsLtr()){if(a<p){var l=k;break}}else if(a>p){l=
k;break}}l?(this.dom.pointer.css("left",l.x),this.s.mouse.toIndex=l.to):(this.dom.pointer.css("left",g().x),this.s.mouse.toIndex=g().to);this.s.init.bRealtime&&c!==this.s.mouse.toIndex&&(this.s.dt.oInstance.fnColReorder(this.s.mouse.fromIndex,this.s.mouse.toIndex),this.s.mouse.fromIndex=this.s.mouse.toIndex,""===this.s.dt.oScroll.sX&&""===this.s.dt.oScroll.sY||this.s.dt.oInstance.fnAdjustColumnSizing(!1),this._fnRegions())},_fnMouseUp:function(a){e(t).off(".ColReorder");null!==this.dom.drag&&(this.dom.drag.remove(),
this.dom.pointer.remove(),this.dom.drag=null,this.dom.pointer=null,this.s.dt.oInstance.fnColReorder(this.s.mouse.fromIndex,this.s.mouse.toIndex,!0),this._fnSetColumnIndexes(),""===this.s.dt.oScroll.sX&&""===this.s.dt.oScroll.sY||this.s.dt.oInstance.fnAdjustColumnSizing(!1),this.s.dt.oInstance.oApi._fnSaveState(this.s.dt),null!==this.s.reorderCallback&&this.s.reorderCallback.call(this))},_fnRegions:function(){var a=this.s.dt.aoColumns,b=this._fnIsLtr();this.s.aoTargets.splice(0,this.s.aoTargets.length);
var c=e(this.s.dt.nTable).offset().left,f=[];e.each(a,function(m,k){if(k.bVisible&&"none"!==k.nTh.style.display){k=e(k.nTh);var p=k.offset().left;b&&(p+=k.outerWidth());f.push({index:m,bound:p});c=p}else f.push({index:m,bound:c})});var h=f[0];a=e(a[h.index].nTh).outerWidth();this.s.aoTargets.push({to:0,x:h.bound-a});for(h=0;h<f.length;h++){a=f[h];var g=a.index;a.index<this.s.mouse.fromIndex&&g++;this.s.aoTargets.push({to:g,x:a.bound})}0!==this.s.fixedRight&&this.s.aoTargets.splice(this.s.aoTargets.length-
this.s.fixedRight);0!==this.s.fixed&&this.s.aoTargets.splice(0,this.s.fixed)},_fnCreateDragNode:function(){var a=""!==this.s.dt.oScroll.sX||""!==this.s.dt.oScroll.sY,b=this.s.dt.aoColumns[this.s.mouse.targetIndex].nTh,c=b.parentNode,f=c.parentNode,h=f.parentNode,g=e(b).clone();this.dom.drag=e(h.cloneNode(!1)).addClass("DTCR_clonedTable").append(e(f.cloneNode(!1)).append(e(c.cloneNode(!1)).append(g[0]))).css({position:"absolute",top:0,left:0,width:e(b).outerWidth(),height:e(b).outerHeight()}).appendTo("body");
this.dom.pointer=e("<div></div>").addClass("DTCR_pointer").css({position:"absolute",top:a?e(e(this.s.dt.nScrollBody).parent()).offset().top:e(this.s.dt.nTable).offset().top,height:a?e(e(this.s.dt.nScrollBody).parent()).height():e(this.s.dt.nTable).height()}).appendTo("body")},_fnSetColumnIndexes:function(){e.each(this.s.dt.aoColumns,function(a,b){e(b.nTh).attr("data-column-index",a)})},_fnCursorPosition:function(a,b){return-1!==a.type.indexOf("touch")?a.originalEvent.touches[0][b]:a[b]},_fnIsLtr:function(){return"rtl"!==
e(this.s.dt.nTable).css("direction")}});r.defaults={aiOrder:null,bEnable:!0,bRealtime:!0,iFixedColumnsLeft:0,iFixedColumnsRight:0,fnReorderCallback:null};r.version="1.5.6";e.fn.dataTable.ColReorder=r;e.fn.DataTable.ColReorder=r;"function"==typeof e.fn.dataTable&&"function"==typeof e.fn.dataTableExt.fnVersionCheck&&e.fn.dataTableExt.fnVersionCheck("1.10.8")?e.fn.dataTableExt.aoFeatures.push({fnInit:function(a){var b=a.oInstance;a._colReorder?b.oApi._fnLog(a,1,"ColReorder attempted to initialise twice. Ignoring second"):
(b=a.oInit,new r(a,b.colReorder||b.oColReorder||{}));return null},cFeature:"R",sFeature:"ColReorder"}):alert("Warning: ColReorder requires DataTables 1.10.8 or greater - www.datatables.net/download");e(t).on("preInit.dt.colReorder",function(a,b){if("dt"===a.namespace){a=b.oInit.colReorder;var c=D.defaults.colReorder;if(a||c)c=e.extend({},a,c),!1!==a&&new r(b,c)}});e.fn.dataTable.Api.register("colReorder.reset()",function(){return this.iterator("table",function(a){a._colReorder.fnReset()})});e.fn.dataTable.Api.register("colReorder.order()",
function(a,b){return a?this.iterator("table",function(c){c._colReorder.fnOrder(a,b)}):this.context.length?this.context[0]._colReorder.fnOrder():null});e.fn.dataTable.Api.register("colReorder.transpose()",function(a,b){return this.context.length&&this.context[0]._colReorder?this.context[0]._colReorder.fnTranspose(a,b):a});e.fn.dataTable.Api.register("colReorder.move()",function(a,b,c,f){this.context.length&&(this.context[0]._colReorder.s.dt.oInstance.fnColReorder(a,b,c,f),this.context[0]._colReorder._fnSetColumnIndexes());
return this});e.fn.dataTable.Api.register("colReorder.enable()",function(a){return this.iterator("table",function(b){b._colReorder&&b._colReorder.fnEnable(a)})});e.fn.dataTable.Api.register("colReorder.disable()",function(){return this.iterator("table",function(a){a._colReorder&&a._colReorder.fnDisable()})});return r});
/*!
SpryMedia Ltd.
This source file is free software, available under the following license:
MIT license - http://datatables.net/license/mit
This source file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
For details please refer to: http://www.datatables.net
FixedHeader 3.2.4
©2009-2022 SpryMedia Ltd - datatables.net/license
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(b,h,g){b instanceof String&&(b=String(b));for(var l=b.length,k=0;k<l;k++){var w=b[k];if(h.call(g,w,k,b))return{i:k,v:w}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(b,h,g){if(b==Array.prototype||b==Object.prototype)return b;b[h]=g.value;return b};$jscomp.getGlobal=function(b){b=["object"==typeof globalThis&&globalThis,b,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var h=0;h<b.length;++h){var g=b[h];if(g&&g.Math==Math)return g}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(b,h){var g=$jscomp.propertyToPolyfillSymbol[h];if(null==g)return b[h];g=b[g];return void 0!==g?g:b[h]};
$jscomp.polyfill=function(b,h,g,l){h&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(b,h,g,l):$jscomp.polyfillUnisolated(b,h,g,l))};$jscomp.polyfillUnisolated=function(b,h,g,l){g=$jscomp.global;b=b.split(".");for(l=0;l<b.length-1;l++){var k=b[l];if(!(k in g))return;g=g[k]}b=b[b.length-1];l=g[b];h=h(l);h!=l&&null!=h&&$jscomp.defineProperty(g,b,{configurable:!0,writable:!0,value:h})};
$jscomp.polyfillIsolated=function(b,h,g,l){var k=b.split(".");b=1===k.length;l=k[0];l=!b&&l in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var w=0;w<k.length-1;w++){var t=k[w];if(!(t in l))return;l=l[t]}k=k[k.length-1];g=$jscomp.IS_SYMBOL_NATIVE&&"es6"===g?l[k]:null;h=h(g);null!=h&&(b?$jscomp.defineProperty($jscomp.polyfills,k,{configurable:!0,writable:!0,value:h}):h!==g&&($jscomp.propertyToPolyfillSymbol[k]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(k):$jscomp.POLYFILL_PREFIX+k,k=
$jscomp.propertyToPolyfillSymbol[k],$jscomp.defineProperty(l,k,{configurable:!0,writable:!0,value:h})))};$jscomp.polyfill("Array.prototype.find",function(b){return b?b:function(h,g){return $jscomp.findInternal(this,h,g).v}},"es6","es3");
(function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(h){return b(h,window,document)}):"object"===typeof exports?module.exports=function(h,g){h||(h=window);g&&g.fn.dataTable||(g=require("datatables.net")(h,g).$);return b(g,h,h.document)}:b(jQuery,window,document)})(function(b,h,g,l){var k=b.fn.dataTable,w=0,t=function(a,d){if(!(this instanceof t))throw"FixedHeader must be initialised with the 'new' keyword.";!0===d&&(d={});a=new k.Api(a);this.c=b.extend(!0,
{},t.defaults,d);this.s={dt:a,position:{theadTop:0,tbodyTop:0,tfootTop:0,tfootBottom:0,width:0,left:0,tfootHeight:0,theadHeight:0,windowHeight:b(h).height(),visible:!0},headerMode:null,footerMode:null,autoWidth:a.settings()[0].oFeatures.bAutoWidth,namespace:".dtfc"+w++,scrollLeft:{header:-1,footer:-1},enable:!0};this.dom={floatingHeader:null,thead:b(a.table().header()),tbody:b(a.table().body()),tfoot:b(a.table().footer()),header:{host:null,floating:null,floatingParent:b('<div class="dtfh-floatingparent">'),
placeholder:null},footer:{host:null,floating:null,floatingParent:b('<div class="dtfh-floatingparent">'),placeholder:null}};this.dom.header.host=this.dom.thead.parent();this.dom.footer.host=this.dom.tfoot.parent();a=a.settings()[0];if(a._fixedHeader)throw"FixedHeader already initialised on table "+a.nTable.id;a._fixedHeader=this;this._constructor()};b.extend(t.prototype,{destroy:function(){var a=this.dom;this.s.dt.off(".dtfc");b(h).off(this.s.namespace);a.header.rightBlocker&&a.header.rightBlocker.remove();
a.header.leftBlocker&&a.header.leftBlocker.remove();a.footer.rightBlocker&&a.footer.rightBlocker.remove();a.footer.leftBlocker&&a.footer.leftBlocker.remove();this.c.header&&this._modeChange("in-place","header",!0);this.c.footer&&a.tfoot.length&&this._modeChange("in-place","footer",!0)},enable:function(a,d){this.s.enable=a;if(d||d===l)this._positions(),this._scroll(!0)},enabled:function(){return this.s.enable},headerOffset:function(a){a!==l&&(this.c.headerOffset=a,this.update());return this.c.headerOffset},
footerOffset:function(a){a!==l&&(this.c.footerOffset=a,this.update());return this.c.footerOffset},update:function(a){if(this.s.enable){var d=this.s.dt.table().node();b(d).is(":visible")?this.enable(!0,!1):this.enable(!1,!1);0!==b(d).children("thead").length&&(this._positions(),this._scroll(a!==l?a:!0))}},_constructor:function(){var a=this,d=this.s.dt;b(h).on("scroll"+this.s.namespace,function(){a._scroll()}).on("resize"+this.s.namespace,k.util.throttle(function(){a.s.position.windowHeight=b(h).height();
a.update()},50));var c=b(".fh-fixedHeader");!this.c.headerOffset&&c.length&&(this.c.headerOffset=c.outerHeight());c=b(".fh-fixedFooter");!this.c.footerOffset&&c.length&&(this.c.footerOffset=c.outerHeight());d.on("column-reorder.dt.dtfc column-visibility.dt.dtfc column-sizing.dt.dtfc responsive-display.dt.dtfc",function(f,e){a.update()}).on("draw.dt.dtfc",function(f,e){a.update(e===d.settings()[0]?!1:!0)});d.on("destroy.dtfc",function(){a.destroy()});this._positions();this._scroll()},_clone:function(a,
d){var c=this,f=this.s.dt,e=this.dom[a],n="header"===a?this.dom.thead:this.dom.tfoot;if("footer"!==a||!this._scrollEnabled())if(!d&&e.floating)e.floating.removeClass("fixedHeader-floating fixedHeader-locked");else{d=b(g).scrollLeft();var q=b(g).scrollTop();e.floating&&(null!==e.placeholder&&e.placeholder.remove(),this._unsize(a),e.floating.children().detach(),e.floating.remove());var p=b(f.table().node()),r=b(p.parent()),m=this._scrollEnabled();e.floating=b(f.table().node().cloneNode(!1)).attr("aria-hidden",
"true").css({"table-layout":"fixed",top:0,left:0}).removeAttr("id").append(n);e.floatingParent.css({width:r.width(),overflow:"hidden",height:"fit-content",position:"fixed",left:m?p.offset().left+r.scrollLeft():0}).css("header"===a?{top:this.c.headerOffset,bottom:""}:{top:"",bottom:this.c.footerOffset}).addClass("footer"===a?"dtfh-floatingparentfoot":"dtfh-floatingparenthead").append(e.floating).appendTo("body");this._stickyPosition(e.floating,"-");a=function(){var u=r.scrollLeft();c.s.scrollLeft=
{footer:u,header:u};e.floatingParent.scrollLeft(c.s.scrollLeft.header)};a();r.off("scroll.dtfh").on("scroll.dtfh",a);e.placeholder=n.clone(!1);e.placeholder.find("*[id]").removeAttr("id");e.host.prepend(e.placeholder);this._matchWidths(e.placeholder,e.floating);b(g).scrollTop(q).scrollLeft(d)}},_stickyPosition:function(a,d){if(this._scrollEnabled()){var c=this,f="rtl"===b(c.s.dt.table().node()).css("direction");a.find("th").each(function(){if("sticky"===b(this).css("position")){var e=b(this).css("right"),
n=b(this).css("left");"auto"===e||f?"auto"!==n&&f&&(e=+n.replace(/px/g,"")+("-"===d?-1:1)*c.s.dt.settings()[0].oBrowser.barWidth,b(this).css("left",0<e?e:0)):(e=+e.replace(/px/g,"")+("-"===d?-1:1)*c.s.dt.settings()[0].oBrowser.barWidth,b(this).css("right",0<e?e:0))}})}},_matchWidths:function(a,d){var c=function(n){return b(n,a).map(function(){return 1*b(this).css("width").replace(/[^\d\.]/g,"")}).toArray()},f=function(n,q){b(n,d).each(function(p){b(this).css({width:q[p],minWidth:q[p]})})},e=c("th");
c=c("td");f("th",e);f("td",c)},_unsize:function(a){var d=this.dom[a].floating;d&&("footer"===a||"header"===a&&!this.s.autoWidth)?b("th, td",d).css({width:"",minWidth:""}):d&&"header"===a&&b("th, td",d).css("min-width","")},_horizontal:function(a,d){var c=this.dom[a],f=this.s.scrollLeft;if(c.floating&&f[a]!==d){if(this._scrollEnabled()){var e=b(b(this.s.dt.table().node()).parent()).scrollLeft();c.floating.scrollLeft(e);c.floatingParent.scrollLeft(e)}f[a]=d}},_modeChange:function(a,d,c){var f=this.dom[d],
e=this.s.position,n=this._scrollEnabled();if("footer"!==d||!n){var q=function(B){f.floating.attr("style",function(x,y){return(y||"")+"width: "+B+"px !important;"});n||f.floatingParent.attr("style",function(x,y){return(y||"")+"width: "+B+"px !important;"})},p=this.dom["footer"===d?"tfoot":"thead"],r=b.contains(p[0],g.activeElement)?g.activeElement:null,m=b(b(this.s.dt.table().node()).parent());if("in-place"===a)f.placeholder&&(f.placeholder.remove(),f.placeholder=null),this._unsize(d),"header"===d?
f.host.prepend(p):f.host.append(p),f.floating&&(f.floating.remove(),f.floating=null,this._stickyPosition(f.host,"+")),f.floatingParent&&f.floatingParent.remove(),b(b(f.host.parent()).parent()).scrollLeft(m.scrollLeft());else if("in"===a){this._clone(d,c);p=m.offset();c=b(g).scrollTop();var u=b(h).height();u=c+u;var z=n?p.top:e.tbodyTop;m=n?p.top+m.outerHeight():e.tfootTop;c="footer"===d?z>u?e.tfootHeight:z+e.tfootHeight-u:c+this.c.headerOffset+e.theadHeight-m;m="header"===d?"top":"bottom";c=this.c[d+
"Offset"]-(0<c?c:0);f.floating.addClass("fixedHeader-floating");f.floatingParent.css(m,c).css({left:e.left,height:"header"===d?e.theadHeight:e.tfootHeight,"z-index":2}).append(f.floating);q(e.width);"footer"===d&&f.floating.css("top","")}else"below"===a?(this._clone(d,c),f.floating.addClass("fixedHeader-locked"),f.floatingParent.css({position:"absolute",top:e.tfootTop-e.theadHeight,left:e.left+"px"}),q(e.width)):"above"===a&&(this._clone(d,c),f.floating.addClass("fixedHeader-locked"),f.floatingParent.css({position:"absolute",
top:e.tbodyTop,left:e.left+"px"}),q(e.width));r&&r!==g.activeElement&&setTimeout(function(){r.focus()},10);this.s.scrollLeft.header=-1;this.s.scrollLeft.footer=-1;this.s[d+"Mode"]=a}},_positions:function(){var a=this.s.dt,d=a.table(),c=this.s.position,f=this.dom;d=b(d.node());var e=this._scrollEnabled(),n=b(a.table().header());a=b(a.table().footer());f=f.tbody;var q=d.parent();c.visible=d.is(":visible");c.width=d.outerWidth();c.left=d.offset().left;c.theadTop=n.offset().top;c.tbodyTop=e?q.offset().top:
f.offset().top;c.tbodyHeight=e?q.outerHeight():f.outerHeight();c.theadHeight=n.outerHeight();c.theadBottom=c.theadTop+c.theadHeight;a.length?(c.tfootTop=c.tbodyTop+c.tbodyHeight,c.tfootBottom=c.tfootTop+a.outerHeight(),c.tfootHeight=a.outerHeight()):(c.tfootTop=c.tbodyTop+f.outerHeight(),c.tfootBottom=c.tfootTop,c.tfootHeight=c.tfootTop)},_scroll:function(a){if(!this.s.dt.settings()[0].bDestroying){var d=this._scrollEnabled(),c=b(this.s.dt.table().node()).parent(),f=c.offset(),e=c.outerHeight(),n=
b(g).scrollLeft(),q=b(g).scrollTop(),p=b(h).height(),r=p+q,m=this.s.position,u=d?f.top:m.tbodyTop,z=d?f.left:m.left;e=d?f.top+e:m.tfootTop;var B=d?c.outerWidth():m.tbodyWidth;r=q+p;this.c.header&&(this.s.enable?!m.visible||q+this.c.headerOffset+m.theadHeight<=u?p="in-place":q+this.c.headerOffset+m.theadHeight>u&&q+this.c.headerOffset+m.theadHeight<e?(p="in",c=b(b(this.s.dt.table().node()).parent()),q+this.c.headerOffset+m.theadHeight>e||this.dom.header.floatingParent===l?a=!0:this.dom.header.floatingParent.css({top:this.c.headerOffset,
position:"fixed"}).append(this.dom.header.floating)):p="below":p="in-place",(a||p!==this.s.headerMode)&&this._modeChange(p,"header",a),this._horizontal("header",n));var x={offset:{top:0,left:0},height:0},y={offset:{top:0,left:0},height:0};this.c.footer&&this.dom.tfoot.length&&(this.s.enable?!m.visible||m.tfootBottom+this.c.footerOffset<=r?m="in-place":e+m.tfootHeight+this.c.footerOffset>r&&u+this.c.footerOffset<r?(m="in",a=!0):m="above":m="in-place",(a||m!==this.s.footerMode)&&this._modeChange(m,
"footer",a),this._horizontal("footer",n),a=function(A){return{offset:A.offset(),height:A.outerHeight()}},x=this.dom.header.floating?a(this.dom.header.floating):a(this.dom.thead),y=this.dom.footer.floating?a(this.dom.footer.floating):a(this.dom.tfoot),d&&y.offset.top>q&&(d=q-f.top,r=r+(d>-x.height?d:0)-(x.offset.top+(d<-x.height?x.height:0)+y.height),0>r&&(r=0),c.outerHeight(r),Math.round(c.outerHeight())>=Math.round(r)?b(this.dom.tfoot.parent()).addClass("fixedHeader-floating"):b(this.dom.tfoot.parent()).removeClass("fixedHeader-floating")));
this.dom.header.floating&&this.dom.header.floatingParent.css("left",z-n);this.dom.footer.floating&&this.dom.footer.floatingParent.css("left",z-n);this.s.dt.settings()[0]._fixedColumns!==l&&(c=function(A,C,v){v===l&&(v=b("div.dtfc-"+A+"-"+C+"-blocker"),v=0===v.length?null:v.clone().appendTo("body").css("z-index",1));null!==v&&v.css({top:"top"===C?x.offset.top:y.offset.top,left:"right"===A?z+B-v.width():z});return v},this.dom.header.rightBlocker=c("right","top",this.dom.header.rightBlocker),this.dom.header.leftBlocker=
c("left","top",this.dom.header.leftBlocker),this.dom.footer.rightBlocker=c("right","bottom",this.dom.footer.rightBlocker),this.dom.footer.leftBlocker=c("left","bottom",this.dom.footer.leftBlocker))}},_scrollEnabled:function(){var a=this.s.dt.settings()[0].oScroll;return""!==a.sY||""!==a.sX?!0:!1}});t.version="3.2.4";t.defaults={header:!0,footer:!1,headerOffset:0,footerOffset:0};b.fn.dataTable.FixedHeader=t;b.fn.DataTable.FixedHeader=t;b(g).on("init.dt.dtfh",function(a,d,c){"dt"===a.namespace&&(a=
d.oInit.fixedHeader,c=k.defaults.fixedHeader,!a&&!c||d._fixedHeader||(c=b.extend({},c,a),!1!==a&&new t(d,c)))});k.Api.register("fixedHeader()",function(){});k.Api.register("fixedHeader.adjust()",function(){return this.iterator("table",function(a){(a=a._fixedHeader)&&a.update()})});k.Api.register("fixedHeader.enable()",function(a){return this.iterator("table",function(d){d=d._fixedHeader;a=a!==l?a:!0;d&&a!==d.enabled()&&d.enable(a)})});k.Api.register("fixedHeader.enabled()",function(){if(this.context.length){var a=
this.context[0]._fixedHeader;if(a)return a.enabled()}return!1});k.Api.register("fixedHeader.disable()",function(){return this.iterator("table",function(a){(a=a._fixedHeader)&&a.enabled()&&a.enable(!1)})});b.each(["header","footer"],function(a,d){k.Api.register("fixedHeader."+d+"Offset()",function(c){var f=this.context;return c===l?f.length&&f[0]._fixedHeader?f[0]._fixedHeader[d+"Offset"]():l:this.iterator("table",function(e){if(e=e._fixedHeader)e[d+"Offset"](c)})})});return t});
/*!
SearchPanes 2.0.2
2019-2022 SpryMedia Ltd - datatables.net/license
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.getGlobal=function(l){l=["object"==typeof globalThis&&globalThis,l,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var n=0;n<l.length;++n){var k=l[n];if(k&&k.Math==Math)return k}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.checkEs6ConformanceViaProxy=function(){try{var l={},n=Object.create(new $jscomp.global.Proxy(l,{get:function(k,q,v){return k==l&&"q"==q&&v==n}}));return!0===n.q}catch(k){return!1}};$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS=!1;$jscomp.ES6_CONFORMANCE=$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS&&$jscomp.checkEs6ConformanceViaProxy();$jscomp.arrayIteratorImpl=function(l){var n=0;return function(){return n<l.length?{done:!1,value:l[n++]}:{done:!0}}};$jscomp.arrayIterator=function(l){return{next:$jscomp.arrayIteratorImpl(l)}};
$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(l,n,k){if(l==Array.prototype||l==Object.prototype)return l;l[n]=k.value;return l};$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;
$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(l,n){var k=$jscomp.propertyToPolyfillSymbol[n];if(null==k)return l[n];k=l[k];return void 0!==k?k:l[n]};$jscomp.polyfill=function(l,n,k,q){n&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(l,n,k,q):$jscomp.polyfillUnisolated(l,n,k,q))};
$jscomp.polyfillUnisolated=function(l,n,k,q){k=$jscomp.global;l=l.split(".");for(q=0;q<l.length-1;q++){var v=l[q];if(!(v in k))return;k=k[v]}l=l[l.length-1];q=k[l];n=n(q);n!=q&&null!=n&&$jscomp.defineProperty(k,l,{configurable:!0,writable:!0,value:n})};
$jscomp.polyfillIsolated=function(l,n,k,q){var v=l.split(".");l=1===v.length;q=v[0];q=!l&&q in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var B=0;B<v.length-1;B++){var C=v[B];if(!(C in q))return;q=q[C]}v=v[v.length-1];k=$jscomp.IS_SYMBOL_NATIVE&&"es6"===k?q[v]:null;n=n(k);null!=n&&(l?$jscomp.defineProperty($jscomp.polyfills,v,{configurable:!0,writable:!0,value:n}):n!==k&&($jscomp.propertyToPolyfillSymbol[v]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(v):$jscomp.POLYFILL_PREFIX+v,v=
$jscomp.propertyToPolyfillSymbol[v],$jscomp.defineProperty(q,v,{configurable:!0,writable:!0,value:n})))};$jscomp.initSymbol=function(){};
$jscomp.polyfill("Symbol",function(l){if(l)return l;var n=function(v,B){this.$jscomp$symbol$id_=v;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:B})};n.prototype.toString=function(){return this.$jscomp$symbol$id_};var k=0,q=function(v){if(this instanceof q)throw new TypeError("Symbol is not a constructor");return new n("jscomp_symbol_"+(v||"")+"_"+k++,v)};return q},"es6","es3");$jscomp.initSymbolIterator=function(){};
$jscomp.polyfill("Symbol.iterator",function(l){if(l)return l;l=Symbol("Symbol.iterator");for(var n="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),k=0;k<n.length;k++){var q=$jscomp.global[n[k]];"function"===typeof q&&"function"!=typeof q.prototype[l]&&$jscomp.defineProperty(q.prototype,l,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}})}return l},"es6",
"es3");$jscomp.initSymbolAsyncIterator=function(){};$jscomp.iteratorPrototype=function(l){l={next:l};l[Symbol.iterator]=function(){return this};return l};$jscomp.makeIterator=function(l){var n="undefined"!=typeof Symbol&&Symbol.iterator&&l[Symbol.iterator];return n?n.call(l):$jscomp.arrayIterator(l)};$jscomp.owns=function(l,n){return Object.prototype.hasOwnProperty.call(l,n)};
$jscomp.polyfill("WeakMap",function(l){function n(){if(!l||!Object.seal)return!1;try{var p=Object.seal({}),u=Object.seal({}),y=new l([[p,2],[u,3]]);if(2!=y.get(p)||3!=y.get(u))return!1;y.delete(p);y.set(u,4);return!y.has(p)&&4==y.get(u)}catch(E){return!1}}function k(){}function q(p){var u=typeof p;return"object"===u&&null!==p||"function"===u}function v(p){if(!$jscomp.owns(p,C)){var u=new k;$jscomp.defineProperty(p,C,{value:u})}}function B(p){if(!$jscomp.ISOLATE_POLYFILLS){var u=Object[p];u&&(Object[p]=
function(y){if(y instanceof k)return y;Object.isExtensible(y)&&v(y);return u(y)})}}if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(l&&$jscomp.ES6_CONFORMANCE)return l}else if(n())return l;var C="$jscomp_hidden_"+Math.random();B("freeze");B("preventExtensions");B("seal");var H=0,r=function(p){this.id_=(H+=Math.random()+1).toString();if(p){p=$jscomp.makeIterator(p);for(var u;!(u=p.next()).done;)u=u.value,this.set(u[0],u[1])}};r.prototype.set=function(p,u){if(!q(p))throw Error("Invalid WeakMap key");
v(p);if(!$jscomp.owns(p,C))throw Error("WeakMap key fail: "+p);p[C][this.id_]=u;return this};r.prototype.get=function(p){return q(p)&&$jscomp.owns(p,C)?p[C][this.id_]:void 0};r.prototype.has=function(p){return q(p)&&$jscomp.owns(p,C)&&$jscomp.owns(p[C],this.id_)};r.prototype.delete=function(p){return q(p)&&$jscomp.owns(p,C)&&$jscomp.owns(p[C],this.id_)?delete p[C][this.id_]:!1};return r},"es6","es3");$jscomp.MapEntry=function(){};
$jscomp.polyfill("Map",function(l){function n(){if($jscomp.ASSUME_NO_NATIVE_MAP||!l||"function"!=typeof l||!l.prototype.entries||"function"!=typeof Object.seal)return!1;try{var r=Object.seal({x:4}),p=new l($jscomp.makeIterator([[r,"s"]]));if("s"!=p.get(r)||1!=p.size||p.get({x:4})||p.set({x:4},"t")!=p||2!=p.size)return!1;var u=p.entries(),y=u.next();if(y.done||y.value[0]!=r||"s"!=y.value[1])return!1;y=u.next();return y.done||4!=y.value[0].x||"t"!=y.value[1]||!u.next().done?!1:!0}catch(E){return!1}}
if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(l&&$jscomp.ES6_CONFORMANCE)return l}else if(n())return l;var k=new WeakMap,q=function(r){this.data_={};this.head_=C();this.size=0;if(r){r=$jscomp.makeIterator(r);for(var p;!(p=r.next()).done;)p=p.value,this.set(p[0],p[1])}};q.prototype.set=function(r,p){r=0===r?0:r;var u=v(this,r);u.list||(u.list=this.data_[u.id]=[]);u.entry?u.entry.value=p:(u.entry={next:this.head_,previous:this.head_.previous,head:this.head_,key:r,value:p},u.list.push(u.entry),
this.head_.previous.next=u.entry,this.head_.previous=u.entry,this.size++);return this};q.prototype.delete=function(r){r=v(this,r);return r.entry&&r.list?(r.list.splice(r.index,1),r.list.length||delete this.data_[r.id],r.entry.previous.next=r.entry.next,r.entry.next.previous=r.entry.previous,r.entry.head=null,this.size--,!0):!1};q.prototype.clear=function(){this.data_={};this.head_=this.head_.previous=C();this.size=0};q.prototype.has=function(r){return!!v(this,r).entry};q.prototype.get=function(r){return(r=
v(this,r).entry)&&r.value};q.prototype.entries=function(){return B(this,function(r){return[r.key,r.value]})};q.prototype.keys=function(){return B(this,function(r){return r.key})};q.prototype.values=function(){return B(this,function(r){return r.value})};q.prototype.forEach=function(r,p){for(var u=this.entries(),y;!(y=u.next()).done;)y=y.value,r.call(p,y[1],y[0],this)};q.prototype[Symbol.iterator]=q.prototype.entries;var v=function(r,p){var u=p&&typeof p;"object"==u||"function"==u?k.has(p)?u=k.get(p):
(u=""+ ++H,k.set(p,u)):u="p_"+p;var y=r.data_[u];if(y&&$jscomp.owns(r.data_,u))for(r=0;r<y.length;r++){var E=y[r];if(p!==p&&E.key!==E.key||p===E.key)return{id:u,list:y,index:r,entry:E}}return{id:u,list:y,index:-1,entry:void 0}},B=function(r,p){var u=r.head_;return $jscomp.iteratorPrototype(function(){if(u){for(;u.head!=r.head_;)u=u.previous;for(;u.next!=u.head;)return u=u.next,{done:!1,value:p(u)};u=null}return{done:!0,value:void 0}})},C=function(){var r={};return r.previous=r.next=r.head=r},H=0;
return q},"es6","es3");$jscomp.findInternal=function(l,n,k){l instanceof String&&(l=String(l));for(var q=l.length,v=0;v<q;v++){var B=l[v];if(n.call(k,B,v,l))return{i:v,v:B}}return{i:-1,v:void 0}};$jscomp.polyfill("Array.prototype.find",function(l){return l?l:function(n,k){return $jscomp.findInternal(this,n,k).v}},"es6","es3");
$jscomp.iteratorFromArray=function(l,n){l instanceof String&&(l+="");var k=0,q={next:function(){if(k<l.length){var v=k++;return{value:n(v,l[v]),done:!1}}q.next=function(){return{done:!0,value:void 0}};return q.next()}};q[Symbol.iterator]=function(){return q};return q};$jscomp.polyfill("Array.prototype.keys",function(l){return l?l:function(){return $jscomp.iteratorFromArray(this,function(n){return n})}},"es6","es3");
$jscomp.polyfill("Object.is",function(l){return l?l:function(n,k){return n===k?0!==n||1/n===1/k:n!==n&&k!==k}},"es6","es3");$jscomp.polyfill("Array.prototype.includes",function(l){return l?l:function(n,k){var q=this;q instanceof String&&(q=String(q));var v=q.length;k=k||0;for(0>k&&(k=Math.max(k+v,0));k<v;k++){var B=q[k];if(B===n||Object.is(B,n))return!0}return!1}},"es7","es3");
$jscomp.checkStringArgs=function(l,n,k){if(null==l)throw new TypeError("The 'this' value for String.prototype."+k+" must not be null or undefined");if(n instanceof RegExp)throw new TypeError("First argument to String.prototype."+k+" must not be a regular expression");return l+""};$jscomp.polyfill("String.prototype.includes",function(l){return l?l:function(n,k){return-1!==$jscomp.checkStringArgs(this,n,"includes").indexOf(n,k||0)}},"es6","es3");
$jscomp.underscoreProtoCanBeSet=function(){var l={a:!0},n={};try{return n.__proto__=l,n.a}catch(k){}return!1};$jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(l,n){l.__proto__=n;if(l.__proto__!==n)throw new TypeError(l+" is not extensible");return l}:null;$jscomp.polyfill("Object.setPrototypeOf",function(l){return l||$jscomp.setPrototypeOf},"es6","es5");
(function(){function l(h){k=h;q=h.fn.dataTable}function n(h){D=h;G=h.fn.dataTable}var k,q,v=function(){function h(b,a,c,d,e){var f=this;void 0===e&&(e=null);if(!q||!q.versionCheck||!q.versionCheck("1.10.0"))throw Error("SearchPane requires DataTables 1.10 or newer");if(!q.select)throw Error("SearchPane requires Select");b=new q.Api(b);this.classes=k.extend(!0,{},h.classes);this.c=k.extend(!0,{},h.defaults,a);a&&a.hideCount&&void 0===a.viewCount&&(this.c.viewCount=!this.c.hideCount);a=b.columns().eq(0).toArray().length;
this.s={colExists:c<a,colOpts:void 0,customPaneSettings:e,displayed:!1,dt:b,dtPane:void 0,firstSet:!0,index:c,indexes:[],listSet:!1,name:void 0,rowData:{arrayFilter:[],arrayOriginal:[],bins:{},binsOriginal:{},filterMap:new Map,totalOptions:0},scrollTop:0,searchFunction:void 0,selections:[],serverSelect:[],serverSelecting:!1,tableLength:null,updating:!1};this.s.colOpts=this.s.colExists?this._getOptions():this._getBonusOptions();this.dom={buttonGroup:k("<div/>").addClass(this.classes.buttonGroup),clear:k('<button type="button">&#215;</button>').attr("disabled",
"true").addClass(this.classes.disabledButton).addClass(this.classes.paneButton).addClass(this.classes.clearButton).html(this.s.dt.i18n("searchPanes.clearPane",this.c.i18n.clearPane)),collapseButton:k('<button type="button"><span class="'+this.classes.caret+'">&#x5e;</span></button>').addClass(this.classes.paneButton).addClass(this.classes.collapseButton),container:k("<div/>").addClass(this.classes.container).addClass(this.s.colOpts.className).addClass(this.classes.layout+(10>parseInt(this.c.layout.split("-")[1],
10)?this.c.layout:this.c.layout.split("-")[0]+"-9")).addClass(this.s.customPaneSettings&&this.s.customPaneSettings.className?this.s.customPaneSettings.className:""),countButton:k('<button type="button"></button>').addClass(this.classes.paneButton).addClass(this.classes.countButton),dtP:k("<table><thead><tr><th>"+(this.s.colExists?k(this.s.dt.column(this.s.index).header()).text():this.s.customPaneSettings.header||"Custom Pane")+"</th><th/></tr></thead></table>"),lower:k("<div/>").addClass(this.classes.subRow2).addClass(this.classes.narrowButton),
nameButton:k('<button type="button"></button>').addClass(this.classes.paneButton).addClass(this.classes.nameButton),panesContainer:d,searchBox:k("<input/>").addClass(this.classes.paneInputButton).addClass(this.classes.search),searchButton:k('<button type = "button"/>').addClass(this.classes.searchIcon).addClass(this.classes.paneButton),searchCont:k("<div/>").addClass(this.classes.searchCont),searchLabelCont:k("<div/>").addClass(this.classes.searchLabelCont),topRow:k("<div/>").addClass(this.classes.topRow),
upper:k("<div/>").addClass(this.classes.subRow1).addClass(this.classes.narrowSearch)};this.s.name=this.s.colOpts.name?this.s.colOpts.name:this.s.customPaneSettings&&this.s.customPaneSettings.name?this.s.customPaneSettings.name:this.s.colExists?k(this.s.dt.column(this.s.index).header()).text():this.s.customPaneSettings.header||"Custom Pane";var g=this.s.dt.table(0).node();this.s.searchFunction=function(m,t,w){if(0===f.s.selections.length||m.nTable!==g)return!0;m=null;f.s.colExists&&(m=t[f.s.index],
"filter"!==f.s.colOpts.orthogonal.filter&&(m=f.s.rowData.filterMap.get(w),m instanceof k.fn.dataTable.Api&&(m=m.toArray())));return f._search(m,w)};k.fn.dataTable.ext.search.push(this.s.searchFunction);if(this.c.clear)this.dom.clear.on("click.dtsp",function(){f.dom.container.find("."+f.classes.search.replace(/\s+/g,".")).each(function(){k(this).val("").trigger("input")});f.clearPane()});this.s.dt.on("draw.dtsp",function(){return f.adjustTopRow()});this.s.dt.on("buttons-action.dtsp",function(){return f.adjustTopRow()});
this.s.dt.on("column-reorder.dtsp",function(m,t,w){f.s.index=w.mapping[f.s.index]});return this}h.prototype.addRow=function(b,a,c,d,e,f,g){f||(f=this.s.rowData.bins[a]?this.s.rowData.bins[a]:0);g||(g=this._getShown(a));for(var m,t=0,w=this.s.indexes;t<w.length;t++){var A=w[t];A.filter===a&&(m=A.index)}void 0===m&&(m=this.s.indexes.length,this.s.indexes.push({filter:a,index:m}));return this.s.dtPane.row.add({className:e,display:""!==b?b:this.emptyMessage(),filter:a,index:m,shown:g,sort:c,total:f,type:d})};
h.prototype.adjustTopRow=function(){var b=this.dom.container.find("."+this.classes.subRowsContainer.replace(/\s+/g,".")),a=this.dom.container.find("."+this.classes.subRow1.replace(/\s+/g,".")),c=this.dom.container.find("."+this.classes.subRow2.replace(/\s+/g,".")),d=this.dom.container.find("."+this.classes.topRow.replace(/\s+/g,"."));(252>k(b[0]).width()||252>k(d[0]).width())&&0!==k(b[0]).width()?(k(b[0]).addClass(this.classes.narrow),k(a[0]).addClass(this.classes.narrowSub).removeClass(this.classes.narrowSearch),
k(c[0]).addClass(this.classes.narrowSub).removeClass(this.classes.narrowButton)):(k(b[0]).removeClass(this.classes.narrow),k(a[0]).removeClass(this.classes.narrowSub).addClass(this.classes.narrowSearch),k(c[0]).removeClass(this.classes.narrowSub).addClass(this.classes.narrowButton))};h.prototype.clearData=function(){this.s.rowData={arrayFilter:[],arrayOriginal:[],bins:{},binsOriginal:{},filterMap:new Map,totalOptions:0}};h.prototype.clearPane=function(){this.s.dtPane.rows({selected:!0}).deselect();
this.updateTable();return this};h.prototype.collapse=function(){var b=this;this.s.displayed&&(this.c.collapse||!0===this.s.colOpts.collapse)&&!1!==this.s.colOpts.collapse&&(k(this.s.dtPane.table().container()).addClass(this.classes.hidden),this.dom.topRow.addClass(this.classes.bordered),this.dom.nameButton.addClass(this.classes.disabledButton),this.dom.countButton.addClass(this.classes.disabledButton),this.dom.searchButton.addClass(this.classes.disabledButton),this.dom.collapseButton.addClass(this.classes.rotated),
this.dom.topRow.one("click.dtsp",function(){return b.show()}))};h.prototype.destroy=function(){this.s.dtPane&&this.s.dtPane.off(".dtsp");this.s.dt.off(".dtsp");this.dom.clear.off(".dtsp");this.dom.nameButton.off(".dtsp");this.dom.countButton.off(".dtsp");this.dom.searchButton.off(".dtsp");this.dom.collapseButton.off(".dtsp");k(this.s.dt.table().node()).off(".dtsp");this.dom.container.detach();for(var b=k.fn.dataTable.ext.search.indexOf(this.s.searchFunction);-1!==b;)k.fn.dataTable.ext.search.splice(b,
1),b=k.fn.dataTable.ext.search.indexOf(this.s.searchFunction);this.s.dtPane&&this.s.dtPane.destroy();this.s.listSet=!1};h.prototype.emptyMessage=function(){var b=this.c.i18n.emptyMessage;this.c.emptyMessage&&(b=this.c.emptyMessage);!1!==this.s.colOpts.emptyMessage&&null!==this.s.colOpts.emptyMessage&&(b=this.s.colOpts.emptyMessage);return this.s.dt.i18n("searchPanes.emptyMessage",b)};h.prototype.getPaneCount=function(){return this.s.dtPane?this.s.dtPane.rows({selected:!0}).data().toArray().length:
0};h.prototype.rebuildPane=function(b,a){void 0===b&&(b=null);void 0===a&&(a=!1);this.clearData();var c=[];this.s.serverSelect=[];var d=null;this.s.dtPane&&(a&&(this.s.dt.page.info().serverSide?this.s.serverSelect=this.s.dtPane.rows({selected:!0}).data().toArray():c=this.s.dtPane.rows({selected:!0}).data().toArray()),this.s.dtPane.clear().destroy(),d=this.dom.container.prev(),this.destroy(),this.s.dtPane=void 0,k.fn.dataTable.ext.search.push(this.s.searchFunction));this.dom.container.removeClass(this.classes.hidden);
this.s.displayed=!1;this._buildPane(this.s.dt.page.info().serverSide?this.s.serverSelect:c,b,d);return this};h.prototype.resize=function(b){this.c.layout=b;this.dom.container.removeClass().addClass(this.classes.show).addClass(this.classes.container).addClass(this.s.colOpts.className).addClass(this.classes.layout+(10>parseInt(b.split("-")[1],10)?b:b.split("-")[0]+"-9")).addClass(null!==this.s.customPaneSettings&&this.s.customPaneSettings.className?this.s.customPaneSettings.className:"");this.adjustTopRow()};
h.prototype.setListeners=function(){var b=this;this.s.dtPane&&(this.s.dtPane.select.style(this.s.colOpts.dtOpts&&this.s.colOpts.dtOpts.select&&this.s.colOpts.dtOpts.select.style?this.s.colOpts.dtOpts.select.style:this.c.dtOpts&&this.c.dtOpts.select&&this.c.dtOpts.select.style?this.c.dtOpts.select.style:"os"),this.s.dtPane.off("select.dtsp").on("select.dtsp",function(){clearTimeout(b.s.deselectTimeout);b._updateSelection(!b.s.updating);b.dom.clear.removeClass(b.classes.disabledButton).removeAttr("disabled")}),
this.s.dtPane.off("deselect.dtsp").on("deselect.dtsp",function(){b.s.deselectTimeout=setTimeout(function(){b._updateSelection(!0);0===b.s.dtPane.rows({selected:!0}).data().toArray().length&&b.dom.clear.addClass(b.classes.disabledButton).attr("disabled","true")},50)}),this.s.firstSet&&(this.s.firstSet=!1,this.s.dt.on("stateSaveParams.dtsp",function(a,c,d){if(k.isEmptyObject(d))b.s.dtPane.state.clear();else{a=[];if(b.s.dtPane){a=b.s.dtPane.rows({selected:!0}).data().map(function(w){return w.filter.toString()}).toArray();
var e=b.dom.searchBox.val();var f=b.s.dtPane.order();var g=b.s.rowData.binsOriginal;var m=b.s.rowData.arrayOriginal;var t=b.dom.collapseButton.hasClass(b.classes.rotated)}void 0===d.searchPanes&&(d.searchPanes={});void 0===d.searchPanes.panes&&(d.searchPanes.panes=[]);for(c=0;c<d.searchPanes.panes.length;c++)d.searchPanes.panes[c].id===b.s.index&&(d.searchPanes.panes.splice(c,1),c--);d.searchPanes.panes.push({arrayFilter:m,bins:g,collapsed:t,id:b.s.index,order:f,searchTerm:e,selected:a})}})),this.s.dtPane.off("user-select.dtsp").on("user-select.dtsp",
function(a,c,d,e,f){f.stopPropagation()}),this.s.dtPane.off("draw.dtsp").on("draw.dtsp",function(){return b.adjustTopRow()}),this.dom.nameButton.off("click.dtsp").on("click.dtsp",function(){var a=b.s.dtPane.order()[0][1];b.s.dtPane.order([0,"asc"===a?"desc":"asc"]).draw();b.s.dt.state.save()}),this.dom.countButton.off("click.dtsp").on("click.dtsp",function(){var a=b.s.dtPane.order()[0][1];b.s.dtPane.order([1,"asc"===a?"desc":"asc"]).draw();b.s.dt.state.save()}),this.dom.collapseButton.off("click.dtsp").on("click.dtsp",
function(a){a.stopPropagation();a=k(b.s.dtPane.table().container());a.toggleClass(b.classes.hidden);b.dom.topRow.toggleClass(b.classes.bordered);b.dom.nameButton.toggleClass(b.classes.disabledButton);b.dom.countButton.toggleClass(b.classes.disabledButton);b.dom.searchButton.toggleClass(b.classes.disabledButton);b.dom.collapseButton.toggleClass(b.classes.rotated);if(a.hasClass(b.classes.hidden))b.dom.topRow.on("click.dtsp",function(){return b.dom.collapseButton.click()});else b.dom.topRow.off("click.dtsp");
b.s.dt.state.save()}),this.dom.clear.off("click.dtsp").on("click.dtsp",function(){b.dom.container.find("."+b.classes.search.replace(/ /g,".")).each(function(){k(this).val("").trigger("input")});b.clearPane()}),this.dom.searchButton.off("click.dtsp").on("click.dtsp",function(){return b.dom.searchBox.focus()}),this.dom.searchBox.off("click.dtsp").on("input.dtsp",function(){var a=b.dom.searchBox.val();b.s.dtPane.search(a).draw();"string"===typeof a&&(0<a.length||0===a.length&&0<b.s.dtPane.rows({selected:!0}).data().toArray().length)?
b.dom.clear.removeClass(b.classes.disabledButton).removeAttr("disabled"):b.dom.clear.addClass(b.classes.disabledButton).attr("disabled","true");b.s.dt.state.save()}),this.s.dtPane.select.style(this.s.colOpts.dtOpts&&this.s.colOpts.dtOpts.select&&this.s.colOpts.dtOpts.select.style?this.s.colOpts.dtOpts.select.style:this.c.dtOpts&&this.c.dtOpts.select&&this.c.dtOpts.select.style?this.c.dtOpts.select.style:"os"))};h.prototype._serverPopulate=function(b){if(b.tableLength)this.s.tableLength=b.tableLength,
this.s.rowData.totalOptions=this.s.tableLength;else if(null===this.s.tableLength||this.s.dt.rows()[0].length>this.s.tableLength)this.s.tableLength=this.s.dt.rows()[0].length,this.s.rowData.totalOptions=this.s.tableLength;var a=this.s.dt.column(this.s.index).dataSrc();if(b.searchPanes.options[a]){var c=0;for(b=b.searchPanes.options[a];c<b.length;c++)a=b[c],this.s.rowData.arrayFilter.push({display:a.label,filter:a.value,sort:a.label,type:a.label}),this.s.rowData.bins[a.value]=a.total}c=Object.keys(this.s.rowData.bins).length;
b=this._uniqueRatio(c,this.s.tableLength);!1===this.s.displayed&&((void 0===this.s.colOpts.show&&null===this.s.colOpts.threshold?b>this.c.threshold:b>this.s.colOpts.threshold)||!0!==this.s.colOpts.show&&1>=c)?(this.dom.container.addClass(this.classes.hidden),this.s.displayed=!1):(this.s.rowData.arrayOriginal=this.s.rowData.arrayFilter,this.s.rowData.binsOriginal=this.s.rowData.bins,this.s.displayed=!0)};h.prototype.show=function(){this.s.displayed&&(this.dom.topRow.removeClass(this.classes.bordered),
this.dom.nameButton.removeClass(this.classes.disabledButton),this.dom.countButton.removeClass(this.classes.disabledButton),this.dom.searchButton.removeClass(this.classes.disabledButton),this.dom.collapseButton.removeClass(this.classes.rotated),k(this.s.dtPane.table().container()).removeClass(this.classes.hidden))};h.prototype._uniqueRatio=function(b,a){return 0<a&&(0<this.s.rowData.totalOptions&&!this.s.dt.page.info().serverSide||this.s.dt.page.info().serverSide&&0<this.s.tableLength)?b/this.s.rowData.totalOptions:
1};h.prototype.updateTable=function(){var b=this.s.dtPane.rows({selected:!0}).data().toArray().map(function(a){return a.filter});this.s.selections=b;this._searchExtras()};h.prototype._getComparisonRows=function(){var b=this.s.colOpts.options?this.s.colOpts.options:this.s.customPaneSettings&&this.s.customPaneSettings.options?this.s.customPaneSettings.options:void 0;if(void 0!==b){var a=this.s.dt.rows(),c=a.data().toArray(),d=[];this.s.dtPane.clear();this.s.indexes=[];for(var e=0;e<b.length;e++){var f=
b[e],g=""!==f.label?f.label:this.emptyMessage(),m=f.className,t=g,w="function"===typeof f.value?f.value:[],A=g,z=0;if("function"===typeof f.value){for(var x=0;x<c.length;x++)f.value.call(this.s.dt,c[x],a[0][x])&&z++;"function"!==typeof w&&w.push(f.filter)}d.push(this.addRow(t,w,A,g,m,z))}return d}};h.prototype._getMessage=function(b){return this.s.dt.i18n("searchPanes.count",this.c.i18n.count).replace(/{total}/g,b.total)};h.prototype._getShown=function(b){};h.prototype._getPaneConfig=function(){var b=
this,a=q.Scroller,c=this.s.dt.settings()[0].oLanguage;c.url=void 0;c.sUrl=void 0;return{columnDefs:[{className:"dtsp-nameColumn",data:"display",render:function(d,e,f){if("sort"===e)return f.sort;if("type"===e)return f.type;f=b._getMessage(f);f='<span class="'+b.classes.pill+'">'+f+"</span>";b.c.viewCount&&b.s.colOpts.viewCount||(f="");return"filter"===e?"string"===typeof d&&null!==d.match(/<[^>]*>/)?d.replace(/<[^>]*>/g,""):d:'<div class="'+b.classes.nameCont+'"><span title="'+("string"===typeof d&&
null!==d.match(/<[^>]*>/)?d.replace(/<[^>]*>/g,""):d)+'" class="'+b.classes.name+'">'+d+"</span>"+f+"</div>"},targets:0,type:this.s.dt.settings()[0].aoColumns[this.s.index]?this.s.dt.settings()[0].aoColumns[this.s.index]._sManualType:null},{className:"dtsp-countColumn "+this.classes.badgePill,data:"total",searchable:!1,targets:1,visible:!1}],deferRender:!0,dom:"t",info:!1,language:c,paging:a?!0:!1,scrollX:!1,scrollY:"200px",scroller:a?!0:!1,select:!0,stateSave:this.s.dt.settings()[0].oFeatures.bStateSave?
!0:!1}};h.prototype._makeSelection=function(){this.updateTable();this.s.updating=!0;this.s.dt.draw();this.s.updating=!1};h.prototype._populatePaneArray=function(b,a,c,d){void 0===d&&(d=this.s.rowData.bins);if("string"===typeof this.s.colOpts.orthogonal)c=c.oApi._fnGetCellData(c,b,this.s.index,this.s.colOpts.orthogonal),this.s.rowData.filterMap.set(b,c),this._addOption(c,c,c,c,a,d);else{var e=c.oApi._fnGetCellData(c,b,this.s.index,this.s.colOpts.orthogonal.search);null===e&&(e="");"string"===typeof e&&
(e=e.replace(/<[^>]*>/g,""));this.s.rowData.filterMap.set(b,e);d[e]?d[e]++:(d[e]=1,this._addOption(e,c.oApi._fnGetCellData(c,b,this.s.index,this.s.colOpts.orthogonal.display),c.oApi._fnGetCellData(c,b,this.s.index,this.s.colOpts.orthogonal.sort),c.oApi._fnGetCellData(c,b,this.s.index,this.s.colOpts.orthogonal.type),a,d))}this.s.rowData.totalOptions++};h.prototype._reloadSelect=function(b){if(void 0!==b){for(var a,c=0;c<b.searchPanes.panes.length;c++)if(b.searchPanes.panes[c].id===this.s.index){a=
c;break}if(a){c=this.s.dtPane;var d=c.rows({order:"index"}).data().map(function(g){return null!==g.filter?g.filter.toString():null}).toArray(),e=0;for(b=b.searchPanes.panes[a].selected;e<b.length;e++){a=b[e];var f=-1;null!==a&&(f=d.indexOf(a.toString()));-1<f&&(this.s.serverSelecting=!0,c.row(f).select(),this.s.serverSelecting=!1)}}}};h.prototype._updateSelection=function(b){this.s.scrollTop=k(this.s.dtPane.table().node()).parent()[0].scrollTop;this.s.dt.page.info().serverSide&&!this.s.updating?this.s.serverSelecting||
(this.s.serverSelect=this.s.dtPane.rows({selected:!0}).data().toArray(),this.s.dt.draw(!1)):b&&this._makeSelection()};h.prototype._addOption=function(b,a,c,d,e,f){if(Array.isArray(b)||b instanceof q.Api)if(b instanceof q.Api&&(b=b.toArray(),a=a.toArray()),b.length===a.length)for(var g=0;g<b.length;g++)f[b[g]]?f[b[g]]++:(f[b[g]]=1,e.push({display:a[g],filter:b[g],sort:c[g],type:d[g]})),this.s.rowData.totalOptions++;else throw Error("display and filter not the same length");else"string"===typeof this.s.colOpts.orthogonal?
(f[b]?f[b]++:(f[b]=1,e.push({display:a,filter:b,sort:c,type:d})),this.s.rowData.totalOptions++):e.push({display:a,filter:b,sort:c,type:d})};h.prototype._buildPane=function(b,a,c){var d=this;void 0===b&&(b=[]);void 0===a&&(a=null);void 0===c&&(c=null);this.s.selections=[];var e=this.s.dt.state.loaded();this.s.listSet&&(e=this.s.dt.state());if(this.s.colExists){var f=-1;if(e&&e.searchPanes&&e.searchPanes.panes)for(var g=0;g<e.searchPanes.panes.length;g++)if(e.searchPanes.panes[g].id===this.s.index){f=
g;break}if((!1===this.s.colOpts.show||void 0!==this.s.colOpts.show&&!0!==this.s.colOpts.show)&&-1===f)return this.dom.container.addClass(this.classes.hidden),this.s.displayed=!1;if(!0===this.s.colOpts.show||-1!==f)this.s.displayed=!0;if(this.s.dt.page.info().serverSide||a&&a.searchPanes&&a.searchPanes.options)a&&a.searchPanes&&a.searchPanes.options&&this._serverPopulate(a);else{0===this.s.rowData.arrayFilter.length&&(this.s.rowData.totalOptions=0,this._populatePane(),this.s.rowData.arrayOriginal=
this.s.rowData.arrayFilter,this.s.rowData.binsOriginal=this.s.rowData.bins);g=Object.keys(this.s.rowData.binsOriginal).length;f=this._uniqueRatio(g,this.s.dt.rows()[0].length);if(!1===this.s.displayed&&((void 0===this.s.colOpts.show&&null===this.s.colOpts.threshold?f>this.c.threshold:f>this.s.colOpts.threshold)||!0!==this.s.colOpts.show&&1>=g)){this.dom.container.addClass(this.classes.hidden);this.s.displayed=!1;return}this.dom.container.addClass(this.classes.show);this.s.displayed=!0}}else this.s.displayed=
!0;this._displayPane();if(!this.s.listSet)this.dom.dtP.on("stateLoadParams.dtsp",function(w,A,z){k.isEmptyObject(d.s.dt.state.loaded())&&k.each(z,function(x){delete z[x]})});null!==c&&0<this.dom.panesContainer.has(c).length?this.dom.container.insertAfter(c):this.dom.panesContainer.prepend(this.dom.container);c=k.fn.dataTable.ext.errMode;k.fn.dataTable.ext.errMode="none";this.s.dtPane=this.dom.dtP.DataTable(k.extend(!0,this._getPaneConfig(),this.c.dtOpts,this.s.colOpts?this.s.colOpts.dtOpts:{},this.s.colOpts.options||
!this.s.colExists?{createdRow:function(w,A){k(w).addClass(A.className)}}:void 0,null!==this.s.customPaneSettings&&this.s.customPaneSettings.dtOpts?this.s.customPaneSettings.dtOpts:{},k.fn.dataTable.versionCheck("2")?{layout:{bottomLeft:null,bottomRight:null,topLeft:null,topRight:null}}:{}));this.dom.dtP.addClass(this.classes.table);g="Custom Pane";this.s.customPaneSettings&&this.s.customPaneSettings.header?g=this.s.customPaneSettings.header:this.s.colOpts.header?g=this.s.colOpts.header:this.s.colExists&&
(g=k.fn.dataTable.versionCheck("2")?this.s.dt.column(this.s.index).title():this.s.dt.settings()[0].aoColumns[this.s.index].sTitle);g=this._escapeHTML(g);this.dom.searchBox.attr("placeholder",g);k.fn.dataTable.select.init(this.s.dtPane);k.fn.dataTable.ext.errMode=c;if(this.s.colExists)for(g=0,f=this.s.rowData.arrayFilter.length;g<f;g++)if(this.s.dt.page.info().serverSide){c=this.addRow(this.s.rowData.arrayFilter[g].display,this.s.rowData.arrayFilter[g].filter,this.s.rowData.arrayFilter[g].sort,this.s.rowData.arrayFilter[g].type);
for(var m=0,t=this.s.serverSelect;m<t.length;m++)t[m].filter===this.s.rowData.arrayFilter[g].filter&&(this.s.serverSelecting=!0,c.select(),this.s.serverSelecting=!1)}else!this.s.dt.page.info().serverSide&&this.s.rowData.arrayFilter[g]?this.addRow(this.s.rowData.arrayFilter[g].display,this.s.rowData.arrayFilter[g].filter,this.s.rowData.arrayFilter[g].sort,this.s.rowData.arrayFilter[g].type):this.s.dt.page.info().serverSide||this.addRow("","","","");q.select.init(this.s.dtPane);(this.s.colOpts.options||
this.s.customPaneSettings&&this.s.customPaneSettings.options)&&this._getComparisonRows();this.s.dtPane.draw();this.s.dtPane.table().node().parentNode.scrollTop=this.s.scrollTop;this.adjustTopRow();this.setListeners();this.s.listSet=!0;for(g=0;g<b.length;g++)if(f=b[g])for(m=0,t=this.s.dtPane.rows().indexes().toArray();m<t.length;m++)c=t[m],this.s.dtPane.row(c).data()&&f.filter===this.s.dtPane.row(c).data().filter&&(this.s.dt.page.info().serverSide?(this.s.serverSelecting=!0,this.s.dtPane.row(c).select(),
this.s.serverSelecting=!1):this.s.dtPane.row(c).select());this.s.dt.page.info().serverSide&&this.s.dtPane.search(this.dom.searchBox.val()).draw();if((this.c.initCollapsed&&!1!==this.s.colOpts.initCollapsed||this.s.colOpts.initCollapsed)&&(this.c.collapse&&!1!==this.s.colOpts.collapse||this.s.colOpts.collapse))if(this.s.dtPane.settings()[0]._bInitComplete)this.collapse();else this.s.dtPane.one("init",function(){return d.collapse()});if(e&&e.searchPanes&&e.searchPanes.panes&&(!a||1===a.draw))for(this._reloadSelect(e),
a=0,e=e.searchPanes.panes;a<e.length;a++)b=e[a],b.id===this.s.index&&(b.searchTerm&&0<b.searchTerm.length&&this.dom.searchBox.val(b.searchTerm).trigger("input"),b.order&&this.s.dtPane.order(b.order).draw(),b.collapsed?this.collapse():this.show());return!0};h.prototype._displayPane=function(){this.dom.dtP.empty();this.dom.topRow.empty().addClass(this.classes.topRow);3<parseInt(this.c.layout.split("-")[1],10)&&this.dom.container.addClass(this.classes.smallGap);this.dom.topRow.addClass(this.classes.subRowsContainer).append(this.dom.upper.append(this.dom.searchCont)).append(this.dom.lower.append(this.dom.buttonGroup));
(!1===this.c.dtOpts.searching||this.s.colOpts.dtOpts&&!1===this.s.colOpts.dtOpts.searching||!this.c.controls||!this.s.colOpts.controls||this.s.customPaneSettings&&this.s.customPaneSettings.dtOpts&&void 0!==this.s.customPaneSettings.dtOpts.searching&&!this.s.customPaneSettings.dtOpts.searching)&&this.dom.searchBox.removeClass(this.classes.paneInputButton).addClass(this.classes.disabledButton).attr("disabled","true");this.dom.searchBox.appendTo(this.dom.searchCont);this._searchContSetup();this.c.clear&&
this.c.controls&&this.s.colOpts.controls&&this.dom.clear.appendTo(this.dom.buttonGroup);this.c.orderable&&this.s.colOpts.orderable&&this.c.controls&&this.s.colOpts.controls&&this.dom.nameButton.appendTo(this.dom.buttonGroup);this.c.viewCount&&this.s.colOpts.viewCount&&this.c.orderable&&this.s.colOpts.orderable&&this.c.controls&&this.s.colOpts.controls&&this.dom.countButton.appendTo(this.dom.buttonGroup);(this.c.collapse&&!1!==this.s.colOpts.collapse||this.s.colOpts.collapse)&&this.c.controls&&this.s.colOpts.controls&&
this.dom.collapseButton.appendTo(this.dom.buttonGroup);this.dom.container.prepend(this.dom.topRow).append(this.dom.dtP).show()};h.prototype._escapeHTML=function(b){return b.toString().replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"')};h.prototype._getBonusOptions=function(){return k.extend(!0,{},h.defaults,{threshold:null},this.c?this.c:{})};h.prototype._getOptions=function(){var b=this.s.dt.settings()[0].aoColumns[this.s.index].searchPanes,a=k.extend(!0,{},h.defaults,
{collapse:null,emptyMessage:!1,initCollapsed:null,threshold:null},b);b&&b.hideCount&&void 0===b.viewCount&&(a.viewCount=!b.hideCount);return a};h.prototype._populatePane=function(){this.s.rowData.arrayFilter=[];this.s.rowData.bins={};var b=this.s.dt.settings()[0];if(!this.s.dt.page.info().serverSide)for(var a=0,c=this.s.dt.rows().indexes().toArray();a<c.length;a++)this._populatePaneArray(c[a],this.s.rowData.arrayFilter,b)};h.prototype._search=function(b,a){for(var c=this.s.colOpts,d=this.s.dt,e=0,
f=this.s.selections;e<f.length;e++){var g=f[e];"string"===typeof g&&"string"===typeof b&&(g=this._escapeHTML(g));if(Array.isArray(b))if("and"===c.combiner){if(!b.includes(g))return!1}else{if(b.includes(g))return!0}else if("function"===typeof g)if(g.call(d,d.row(a).data(),a)){if("or"===c.combiner)return!0}else{if("and"===c.combiner)return!1}else if(b===g||("string"!==typeof b||0!==b.length)&&b==g||null===g&&"string"===typeof b&&""===b)return!0}return"and"===c.combiner?!0:!1};h.prototype._searchContSetup=
function(){this.c.controls&&this.s.colOpts.controls&&this.dom.searchButton.appendTo(this.dom.searchLabelCont);!1===this.c.dtOpts.searching||!1===this.s.colOpts.dtOpts.searching||this.s.customPaneSettings&&this.s.customPaneSettings.dtOpts&&void 0!==this.s.customPaneSettings.dtOpts.searching&&!this.s.customPaneSettings.dtOpts.searching||this.dom.searchLabelCont.appendTo(this.dom.searchCont)};h.prototype._searchExtras=function(){var b=this.s.updating;this.s.updating=!0;var a=this.s.dtPane.rows({selected:!0}).data().pluck("filter").toArray(),
c=a.indexOf(this.emptyMessage()),d=k(this.s.dtPane.table().container());-1<c&&(a[c]="");0<a.length?d.addClass(this.classes.selected):0===a.length&&d.removeClass(this.classes.selected);this.s.updating=b};h.version="2.0.0-dev";h.classes={bordered:"dtsp-bordered",buttonGroup:"dtsp-buttonGroup",buttonSub:"dtsp-buttonSub",caret:"dtsp-caret",clear:"dtsp-clear",clearAll:"dtsp-clearAll",clearButton:"clearButton",collapseAll:"dtsp-collapseAll",collapseButton:"dtsp-collapseButton",container:"dtsp-searchPane",
countButton:"dtsp-countButton",disabledButton:"dtsp-disabledButton",hidden:"dtsp-hidden",hide:"dtsp-hide",layout:"dtsp-",name:"dtsp-name",nameButton:"dtsp-nameButton",nameCont:"dtsp-nameCont",narrow:"dtsp-narrow",paneButton:"dtsp-paneButton",paneInputButton:"dtsp-paneInputButton",pill:"dtsp-pill",rotated:"dtsp-rotated",search:"dtsp-search",searchCont:"dtsp-searchCont",searchIcon:"dtsp-searchIcon",searchLabelCont:"dtsp-searchButtonCont",selected:"dtsp-selected",smallGap:"dtsp-smallGap",subRow1:"dtsp-subRow1",
subRow2:"dtsp-subRow2",subRowsContainer:"dtsp-subRowsContainer",title:"dtsp-title",topRow:"dtsp-topRow"};h.defaults={clear:!0,collapse:!0,combiner:"or",container:function(b){return b.table().container()},controls:!0,dtOpts:{},emptyMessage:null,hideCount:!1,i18n:{clearPane:"&times;",count:"{total}",emptyMessage:"<em>No data</em>"},initCollapsed:!1,layout:"auto",name:void 0,orderable:!0,orthogonal:{display:"display",filter:"filter",hideCount:!1,search:"filter",show:void 0,sort:"sort",threshold:.6,type:"type",
viewCount:!0},preSelect:[],threshold:.6,viewCount:!0};return h}(),B=window&&window.__extends||function(){var h=function(b,a){h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var e in d)d.hasOwnProperty(e)&&(c[e]=d[e])};return h(b,a)};return function(b,a){function c(){this.constructor=b}h(b,a);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)}}(),C=function(h){function b(a,c,d,e,f){return h.call(this,a,c,d,e,f)||this}B(b,h);
b.prototype._serverPopulate=function(a){this.s.rowData.binsShown={};this.s.rowData.arrayFilter=[];if(void 0!==a.tableLength)this.s.tableLength=a.tableLength,this.s.rowData.totalOptions=this.s.tableLength;else if(null===this.s.tableLength||this.s.dt.rows()[0].length>this.s.tableLength)this.s.tableLength=this.s.dt.rows()[0].length,this.s.rowData.totalOptions=this.s.tableLength;var c=this.s.dt.column(this.s.index).dataSrc();if(void 0!==a.searchPanes.options[c]){var d=0;for(a=a.searchPanes.options[c];d<
a.length;d++)c=a[d],this.s.rowData.arrayFilter.push({display:c.label,filter:c.value,shown:+c.count,sort:c.label,total:+c.total,type:c.label}),this.s.rowData.binsShown[c.value]=+c.count,this.s.rowData.bins[c.value]=+c.total}d=Object.keys(this.s.rowData.bins).length;a=this._uniqueRatio(d,this.s.tableLength);if(!this.s.colOpts.show&&!1===this.s.displayed&&((void 0===this.s.colOpts.show&&null===this.s.colOpts.threshold?a>this.c.threshold:a>this.s.colOpts.threshold)||!0!==this.s.colOpts.show&&1>=d))this.dom.container.addClass(this.classes.hidden),
this.s.displayed=!1;else if(this.s.rowData.arrayOriginal=this.s.rowData.arrayFilter,this.s.rowData.binsOriginal=this.s.rowData.bins,this.s.displayed=!0,this.s.dtPane){d=this.s.serverSelect;this.s.dtPane.rows().remove();for(var e=0,f=this.s.rowData.arrayFilter;e<f.length;e++)if(a=f[e],this._shouldAddRow(a)){c=this.addRow(a.display,a.filter,a.sort,a.type);for(var g=0;g<d.length;g++){var m=d[g];if(m.filter===a.filter){this.s.serverSelecting=!0;c.select();this.s.serverSelecting=!1;d.splice(g,1);this.s.selections.push(a.filter);
break}}}for(e=0;e<d.length;e++)for(m=d[e],f=0,g=this.s.rowData.arrayOriginal;f<g.length;f++)a=g[f],a.filter===m.filter&&(c=this.addRow(a.display,a.filter,a.sort,a.type),this.s.serverSelecting=!0,c.select(),this.s.serverSelecting=!1,this.s.selections.push(a.filter));this.s.serverSelect=this.s.dtPane.rows({selected:!0}).data().toArray();this.s.dtPane.draw()}};b.prototype.updateRows=function(){if(!this.s.dt.page.info().serverSide){this.s.rowData.binsShown={};for(var a=0,c=this.s.dt.rows({search:"applied"}).indexes().toArray();a<
c.length;a++)this._updateShown(c[a],this.s.dt.settings()[0],this.s.rowData.binsShown)}a=0;for(c=this.s.dtPane.rows().data().toArray();a<c.length;a++){var d=c[a];d.shown="number"===typeof this.s.rowData.binsShown[d.filter]?this.s.rowData.binsShown[d.filter]:0;this.s.dtPane.row(d.index).data(d)}this.s.dtPane.draw();this.s.dtPane.table().node().parentNode.scrollTop=this.s.scrollTop};b.prototype._makeSelection=function(){};b.prototype._reloadSelect=function(){};b.prototype._shouldAddRow=function(a){return!0};
b.prototype._updateSelection=function(){!this.s.dt.page.info().serverSide||this.s.updating||this.s.serverSelecting||(this.s.serverSelect=this.s.dtPane.rows({selected:!0}).data().toArray())};b.prototype._updateShown=function(a,c,d){void 0===d&&(d=this.s.rowData.binsShown);a=c.oApi._fnGetCellData(c,a,this.s.index,"string"===typeof this.s.colOpts.orthogonal?this.s.colOpts.orthogonal:this.s.colOpts.orthogonal.search);if(Array.isArray(a))for(c=0;c<a.length;c++){var e=a[c];d[e]?d[e]++:d[e]=1}else d[a]?
d[a]++:d[a]=1};return b}(v),H=window&&window.__extends||function(){var h=function(b,a){h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var e in d)d.hasOwnProperty(e)&&(c[e]=d[e])};return h(b,a)};return function(b,a){function c(){this.constructor=b}h(b,a);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)}}(),r,p=function(h){function b(a,c,d,e,f){return h.call(this,a,r.extend({i18n:{countFiltered:"{shown} ({total})"}},c),d,
e,f)||this}H(b,h);b.prototype._getMessage=function(a){var c=this.s.dt.i18n("searchPanes.count",this.c.i18n.count),d=this.s.dt.i18n("searchPanes.countFiltered",this.c.i18n.countFiltered);return(this.s.filteringActive?d:c).replace(/{total}/g,a.total).replace(/{shown}/g,a.shown)};b.prototype._getShown=function(a){return this.s.rowData.binsShown&&this.s.rowData.binsShown[a]?this.s.rowData.binsShown[a]:0};return b}(C),u=window&&window.__extends||function(){var h=function(b,a){h=Object.setPrototypeOf||
{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var e in d)d.hasOwnProperty(e)&&(c[e]=d[e])};return h(b,a)};return function(b,a){function c(){this.constructor=b}h(b,a);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)}}(),y,E=function(h){function b(a,c,d,e,f){return h.call(this,a,y.extend({i18n:{count:"{shown}"}},c),d,e,f)||this}u(b,h);b.prototype.updateRows=function(){var a=this.s.dtPane.rows({selected:!0}).data().toArray();if(this.s.colOpts.options||
this.s.customPaneSettings&&this.s.customPaneSettings.options){this._getComparisonRows();for(var c=this.s.dtPane.rows().toArray()[0],d=0;d<c.length;d++){var e=this.s.dtPane.row(c[d]),f=e.data();if(void 0!==f)if(0===f.shown)e.remove(),c=this.s.dtPane.rows().toArray()[0],d--;else for(var g=0,m=a;g<m.length;g++){var t=m[g];if(f.filter===t.filter){e.select();a.splice(d,1);this.s.selections.push(f.filter);break}}}}else{if(!this.s.dt.page.info().serverSide)for(this._activePopulatePane(),this.s.rowData.binsShown=
{},e=0,t=this.s.dt.rows({search:"applied"}).indexes().toArray();e<t.length;e++)this._updateShown(t[e],this.s.dt.settings()[0],this.s.rowData.binsShown);this.s.dtPane.rows().remove();f=0;for(g=this.s.rowData.arrayFilter;f<g.length;f++)if(c=g[f],0!==c.shown)for(e=this.addRow(c.display,c.filter,c.sort,c.type,void 0),d=0;d<a.length;d++)if(t=a[d],t.filter===c.filter){e.select();a.splice(d,1);this.s.selections.push(c.filter);break}for(d=0;d<a.length;d++)for(t=a[d],f=0,g=this.s.rowData.arrayOriginal;f<g.length;f++)c=
g[f],c.filter===t.filter&&(e=this.addRow(c.display,c.filter,c.sort,c.type,void 0),e.select(),this.s.selections.push(c.filter))}this.s.dtPane.draw();this.s.dtPane.table().node().parentNode.scrollTop=this.s.scrollTop;this.s.dt.page.info().serverSide||this.s.dt.draw()};b.prototype._activePopulatePane=function(){this.s.rowData.arrayFilter=[];this.s.rowData.bins={};var a=this.s.dt.settings()[0];if(!this.s.dt.page.info().serverSide)for(var c=0,d=this.s.dt.rows({search:"applied"}).indexes().toArray();c<
d.length;c++)this._populatePaneArray(d[c],this.s.rowData.arrayFilter,a)};b.prototype._getComparisonRows=function(){var a=this.s.colOpts.options?this.s.colOpts.options:this.s.customPaneSettings&&this.s.customPaneSettings.options?this.s.customPaneSettings.options:void 0;if(void 0!==a){var c=this.s.dt.rows(),d=this.s.dt.rows({search:"applied"}),e=c.data().toArray(),f=d.data().toArray(),g=[];this.s.dtPane.clear();this.s.indexes=[];for(var m=0;m<a.length;m++){var t=a[m],w=""!==t.label?t.label:this.emptyMessage(),
A=t.className,z=w,x="function"===typeof t.value?t.value:[],L=0,O=w,M=0;if("function"===typeof t.value){for(var F=0;F<e.length;F++)t.value.call(this.s.dt,e[F],c[0][F])&&M++;for(F=0;F<f.length;F++)t.value.call(this.s.dt,f[F],d[0][F])&&L++;"function"!==typeof x&&x.push(t.filter)}g.push(this.addRow(z,x,O,w,A,M,L))}return g}};b.prototype._getMessage=function(a){return this.s.dt.i18n("searchPanes.count",this.c.i18n.count).replace(/{total}/g,a.total).replace(/{shown}/g,a.shown)};b.prototype._getShown=function(a){return this.s.rowData.binsShown&&
this.s.rowData.binsShown[a]?this.s.rowData.binsShown[a]:0};b.prototype._shouldAddRow=function(a){return 0<a.shown};return b}(C),P=window&&window.__extends||function(){var h=function(b,a){h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var e in d)d.hasOwnProperty(e)&&(c[e]=d[e])};return h(b,a)};return function(b,a){function c(){this.constructor=b}h(b,a);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)}}(),N,J=function(h){function b(a,
c,d,e,f){return h.call(this,a,N.extend({i18n:{count:"{total}",countFiltered:"{shown} ({total})"}},c),d,e,f)||this}P(b,h);b.prototype._activePopulatePane=function(){this.s.rowData.arrayFilter=[];this.s.rowData.binsShown={};var a=this.s.dt.settings()[0];if(!this.s.dt.page.info().serverSide)for(var c=0,d=this.s.dt.rows({search:"applied"}).indexes().toArray();c<d.length;c++)this._populatePaneArray(d[c],this.s.rowData.arrayFilter,a,this.s.rowData.binsShown)};b.prototype._getMessage=function(a){var c=this.s.dt.i18n("searchPanes.count",
this.c.i18n.count),d=this.s.dt.i18n("searchPanes.countFiltered",this.c.i18n.countFiltered);return(this.s.filteringActive?d:c).replace(/{total}/g,a.total).replace(/{shown}/g,a.shown)};return b}(E),D,G,I=function(){function h(b,a,c,d){var e=this;void 0===c&&(c=!1);void 0===d&&(d=v);if(!G||!G.versionCheck||!G.versionCheck("1.10.0"))throw Error("SearchPane requires DataTables 1.10 or newer");if(!G.select)throw Error("SearchPane requires Select");var f=new G.Api(b);this.classes=D.extend(!0,{},h.classes);
this.c=D.extend(!0,{},h.defaults,a);this.dom={clearAll:D('<button type="button"/>').addClass(this.classes.clearAll).html(f.i18n("searchPanes.clearMessage",this.c.i18n.clearMessage)),collapseAll:D('<button type="button"/>').addClass(this.classes.collapseAll).html(f.i18n("searchPanes.collapseMessage",this.c.i18n.collapseMessage)),container:D("<div/>").addClass(this.classes.panes).html(f.i18n("searchPanes.loadMessage",this.c.i18n.loadMessage)),emptyMessage:D("<div/>").addClass(this.classes.emptyMessage),
panes:D("<div/>").addClass(this.classes.container),showAll:D('<button type="button"/>').addClass(this.classes.showAll).addClass(this.classes.disabledButton).attr("disabled","true").html(f.i18n("searchPanes.showMessage",this.c.i18n.showMessage)),title:D("<div/>").addClass(this.classes.title),titleRow:D("<div/>").addClass(this.classes.titleRow)};this.s={colOpts:[],dt:f,filterCount:0,minPaneWidth:260,page:0,paging:!1,pagingST:!1,paneClass:d,panes:[],selectionList:[],serverData:{},stateRead:!1,updating:!1};
if(!f.settings()[0]._searchPanes){this._getState();if(this.s.dt.page.info().serverSide){var g=this.s.dt.settings()[0];this.s.dt.on("preXhr.dtsps",function(m,t,w){if(g===t){void 0===w.searchPanes&&(w.searchPanes={});void 0===w.searchPanes_null&&(w.searchPanes_null={});m=0;for(t=e.s.selectionList;m<t.length;m++){var A=t[m];var z=e.s.dt.column(A.column).dataSrc();void 0===w.searchPanes[z]&&(w.searchPanes[z]={});void 0===w.searchPanes_null[z]&&(w.searchPanes_null[z]={});for(var x=0;x<A.rows.length;x++)w.searchPanes[z][x]=
A.rows[x],null===w.searchPanes[z][x]&&(w.searchPanes_null[z][x]=!0)}0<e.s.selectionList.length&&(w.searchPanesLast=z)}})}this._setXHR();f.settings()[0]._searchPanes=this;if(this.s.dt.settings()[0]._bInitComplete||c)this._paneDeclare(f,b,a);else f.one("preInit.dtsps",function(){e._paneDeclare(f,b,a)});return this}}h.prototype.clearSelections=function(){for(var b=0,a=this.s.panes;b<a.length;b++){var c=a[b];c.s.dtPane&&(c.s.scrollTop=c.s.dtPane.table().node().parentNode.scrollTop)}this.dom.container.find("."+
this.classes.search.replace(/\s+/g,".")).each(function(){D(this).val("").trigger("input")});this.s.selectionList=[];b=[];a=0;for(var d=this.s.panes;a<d.length;a++)c=d[a],c.s.dtPane&&b.push(c.clearPane());return b};h.prototype.getNode=function(){return this.dom.container};h.prototype.rebuild=function(b,a){void 0===b&&(b=!1);void 0===a&&(a=!1);this.dom.emptyMessage.detach();!1===b&&this.dom.panes.empty();for(var c=[],d=0,e=this.s.panes;d<e.length;d++){var f=e[d];if(!1===b||f.s.index===b)f.clearData(),
f.rebuildPane(this.s.dt.page.info().serverSide?this.s.serverData:void 0,a),this.dom.panes.append(f.dom.container),c.push(f)}this._updateSelection();this._updateFilterCount();this._attachPaneContainer();this._initSelectionListeners(!1);this.s.dt.draw(!a);this.resizePanes();return 1===c.length?c[0]:c};h.prototype.resizePanes=function(){if("auto"===this.c.layout){var b=D(this.s.dt.searchPanes.container()).width(),a=Math.floor(b/this.s.minPaneWidth),c=1,d=0;b=[];for(var e=0,f=this.s.panes;e<f.length;e++){var g=
f[e];g.s.displayed&&b.push(g.s.index)}g=b.length;if(a===g)c=a;else for(;1<a;a--)if(e=g%a,0===e){c=a;d=0;break}else e>d&&(c=a,d=e);var m=0!==d?b.slice(b.length-d,b.length):[];this.s.panes.forEach(function(t){t.s.displayed&&t.resize("columns-"+(m.includes(t.s.index)?d:c))})}else for(b=0,a=this.s.panes;b<a.length;b++)g=a[b],g.adjustTopRow();return this};h.prototype._initSelectionListeners=function(b){};h.prototype._serverTotals=function(){};h.prototype._setXHR=function(){var b=this,a=this.s.dt.settings()[0],
c=function(d){d&&d.searchPanes&&d.searchPanes.options&&(b.s.serverData=d,b.s.serverData.tableLength=d.recordsTotal,b._serverTotals())};this.s.dt.on("xhr.dtsps",function(d,e,f){a===e&&c(f)});c(this.s.dt.ajax.json())};h.prototype._stateLoadListener=function(){var b=this;this.s.dt.on("stateLoadParams.dtsps",function(a,c,d){if(void 0!==d.searchPanes){b.clearSelections();b.s.selectionList=d.searchPanes.selectionList?d.searchPanes.selectionList:[];if(d.searchPanes.panes)for(a=0,d=d.searchPanes.panes;a<
d.length;a++){c=d[a];for(var e=0,f=b.s.panes;e<f.length;e++){var g=f[e];c.id===g.s.index&&g.s.dtPane&&(g.dom.searchBox.val(c.searchTerm),g.s.dtPane.order(c.order))}}b._makeSelections(b.s.selectionList)}})};h.prototype._updateSelection=function(){this.s.selectionList=[];for(var b=0,a=this.s.panes;b<a.length;b++){var c=a[b];if(c.s.dtPane){var d=c.s.dtPane.rows({selected:!0}).data().toArray().map(function(e){return e.filter});d.length&&this.s.selectionList.push({column:c.s.index,rows:d})}}};h.prototype._attach=
function(){var b=this;this.dom.titleRow.removeClass(this.classes.hide).detach().append(this.dom.title);if(this.c.clear)this.dom.clearAll.appendTo(this.dom.titleRow).on("click.dtsps",function(){return b.clearSelections()});this.c.collapse&&(this.dom.showAll.appendTo(this.dom.titleRow),this.dom.collapseAll.appendTo(this.dom.titleRow),this._setCollapseListener());for(var a=0,c=this.s.panes;a<c.length;a++)this.dom.panes.append(c[a].dom.container);this.dom.container.text("").removeClass(this.classes.hide).append(this.dom.titleRow).append(this.dom.panes);
this.s.panes.forEach(function(d){return d.setListeners()});0===D("div."+this.classes.container).length&&this.dom.container.prependTo(this.s.dt)};h.prototype._attachMessage=function(){try{var b=this.s.dt.i18n("searchPanes.emptyPanes",this.c.i18n.emptyPanes)}catch(a){b=null}null===b?(this.dom.container.addClass(this.classes.hide),this.dom.titleRow.removeClass(this.classes.hide)):(this.dom.container.removeClass(this.classes.hide),this.dom.titleRow.addClass(this.classes.hide),this.dom.emptyMessage.html(b).appendTo(this.dom.container))};
h.prototype._attachPaneContainer=function(){for(var b=0,a=this.s.panes;b<a.length;b++)if(!0===a[b].s.displayed){this._attach();return}this._attachMessage()};h.prototype._checkCollapse=function(){for(var b=!0,a=!0,c=0,d=this.s.panes;c<d.length;c++){var e=d[c];e.s.displayed&&(e.dom.collapseButton.hasClass(e.classes.rotated)?(this.dom.showAll.removeClass(this.classes.disabledButton).removeAttr("disabled"),a=!1):(this.dom.collapseAll.removeClass(this.classes.disabledButton).removeAttr("disabled"),b=!1))}b&&
this.dom.collapseAll.addClass(this.classes.disabledButton).attr("disabled","true");a&&this.dom.showAll.addClass(this.classes.disabledButton).attr("disabled","true")};h.prototype._checkMessage=function(){for(var b=0,a=this.s.panes;b<a.length;b++)if(!0===a[b].s.displayed){this.dom.emptyMessage.detach();this.dom.titleRow.removeClass(this.classes.hide);return}this._attachMessage()};h.prototype._collapseAll=function(){for(var b=0,a=this.s.panes;b<a.length;b++)a[b].collapse()};h.prototype._findPane=function(b){for(var a=
0,c=this.s.panes;a<c.length;a++){var d=c[a];if(b===d.s.name)return d}};h.prototype._getState=function(){var b=this.s.dt.state.loaded();b&&b.searchPanes&&b.searchPanes.selectionList&&(this.s.selectionList=b.searchPanes.selectionList)};h.prototype._makeSelections=function(b){for(var a=0;a<b.length;a++){for(var c=b[a],d=void 0,e=0,f=this.s.panes;e<f.length;e++){var g=f[e];if(g.s.index===c.column){d=g;break}}if(d&&d.s.dtPane){for(e=0;e<d.s.dtPane.rows().data().toArray().length;e++)c.rows.includes("function"===
typeof d.s.dtPane.row(e).data().filter?d.s.dtPane.cell(e,0).data():d.s.dtPane.row(e).data().filter)&&d.s.dtPane.row(e).select();d.updateTable()}}};h.prototype._paneDeclare=function(b,a,c){var d=this;b.columns(0<this.c.columns.length?this.c.columns:void 0).eq(0).each(function(g){d.s.panes.push(new d.s.paneClass(a,c,g,d.dom.panes))});for(var e=b.columns().eq(0).toArray().length,f=0;f<this.c.panes.length;f++)this.s.panes.push(new this.s.paneClass(a,c,e+f,this.dom.panes,this.c.panes[f]));0<this.c.order.length&&
(this.s.panes=this.c.order.map(function(g){return d._findPane(g)}));this.s.dt.settings()[0]._bInitComplete?this._startup(b):this.s.dt.settings()[0].aoInitComplete.push({fn:function(){return d._startup(b)}})};h.prototype._setCollapseListener=function(){var b=this;this.dom.collapseAll.on("click.dtsps",function(){b._collapseAll();b.dom.collapseAll.addClass(b.classes.disabledButton).attr("disabled","true");b.dom.showAll.removeClass(b.classes.disabledButton).removeAttr("disabled");b.s.dt.state.save()});
this.dom.showAll.on("click.dtsps",function(){b._showAll();b.dom.showAll.addClass(b.classes.disabledButton).attr("disabled","true");b.dom.collapseAll.removeClass(b.classes.disabledButton).removeAttr("disabled");b.s.dt.state.save()});for(var a=0,c=this.s.panes;a<c.length;a++)c[a].dom.collapseButton.on("click.dtsps",function(){return b._checkCollapse()});this._checkCollapse()};h.prototype._showAll=function(){for(var b=0,a=this.s.panes;b<a.length;b++)a[b].show()};h.prototype._startup=function(b){var a=
this;this._attach();this.dom.panes.empty();for(var c=0,d=this.s.panes;c<d.length;c++){var e=d[c];e.rebuildPane(0<Object.keys(this.s.serverData).length?this.s.serverData:void 0);this.dom.panes.append(e.dom.container)}"auto"===this.c.layout&&this.resizePanes();c=this.s.dt.state.loaded();!this.s.stateRead&&c&&this.s.dt.page(c.start/this.s.dt.page.len()).draw("page");this.s.stateRead=!0;this._checkMessage();b.on("preDraw.dtsps",function(){a.s.updating||a.s.paging||(a._updateFilterCount(),a._updateSelection());
a.s.paging=!1});D(window).on("resize.dtsps",G.util.throttle(function(){return a.resizePanes()}));this.s.dt.on("stateSaveParams.dtsps",function(f,g,m){void 0===m.searchPanes&&(m.searchPanes={});m.searchPanes.selectionList=a.s.selectionList});this._stateLoadListener();b.off("page.dtsps page-nc.dtsps").on("page.dtsps page-nc.dtsps",function(f,g){a.s.paging=!0;a.s.pagingST=!0;a.s.page=a.s.dt.page()});if(this.s.dt.page.info().serverSide)b.off("preXhr.dtsps").on("preXhr.dtsps",function(f,g,m){m.searchPanes||
(m.searchPanes={});m.searchPanes_null||(m.searchPanes_null={});g=f=0;for(var t=a.s.panes;g<t.length;g++){var w=t[g],A=a.s.dt.column(w.s.index).dataSrc();m.searchPanes[A]||(m.searchPanes[A]={});m.searchPanes_null[A]||(m.searchPanes_null[A]={});if(w.s.dtPane){w=w.s.dtPane.rows({selected:!0}).data().toArray();for(var z=0;z<w.length;z++)m.searchPanes[A][z]=w[z].filter,m.searchPanes[A][z]||(m.searchPanes_null[A][z]=!0),f++}}0<f&&(f!==a.s.filterCount?(m.start=0,a.s.page=0):m.start=a.s.page*a.s.dt.page.len(),
a.s.dt.page(a.s.page),a.s.filterCount=f);0<a.s.selectionList.length&&(m.searchPanesLast=a.s.dt.column(a.s.selectionList[a.s.selectionList.length-1].column).dataSrc())});else b.on("preXhr.dtsps",function(){return a.s.panes.forEach(function(f){return f.clearData()})});this.s.dt.on("xhr.dtsps",function(f,g){if(g.nTable===a.s.dt.table().node()&&!a.s.dt.page.info().serverSide){var m=!1;a.s.dt.one("preDraw.dtsps",function(){if(!m){var t=a.s.dt.page();m=!0;a.s.updating=!0;a.dom.panes.empty();for(var w=0,
A=a.s.panes;w<A.length;w++){var z=A[w];z.clearData();z.rebuildPane(void 0,!0);a.dom.panes.append(z.dom.container)}a.s.dt.page.info().serverSide||a.s.dt.draw();a.s.updating=!1;a._updateSelection();a._checkMessage();a.s.dt.one("draw.dtsps",function(){a.s.updating=!0;a.s.dt.page(t).draw(!1);a.s.updating=!1})}})}});d=this.c.preSelect;c&&c.searchPanes&&c.searchPanes.selectionList&&(d=c.searchPanes.selectionList);this._makeSelections(d);this._updateFilterCount();b.on("destroy.dtsps",function(){for(var f=
0,g=a.s.panes;f<g.length;f++)g[f].destroy();b.off(".dtsps");a.dom.showAll.off(".dtsps");a.dom.clearAll.off(".dtsps");a.dom.collapseAll.off(".dtsps");D(b.table().node()).off(".dtsps");a.dom.container.detach();a.clearSelections()});this.c.collapse&&this._setCollapseListener();if(this.c.clear)this.dom.clearAll.on("click.dtsps",function(){return a.clearSelections()});b.settings()[0]._searchPanes=this;this.s.dt.state.save()};h.prototype._updateFilterCount=function(){for(var b=0,a=0,c=this.s.panes;a<c.length;a++){var d=
c[a];d.s.dtPane&&(b+=d.getPaneCount())}this.dom.title.html(this.s.dt.i18n("searchPanes.title",this.c.i18n.title,b));this.c.filterChanged&&"function"===typeof this.c.filterChanged&&this.c.filterChanged.call(this.s.dt,b);0===b?this.dom.clearAll.addClass(this.classes.disabledButton).attr("disabled","true"):this.dom.clearAll.removeClass(this.classes.disabledButton).removeAttr("disabled")};h.version="2.0.2";h.classes={clear:"dtsp-clear",clearAll:"dtsp-clearAll",collapseAll:"dtsp-collapseAll",container:"dtsp-searchPanes",
disabledButton:"dtsp-disabledButton",emptyMessage:"dtsp-emptyMessage",hide:"dtsp-hidden",panes:"dtsp-panesContainer",search:"dtsp-search",showAll:"dtsp-showAll",title:"dtsp-title",titleRow:"dtsp-titleRow"};h.defaults={clear:!0,collapse:!0,columns:[],container:function(b){return b.table().container()},filterChanged:void 0,i18n:{clearMessage:"Clear All",clearPane:"&times;",collapse:{0:"SearchPanes",_:"SearchPanes (%d)"},collapseMessage:"Collapse All",count:"{total}",emptyMessage:"<em>No data</em>",
emptyPanes:"No SearchPanes",loadMessage:"Loading Search Panes...",showMessage:"Show All",title:"Filters Active - %d"},layout:"auto",order:[],panes:[],preSelect:[]};return h}(),Q=window&&window.__extends||function(){var h=function(b,a){h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var e in d)d.hasOwnProperty(e)&&(c[e]=d[e])};return h(b,a)};return function(b,a){function c(){this.constructor=b}h(b,a);b.prototype=null===a?Object.create(a):(c.prototype=
a.prototype,new c)}}(),K=function(h){function b(a,c,d){void 0===d&&(d=!1);var e=this,f;c.cascadePanes&&c.viewTotal?f=J:c.cascadePanes?f=E:c.viewTotal&&(f=p);e=h.call(this,a,c,d,f)||this;var g=e.s.dt.state.loaded();e.s.dt.off("init.dtsps").on("init.dtsps",function(){return e._initSelectionListeners(!0,g&&g.searchPanes&&g.searchPanes.selectionList?g.searchPanes.selectionList:e.c.preSelect)});return e}Q(b,h);b.prototype._initSelectionListeners=function(a,c){void 0===a&&(a=!0);void 0===c&&(c=[]);a&&(this.s.selectionList=
c);a=0;for(c=this.s.panes;a<c.length;a++){var d=c[a];if(d.s.displayed)d.s.dtPane.off("select.dtsp").on("select.dtsp",this._update(d)).off("deselect.dtsp").on("deselect.dtsp",this._updateTimeout(d))}this.s.dt.off("draw.dtsps").on("draw.dtsps",this._update());this._updateSelectionList()};b.prototype._serverTotals=function(){for(var a=0,c=this.s.panes;a<c.length;a++){var d=c[a];if(d.s.colOpts.show){var e=this.s.dt.column(d.s.index).dataSrc(),f=!0;if(this.s.serverData.searchPanes.options[e]){var g=0;
for(e=this.s.serverData.searchPanes.options[e];g<e.length;g++){var m=e[g];if(m.total!==m.count){f=!1;break}}}d.s.filteringActive=!f;d._serverPopulate(this.s.serverData)}}};b.prototype._stateLoadListener=function(){var a=this,c=function(d,e,f){if(void 0!==f.searchPanes){a.s.selectionList=f.searchPanes.selectionList?f.searchPanes.selectionList:[];if(f.searchPanes.panes)for(d=0,f=f.searchPanes.panes;d<f.length;d++){e=f[d];for(var g=0,m=a.s.panes;g<m.length;g++){var t=m[g];e.id===t.s.index&&t.s.dtPane&&
(t.dom.searchBox.val(e.searchTerm),t.s.dtPane.order(e.order))}}a._updateSelectionList()}};this.s.dt.off("stateLoadParams.dtsps",c).on("stateLoadParams.dtsps",c)};b.prototype._updateSelection=function(){};b.prototype._update=function(a){var c=this;void 0===a&&(a=void 0);return function(){a&&clearTimeout(a.s.deselectTimeout);c._updateSelectionList(a)}};b.prototype._updateTimeout=function(a){var c=this;void 0===a&&(a=void 0);return function(){return a?a.s.deselectTimeout=setTimeout(function(){return c._updateSelectionList(a)},
50):c._updateSelectionList()}};b.prototype._updateSelectionList=function(a){void 0===a&&(a=void 0);if(this.s.pagingST)this.s.pagingST=!1;else if(!(this.s.updating||a&&a.s.serverSelecting)){if(void 0!==a){this.s.dt.page.info().serverSide&&a._updateSelection();var c=a.s.dtPane.rows({selected:!0}).data().toArray().map(function(d){return d.filter});this.s.selectionList=this.s.selectionList.filter(function(d){return d.column!==a.s.index});0<c.length?(this.s.selectionList.push({column:a.s.index,rows:c}),
a.dom.clear.removeClass(this.classes.disabledButton).removeAttr("disabled")):a.dom.clear.addClass(this.classes.disabledButton).attr("disabled","true");this.s.dt.page.info().serverSide&&this.s.dt.draw(!1)}this._remakeSelections();this._updateFilterCount()}};b.prototype._remakeSelections=function(){this.s.updating=!0;if(this.s.dt.page.info().serverSide){e=void 0;0<this.s.selectionList.length&&(e=this.s.panes[this.s.selectionList[this.s.selectionList.length-1].column]);for(var a=0,c=this.s.panes;a<c.length;a++)x=
c[a],!x.s.displayed||e&&x.s.index===e.s.index||x.updateRows()}else{e=this.s.selectionList;a=!1;this.clearSelections();this.s.dt.draw();this.s.dt.rows().toArray()[0].length>this.s.dt.rows({search:"applied"}).toArray()[0].length&&(a=!0);this.s.selectionList=e;c=0;for(var d=this.s.panes;c<d.length;c++){var e=d[c];e.s.displayed&&(e.s.filteringActive=a,e.updateRows())}c=0;for(d=this.s.selectionList;c<d.length;c++){x=d[c];e=void 0;for(var f=0,g=this.s.panes;f<g.length;f++){var m=g[f];if(m.s.index===x.column){e=
m;break}}if(e.s.dtPane){f=e.s.dtPane.rows().indexes().toArray();for(g=0;g<x.rows.length;g++){m=!1;for(var t=0,w=f;t<w.length;t++){var A=e.s.dtPane.row(w[t]),z=A.data();x.rows[g]===z.filter&&(A.select(),m=!0)}m||(x.rows.splice(g,1),g--)}e.s.selections=x.rows;if(0!==x.rows.length){this.s.dt.draw();t=f=m=g=0;for(w=this.s.panes;t<w.length;t++){var x=w[t];x.s.dtPane&&(g+=x.getPaneCount(),g>m&&(f++,m=g))}g=0<g;m=0;for(t=this.s.panes;m<t.length;m++)x=t[m],x.s.displayed&&(a||e.s.index!==x.s.index||!g?x.s.filteringActive=
g||a:1===f&&(x.s.filteringActive=!1),x.s.index!==e.s.index&&x.updateRows())}}}this.s.dt.draw()}this.s.updating=!1};return b}(I);(function(h){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(b){return h(b,window,document)}):"object"===typeof exports?module.exports=function(b,a){b||(b=window);a&&a.fn.dataTable||(a=require("datatables.net")(b,a).$);return h(a,b,b.document)}:h(window.jQuery,window,document)})(function(h,b,a){function c(e,f,g){void 0===f&&(f=null);void 0===
g&&(g=!1);e=new d.Api(e);f=f?f:e.init().searchPanes||d.defaults.searchPanes;return(f&&(f.cascadePanes||f.viewTotal)?new K(e,f,g):new I(e,f,g)).getNode()}l(h);n(h);N=y=r=h;var d=h.fn.dataTable;h.fn.dataTable.SearchPanes=I;h.fn.DataTable.SearchPanes=I;h.fn.dataTable.SearchPanesST=K;h.fn.DataTable.SearchPanesST=K;h.fn.dataTable.SearchPane=v;h.fn.DataTable.SearchPane=v;h.fn.dataTable.SearchPaneViewTotal=p;h.fn.DataTable.SearchPaneViewTotal=p;h.fn.dataTable.SearchPaneCascade=E;h.fn.DataTable.SearchPaneCascade=
E;h.fn.dataTable.SearchPaneCascadeViewTotal=J;h.fn.DataTable.SearchPaneCascadeViewTotal=J;b=h.fn.dataTable.Api.register;b("searchPanes()",function(){return this});b("searchPanes.clearSelections()",function(){return this.iterator("table",function(e){e._searchPanes&&e._searchPanes.clearSelections()})});b("searchPanes.rebuildPane()",function(e,f){return this.iterator("table",function(g){g._searchPanes&&g._searchPanes.rebuild(e,f)})});b("searchPanes.resizePanes()",function(){var e=this.context[0];return e._searchPanes?
e._searchPanes.resizePanes():null});b("searchPanes.container()",function(){var e=this.context[0];return e._searchPanes?e._searchPanes.getNode():null});h.fn.dataTable.ext.buttons.searchPanesClear={action:function(e,f){f.searchPanes.clearSelections()},text:"Clear Panes"};h.fn.dataTable.ext.buttons.searchPanes={action:function(e,f,g,m){this.popover(m._panes.getNode(),{align:"container",span:"container"});m._panes.rebuild(void 0,!0)},config:{},init:function(e,f,g){var m=h.extend({filterChanged:function(t){e.button(f).text(e.i18n("searchPanes.collapse",
void 0!==e.context[0].oLanguage.searchPanes?e.context[0].oLanguage.searchPanes.collapse:e.context[0]._searchPanes.c.i18n.collapse,t))}},g.config);m=m&&(m.cascadePanes||m.viewTotal)?new h.fn.dataTable.SearchPanesST(e,m):new h.fn.dataTable.SearchPanes(e,m);e.button(f).text(g.text||e.i18n("searchPanes.collapse",m.c.i18n.collapse,0));g._panes=m},text:null};h(a).on("preInit.dt.dtsp",function(e,f){"dt"===e.namespace&&(f.oInit.searchPanes||d.defaults.searchPanes)&&(f._searchPanes||c(f,null,!0))});d.ext.feature.push({cFeature:"P",
fnInit:c});d.ext.features&&d.ext.features.register("searchPanes",c)})})();
/*!
Bootstrap integration for DataTables' SearchPanes
©2016 SpryMedia Ltd - datatables.net/license
*/
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-dt","datatables.net-searchpanes"],function(b){return c(b)}):"object"===typeof exports?module.exports=function(b,a){b||(b=window);a&&a.fn.dataTable||(a=require("datatables.net-dt")(b,a).$);a.fn.dataTable.SearchPanes||require("datatables.net-searchpanes")(b,a);return c(a)}:c(jQuery)})(function(c){return c.fn.dataTable.searchPanes});

View File

@ -0,0 +1,12 @@
{
"autoFill": {
"cancel": "sazzamu",
"fill": "juza",
"fillHorizontal": "juzaObukiika",
"fillVertical": "juzaObusiimba"
},
"buttons": {
"colvis": "endabikaYolunyilili",
"copy": "Koppa"
}
}

View File

@ -0,0 +1,43 @@
{
"infoFiltered": "(gefiltreer uit _MAX_ totaal inskrywings)",
"infoThousands": ",",
"lengthMenu": "uitstal _MENU_ inskrywings",
"loadingRecords": "laai...",
"paginate": {
"first": "eerste",
"last": "laaste",
"next": "volgende",
"previous": "vorige"
},
"aria": {
"sortAscending": ": aktiveer kolom om stygend te sorteer",
"sortDescending": ": aktiveer kolom om dalend te sorteer"
},
"autoFill": {
"cancel": "kanseleer"
},
"buttons": {
"collection": "Versameling",
"colvis": "Kolom sigbaarheid",
"colvisRestore": "Herstel sigbaarheid",
"copy": "Kopieer",
"copyTitle": "Kopieer na knipbord",
"csv": "CSV",
"excel": "Excel",
"pdf": "PDF",
"print": "Druk"
},
"emptyTable": "Geen data beskikbaar nie",
"info": "Wys _START_ tot _END_ uit _TOTAL_ inskrywings",
"infoEmpty": "Wys 0 tot 0 uit 0 inskrywings",
"processing": "besig...",
"search": "soek:",
"searchBuilder": {
"add": "Voeg by",
"clearAll": "Alles uitvee",
"condition": "Voorwaardes",
"data": "Data"
},
"thousands": "duisende",
"zeroRecords": "Geen gevind"
}

View File

@ -0,0 +1,22 @@
{
"emptyTable": "ባዶ ሰንጠረዥ",
"info": "ከጠቅላላው _TOTAL_ ዝርዝሮች ውስጥ ከ _START_ እስከ _END_ ያሉት ዝርዝር",
"infoEmpty": "ከጠቅላላው 0 ዝርዝሮች ውስጥ ከ 0 እስከ 0 ያሉት ዝርዝር",
"infoFiltered": "(ከጠቅላላው _MAX_ የተመረጡ ዝርዝሮች)",
"infoThousands": ",",
"lengthMenu": "የዝርዝሮች ብዛት _MENU_",
"loadingRecords": "በማቅረብ ላይ...",
"processing": "በማቀናበር ላይ...",
"search": "ፈልግ:",
"zeroRecords": "ከሚፈለገው ጋር የሚሚሳሰል ዝርዝር አልተገኘም",
"paginate": {
"first": "መጀመሪያ",
"last": "መጨረሻ",
"next": "ቀጣዩ",
"previous": "የበፊቱ"
},
"aria": {
"sortAscending": ": ከመጀመሪያ ወደ መጨረሻ(ወጪ) አደራደር",
"sortDescending": ": ከመጨረሻ ወደ መጀመሪያ(ወራጅ) አደራደር"
}
}

View File

@ -0,0 +1,211 @@
{
"loadingRecords": "جارٍ التحميل...",
"lengthMenu": "أظهر _MENU_ مدخلات",
"zeroRecords": "لم يعثر على أية سجلات",
"info": "إظهار _START_ إلى _END_ من أصل _TOTAL_ مدخل",
"search": "ابحث:",
"paginate": {
"first": "الأول",
"previous": "السابق",
"next": "التالي",
"last": "الأخير"
},
"aria": {
"sortAscending": ": تفعيل لترتيب العمود تصاعدياً",
"sortDescending": ": تفعيل لترتيب العمود تنازلياً"
},
"select": {
"rows": {
"_": "%d قيمة محددة",
"1": "1 قيمة محددة"
},
"cells": {
"1": "1 خلية محددة",
"_": "%d خلايا محددة"
},
"columns": {
"1": "1 عمود محدد",
"_": "%d أعمدة محددة"
}
},
"buttons": {
"print": "طباعة",
"copyKeys": "زر <i>ctrl<\/i> أو <i>⌘<\/i> + <i>C<\/i> من الجدول<br>ليتم نسخها إلى الحافظة<br><br>للإلغاء اضغط على الرسالة أو اضغط على زر الخروج.",
"pageLength": {
"-1": "اظهار الكل",
"_": "إظهار %d أسطر"
},
"collection": "مجموعة",
"copy": "نسخ",
"copyTitle": "نسخ إلى الحافظة",
"csv": "CSV",
"excel": "Excel",
"pdf": "PDF",
"colvis": "إظهار الأعمدة",
"colvisRestore": "إستعادة العرض",
"copySuccess": {
"1": "تم نسخ سطر واحد الى الحافظة",
"_": "تم نسخ %ds أسطر الى الحافظة"
}
},
"searchBuilder": {
"add": "اضافة شرط",
"clearAll": "ازالة الكل",
"condition": "الشرط",
"data": "المعلومة",
"logicAnd": "و",
"logicOr": "أو",
"title": [
"منشئ البحث"
],
"value": "القيمة",
"conditions": {
"date": {
"after": "بعد",
"before": "قبل",
"between": "بين",
"empty": "فارغ",
"equals": "تساوي",
"notBetween": "ليست بين",
"notEmpty": "ليست فارغة",
"not": "ليست "
},
"number": {
"between": "بين",
"empty": "فارغة",
"equals": "تساوي",
"gt": "أكبر من",
"lt": "أقل من",
"not": "ليست",
"notBetween": "ليست بين",
"notEmpty": "ليست فارغة",
"gte": "أكبر أو تساوي",
"lte": "أقل أو تساوي"
},
"string": {
"not": "ليست",
"notEmpty": "ليست فارغة",
"startsWith": " تبدأ بـ ",
"contains": "تحتوي",
"empty": "فارغة",
"endsWith": "تنتهي ب",
"equals": "تساوي",
"notContains": "لا تحتوي",
"notStarts": "لا تبدأ بـ",
"notEnds": "لا تنتهي بـ"
},
"array": {
"equals": "تساوي",
"empty": "فارغة",
"contains": "تحتوي",
"not": "ليست",
"notEmpty": "ليست فارغة",
"without": "بدون"
}
},
"button": {
"0": "فلاتر البحث",
"_": "فلاتر البحث (%d)"
},
"deleteTitle": "حذف فلاتر"
},
"searchPanes": {
"clearMessage": "ازالة الكل",
"collapse": {
"0": "بحث",
"_": "بحث (%d)"
},
"count": "عدد",
"countFiltered": "عدد المفلتر",
"loadMessage": "جارِ التحميل ...",
"title": "الفلاتر النشطة",
"showMessage": "إظهار الجميع",
"collapseMessage": "إخفاء الجميع"
},
"infoThousands": ",",
"datetime": {
"previous": "السابق",
"next": "التالي",
"hours": "الساعة",
"minutes": "الدقيقة",
"seconds": "الثانية",
"unknown": "-",
"amPm": [
"صباحا",
"مساءا"
],
"weekdays": [
"الأحد",
"الإثنين",
"الثلاثاء",
"الأربعاء",
"الخميس",
"الجمعة",
"السبت"
],
"months": [
"يناير",
"فبراير",
"مارس",
"أبريل",
"مايو",
"يونيو",
"يوليو",
"أغسطس",
"سبتمبر",
"أكتوبر",
"نوفمبر",
"ديسمبر"
]
},
"editor": {
"close": "إغلاق",
"create": {
"button": "إضافة",
"title": "إضافة جديدة",
"submit": "إرسال"
},
"edit": {
"button": "تعديل",
"title": "تعديل السجل",
"submit": "تحديث"
},
"remove": {
"button": "حذف",
"title": "حذف",
"submit": "حذف",
"confirm": {
"_": "هل أنت متأكد من رغبتك في حذف السجلات %d المحددة؟",
"1": "هل أنت متأكد من رغبتك في حذف السجل؟"
}
},
"error": {
"system": "حدث خطأ ما"
},
"multi": {
"title": "قيم متعدية",
"restore": "تراجع"
}
},
"processing": "جارٍ المعالجة...",
"emptyTable": "لا يوجد بيانات متاحة في الجدول",
"infoEmpty": "يعرض 0 إلى 0 من أصل 0 مُدخل",
"thousands": ".",
"stateRestore": {
"creationModal": {
"columns": {
"search": "إمكانية البحث للعمود",
"visible": "إظهار العمود"
},
"toggleLabel": "تتضمن"
}
},
"autoFill": {
"cancel": "إلغاء الامر",
"fill": "املأ كل الخلايا بـ <i>%d<\/i>",
"fillHorizontal": "تعبئة الخلايا أفقيًا",
"fillVertical": "تعبئة الخلايا عموديا"
},
"decimal": ",",
"infoFiltered": "(مرشحة من مجموع _MAX_ مُدخل)"
}

View File

@ -0,0 +1,181 @@
{
"emptyTable": "Cədvəldə heç bir məlumat yoxdur",
"infoEmpty": "Nəticə Yoxdur",
"infoFiltered": "( _MAX_ Nəticə İçindən Tapılanlar)",
"loadingRecords": "Yüklənir...",
"processing": "Gözləyin...",
"search": "Axtarış:",
"zeroRecords": "Nəticə Tapılmadı.",
"paginate": {
"first": "İlk",
"last": "Axırıncı",
"previous": "Öncəki",
"next": "Sonrakı"
},
"aria": {
"sortDescending": ": sütunu azalma sırası üzərə aktiv etmək",
"sortAscending": ": sütunu artma sırası üzərə aktiv etmək"
},
"autoFill": {
"fill": "Bütün hücrələri <i>%d<\/i> ile doldur",
"fillHorizontal": "Hücrələri üfiqi olaraq doldur",
"fillVertical": "Hücrələri şaquli olara1 doldur",
"cancel": "Ləğv et"
},
"buttons": {
"collection": "Kolleksiya <span class=\"\\\"><\/span>",
"colvis": "Sütun baxışı",
"colvisRestore": "Baxışı əvvəlki vəziyyətinə gətir",
"copy": "Kopyala",
"copyKeys": "Cədvəldəki qeydi kopyalamaq üçün CTRL və ya u2318 + C düymələrinə basın. Ləğv etmək üçün bu mesajı vurun və ya ESC düyməsini vurun.",
"copySuccess": {
"1": "1 sətir panoya kopyalandı",
"_": "%ds sətir panoya kopyalandı"
},
"copyTitle": "Panoya kopyala",
"csv": "CSV",
"excel": "Excel",
"pageLength": {
"-1": "Bütün sətirlari göstər",
"_": "%d sətir göstər"
},
"pdf": "PDF",
"print": "Çap Et"
},
"decimal": ",",
"info": "_TOTAL_ Nəticədən _START_ - _END_ Arası Nəticələr",
"infoThousands": ".",
"searchBuilder": {
"add": "Koşul Ekle",
"button": {
"0": "Axtarış Yaradıcı",
"_": "Axtarış Yaradıcı (%d)"
},
"clearAll": "Filtrləri Təmizlə",
"condition": "Şərt",
"conditions": {
"date": {
"after": "Növbəti",
"before": "Öncəki",
"between": "Arasında",
"empty": "Boş",
"equals": "Bərabərdir",
"not": "Deyildir",
"notBetween": "Xaricində",
"notEmpty": "Dolu"
},
"number": {
"between": "Arasında",
"empty": "Boş",
"equals": "Bərabərdir",
"gt": "Böyükdür",
"gte": "Böyük bərabərdir",
"lt": "Kiçikdir",
"lte": "Kiçik bərabərdir",
"not": "Deyildir",
"notBetween": "Xaricində",
"notEmpty": "Dolu"
},
"string": {
"contains": "Tərkibində",
"empty": "Boş",
"endsWith": "İlə bitər",
"equals": "Bərabərdir",
"not": "Deyildir",
"notEmpty": "Dolu",
"startsWith": "İlə başlayar"
},
"array": {
"equals": "Bərabərdir",
"empty": "Boş",
"contains": "Tərkibində",
"not": "Deyildir",
"notEmpty": "Dolu",
"without": "Xaric"
}
},
"data": "Qeyd",
"deleteTitle": "Filtrləmə qaydasını silin",
"leftTitle": "Meyarı xaricə çıxarmaq",
"logicAnd": "və",
"logicOr": "vəya",
"rightTitle": "Meyarı içəri al",
"title": {
"0": "Axtarış Yaradıcı",
"_": "Axtarış Yaradıcı (%d)"
},
"value": "Değer"
},
"searchPanes": {
"clearMessage": "Hamısını Təmizlə",
"collapse": {
"0": "Axtarış Bölməsi",
"_": "Axtarış Bölməsi (%d)"
},
"count": "{total}",
"countFiltered": "{shown}\/{total}",
"emptyPanes": "Axtarış Bölməsi yoxdur",
"loadMessage": "Axtarış Bölməsi yüklənir ...",
"title": "Aktiv filtrlər - %d"
},
"select": {
"cells": {
"1": "1 hücrə seçildi",
"_": "%d hücrə seçildi"
},
"columns": {
"1": "1 sütun seçildi",
"_": "%d sütun seçildi"
},
"rows": {
"1": "1 qeyd seçildi",
"_": "%d qeyd seçildi"
}
},
"thousands": ".",
"datetime": {
"previous": "Öncəki",
"next": "Növbəti",
"hours": "Saat",
"minutes": "Dəqiqə",
"seconds": "Saniyə",
"unknown": "Naməlum",
"amPm": [
"am",
"pm"
]
},
"editor": {
"close": "Bağla",
"create": {
"button": "Təzə",
"title": "Yeni qeyd yarat",
"submit": "Qeyd Et"
},
"edit": {
"button": "Redaktə Et",
"title": "Qeydi Redaktə Et",
"submit": "Yeniləyin"
},
"remove": {
"button": "Sil",
"title": "Qeydləri sil",
"submit": "Sil",
"confirm": {
"_": "%d ədəd qeydi silmək istədiyinizə əminsiniz?",
"1": "Bu qeydi silmək istədiyinizə əminsiniz?"
}
},
"error": {
"system": "Sistem xətası baş verdi (Ətraflı Məlumat)"
},
"multi": {
"title": "Çox dəyər",
"info": "Seçilmiş qeydlər bu sahədə fərqli dəyərlər ehtiva edir. Bütün seçilmiş qeydlər üçün bu sahəyə eyni dəyəri təyin etmək üçün buraya vurun; əks halda hər qeyd öz dəyərini saxlayacaqdır.",
"restore": "Dəyişiklikləri geri qaytarın",
"noMulti": "Bu sahə qrup şəklində deyil, ayrı-ayrılıqda təşkil edilə bilər."
}
},
"lengthMenu": "Səhifədə _MENU_ nəticə göstər",
"searchPlaceholder": "Nəyi axtarırsınız?"
}

View File

@ -0,0 +1,19 @@
{
"processing": "Пачакайце...",
"lengthMenu": "Паказваць _MENU_ запісаў",
"zeroRecords": "Запісы адсутнічаюць.",
"info": "Запісы з _START_ па _END_ з _TOTAL_ запісаў",
"infoEmpty": "Запісы з 0 па 0 з 0 запісаў",
"infoFiltered": "(адфільтравана з _MAX_ запісаў)",
"search": "Пошук:",
"paginate": {
"first": "Першая",
"previous": "Папярэдняя",
"next": "Наступная",
"last": "Апошняя"
},
"aria": {
"sortAscending": ": актываваць для сартавання слупка па ўзрастанні",
"sortDescending": ": актываваць для сартавання слупка па змяншэнні"
}
}

View File

@ -0,0 +1,176 @@
{
"processing": "Обработка на резултатите...",
"lengthMenu": "Показване на _MENU_ резултата",
"zeroRecords": "Няма намерени резултати",
"info": "Показване на резултати от _START_ до _END_ от общо _TOTAL_",
"infoEmpty": "Показване на резултати от 0 до 0 от общо 0",
"infoFiltered": "(филтрирани от общо _MAX_ резултата)",
"search": "Търсене:",
"paginate": {
"first": "Първа",
"previous": "Предишна",
"next": "Следваща",
"last": "Последна"
},
"aria": {
"sortAscending": "сортирай възходящо",
"sortDescending": "сортирай низходящо"
},
"autoFill": {
"cancel": "Oткажи",
"fill": "Попълни всички клетки с <i>%d<i><\/i><\/i>",
"fillHorizontal": "Попълни хоризонтални клетки",
"fillVertical": "Попълни вертикални клетки"
},
"searchBuilder": {
"add": "Добави",
"deleteTitle": "Изтрий критериите за търсене",
"clearAll": "Изчисти всичко",
"condition": "Правило",
"conditions": {
"array": {
"contains": "Съдържа",
"empty": "Празно",
"equals": "Еднакво с",
"not": "Различно от",
"notEmpty": "Не е празно",
"without": "Без"
},
"date": {
"after": "След",
"before": "Преди",
"between": "Между",
"empty": "Празно",
"equals": "Равна на",
"not": "Различна от",
"notBetween": "Не е между",
"notEmpty": "Не е празно"
},
"number": {
"between": "Между",
"empty": "Празно",
"equals": "Равно",
"gt": "Над",
"gte": "Над или равно",
"lt": "Под",
"lte": "Под или равно",
"not": "Различно от",
"notBetween": "Не е между",
"notEmpty": "Не е празно"
},
"string": {
"contains": "Съдържа",
"empty": "Празно",
"endsWith": "Завършва с",
"equals": "Еднакво с",
"not": "Различно от",
"notEmpty": "Не е празно",
"startsWith": "Започва с"
}
},
"data": "Поле",
"logicAnd": "И",
"logicOr": "Или",
"value": "Стойност"
},
"searchPanes": {
"clearMessage": "Изтрий всички",
"emptyPanes": "Няма SearchPanes",
"loadMessage": "Зареждане...",
"title": "Активни филтри - %d"
},
"buttons": {
"collection": "Колекция",
"colvis": "Показване\/Скриване на колони",
"colvisRestore": "Показване на всички колони",
"copy": "Копиране",
"copyKeys": "Натисни <i>ctrl или u2318 + C за да копираш данните от таблицата.<br \/> За да отмените, щракнете върху това съобщение или натиснете <i>escape<\/i>.<\/i>",
"copySuccess": {
"_": "Копирани %ds реда",
"1": "Копиран един ред"
},
"copyTitle": "Копиране в буфера",
"pageLength": {
"_": "Покажи %d реда",
"-1": "Покажи всички редове"
},
"print": "Принтиране"
},
"datetime": {
"hours": "Часове",
"minutes": "Минути",
"months": {
"0": "Януари",
"1": "Февруари",
"10": "Ноември",
"11": "Декември",
"2": "Март",
"3": "Април",
"4": "Май",
"5": "Юни",
"6": "Юли",
"7": "Август",
"8": "Септември",
"9": "Октомври"
},
"next": "Напред",
"previous": "Назад",
"seconds": "Секунди",
"weekdays": [
"Нед",
"Пон",
"Вт",
"Ср",
"Четв",
"Пет",
"Съб"
]
},
"editor": {
"close": "Затвори",
"create": {
"button": "Нов запис",
"submit": "Създай",
"title": "Създай нов запис"
},
"edit": {
"button": "Промени",
"submit": "Промени",
"title": "Промени запис"
},
"error": {
"system": "Грешка в системата!"
},
"multi": {
"info": "Избраните елементи съдържат различни стойности за това поле. За да редактирате и зададете всички елементи за това поле на една и съща стойност, щракнете или докоснете тук, в противен случай те ще запазят своите индивидуални стойности.",
"noMulti": "Това полеможе да се редактира индивидуално, но не е част от група.",
"restore": "Отмяна на промените",
"title": "Множество стойности"
},
"remove": {
"button": "Изтрий",
"confirm": {
"_": "Сигурни ли сте, че искате да изтриете %d реда?",
"1": "Сигурни ли сте, че искате да изтриете 1 ред?"
},
"submit": "Изтрий",
"title": "Изтрий запис"
}
},
"emptyTable": "Няма налични данни в таблицата",
"loadingRecords": "Зареждане...",
"select": {
"cells": {
"_": "%d избрани клетки",
"1": "%d избрана клетка"
},
"columns": {
"_": "%d избрани колони",
"1": "%d избрана колона"
},
"rows": {
"_": "%d избрани реда",
"1": "%d избран ред"
}
}
}

View File

@ -0,0 +1,236 @@
{
"processing": "প্রসেসিং হচ্ছে...",
"lengthMenu": "_MENU_ টা এন্ট্রি দেখাও",
"zeroRecords": "আপনি যা অনুসন্ধান করেছেন তার সাথে মিলে যাওয়া কোন রেকর্ড খুঁজে পাওয়া যায় নাই",
"info": "_TOTAL_ টা এন্ট্রির মধ্যে _START_ থেকে _END_ পর্যন্ত দেখানো হচ্ছে",
"infoEmpty": "কোন এন্ট্রি খুঁজে পাওয়া যায় নাই",
"infoFiltered": "(মোট _MAX_ টা এন্ট্রির মধ্যে থেকে বাছাইকৃত)",
"search": "অনুসন্ধান:",
"paginate": {
"first": "প্রথমটা",
"previous": "আগেরটা",
"next": "পরবর্তীটা",
"last": "শেষেরটা"
},
"autoFill": {
"cancel": "বাতিল করা",
"fill": "<i>%d<\/i> দিয়ে সমস্ত ঘর পূরণ করুন",
"fillHorizontal": "অনুভূমিকভাবে কোষগুলি পূরণ করুন",
"fillVertical": "উল্লম্বভাবে কক্ষগুলি পূরণ করুন"
},
"aria": {
"sortAscending": ":ঊর্ধ্বক্রম অনুসারে কলাম সাজাতে সক্রিয় করুন",
"sortDescending": ":নিন্মক্রম অনুসারে কলাম সাজাতে সক্রিয় করুন"
},
"buttons": {
"collection": "সংগ্রহ <span class=\"ui-button-icon-primary ui-icon ui-icon-triangle-1-s\"><\/span>",
"colvis": "কলাম দৃশ্যমানতা",
"colvisRestore": "দৃশ্যমানতা পুনরুদ্ধার করুন",
"copy": "অনুলিপি",
"copySuccess": {
"_": "ক্লিপবোর্ডে %d সারি কপি করা হয়েছে",
"1": "ক্লিপবোর্ডে ১টি সারি কপি করা হয়েছে"
},
"copyTitle": "ক্লিপবোর্ডে কপি করুন",
"excel": "এক্সেল",
"pageLength": {
"_": "%d সারি দেখান",
"-1": "সমস্ত সারি দেখান"
},
"pdf": "পিডিএফ",
"print": "মুদ্রণ",
"removeState": "অপসারণ করা",
"renameState": "নাম পরিবর্তন করুন",
"copyKeys": "টেবিলের তথ্য সিস্টেম ক্লিপবোর্ডে কপি করতে <i>ctrl<\/i> অথবা <i>u2318<\/i> + <i>C<\/i> চাপুন।<br \/><br \/>বাদ দিতে চাইলে, এই মেসেজে ক্লিক করুন বা এসকেপ চাপুন।",
"csv": "সিএসভি",
"createState": "স্টেট তৈরি",
"removeAllStates": "সব স্টেটগুলো অপসারণ",
"savedStates": "সেভ করা স্টেটগুলো",
"stateRestore": "স্টেট %d",
"updateState": "আপডেট"
},
"datetime": {
"amPm": [
"মধ্য রাতের পর",
"মধ্যাহ্নের মধ্যবর্তিকালীন"
],
"hours": "ঘন্টা",
"minutes": "মিনিট",
"months": {
"0": "জানুয়ারি",
"1": "ফেব্রুয়ারী",
"10": "নভেম্বর",
"11": "ডিসেম্বর",
"2": "মার্চ",
"3": "এপ্রিল",
"4": "মে",
"5": "জুন",
"6": "জুলাই",
"7": "আগষ্ট",
"8": "সেপ্টেম্বর",
"9": "অক্টোবর"
},
"next": "পরবর্তী",
"previous": "আগে",
"seconds": "সেকেন্ড",
"weekdays": [
"রবিবার",
"সোমবার",
"মঙ্গলবার",
"বুধবার",
"বৃহস্পতিবার",
"শুক্রবার",
"শনিবার"
],
"unknown": "অজানা"
},
"editor": {
"create": {
"button": "নতুন",
"submit": "সৃষ্টি করা",
"title": "নতুন এন্ট্রি তৈরি করুন"
},
"edit": {
"button": "সম্পাদনা করুন",
"title": "এন্ট্রি সম্পাদনা",
"submit": "আপডেট"
},
"error": {
"system": "একটি সিস্টেম ত্রুটি ঘটেছে (<a target=\"\\\" rel=\"\\ nofollow\" href=\"\\\">অধিক তথ্য<\/a>)."
},
"multi": {
"info": "নির্বাচিত আইটেম এই ইনপুট জন্য বিভিন্ন মান আছে. এই ইনপুটের জন্য সমস্ত আইটেমকে একই মান সম্পাদনা করতে এবং সেট করতে, এখানে ক্লিক করুন বা আলতো চাপুন, অন্যথায় তারা তাদের পৃথক মান বজায় রাখবে।",
"noMulti": "এই ইনপুটটি পৃথকভাবে সম্পাদনা করা যেতে পারে, তবে একটি গোষ্ঠীর অংশ হিসাবে নয়৷ ",
"restore": "পরিবর্তন পূর্বাবস্থায় ফেরান",
"title": "একাধিক মান"
},
"remove": {
"confirm": {
"_": "আপনি কি নিশ্চিত যে আপনি %d সারি মুছে ফেলতে চান?",
"1": "আপনি কি নিশ্চিত যে আপনি 1টি সারি মুছে ফেলতে চান?"
},
"button": "মুছে ফেলা",
"submit": "মুছে ফেলা",
"title": "মুছে ফেলা"
},
"close": "বন্ধ করুন"
},
"stateRestore": {
"creationModal": {
"button": "সৃষ্টি",
"columns": {
"search": "কলাম অনুসন্ধান",
"visible": "কলাম দৃশ্যমানতা"
},
"name": "নাম",
"paging": "পেজিং",
"scroller": "স্ক্রোল অবস্থান",
"search": "অনুসন্ধান করুন",
"searchBuilder": "সার্চ বিল্ডার",
"select": "নির্বাচন করুন",
"title": "নতুন স্টেট তৈরি করুন",
"toggleLabel": "অন্তর্ভুক্ত: ",
"order": "সাজানো"
},
"duplicateError": "এই নামের একটি স্টেট ইতিমধ্যেই বিদ্যমান৷",
"emptyError": "নাম খালি রাখা যাবে না।",
"emptyStates": "কোন সংরক্ষিত স্টেট",
"removeConfirm": "আপনি নিশ্চিত ভাবে সরাতে চান হয় %s?",
"removeError": "স্টেট সরাতে ব্যর্থ হয়েছে৷",
"removeJoiner": "এবং",
"removeSubmit": "অপসারণ",
"renameButton": "নাম পরিবর্তন করুন",
"renameLabel": "নতুন নাম এর জন্য %s:",
"renameTitle": "রাজ্যের নাম পরিবর্তন করুন",
"removeTitle": "স্টেট মুছুন"
},
"thousands": ",",
"emptyTable": "খালি টেবিল",
"searchBuilder": {
"clearAll": "সব মুছে ফেলুন",
"data": "ডাটা",
"add": "নতুন শর্ত",
"button": {
"0": "অনুসন্ধান বিল্ডার",
"_": "অনুসন্ধান বিল্ডার (%d)"
},
"condition": "শর্ত",
"conditions": {
"date": {
"after": "পরে",
"before": "আগে",
"between": "মধ্যে",
"empty": "খালি",
"equals": "সমান",
"not": "নয়",
"notBetween": "মধ্যে নয়",
"notEmpty": "খালি নয়"
},
"number": {
"between": "মধ্যে",
"empty": "খালি",
"equals": "সমান",
"gt": "বৃহত্তর",
"gte": "বৃহত্তর বা সমান",
"lt": "ক্ষুদ্রতর",
"lte": "ক্ষুদ্রতর বা সমান",
"not": "নয়",
"notBetween": "মধ্যে নয়",
"notEmpty": "খালি নয়"
},
"string": {
"contains": "বিদ্যমান",
"empty": "খালি",
"endsWith": "শেষ হয়",
"equals": "সমান",
"not": "নয়",
"notEmpty": "খালি নয়",
"startsWith": "শুরু হয়",
"notContains": "বিদ্যমান নয়",
"notStarts": "শুরু হয় না",
"notEnds": "শেষ হয় না"
},
"array": {
"equals": "সমান",
"empty": "খালি",
"contains": "বিদ্যমান",
"not": "নয়",
"notEmpty": "খালি নয়",
"without": "ছাড়া"
}
},
"deleteTitle": "ফিল্টারের নিয়ম অপসারণ",
"leftTitle": "বাইরের মানদন্ড",
"logicAnd": "এবং",
"logicOr": "অথবা",
"rightTitle": "ভেতরের মানদন্ড",
"title": {
"0": "অনুসন্ধান বিল্ডার",
"_": "অনুসন্ধান বিল্ডার (%d)"
},
"value": "ফলাফল"
},
"loadingRecords": "লোডিং হচ্ছে...",
"searchPanes": {
"clearMessage": "সব মুছুন",
"collapse": {
"0": "সার্চপেনসমূহ",
"_": "সার্চপেন (%d)"
},
"emptyPanes": "কোনো সার্চপেন নেই",
"loadMessage": "সার্চপেন লোড হচ্ছে...",
"title": "চলমান ফিল্টার - %d",
"showMessage": "সবগুলো দেখান",
"collapseMessage": "সবগুলো বন্ধ করুন"
},
"select": {
"cells": {
"1": "১টি সেল সিলেক্ট হয়েছে",
"_": "%dটি সেল সিলেক্ট হয়েছে"
},
"columns": {
"1": "১টি কলাম সিলেক্ট হয়েছে",
"_": "%dটি কলাম সিলেক্ট হয়েছে"
}
}
}

View File

@ -0,0 +1,74 @@
{
"aria": {
"sortAscending": ": aktivirajte da sortirate kolonu uzlazno",
"sortDescending": ": aktivirajte da sortirate kolonu silazno"
},
"autoFill": {
"cancel": "Poništiti",
"fill": "Ispunite sve ćelije s <i>% d <\/i>",
"fillHorizontal": "Ispunite ćelije vodoravno",
"fillVertical": "Ispunite ćelije vertikalno"
},
"buttons": {
"collection": "Collection <span class=\"ui-button-icon-primary ui-icon ui-icon-triangle-1-s\"><\/span>",
"colvis": "Vidljivost kolone",
"colvisRestore": "Vratite vidljivost",
"copy": "Kopiraj",
"copyKeys": "Pritisnite ctrl ili u2318 + C da biste kopirali podatke tabele u sistemski međuspremnik. <br \/> <br \/> Za otkazivanje kliknite ovu poruku ili pritisnite Escape.",
"copySuccess": {
"1": "Kopiran je 1 red u međuspremnik",
"_": "Kopirani su %d redova u međuspremnik"
},
"copyTitle": "Kopirajte u međuspremnik",
"csv": "CSV",
"excel": "Excel",
"pageLength": {
"-1": "Prikaži sve redove",
"_": "Prikaži %d redova"
},
"pdf": "PDF",
"print": "Štampaj"
},
"emptyTable": "Nema podataka u tabeli",
"info": "Prikaz _START_ do _END_ od ukupno _TOTAL_ zapisa",
"infoEmpty": "Prikaz 0 do 0 od ukupno 0 zapisa",
"infoFiltered": "(filtrirano od ukupno _MAX_ zapisa)",
"infoThousands": ".",
"lengthMenu": "Prikaži _MENU_ zapisa",
"loadingRecords": "Učitavanje...",
"paginate": {
"first": "Početna",
"last": "Poslednja",
"next": "Sledeća",
"previous": "Prethodna"
},
"processing": "Obrada...",
"search": "Pretraga:",
"searchBuilder": {
"add": "Dodaj uslov",
"clearAll": "Obriši sve"
},
"searchPanes": {
"clearMessage": "Obriši sve",
"collapse": {
"0": "Paneli za Pretragu",
"_": "Paneli za Pretragu (%d)"
},
"count": "{total}",
"countFiltered": "{shown} ({total})",
"emptyPanes": "Nema panela za pretragu",
"loadMessage": "Učitavanje panela za pretragu",
"title": "Aktivni filteri - %d"
},
"select": {
"cells": {
"1": "Odabran je 1 red",
"_": "Broj odabranih redova: %d"
},
"columns": {
"1": "Jedna colona odabrana",
"_": "Broj odabranih kolona: %d"
}
},
"zeroRecords": "Nisu pronađeni odgovarajući zapisi"
}

View File

@ -0,0 +1,244 @@
{
"processing": "Processant...",
"lengthMenu": "Mostra _MENU_ registres",
"zeroRecords": "No s'han trobat registres",
"info": "Mostrant del _START_ al _END_ d'un total de _TOTAL_ registres",
"infoEmpty": "No hi ha registres disponibles",
"infoFiltered": "(filtrat de _MAX_ registres)",
"search": "Cerca:",
"infoThousands": ".",
"decimal": ",",
"loadingRecords": "Carregant...",
"paginate": {
"first": "Primer",
"previous": "Anterior",
"next": "Següent",
"last": "Darrer"
},
"aria": {
"sortAscending": ": Activa per ordenar la columna de manera ascendent",
"sortDescending": ": Activa per ordenar la columna de manera descendent"
},
"buttons": {
"print": "Imprimeix",
"copy": "Copia",
"colvis": "Columnes",
"copyTitle": "Copia al portapapers",
"copySuccess": {
"_": "%d files copiades",
"1": "1 fila copiada"
},
"pageLength": {
"-1": "Mostra totes les files",
"_": "Mostra %d files"
},
"pdf": "PDF",
"collection": "Col·lecció",
"colvisRestore": "Restaurar visibilitat",
"copyKeys": "Pressiona ctrl o poma + C per copiar les dades de la tabla al teu portapaper",
"csv": "CSV",
"excel": "Excel",
"createState": "Crear Estat",
"removeAllStates": "Borrar tots els Estats",
"removeState": "Borra",
"renameState": "Canviar nom",
"savedStates": "Estats gravats",
"stateRestore": "Restaura",
"updateState": "Actualitza"
},
"select": {
"rows": {
"_": "%d files seleccionades",
"1": "1 fila seleccionada"
},
"cells": {
"1": "1 fila seleccionada",
"_": "%d files seleccionades"
},
"columns": {
"1": "1 columna seleccionada",
"_": "%d columnes seleccionades"
}
},
"autoFill": {
"cancel": "Cancel·lar",
"fillHorizontal": "Omple les cel·les horitzontalment",
"fillVertical": "Omple les cel·les verticalment",
"fill": "Omple totes les cel·les amb <i>%d<\/i>"
},
"thousands": ".",
"datetime": {
"hours": "Hora",
"seconds": "Segons",
"unknown": "Desconegut",
"amPm": [
"am",
"pm"
],
"previous": "Anterior",
"next": "Següent",
"months": {
"11": "Desembre",
"10": "Novembre",
"9": "Octubre",
"7": "Agost",
"5": "Juny",
"4": "Maig",
"3": "Abril",
"2": "Març",
"1": "Febrer",
"0": "Gener",
"6": "Juliol",
"8": "Setembre"
},
"weekdays": {
"0": "Dg",
"2": "Dt",
"3": "Dc",
"4": "Dj",
"5": "Dv",
"6": "Ds",
"1": "Dl"
},
"minutes": "Minuts"
},
"editor": {
"close": "Tancar",
"create": {
"button": "Nou",
"title": "Crear nova entrada",
"submit": "Crear"
},
"edit": {
"button": "Editar",
"title": "Editar entrada",
"submit": "Actualitzar"
},
"remove": {
"button": "Eliminar",
"title": "Eliminar",
"submit": "Eliminar",
"confirm": {
"_": "Està segur de voler eliminar %d files?",
"1": "Està segur de voler elmiminar 1 fila?"
}
},
"error": {
"system": "Ha ocurregut un error de sistema (Més informació)"
},
"multi": {
"title": "Múltiples valors",
"restore": "Desfés el canvi",
"info": "El ítems seleccionats contenen diferents valors per aquesta entrada. Per editar i configurar tots els ítems per a aquesta entrada al mateix valor, prem o clica tabular aquí, sino, mantindran els seus valors individuals",
"noMulti": "Aquest camp pot ser editat individualment; però no com a part d'un grup"
}
},
"searchBuilder": {
"add": "Afegir condició",
"clearAll": "Eliminar tot",
"condition": "Condició",
"conditions": {
"date": {
"after": "Després",
"before": "Abans",
"between": "Entre",
"empty": "Buit",
"equals": "Iguals",
"not": "No",
"notBetween": "No entre",
"notEmpty": "No buit"
},
"number": {
"between": "Entre",
"empty": "Buit",
"equals": "Iguals",
"gt": "Major que",
"gte": "Mejor o igual a",
"lt": "Menor que",
"lte": "Menor o igual a",
"not": "No",
"notBetween": "No entre",
"notEmpty": "No buit"
},
"string": {
"contains": "Conté",
"empty": "Buit",
"endsWith": "Finalitza amb",
"equals": "Iguals",
"not": "No",
"notEmpty": "No buit",
"startsWith": "Comença amb",
"notEnds": "No acaba amb",
"notStarts": "No comença amb",
"notContains": "No inclou"
},
"array": {
"equals": "Iguals",
"empty": "Buit",
"contains": "Conté",
"not": "No",
"notEmpty": "No buit",
"without": "Sense"
}
},
"data": "Data",
"deleteTitle": "Esborrar regla de filtrat",
"leftTitle": "Criteri de desindentació",
"logicAnd": "I",
"logicOr": "O",
"rightTitle": "Criteri d'indentació",
"value": "Valor",
"title": {
"_": "Constructor de cerca (%d)",
"0": "Constructor de cerca"
},
"button": {
"_": "Constructor de cerca (%d)",
"0": "Constructor de cerca"
}
},
"searchPanes": {
"collapse": {
"0": "Panells de cerca",
"_": "Panells de cerca (%d)"
},
"count": "{total}",
"countFiltered": "{monstrat} ({total})",
"loadMessage": "Carregant panells de cerca",
"collapseMessage": "Colapsar Tot",
"clearMessage": "Esborrar tot",
"emptyPanes": "No hi ha panells de cerca",
"showMessage": "Mostrar-ho tot",
"title": "Filtres actius - %d"
},
"stateRestore": {
"removeSubmit": "Eliminar",
"removeJoiner": "i",
"removeError": "Error eliminant el registre",
"removeConfirm": "¿Segur que vol eliminar aquest %s?",
"emptyError": "El nom no pot estar buit",
"creationModal": {
"button": "Crear",
"columns": {
"search": "Cerca per columnes",
"visible": "Visibilitat de columnes"
},
"name": "Nom",
"order": "Ordenar",
"toggleLabel": "Inclou:",
"paging": "Paginació",
"scroller": "Posició Scroll",
"search": "Bñusqueda",
"searchBuilder": "Generador Búsquedes",
"title": "Crear nou Estat",
"select": "Sel·lecció"
},
"renameLabel": "Nou nom per %s",
"duplicateError": "Ja existeix un estat amb aquest nom",
"emptyStates": "No hi ha estats gravats",
"removeTitle": "Borrar Estat",
"renameButton": "Canviar nom",
"renameTitle": "Canviar nom"
},
"emptyTable": "No hi ha registres disponibles en aquesta taula"
}

View File

@ -0,0 +1,28 @@
{
"aria": {
"sortAscending": ": attivà per trasceglie a culonna in ordine criscente",
"sortDescending": ": attivà per trasceglie a culonna in ordine scendente"
},
"emptyTable": "Nisunu datu dispunibule in u tavulone",
"info": "Visualisazione di l'elementu _START_ à _END_ nant'à _TOTAL_ elementi",
"infoEmpty": "Visualisazione di l'elementu 0 à 0 nant'à 0 elementu",
"infoFiltered": "staccià à partesi da _MAX_ elementi in tutale",
"infoThousands": ",",
"lengthMenu": "Mustrà _MENU_ elementi",
"loadingRecords": "Carcamentu...",
"paginate": {
"first": "Prima",
"last": "Ultimu",
"next": "Seguente",
"previous": "Precedente"
},
"processing": "Trattamentu...",
"search": "Circà :",
"select": {
"rows": {
"1": "1 linea selezziunata",
"_": "%d linee selezziunate"
}
},
"zeroRecords": "Nisunu elementu currispundente trovu"
}

View File

@ -0,0 +1,234 @@
{
"emptyTable": "Tabulka neobsahuje žádná data",
"info": "Zobrazuji _START_ až _END_ z celkem _TOTAL_ záznamů",
"infoEmpty": "Zobrazuji 0 až 0 z 0 záznamů",
"infoFiltered": "(filtrováno z celkem _MAX_ záznamů)",
"loadingRecords": "Načítám...",
"zeroRecords": "Žádné záznamy nebyly nalezeny",
"paginate": {
"first": "První",
"last": "Poslední",
"next": "Další",
"previous": "Předchozí"
},
"searchBuilder": {
"add": "Přidat podmínku",
"clearAll": "Smazat vše",
"condition": "Podmínka",
"conditions": {
"date": {
"after": "po",
"before": "před",
"between": "mezi",
"empty": "prázdné",
"equals": "rovno",
"not": "není",
"notBetween": "není mezi",
"notEmpty": "není prázdné"
},
"number": {
"between": "mezi",
"empty": "prázdné",
"equals": "rovno",
"gt": "větší",
"gte": "rovno a větší",
"lt": "menší",
"lte": "rovno a menší",
"not": "není",
"notBetween": "není mezi",
"notEmpty": "není prázdné"
},
"string": {
"contains": "obsahuje",
"empty": "prázdné",
"endsWith": "končí na",
"equals": "rovno",
"not": "není",
"notEmpty": "není prázdné",
"startsWith": "začíná na",
"notContains": "Podmínka",
"notStarts": "Nezačíná",
"notEnds": "Nekončí"
},
"array": {
"equals": "rovno",
"empty": "prázdné",
"contains": "obsahuje",
"not": "není",
"notEmpty": "není prázdné",
"without": "neobsahuje"
}
},
"data": "Sloupec",
"logicAnd": "A",
"logicOr": "NEBO",
"title": {
"0": "Rozšířený filtr",
"_": "Rozšířený filtr (%d)"
},
"value": "Hodnota",
"button": {
"0": "Rozšířený filtr",
"_": "Rozšířený filtr (%d)"
},
"deleteTitle": "Smazat filtrovací pravidlo"
},
"autoFill": {
"cancel": "Zrušit",
"fill": "Vyplň všechny buňky textem <i>%d<i><\/i><\/i>",
"fillHorizontal": "Vyplň všechny buňky horizontálně",
"fillVertical": "Vyplň všechny buňky vertikálně"
},
"buttons": {
"collection": "Kolekce <span class=\"ui-button-icon-primary ui-icon ui-icon-triangle-1-s\"><\/span>",
"copy": "Kopírovat",
"copyTitle": "Kopírovat do schránky",
"csv": "CSV",
"excel": "Excel",
"pageLength": {
"-1": "Zobrazit všechny řádky",
"_": "Zobrazit %d řádků"
},
"pdf": "PDF",
"print": "Tisknout",
"colvis": "Viditelnost sloupců",
"colvisRestore": "Resetovat sloupce",
"copyKeys": "Zmáčkněte ctrl or u2318 + C pro zkopírování dat. Pro zrušení klikněte na tuto zprávu nebo zmáčkněte esc..",
"copySuccess": {
"1": "Zkopírován 1 řádek do schránky",
"_": "Zkopírováno %d řádků do schránky"
},
"createState": "Vytvořit Stav",
"removeAllStates": "Vymazat všechny Stavy",
"removeState": "Odstranit",
"renameState": "Odstranit",
"savedStates": "Uložit Stavy",
"stateRestore": "Stav %d",
"updateState": "Aktualizovat"
},
"searchPanes": {
"clearMessage": "Smazat vše",
"collapse": {
"0": "Vyhledávací Panely",
"_": "Vyhledávací Panely (%d)"
},
"count": "{total}",
"countFiltered": "{shown} ({total})",
"emptyPanes": "Žádné Vyhledávací Panely",
"loadMessage": "Načítám Vyhledávací Panely",
"title": "Aktivních filtrů - %d",
"showMessage": "Zobrazit Vše",
"collapseMessage": "Sbalit Vše"
},
"select": {
"cells": {
"1": "Vybrán 1 záznam",
"_": "Vybráno %d záznamů"
},
"columns": {
"1": "Vybrán 1 sloupec",
"_": "Vybráno %d sloupců"
}
},
"aria": {
"sortAscending": "Aktivujte pro seřazení vzestupně",
"sortDescending": "Aktivujte pro seřazení sestupně"
},
"lengthMenu": "Zobrazit _MENU_ výsledků",
"processing": "Zpracovávání...",
"search": "Vyhledávání:",
"datetime": {
"previous": "Předchozí",
"next": "Další",
"hours": "Hodiny",
"minutes": "Minuty",
"seconds": "Vteřiny",
"unknown": "-",
"amPm": [
"Dopoledne",
"Odpoledne"
],
"weekdays": [
"Po",
"Út",
"St",
"Čt",
"Pá",
"So",
"Ne"
],
"months": [
"Leden",
"Únor",
"Březen",
"Duben",
"Květen",
"Červen",
"Červenec",
"Srpen",
"Září",
"Říjen",
"Listopad",
"Prosinec"
]
},
"editor": {
"close": "Zavřít",
"create": {
"button": "Nový",
"title": "Nový záznam",
"submit": "Vytvořit"
},
"edit": {
"button": "Změnit",
"title": "Změnit záznam",
"submit": "Aktualizovat"
},
"remove": {
"button": "Vymazat",
"title": "Smazání",
"submit": "Vymazat",
"confirm": {
"_": "Opravdu chcete smazat tyto %d řádky?",
"1": "Opravdu chcete smazat tento 1 řádek?"
}
},
"multi": {
"title": "Mnohočetný výběr",
"restore": "Vrátit změny",
"noMulti": "Toto pole může být editováno individuálně, ale ne jako soušást skupiny."
}
},
"infoThousands": " ",
"decimal": ",",
"thousands": " ",
"stateRestore": {
"creationModal": {
"button": "Vytvořit",
"columns": {
"search": "Vyhledávání v buňce",
"visible": "Viditelnost buňky"
},
"name": "Název:",
"order": "Řazení",
"paging": "Stránkování",
"scroller": "Pozice skrolování",
"search": "Hledání",
"searchBuilder": "SearchBuilder",
"select": "Výběr",
"title": "Vytvořit nový Stav",
"toggleLabel": "Zahrnout"
},
"duplicateError": "Stav s tímto názvem ji existuje.",
"emptyError": "Název nemůže být prázný.",
"emptyStates": "Žádné uložené stavy",
"removeConfirm": "Opravdu chcete odstranbit %s?",
"removeError": "Chyba při odstraňování stavu.",
"removeJoiner": "a",
"removeSubmit": "Odstranit",
"removeTitle": "Odstranit Stav",
"renameButton": "Vymazat",
"renameLabel": "Nové jméno pro %s:",
"renameTitle": "Přejmenování Stavu"
}
}

View File

@ -0,0 +1,22 @@
{
"emptyTable": "Dim data ar gael yn y tabl",
"info": "Dangos _START_ i _END_ o _TOTAL_ cofnod",
"infoEmpty": "Dangos 0 i 0 o 0 cofnod",
"infoFiltered": "(wedi hidlo o gyfanswm o _MAX_ cofnod)",
"infoThousands": ",",
"lengthMenu": "Dangos _MENU_ cofnod",
"loadingRecords": "Wrthi'n llwytho...",
"processing": "Wrthi'n prosesu...",
"search": "Chwilio:",
"zeroRecords": "Heb ddod o hyd i gofnodion sy'n cyfateb",
"paginate": {
"first": "Cyntaf",
"last": "Olaf",
"next": "Nesaf",
"previous": "Blaenorol"
},
"aria": {
"sortAscending": ": rhoi ar waith i drefnu colofnau o'r lleiaf i'r mwyaf",
"sortDescending": ": rhoi ar waith i drefnu colofnau o'r mwyaf i'r lleiaf"
}
}

View File

@ -0,0 +1,167 @@
{
"processing": "Henter...",
"lengthMenu": "Vis _MENU_ linjer",
"zeroRecords": "Ingen linjer matcher s&oslash;gningen",
"info": "Viser _START_ til _END_ af _TOTAL_ linjer",
"infoEmpty": "Viser 0 til 0 af 0 linjer",
"infoFiltered": "(filtreret fra _MAX_ linjer)",
"paginate": {
"previous": "Forrige",
"last": "Sidste",
"first": "Første",
"next": "Næste"
},
"aria": {
"sortAscending": "Stigende sortering",
"sortDescending": "Faldende sortering"
},
"autoFill": {
"fill": "Fyld alle celler med <i>%d<i><\/i><\/i>",
"fillHorizontal": "Fyld celler horisontalt",
"fillVertical": "Fyld celler vertikalt",
"cancel": "Annuller"
},
"buttons": {
"copy": "Kopi",
"copyTitle": "Kopier til udklipsholder",
"csv": "CSV",
"excel": "Excel",
"pageLength": {
"-1": "Vis alle rækker",
"_": "Vis %d rækker"
},
"pdf": "PDF",
"print": "Udskriv",
"collection": "Samling",
"colvis": "Kolonne synlighed",
"colvisRestore": "Gendan synlighed",
"copyKeys": "Tryk ctrl eller u2318 + C for at kopiere data til udklipsholder. For at fortryde, klik på denne besked eller tryk escape.",
"copySuccess": {
"1": "Kopieret en række til udklipsholder",
"_": "Kopieret %ds rækker til udklipsholder"
}
},
"emptyTable": "Ingen data tilgængelige i tabellen",
"infoThousands": ".",
"select": {
"cells": {
"1": "1 celle valgt",
"_": "%d celler valgt"
},
"columns": {
"1": "1 kolonne valgt",
"_": "%d kolonner valgt"
}
},
"thousands": ".",
"decimal": ".",
"search": "Søg",
"searchPanes": {
"clearMessage": "Fjern alle",
"collapse": {
"0": "Søgepanel",
"_": "Søgepanel (%d)"
},
"emptyPanes": "Ingen søgepaneler",
"loadMessage": "Henter søgepaneler",
"title": "Filter aktive - %d",
"count": "Antal",
"countFiltered": "Filtreret antal"
},
"datetime": {
"previous": "Forrige",
"next": "Næste",
"hours": "Timer",
"minutes": "Minutter",
"seconds": "Sekunder",
"unknown": "-"
},
"editor": {
"close": "Luk",
"create": {
"button": "Ny",
"title": "Opret ny række",
"submit": "Opret"
},
"edit": {
"button": "Ret",
"title": "Ret række",
"submit": "Opdater"
},
"remove": {
"button": "Slet",
"title": "Slet",
"submit": "Slet",
"confirm": {
"_": "Er du sikker på, at du vil slette %d rækker?",
"1": "Er du sikker på, at du vil slette 1 række?"
}
},
"error": {
"system": "En systemfejl er opstået (Mere information)"
},
"multi": {
"title": "Flere værdier",
"restore": "Fortryd ændringer"
}
},
"loadingRecords": "Henter...",
"searchBuilder": {
"add": "Tilføj betingelse",
"button": {
"0": "Søg",
"_": "Søg (%d)"
},
"clearAll": "Nulstil",
"condition": "Betingelse",
"conditions": {
"date": {
"after": "Efter",
"before": "Før",
"between": "Mellem",
"empty": "Tom",
"equals": "Lig med",
"not": "Ikke",
"notBetween": "Ikke mellem",
"notEmpty": "Ikke tom"
},
"number": {
"between": "Mellem",
"empty": "Tom",
"equals": "Lig med",
"gt": "Større end",
"lt": "Mindre end",
"lte": "Mindre end eller lig med",
"not": "Ikke",
"notBetween": "Ikke mellem",
"notEmpty": "Ikke tom",
"gte": "Større end eller lig medLig med eller større end"
},
"string": {
"contains": "Indeholder",
"empty": "Tom",
"endsWith": "Slutter med",
"equals": "Lig med",
"not": "Ikke",
"notEmpty": "Ikke tom",
"startsWith": "Starter med"
},
"array": {
"equals": "Lig med",
"empty": "Tom",
"contains": "Indeholder",
"not": "Ikke",
"notEmpty": "Ikke tom",
"without": "Indeholder ikke"
}
},
"data": "Data",
"deleteTitle": "Slet filtrerings regel",
"logicAnd": "Og",
"logicOr": "Eller",
"value": "Værdi",
"title": {
"_": "Brugerdefineret filtrering"
}
}
}

View File

@ -0,0 +1,204 @@
{
"emptyTable": "Keine Daten in der Tabelle vorhanden",
"info": "_START_ bis _END_ von _TOTAL_ Einträgen",
"infoEmpty": "Keine Daten vorhanden",
"infoFiltered": "(gefiltert von _MAX_ Einträgen)",
"infoThousands": ".",
"loadingRecords": "Wird geladen ..",
"processing": "Bitte warten ..",
"paginate": {
"first": "Erste",
"previous": "Zurück",
"next": "Nächste",
"last": "Letzte"
},
"aria": {
"sortAscending": ": aktivieren, um Spalte aufsteigend zu sortieren",
"sortDescending": ": aktivieren, um Spalte absteigend zu sortieren"
},
"select": {
"rows": {
"_": "%d Zeilen ausgewählt",
"1": "1 Zeile ausgewählt"
},
"cells": {
"1": "1 Zelle ausgewählt",
"_": "%d Zellen ausgewählt"
},
"columns": {
"1": "1 Spalte ausgewählt",
"_": "%d Spalten ausgewählt"
}
},
"buttons": {
"print": "Drucken",
"copy": "Kopieren",
"copyTitle": "In Zwischenablage kopieren",
"copySuccess": {
"_": "%d Zeilen kopiert",
"1": "1 Zeile kopiert"
},
"collection": "Aktionen <span class=\"ui-button-icon-primary ui-icon ui-icon-triangle-1-s\"><\/span>",
"colvis": "Spaltensichtbarkeit",
"colvisRestore": "Sichtbarkeit wiederherstellen",
"copyKeys": "Drücken Sie die Taste <i>ctrl<\/i> oder <i>⌘<\/i> + <i>C<\/i> um die Tabelle<br \/>in den Zwischenspeicher zu kopieren.<br \/><br \/>Um den Vorgang abzubrechen, klicken Sie die Nachricht an oder drücken Sie auf Escape.",
"csv": "CSV",
"excel": "Excel",
"pageLength": {
"-1": "Alle Zeilen anzeigen",
"_": "%d Zeilen anzeigen"
},
"pdf": "PDF"
},
"autoFill": {
"cancel": "Abbrechen",
"fill": "Alle Zellen mit <i>%d<i> füllen<\/i><\/i>",
"fillHorizontal": "Alle horizontalen Zellen füllen",
"fillVertical": "Alle vertikalen Zellen füllen"
},
"decimal": ",",
"search": "Suche:",
"searchBuilder": {
"add": "Bedingung hinzufügen",
"button": {
"0": "Such-Baukasten",
"_": "Such-Baukasten (%d)"
},
"condition": "Bedingung",
"conditions": {
"date": {
"after": "Nach",
"before": "Vor",
"between": "Zwischen",
"empty": "Leer",
"not": "Nicht",
"notBetween": "Nicht zwischen",
"notEmpty": "Nicht leer",
"equals": "Gleich"
},
"number": {
"between": "Zwischen",
"empty": "Leer",
"equals": "Entspricht",
"gt": "Größer als",
"gte": "Größer als oder gleich",
"lt": "Kleiner als",
"lte": "Kleiner als oder gleich",
"not": "Nicht",
"notBetween": "Nicht zwischen",
"notEmpty": "Nicht leer"
},
"string": {
"contains": "Beinhaltet",
"empty": "Leer",
"endsWith": "Endet mit",
"equals": "Entspricht",
"not": "Nicht",
"notEmpty": "Nicht leer",
"startsWith": "Startet mit",
"notContains": "enthält nicht",
"notStarts": "startet nicht mit",
"notEnds": "endet nicht mit"
},
"array": {
"equals": "ist gleich",
"empty": "ist leer",
"contains": "enthält",
"not": "ist ungleich",
"notEmpty": "ist nicht leer",
"without": "aber nicht"
}
},
"data": "Daten",
"deleteTitle": "Filterregel entfernen",
"leftTitle": "Äußere Kriterien",
"logicAnd": "UND",
"logicOr": "ODER",
"rightTitle": "Innere Kriterien",
"title": {
"0": "Such-Baukasten",
"_": "Such-Baukasten (%d)"
},
"value": "Wert",
"clearAll": "Alle löschen"
},
"searchPanes": {
"clearMessage": "Leeren",
"collapse": {
"0": "Suchmasken",
"_": "Suchmasken (%d)"
},
"countFiltered": "{shown} ({total})",
"emptyPanes": "Keine Suchmasken",
"loadMessage": "Lade Suchmasken..",
"title": "Aktive Filter: %d",
"showMessage": "zeige Alle",
"collapseMessage": "Alle einklappen",
"count": "{total}"
},
"thousands": ".",
"zeroRecords": "Keine passenden Einträge gefunden",
"lengthMenu": "_MENU_ Zeilen anzeigen",
"datetime": {
"previous": "Vorher",
"next": "Nachher",
"hours": "Stunden",
"minutes": "Minuten",
"seconds": "Sekunden",
"unknown": "Unbekannt",
"weekdays": [
"Sonntag",
"Montag",
"Dienstag",
"Mittwoch",
"Donnerstag",
"Freitag",
"Samstag"
],
"months": [
"Januar",
"Februar",
"März",
"April",
"Mai",
"Juni",
"Juli",
"August",
"September",
"Oktober",
"November",
"Dezember"
]
},
"editor": {
"close": "Schließen",
"create": {
"button": "Neu",
"title": "Neuen Eintrag erstellen",
"submit": "Neu"
},
"edit": {
"button": "Ändern",
"title": "Eintrag ändern",
"submit": "ändern"
},
"remove": {
"button": "Löschen",
"title": "Löschen",
"submit": "Löschen",
"confirm": {
"_": "Sollen %d Zeilen gelöscht werden?",
"1": "Soll diese Zeile gelöscht werden?"
}
},
"error": {
"system": "Ein Systemfehler ist aufgetreten"
},
"multi": {
"title": "Mehrere Werte",
"info": "Die ausgewählten Elemente enthalten mehrere Werte für dieses Feld. Um alle Elemente für dieses Feld zu bearbeiten und auf denselben Wert zu setzen, klicken oder tippen Sie hier, andernfalls behalten diese ihre individuellen Werte bei.",
"restore": "Änderungen zurücksetzen",
"noMulti": "Dieses Feld kann nur einzeln bearbeitet werden, nicht als Teil einer Mengen-Änderung."
}
}
}

View File

@ -0,0 +1,178 @@
{
"decimal": ",",
"emptyTable": "Δεν υπάρχουν δεδομένα στον πίνακα",
"info": "Εμφανίζονται _START_ έως _END_ από _TOTAL_ εγγραφές",
"infoEmpty": "Εμφανίζονται 0 έως 0 από 0 εγγραφές",
"infoFiltered": "(φιλτραρισμένες από _MAX_ συνολικά εγγραφές)",
"infoThousands": ".",
"lengthMenu": "Δείξε _MENU_ εγγραφές",
"loadingRecords": "Φόρτωση...",
"processing": "Επεξεργασία...",
"search": "Αναζήτηση:",
"thousands": ".",
"zeroRecords": "Δεν βρέθηκαν εγγραφές που να ταιριάζουν",
"paginate": {
"first": "Πρώτη",
"previous": "Προηγούμενη",
"next": "Επόμενη",
"last": "Τελευταία"
},
"aria": {
"sortAscending": ": ενεργοποιήστε για αύξουσα ταξινόμηση της στήλης",
"sortDescending": ": ενεργοποιήστε για φθίνουσα ταξινόμηση της στήλης"
},
"autoFill": {
"cancel": "Ακύρωση",
"fill": "Γέμισμα όλων των κελιών με <i>%d<i><\/i><\/i>",
"fillHorizontal": "Γέμισμα κελιών οριζόντια",
"fillVertical": "Γέμισμα κελιών κατακόρυφα"
},
"buttons": {
"collection": "Συλλογή",
"colvis": "Ορατότητα στηλών",
"colvisRestore": "Επαναφορά ορατότητας",
"copy": "Αντιγραφή",
"copyKeys": "Πατήστε ctrl ή u2318 + C για να αντιγράψετε τα δεδομένα του πίνακα<br \/>στο πρόχειρο. <br \/><br \/>Για ακύρωση, πατήστε το μήνυμα ή πατήστε το πλήκτρο Esc.",
"copySuccess": {
"_": " Αντιγράφηκαν %ds γραμμές στο πρόχειρο",
"1": "Αντιγράφηκε 1 γραμμή στο πρόχειρο"
},
"copyTitle": "Αντιγραφή στο πρόχειρο",
"csv": "CSV",
"excel": "Excel",
"pageLength": {
"_": " Εμφάνιση %d γραμμών",
"-1": "Εμφάνιση όλων των γραμμών"
},
"pdf": "PDF",
"print": "Εκτύπωση"
},
"datetime": {
"amPm": [
"πμ",
"μμ"
],
"hours": "Ώρες",
"minutes": "Λεπτά",
"next": "Επόμενο",
"previous": "Προηγούμενο",
"seconds": "Δευτερόλεπτα",
"unknown": "Άγνωστο"
},
"editor": {
"close": "Κλείσιμο",
"create": {
"button": "Νέο",
"submit": "Δημιουργία",
"title": "Δημιουργία νέας εγγραφής"
},
"edit": {
"button": "Επεξεργασία",
"submit": "Επεξεργασία",
"title": "Επεξεργασία εγγραφής"
},
"error": {
"system": "Συνέβη ένα λάθος συστήματος (περισσότερες πληροφορίες)"
},
"multi": {
"info": "Τα επιλεγμένα αντικείμενα περιέχουν διαφορετικές τιμές για αυτό το πεδίο. Για να επεξεργαστείτε ή για να ορίσετε την ίδια τιμή για αυτό το πεδίο σε όλα τα αντικείμενα, κάντε κλικ ή πατήστε εδώ, διαφορετικά θα διατηρήσουν τις αρχικές τους τιμές.",
"noMulti": "Αυτό το πεδίο μπορεί να επεξεργαστεί μεμονωμένα, αλλά όχι σε ομάδα. ",
"restore": "Επαναφορά επιλογών",
"title": "Αρκετές τιμές"
},
"remove": {
"button": "Διαγραφή",
"confirm": {
"_": "Είστε σίγουροι ότι θέλετε να διαγράψετε %d γραμμές;",
"1": "Είστε σίγουροι ότι θέλετε να διαγράψετε 1 γραμή;"
},
"submit": "Διαγραφή",
"title": "Διαγραφή εγγραφής"
}
},
"searchBuilder": {
"add": "Εισαγωγή συνθήκης",
"button": {
"_": "Φίλτρα εύρεσης (%d)",
"0": "Δημιουργία φίλτρων"
},
"clearAll": "Αφαίρεση όλων",
"condition": "Συνθήκη",
"conditions": {
"array": {
"contains": "Περιέχει",
"empty": "Κενό",
"equals": "Ίσο",
"not": "Όχι",
"notEmpty": "Όχι κενό",
"without": "Χωρίς"
},
"date": {
"after": "Μετά",
"before": "Πριν",
"between": "Ενδιάμεσα",
"empty": "Άδειο",
"equals": "Ίσο",
"not": "Όχι ίσο",
"notBetween": "Όχι μεταξύ",
"notEmpty": "Όχι κενό"
},
"number": {
"between": "Μεταξύ",
"empty": "Κενό",
"equals": "Ίσο",
"gt": "Μεγαλύτερο από",
"gte": "Μεγαλύτερο ή ίσο με",
"lt": "Μικρότερο από",
"lte": "Μικρότερο ή ίσο με",
"not": "Όχι",
"notBetween": "Όχι μεταξύ",
"notEmpty": "Όχι κενό"
},
"string": {
"contains": "Περιέχει",
"empty": "Κενό",
"endsWith": "Τελειώνει με",
"equals": "Ίσο",
"not": "Όχι",
"notEmpty": "Όχι κενό",
"startsWith": "Αρχίζει με"
}
},
"data": "Δεδομένα",
"deleteTitle": "Διαγραφή συνθήκης φίλτρου",
"logicAnd": "και",
"logicOr": "ή",
"title": {
"_": "Φίλτρα εύρεσης (%d)",
"0": "Φίλτρα εύρεσης"
},
"value": "Τιμή"
},
"searchPanes": {
"clearMessage": "Καθαρισμός όλων",
"collapse": {
"_": "Φίλτρα αναζήτησης (%d)",
"0": "Φίλτρα αναζήτησης"
},
"count": "{total}",
"countFiltered": "{shown} ({total})",
"emptyPanes": "Άδειος πίνακας αναζήτησης",
"loadMessage": "Φόρτωση πίνακα αναζήτησης",
"title": "Ενεργά φίλτρα - %d"
},
"select": {
"cells": {
"_": "%d κελιά επιλέχθηκαν",
"1": "1 κελί επιλέχθηκε"
},
"columns": {
"_": "%d στήλες επιλέχθηκαν",
"1": "1 στήλη επιλέχθηκε"
},
"rows": {
"_": "%d γραμμές επιλέχθηκαν",
"1": "1 γραμμή επιλέχθηκε"
}
}
}

Some files were not shown because too many files have changed in this diff Show More