code_before
stringlengths 4
2.58M
| code_after
stringlengths 75
2.59M
|
---|---|
""" A FastAPI app used to create an OpenAPI document for end-to-end testing """
import json
from datetime import date, datetime
from enum import Enum
from pathlib import Path
from typing import Any, Dict, List, Union
from fastapi import APIRouter, FastAPI, File, Header, Query, UploadFile
from pydantic import BaseModel
app = FastAPI(title="My Test API", description="An API for testing openapi-python-client",)
@app.get("/ping", response_model=bool)
async def ping():
""" A quick check to see if the system is running """
return True
test_router = APIRouter()
class AnEnum(Enum):
""" For testing Enums in all the ways they can be used """
FIRST_VALUE = "FIRST_VALUE"
SECOND_VALUE = "SECOND_VALUE"
class DifferentEnum(Enum):
FIRST_VALUE = "DIFFERENT"
SECOND_VALUE = "OTHER"
class OtherModel(BaseModel):
""" A different model for calling from TestModel """
a_value: str
class AModel(BaseModel):
""" A Model for testing all the ways custom objects can be used """
an_enum_value: AnEnum
nested_list_of_enums: List[List[DifferentEnum]] = []
some_dict: Dict[str, str] = {}
aCamelDateTime: Union[datetime, date]
a_date: date
@test_router.get("/", response_model=List[AModel], operation_id="getUserList")
def get_list(an_enum_value: List[AnEnum] = Query(...), some_date: Union[date, datetime] = Query(...)):
""" Get a list of things """
return
@test_router.post("/upload")
async def upload_file(some_file: UploadFile = File(...), keep_alive: bool = Header(None)):
""" Upload a file """
data = await some_file.read()
return (some_file.filename, some_file.content_type, data)
@test_router.post("/json_body")
def json_body(body: AModel):
""" Try sending a JSON body """
return
app.include_router(test_router, prefix="/tests", tags=["tests"])
def generate_openapi_json():
path = Path(__file__).parent / "openapi.json"
path.write_text(json.dumps(app.openapi(), indent=4))
if __name__ == "__main__":
generate_openapi_json()
| """ A FastAPI app used to create an OpenAPI document for end-to-end testing """
import json
from datetime import date, datetime
from enum import Enum
from pathlib import Path
from typing import Any, Dict, List, Union
from fastapi import APIRouter, Body, FastAPI, File, Header, Query, UploadFile
from pydantic import BaseModel
app = FastAPI(title="My Test API", description="An API for testing openapi-python-client",)
@app.get("/ping", response_model=bool)
async def ping():
""" A quick check to see if the system is running """
return True
test_router = APIRouter()
class AnEnum(Enum):
""" For testing Enums in all the ways they can be used """
FIRST_VALUE = "FIRST_VALUE"
SECOND_VALUE = "SECOND_VALUE"
class DifferentEnum(Enum):
FIRST_VALUE = "DIFFERENT"
SECOND_VALUE = "OTHER"
class OtherModel(BaseModel):
""" A different model for calling from TestModel """
a_value: str
class AModel(BaseModel):
""" A Model for testing all the ways custom objects can be used """
an_enum_value: AnEnum
nested_list_of_enums: List[List[DifferentEnum]] = []
some_dict: Dict[str, str]
aCamelDateTime: Union[datetime, date]
a_date: date
@test_router.get("/", response_model=List[AModel], operation_id="getUserList")
def get_list(
an_enum_value: List[AnEnum] = Query(...), some_date: Union[date, datetime] = Query(...),
):
""" Get a list of things """
return
@test_router.post("/upload")
async def upload_file(some_file: UploadFile = File(...), keep_alive: bool = Header(None)):
""" Upload a file """
data = await some_file.read()
return (some_file.filename, some_file.content_type, data)
@test_router.post("/json_body")
def json_body(body: AModel):
""" Try sending a JSON body """
return
@test_router.post("/test_defaults")
def test_defaults(
string_prop: str = Query(default="the default string"),
datetime_prop: datetime = Query(default=datetime(1010, 10, 10)),
date_prop: date = Query(default=date(1010, 10, 10)),
float_prop: float = Query(default=3.14),
int_prop: int = Query(default=7),
boolean_prop: bool = Query(default=False),
list_prop: List[AnEnum] = Query(default=[AnEnum.FIRST_VALUE, AnEnum.SECOND_VALUE]),
union_prop: Union[float, str] = Query(default="not a float"),
enum_prop: AnEnum = Query(default=AnEnum.FIRST_VALUE),
dict_prop: Dict[str, str] = Body(default={"key": "val"}),
):
return
app.include_router(test_router, prefix="/tests", tags=["tests"])
def generate_openapi_json():
path = Path(__file__).parent / "openapi.json"
path.write_text(json.dumps(app.openapi(), indent=4))
if __name__ == "__main__":
generate_openapi_json()
|
from __future__ import annotations
from dataclasses import dataclass, field
from datetime import date, datetime
from typing import Any, Dict, List, Optional, Union, cast
from .an_enum import AnEnum
from .different_enum import DifferentEnum
@dataclass
class AModel:
""" A Model for testing all the ways custom objects can be used """
an_enum_value: AnEnum
a_camel_date_time: Union[datetime, date]
a_date: date
nested_list_of_enums: Optional[List[List[DifferentEnum]]] = field(
default_factory=lambda: cast(Optional[List[List[DifferentEnum]]], [])
)
some_dict: Optional[Dict[Any, Any]] = field(default_factory=lambda: cast(Optional[Dict[Any, Any]], {}))
def to_dict(self) -> Dict[str, Any]:
an_enum_value = self.an_enum_value.value
if isinstance(self.a_camel_date_time, datetime):
a_camel_date_time = self.a_camel_date_time.isoformat()
else:
a_camel_date_time = self.a_camel_date_time.isoformat()
a_date = self.a_date.isoformat()
if self.nested_list_of_enums is None:
nested_list_of_enums = None
else:
nested_list_of_enums = []
for nested_list_of_enums_item_data in self.nested_list_of_enums:
nested_list_of_enums_item = []
for nested_list_of_enums_item_item_data in nested_list_of_enums_item_data:
nested_list_of_enums_item_item = nested_list_of_enums_item_item_data.value
nested_list_of_enums_item.append(nested_list_of_enums_item_item)
nested_list_of_enums.append(nested_list_of_enums_item)
some_dict = self.some_dict
return {
"an_enum_value": an_enum_value,
"aCamelDateTime": a_camel_date_time,
"a_date": a_date,
"nested_list_of_enums": nested_list_of_enums,
"some_dict": some_dict,
}
@staticmethod
def from_dict(d: Dict[str, Any]) -> AModel:
an_enum_value = AnEnum(d["an_enum_value"])
def _parse_a_camel_date_time(data: Dict[str, Any]) -> Union[datetime, date]:
a_camel_date_time: Union[datetime, date]
try:
a_camel_date_time = datetime.fromisoformat(d["aCamelDateTime"])
return a_camel_date_time
except:
pass
a_camel_date_time = date.fromisoformat(d["aCamelDateTime"])
return a_camel_date_time
a_camel_date_time = _parse_a_camel_date_time(d["aCamelDateTime"])
a_date = date.fromisoformat(d["a_date"])
nested_list_of_enums = []
for nested_list_of_enums_item_data in d.get("nested_list_of_enums") or []:
nested_list_of_enums_item = []
for nested_list_of_enums_item_item_data in nested_list_of_enums_item_data:
nested_list_of_enums_item_item = DifferentEnum(nested_list_of_enums_item_item_data)
nested_list_of_enums_item.append(nested_list_of_enums_item_item)
nested_list_of_enums.append(nested_list_of_enums_item)
some_dict = d.get("some_dict")
return AModel(
an_enum_value=an_enum_value,
a_camel_date_time=a_camel_date_time,
a_date=a_date,
nested_list_of_enums=nested_list_of_enums,
some_dict=some_dict,
)
| from __future__ import annotations
import datetime
from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional, Union, cast
from .an_enum import AnEnum
from .different_enum import DifferentEnum
@dataclass
class AModel:
""" A Model for testing all the ways custom objects can be used """
an_enum_value: AnEnum
some_dict: Dict[Any, Any]
a_camel_date_time: Union[datetime.datetime, datetime.date]
a_date: datetime.date
nested_list_of_enums: Optional[List[List[DifferentEnum]]] = field(
default_factory=lambda: cast(Optional[List[List[DifferentEnum]]], [])
)
def to_dict(self) -> Dict[str, Any]:
an_enum_value = self.an_enum_value.value
some_dict = self.some_dict
if isinstance(self.a_camel_date_time, datetime.datetime):
a_camel_date_time = self.a_camel_date_time.isoformat()
else:
a_camel_date_time = self.a_camel_date_time.isoformat()
a_date = self.a_date.isoformat()
if self.nested_list_of_enums is None:
nested_list_of_enums = None
else:
nested_list_of_enums = []
for nested_list_of_enums_item_data in self.nested_list_of_enums:
nested_list_of_enums_item = []
for nested_list_of_enums_item_item_data in nested_list_of_enums_item_data:
nested_list_of_enums_item_item = nested_list_of_enums_item_item_data.value
nested_list_of_enums_item.append(nested_list_of_enums_item_item)
nested_list_of_enums.append(nested_list_of_enums_item)
return {
"an_enum_value": an_enum_value,
"some_dict": some_dict,
"aCamelDateTime": a_camel_date_time,
"a_date": a_date,
"nested_list_of_enums": nested_list_of_enums,
}
@staticmethod
def from_dict(d: Dict[str, Any]) -> AModel:
an_enum_value = AnEnum(d["an_enum_value"])
some_dict = d["some_dict"]
def _parse_a_camel_date_time(data: Dict[str, Any]) -> Union[datetime.datetime, datetime.date]:
a_camel_date_time: Union[datetime.datetime, datetime.date]
try:
a_camel_date_time = datetime.datetime.fromisoformat(d["aCamelDateTime"])
return a_camel_date_time
except:
pass
a_camel_date_time = datetime.date.fromisoformat(d["aCamelDateTime"])
return a_camel_date_time
a_camel_date_time = _parse_a_camel_date_time(d["aCamelDateTime"])
a_date = datetime.date.fromisoformat(d["a_date"])
nested_list_of_enums = []
for nested_list_of_enums_item_data in d.get("nested_list_of_enums") or []:
nested_list_of_enums_item = []
for nested_list_of_enums_item_item_data in nested_list_of_enums_item_data:
nested_list_of_enums_item_item = DifferentEnum(nested_list_of_enums_item_item_data)
nested_list_of_enums_item.append(nested_list_of_enums_item_item)
nested_list_of_enums.append(nested_list_of_enums_item)
return AModel(
an_enum_value=an_enum_value,
some_dict=some_dict,
a_camel_date_time=a_camel_date_time,
a_date=a_date,
nested_list_of_enums=nested_list_of_enums,
)
|
from dataclasses import dataclass
from enum import Enum
from typing import Optional
__all__ = ["GeneratorError", "ParseError", "PropertyError"]
from pydantic import BaseModel
class ErrorLevel(Enum):
""" The level of an error """
WARNING = "WARNING" # Client is still generated but missing some pieces
ERROR = "ERROR" # Client could not be generated
@dataclass
class GeneratorError:
""" Base data struct containing info on an error that occurred """
detail: Optional[str] = None
level: ErrorLevel = ErrorLevel.ERROR
header: str = "Unable to generate the client"
@dataclass
class ParseError(GeneratorError):
""" An error raised when there's a problem parsing an OpenAPI document """
level: ErrorLevel = ErrorLevel.WARNING
data: Optional[BaseModel] = None
header: str = "Unable to parse this part of your OpenAPI document: "
@dataclass
class PropertyError(ParseError):
""" Error raised when there's a problem creating a Property """
header = "Problem creating a Property: "
| from dataclasses import dataclass
from enum import Enum
from typing import Optional
__all__ = ["GeneratorError", "ParseError", "PropertyError"]
from pydantic import BaseModel
class ErrorLevel(Enum):
""" The level of an error """
WARNING = "WARNING" # Client is still generated but missing some pieces
ERROR = "ERROR" # Client could not be generated
@dataclass
class GeneratorError:
""" Base data struct containing info on an error that occurred """
detail: Optional[str] = None
level: ErrorLevel = ErrorLevel.ERROR
header: str = "Unable to generate the client"
@dataclass
class ParseError(GeneratorError):
""" An error raised when there's a problem parsing an OpenAPI document """
level: ErrorLevel = ErrorLevel.WARNING
data: Optional[BaseModel] = None
header: str = "Unable to parse this part of your OpenAPI document: "
@dataclass
class PropertyError(ParseError):
""" Error raised when there's a problem creating a Property """
header = "Problem creating a Property: "
class ValidationError(Exception):
pass
|
import re
import stringcase
def _sanitize(value: str) -> str:
return re.sub(r"[^\w _-]+", "", value)
def group_title(value: str) -> str:
value = re.sub(r"([A-Z]{2,})([A-Z][a-z]|[ -_]|$)", lambda m: m.group(1).title() + m.group(2), value.strip())
value = re.sub(r"(^|[ _-])([A-Z])", lambda m: m.group(1) + m.group(2).lower(), value)
return value
def snake_case(value: str) -> str:
return stringcase.snakecase(group_title(_sanitize(value)))
def pascal_case(value: str) -> str:
return stringcase.pascalcase(_sanitize(value))
def kebab_case(value: str) -> str:
return stringcase.spinalcase(group_title(_sanitize(value)))
| import re
from keyword import iskeyword
import stringcase
def sanitize(value: str) -> str:
return re.sub(r"[^\w _\-]+", "", value)
def fix_keywords(value: str) -> str:
if iskeyword(value):
return f"{value}_"
return value
def group_title(value: str) -> str:
value = re.sub(r"([A-Z]{2,})([A-Z][a-z]|[ \-_]|$)", lambda m: m.group(1).title() + m.group(2), value.strip())
value = re.sub(r"(^|[ _-])([A-Z])", lambda m: m.group(1) + m.group(2).lower(), value)
return value
def snake_case(value: str) -> str:
return fix_keywords(stringcase.snakecase(group_title(sanitize(value))))
def pascal_case(value: str) -> str:
return fix_keywords(stringcase.pascalcase(sanitize(value)))
def kebab_case(value: str) -> str:
return fix_keywords(stringcase.spinalcase(group_title(sanitize(value))))
def remove_string_escapes(value: str) -> str:
return value.replace('"', r"\"")
|
from openapi_python_client import utils
def test_snake_case_uppercase_str():
assert utils.snake_case("HTTP") == "http"
assert utils.snake_case("HTTP RESPONSE") == "http_response"
def test_snake_case_from_pascal_with_acronyms():
assert utils.snake_case("HTTPResponse") == "http_response"
assert utils.snake_case("APIClientHTTPResponse") == "api_client_http_response"
assert utils.snake_case("OAuthClientHTTPResponse") == "o_auth_client_http_response"
def test_snake_case_from_pascal():
assert utils.snake_case("HttpResponsePascalCase") == "http_response_pascal_case"
def test_snake_case_from_camel():
assert utils.snake_case("httpResponseLowerCamel") == "http_response_lower_camel"
def test_kebab_case():
assert utils.kebab_case("keep_alive") == "keep-alive"
| from openapi_python_client import utils
def test_snake_case_uppercase_str():
assert utils.snake_case("HTTP") == "http"
assert utils.snake_case("HTTP RESPONSE") == "http_response"
def test_snake_case_from_pascal_with_acronyms():
assert utils.snake_case("HTTPResponse") == "http_response"
assert utils.snake_case("APIClientHTTPResponse") == "api_client_http_response"
assert utils.snake_case("OAuthClientHTTPResponse") == "o_auth_client_http_response"
def test_snake_case_from_pascal():
assert utils.snake_case("HttpResponsePascalCase") == "http_response_pascal_case"
def test_snake_case_from_camel():
assert utils.snake_case("httpResponseLowerCamel") == "http_response_lower_camel"
def test_kebab_case():
assert utils.kebab_case("keep_alive") == "keep-alive"
def test__sanitize():
assert utils.sanitize("something*~with lots_- of weird things}=") == "somethingwith lots_- of weird things"
def test_no_string_escapes():
assert utils.remove_string_escapes('an "evil" string') == 'an \\"evil\\" string'
def test__fix_keywords():
assert utils.fix_keywords("None") == "None_"
|
'use strict';
const socketUser = require('./user');
const socketGroup = require('./groups');
const image = require('../image');
const meta = require('../meta');
const inProgress = {};
const uploads = module.exports;
uploads.upload = async function (socket, data) {
const methodToFunc = {
'user.uploadCroppedPicture': socketUser.uploadCroppedPicture,
'user.updateCover': socketUser.updateCover,
'groups.cover.update': socketGroup.cover.update,
};
if (!socket.uid || !data || !data.chunk || !data.params || !data.params.method || !methodToFunc[data.params.method]) {
throw new Error('[[error:invalid-data]]');
}
inProgress[socket.id] = inProgress[socket.id] || {};
const socketUploads = inProgress[socket.id];
const { method } = data.params;
socketUploads[method] = socketUploads[method] || { imageData: '' };
socketUploads[method].imageData += data.chunk;
try {
const maxSize = data.params.method === 'user.uploadCroppedPicture' ?
meta.config.maximumProfileImageSize : meta.config.maximumCoverImageSize;
const size = image.sizeFromBase64(socketUploads[method].imageData);
if (size > maxSize * 1024) {
throw new Error(`[[error:file-too-big, ${maxSize}]]`);
}
if (socketUploads[method].imageData.length < data.params.size) {
return;
}
data.params.imageData = socketUploads[method].imageData;
const result = await methodToFunc[data.params.method](socket, data.params);
delete socketUploads[method];
return result;
} catch (err) {
delete inProgress[socket.id];
throw err;
}
};
uploads.clear = function (sid) {
delete inProgress[sid];
};
| 'use strict';
const socketUser = require('./user');
const socketGroup = require('./groups');
const image = require('../image');
const meta = require('../meta');
const inProgress = {};
const uploads = module.exports;
uploads.upload = async function (socket, data) {
const methodToFunc = {
'user.uploadCroppedPicture': socketUser.uploadCroppedPicture,
'user.updateCover': socketUser.updateCover,
'groups.cover.update': socketGroup.cover.update,
};
if (!socket.uid || !data || !data.chunk ||
!data.params || !data.params.method || !methodToFunc.hasOwnProperty(data.params.method)) {
throw new Error('[[error:invalid-data]]');
}
inProgress[socket.id] = inProgress[socket.id] || Object.create(null);
const socketUploads = inProgress[socket.id];
const { method } = data.params;
socketUploads[method] = socketUploads[method] || { imageData: '' };
socketUploads[method].imageData += data.chunk;
try {
const maxSize = data.params.method === 'user.uploadCroppedPicture' ?
meta.config.maximumProfileImageSize : meta.config.maximumCoverImageSize;
const size = image.sizeFromBase64(socketUploads[method].imageData);
if (size > maxSize * 1024) {
throw new Error(`[[error:file-too-big, ${maxSize}]]`);
}
if (socketUploads[method].imageData.length < data.params.size) {
return;
}
data.params.imageData = socketUploads[method].imageData;
const result = await methodToFunc[data.params.method](socket, data.params);
delete socketUploads[method];
return result;
} catch (err) {
delete inProgress[socket.id];
throw err;
}
};
uploads.clear = function (sid) {
delete inProgress[sid];
};
|
const _ = require('lodash');
const ActiveConnector = require('../../connector/active');
const FAMILY = {
1: 4,
2: 6
};
module.exports = {
directive: 'EPRT',
handler: function ({command} = {}) {
const [, protocol, ip, port] = _.chain(command).get('arg', '').split('|').value();
const family = FAMILY[protocol];
if (!family) return this.reply(504, 'Unknown network protocol');
this.connector = new ActiveConnector(this);
return this.connector.setupConnection(ip, port, family)
.then(() => this.reply(200));
},
syntax: '{{cmd}} |<protocol>|<address>|<port>|',
description: 'Specifies an address and port to which the server should connect'
};
| const _ = require('lodash');
const ActiveConnector = require('../../connector/active');
const FAMILY = {
1: 4,
2: 6
};
module.exports = {
directive: 'EPRT',
handler: function ({log, command} = {}) {
const [, protocol, ip, port] = _.chain(command).get('arg', '').split('|').value();
const family = FAMILY[protocol];
if (!family) return this.reply(504, 'Unknown network protocol');
this.connector = new ActiveConnector(this);
return this.connector.setupConnection(ip, port, family)
.then(() => this.reply(200))
.catch((err) => {
log.error(err);
return this.reply(err.code || 425, err.message);
});
},
syntax: '{{cmd}} |<protocol>|<address>|<port>|',
description: 'Specifies an address and port to which the server should connect'
};
|
const PassiveConnector = require('../../connector/passive');
module.exports = {
directive: 'EPSV',
handler: function () {
this.connector = new PassiveConnector(this);
return this.connector.setupServer()
.then((server) => {
const {port} = server.address();
return this.reply(229, `EPSV OK (|||${port}|)`);
});
},
syntax: '{{cmd}} [<protocol>]',
description: 'Initiate passive mode'
};
| const PassiveConnector = require('../../connector/passive');
module.exports = {
directive: 'EPSV',
handler: function ({log}) {
this.connector = new PassiveConnector(this);
return this.connector.setupServer()
.then((server) => {
const {port} = server.address();
return this.reply(229, `EPSV OK (|||${port}|)`);
})
.catch((err) => {
log.error(err);
return this.reply(err.code || 425, err.message);
});
},
syntax: '{{cmd}} [<protocol>]',
description: 'Initiate passive mode'
};
|
const _ = require('lodash');
const ActiveConnector = require('../../connector/active');
module.exports = {
directive: 'PORT',
handler: function ({log, command} = {}) {
this.connector = new ActiveConnector(this);
const rawConnection = _.get(command, 'arg', '').split(',');
if (rawConnection.length !== 6) return this.reply(425);
const ip = rawConnection.slice(0, 4).join('.');
const portBytes = rawConnection.slice(4).map((p) => parseInt(p));
const port = portBytes[0] * 256 + portBytes[1];
return this.connector.setupConnection(ip, port)
.then(() => this.reply(200))
.catch((err) => {
log.error(err);
return this.reply(425);
});
},
syntax: '{{cmd}} <x>,<x>,<x>,<x>,<y>,<y>',
description: 'Specifies an address and port to which the server should connect'
};
| const _ = require('lodash');
const ActiveConnector = require('../../connector/active');
module.exports = {
directive: 'PORT',
handler: function ({log, command} = {}) {
this.connector = new ActiveConnector(this);
const rawConnection = _.get(command, 'arg', '').split(',');
if (rawConnection.length !== 6) return this.reply(425);
const ip = rawConnection.slice(0, 4).join('.');
const portBytes = rawConnection.slice(4).map((p) => parseInt(p));
const port = portBytes[0] * 256 + portBytes[1];
return this.connector.setupConnection(ip, port)
.then(() => this.reply(200))
.catch((err) => {
log.error(err);
return this.reply(err.code || 425, err.message);
});
},
syntax: '{{cmd}} <x>,<x>,<x>,<x>,<y>,<y>',
description: 'Specifies an address and port to which the server should connect'
};
|
const {Socket} = require('net');
const tls = require('tls');
const Promise = require('bluebird');
const Connector = require('./base');
class Active extends Connector {
constructor(connection) {
super(connection);
this.type = 'active';
}
waitForConnection({timeout = 5000, delay = 250} = {}) {
const checkSocket = () => {
if (this.dataSocket && this.dataSocket.connected) {
return Promise.resolve(this.dataSocket);
}
return Promise.resolve().delay(delay)
.then(() => checkSocket());
};
return checkSocket().timeout(timeout);
}
setupConnection(host, port, family = 4) {
const closeExistingServer = () => Promise.resolve(
this.dataSocket ? this.dataSocket.destroy() : undefined);
return closeExistingServer()
.then(() => {
this.dataSocket = new Socket();
this.dataSocket.on('error', (err) => this.server && this.server.emit('client-error', {connection: this.connection, context: 'dataSocket', error: err}));
this.dataSocket.connect({host, port, family}, () => {
this.dataSocket.pause();
if (this.connection.secure) {
const secureContext = tls.createSecureContext(this.server.options.tls);
const secureSocket = new tls.TLSSocket(this.dataSocket, {
isServer: true,
secureContext
});
this.dataSocket = secureSocket;
}
this.dataSocket.connected = true;
});
});
}
}
module.exports = Active;
| const {Socket} = require('net');
const tls = require('tls');
const ip = require('ip');
const Promise = require('bluebird');
const Connector = require('./base');
const {SocketError} = require('../errors');
class Active extends Connector {
constructor(connection) {
super(connection);
this.type = 'active';
}
waitForConnection({timeout = 5000, delay = 250} = {}) {
const checkSocket = () => {
if (this.dataSocket && this.dataSocket.connected) {
return Promise.resolve(this.dataSocket);
}
return Promise.resolve().delay(delay)
.then(() => checkSocket());
};
return checkSocket().timeout(timeout);
}
setupConnection(host, port, family = 4) {
const closeExistingServer = () => Promise.resolve(
this.dataSocket ? this.dataSocket.destroy() : undefined);
return closeExistingServer()
.then(() => {
if (!ip.isEqual(this.connection.commandSocket.remoteAddress, host)) {
throw new SocketError('The given address is not yours', 500);
}
this.dataSocket = new Socket();
this.dataSocket.on('error', (err) => this.server && this.server.emit('client-error', {connection: this.connection, context: 'dataSocket', error: err}));
this.dataSocket.connect({host, port, family}, () => {
this.dataSocket.pause();
if (this.connection.secure) {
const secureContext = tls.createSecureContext(this.server.options.tls);
const secureSocket = new tls.TLSSocket(this.dataSocket, {
isServer: true,
secureContext
});
this.dataSocket = secureSocket;
}
this.dataSocket.connected = true;
});
});
}
}
module.exports = Active;
|
const Promise = require('bluebird');
const {expect} = require('chai');
const sinon = require('sinon');
const ActiveConnector = require('../../../src/connector/active');
const CMD = 'EPRT';
describe(CMD, function () {
let sandbox;
const mockClient = {
reply: () => Promise.resolve()
};
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
beforeEach(() => {
sandbox = sinon.sandbox.create().usingPromise(Promise);
sandbox.spy(mockClient, 'reply');
sandbox.stub(ActiveConnector.prototype, 'setupConnection').resolves();
});
afterEach(() => {
sandbox.restore();
});
it('// unsuccessful | no argument', () => {
return cmdFn()
.then(() => {
expect(mockClient.reply.args[0][0]).to.equal(504);
});
});
it('// unsuccessful | invalid argument', () => {
return cmdFn({command: {arg: 'blah'}})
.then(() => {
expect(mockClient.reply.args[0][0]).to.equal(504);
});
});
it('// successful IPv4', () => {
return cmdFn({command: {arg: '|1|192.168.0.100|35286|'}})
.then(() => {
const [ip, port, family] = ActiveConnector.prototype.setupConnection.args[0];
expect(mockClient.reply.args[0][0]).to.equal(200);
expect(ip).to.equal('192.168.0.100');
expect(port).to.equal('35286');
expect(family).to.equal(4);
});
});
it('// successful IPv6', () => {
return cmdFn({command: {arg: '|2|8536:933f:e7f3:3e91:6dc1:e8c6:8482:7b23|35286|'}})
.then(() => {
const [ip, port, family] = ActiveConnector.prototype.setupConnection.args[0];
expect(mockClient.reply.args[0][0]).to.equal(200);
expect(ip).to.equal('8536:933f:e7f3:3e91:6dc1:e8c6:8482:7b23');
expect(port).to.equal('35286');
expect(family).to.equal(6);
});
});
});
| const Promise = require('bluebird');
const {expect} = require('chai');
const sinon = require('sinon');
const ActiveConnector = require('../../../src/connector/active');
const CMD = 'EPRT';
describe(CMD, function () {
let sandbox;
const mockClient = {
reply: () => Promise.resolve()
};
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
beforeEach(() => {
sandbox = sinon.sandbox.create().usingPromise(Promise);
sandbox.spy(mockClient, 'reply');
sandbox.stub(ActiveConnector.prototype, 'setupConnection').resolves();
});
afterEach(() => {
sandbox.restore();
});
it('// unsuccessful | no argument', () => {
return cmdFn({})
.then(() => {
expect(mockClient.reply.args[0][0]).to.equal(504);
});
});
it('// unsuccessful | invalid argument', () => {
return cmdFn({command: {arg: 'blah'}})
.then(() => {
expect(mockClient.reply.args[0][0]).to.equal(504);
});
});
it('// successful IPv4', () => {
return cmdFn({command: {arg: '|1|192.168.0.100|35286|'}})
.then(() => {
const [ip, port, family] = ActiveConnector.prototype.setupConnection.args[0];
expect(mockClient.reply.args[0][0]).to.equal(200);
expect(ip).to.equal('192.168.0.100');
expect(port).to.equal('35286');
expect(family).to.equal(4);
});
});
it('// successful IPv6', () => {
return cmdFn({command: {arg: '|2|8536:933f:e7f3:3e91:6dc1:e8c6:8482:7b23|35286|'}})
.then(() => {
const [ip, port, family] = ActiveConnector.prototype.setupConnection.args[0];
expect(mockClient.reply.args[0][0]).to.equal(200);
expect(ip).to.equal('8536:933f:e7f3:3e91:6dc1:e8c6:8482:7b23');
expect(port).to.equal('35286');
expect(family).to.equal(6);
});
});
});
|
const Promise = require('bluebird');
const {expect} = require('chai');
const sinon = require('sinon');
const PassiveConnector = require('../../../src/connector/passive');
const CMD = 'EPSV';
describe(CMD, function () {
let sandbox;
const mockClient = {
reply: () => Promise.resolve()
};
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
beforeEach(() => {
sandbox = sinon.sandbox.create().usingPromise(Promise);
sandbox.stub(mockClient, 'reply').resolves();
sandbox.stub(PassiveConnector.prototype, 'setupServer').resolves({
address: () => ({port: 12345})
});
});
afterEach(() => {
sandbox.restore();
});
it('// successful IPv4', () => {
return cmdFn()
.then(() => {
const [code, message] = mockClient.reply.args[0];
expect(code).to.equal(229);
expect(message).to.equal('EPSV OK (|||12345|)');
});
});
});
| const Promise = require('bluebird');
const {expect} = require('chai');
const sinon = require('sinon');
const PassiveConnector = require('../../../src/connector/passive');
const CMD = 'EPSV';
describe(CMD, function () {
let sandbox;
const mockClient = {
reply: () => Promise.resolve()
};
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
beforeEach(() => {
sandbox = sinon.sandbox.create().usingPromise(Promise);
sandbox.stub(mockClient, 'reply').resolves();
sandbox.stub(PassiveConnector.prototype, 'setupServer').resolves({
address: () => ({port: 12345})
});
});
afterEach(() => {
sandbox.restore();
});
it('// successful IPv4', () => {
return cmdFn({})
.then(() => {
const [code, message] = mockClient.reply.args[0];
expect(code).to.equal(229);
expect(message).to.equal('EPSV OK (|||12345|)');
});
});
});
|
const Promise = require('bluebird');
const {expect} = require('chai');
const sinon = require('sinon');
const CMD = 'OPTS';
describe(CMD, function () {
let sandbox;
const mockClient = {
reply: () => Promise.resolve()
};
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
beforeEach(() => {
sandbox = sinon.sandbox.create().usingPromise(Promise);
sandbox.spy(mockClient, 'reply');
});
afterEach(() => {
sandbox.restore();
});
it('// unsuccessful', () => {
return cmdFn()
.then(() => {
expect(mockClient.reply.args[0][0]).to.equal(501);
});
});
it('BAD // unsuccessful', () => {
return cmdFn({command: {arg: 'BAD', directive: CMD}})
.then(() => {
expect(mockClient.reply.args[0][0]).to.equal(500);
});
});
it('UTF8 BAD // unsuccessful', () => {
return cmdFn({command: {arg: 'UTF8 BAD', directive: CMD}})
.then(() => {
expect(mockClient.reply.args[0][0]).to.equal(501);
});
});
it('UTF8 OFF // successful', () => {
return cmdFn({command: {arg: 'UTF8 OFF', directive: CMD}})
.then(() => {
expect(mockClient.encoding).to.equal('ascii');
expect(mockClient.reply.args[0][0]).to.equal(200);
});
});
it('UTF8 ON // successful', () => {
return cmdFn({command: {arg: 'UTF8 ON', directive: CMD}})
.then(() => {
expect(mockClient.encoding).to.equal('utf8');
expect(mockClient.reply.args[0][0]).to.equal(200);
});
});
});
| const Promise = require('bluebird');
const {expect} = require('chai');
const sinon = require('sinon');
const CMD = 'OPTS';
describe(CMD, function () {
let sandbox;
const mockClient = {
reply: () => Promise.resolve()
};
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
beforeEach(() => {
sandbox = sinon.sandbox.create().usingPromise(Promise);
sandbox.spy(mockClient, 'reply');
});
afterEach(() => {
sandbox.restore();
});
it('// unsuccessful', () => {
return cmdFn()
.then(() => {
expect(mockClient.reply.args[0][0]).to.equal(501);
});
});
it('BAD // unsuccessful', () => {
return cmdFn({command: {arg: 'BAD', directive: CMD}})
.then(() => {
expect(mockClient.reply.args[0][0]).to.equal(501);
});
});
it('UTF8 BAD // unsuccessful', () => {
return cmdFn({command: {arg: 'UTF8 BAD', directive: CMD}})
.then(() => {
expect(mockClient.reply.args[0][0]).to.equal(501);
});
});
it('UTF8 OFF // successful', () => {
return cmdFn({command: {arg: 'UTF8 OFF', directive: CMD}})
.then(() => {
expect(mockClient.encoding).to.equal('ascii');
expect(mockClient.reply.args[0][0]).to.equal(200);
});
});
it('UTF8 ON // successful', () => {
return cmdFn({command: {arg: 'UTF8 ON', directive: CMD}})
.then(() => {
expect(mockClient.encoding).to.equal('utf8');
expect(mockClient.reply.args[0][0]).to.equal(200);
});
});
});
|
/* eslint no-unused-expressions: 0 */
const {expect} = require('chai');
const sinon = require('sinon');
const net = require('net');
const tls = require('tls');
const ActiveConnector = require('../../src/connector/active');
const {getNextPortFactory} = require('../../src/helpers/find-port');
describe('Connector - Active //', function () {
const host = '127.0.0.1';
let getNextPort = getNextPortFactory(host, 1024);
let PORT;
let active;
let mockConnection = {};
let sandbox;
let server;
before(() => {
active = new ActiveConnector(mockConnection);
});
beforeEach((done) => {
sandbox = sinon.sandbox.create().usingPromise(Promise);
getNextPort()
.then((port) => {
PORT = port;
server = net.createServer()
.on('connection', (socket) => socket.destroy())
.listen(PORT, () => done());
});
});
afterEach((done) => {
sandbox.restore();
server.close(done);
});
it('sets up a connection', function () {
return active.setupConnection(host, PORT)
.then(() => {
expect(active.dataSocket).to.exist;
});
});
it('destroys existing connection, then sets up a connection', function () {
const destroyFnSpy = sandbox.spy(active.dataSocket, 'destroy');
return active.setupConnection(host, PORT)
.then(() => {
expect(destroyFnSpy.callCount).to.equal(1);
expect(active.dataSocket).to.exist;
});
});
it('waits for connection', function () {
return active.setupConnection(host, PORT)
.then(() => {
expect(active.dataSocket).to.exist;
return active.waitForConnection();
})
.then((dataSocket) => {
expect(dataSocket.connected).to.equal(true);
expect(dataSocket instanceof net.Socket).to.equal(true);
expect(dataSocket instanceof tls.TLSSocket).to.equal(false);
});
});
it('upgrades to a secure connection', function () {
mockConnection.secure = true;
mockConnection.server = {
options: {
tls: {}
}
};
return active.setupConnection(host, PORT)
.then(() => {
expect(active.dataSocket).to.exist;
return active.waitForConnection();
})
.then((dataSocket) => {
expect(dataSocket.connected).to.equal(true);
expect(dataSocket instanceof net.Socket).to.equal(true);
expect(dataSocket instanceof tls.TLSSocket).to.equal(true);
});
});
});
| /* eslint no-unused-expressions: 0 */
const {expect} = require('chai');
const sinon = require('sinon');
const net = require('net');
const tls = require('tls');
const ActiveConnector = require('../../src/connector/active');
const {getNextPortFactory} = require('../../src/helpers/find-port');
describe('Connector - Active //', function () {
const host = '127.0.0.1';
let getNextPort = getNextPortFactory(host, 1024);
let PORT;
let active;
let mockConnection = {
commandSocket: {
remoteAddress: '::ffff:127.0.0.1'
}
};
let sandbox;
let server;
beforeEach((done) => {
active = new ActiveConnector(mockConnection);
sandbox = sinon.sandbox.create().usingPromise(Promise);
getNextPort()
.then((port) => {
PORT = port;
server = net.createServer()
.on('connection', (socket) => socket.destroy())
.listen(PORT, () => done());
});
});
afterEach(() => {
sandbox.restore();
server.close();
active.end();
});
it('sets up a connection', function () {
return active.setupConnection(host, PORT)
.then(() => {
expect(active.dataSocket).to.exist;
});
});
it('rejects alternative host', function () {
return active.setupConnection('123.45.67.89', PORT)
.catch((err) => {
expect(err.code).to.equal(500);
expect(err.message).to.equal('The given address is not yours');
})
.finally(() => {
expect(active.dataSocket).not.to.exist;
});
});
it('destroys existing connection, then sets up a connection', function () {
return active.setupConnection(host, PORT)
.then(() => {
const destroyFnSpy = sandbox.spy(active.dataSocket, 'destroy');
return active.setupConnection(host, PORT)
.then(() => {
expect(destroyFnSpy.callCount).to.equal(1);
expect(active.dataSocket).to.exist;
});
});
});
it('waits for connection', function () {
return active.setupConnection(host, PORT)
.then(() => {
expect(active.dataSocket).to.exist;
return active.waitForConnection();
})
.then((dataSocket) => {
expect(dataSocket.connected).to.equal(true);
expect(dataSocket instanceof net.Socket).to.equal(true);
expect(dataSocket instanceof tls.TLSSocket).to.equal(false);
});
});
it('upgrades to a secure connection', function () {
mockConnection.secure = true;
mockConnection.server = {
options: {
tls: {}
}
};
return active.setupConnection(host, PORT)
.then(() => {
expect(active.dataSocket).to.exist;
return active.waitForConnection();
})
.then((dataSocket) => {
expect(dataSocket.connected).to.equal(true);
expect(dataSocket instanceof net.Socket).to.equal(true);
expect(dataSocket instanceof tls.TLSSocket).to.equal(true);
});
});
});
|
var batteriesTable = $('#batteries-table').DataTable({
'order': [[1, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
],
});
$('#batteries-table tbody').removeClass("d-none");
batteriesTable.columns.adjust().draw();
$("#search").on("keyup", Delay(function()
{
var value = $(this).val();
if (value === "all")
{
value = "";
}
batteriesTable.search(value).draw();
}, 200));
$(document).on('click', '.battery-delete-button', function(e)
{
var objectName = $(e.currentTarget).attr('data-battery-name');
var objectId = $(e.currentTarget).attr('data-battery-id');
bootbox.confirm({
message: __t('Are you sure to delete battery "%s"?', objectName),
buttons: {
confirm: {
label: __t('Yes'),
className: 'btn-success'
},
cancel: {
label: __t('No'),
className: 'btn-danger'
}
},
closeButton: false,
callback: function(result)
{
if (result === true)
{
Grocy.Api.Delete('objects/batteries/' + objectId, {},
function(result)
{
window.location.href = U('/batteries');
},
function(xhr)
{
console.error(xhr);
}
);
}
}
});
});
| var batteriesTable = $('#batteries-table').DataTable({
'order': [[1, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
],
});
$('#batteries-table tbody').removeClass("d-none");
batteriesTable.columns.adjust().draw();
$("#search").on("keyup", Delay(function()
{
var value = $(this).val();
if (value === "all")
{
value = "";
}
batteriesTable.search(value).draw();
}, 200));
$(document).on('click', '.battery-delete-button', function(e)
{
var objectName = SanitizeHtml($(e.currentTarget).attr('data-battery-name'));
var objectId = $(e.currentTarget).attr('data-battery-id');
bootbox.confirm({
message: __t('Are you sure to delete battery "%s"?', objectName),
buttons: {
confirm: {
label: __t('Yes'),
className: 'btn-success'
},
cancel: {
label: __t('No'),
className: 'btn-danger'
}
},
closeButton: false,
callback: function(result)
{
if (result === true)
{
Grocy.Api.Delete('objects/batteries/' + objectId, {},
function(result)
{
window.location.href = U('/batteries');
},
function(xhr)
{
console.error(xhr);
}
);
}
}
});
});
|
var choresTable = $('#chores-table').DataTable({
'order': [[1, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
]
});
$('#chores-table tbody').removeClass("d-none");
choresTable.columns.adjust().draw();
$("#search").on("keyup", Delay(function()
{
var value = $(this).val();
if (value === "all")
{
value = "";
}
choresTable.search(value).draw();
}, 200));
$(document).on('click', '.chore-delete-button', function(e)
{
var objectName = $(e.currentTarget).attr('data-chore-name');
var objectId = $(e.currentTarget).attr('data-chore-id');
bootbox.confirm({
message: __t('Are you sure to delete chore "%s"?', objectName),
closeButton: false,
buttons: {
confirm: {
label: __t('Yes'),
className: 'btn-success'
},
cancel: {
label: __t('No'),
className: 'btn-danger'
}
},
callback: function(result)
{
if (result === true)
{
Grocy.Api.Delete('objects/chores/' + objectId, {},
function(result)
{
window.location.href = U('/chores');
},
function(xhr)
{
console.error(xhr);
}
);
}
}
});
});
| var choresTable = $('#chores-table').DataTable({
'order': [[1, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
]
});
$('#chores-table tbody').removeClass("d-none");
choresTable.columns.adjust().draw();
$("#search").on("keyup", Delay(function()
{
var value = $(this).val();
if (value === "all")
{
value = "";
}
choresTable.search(value).draw();
}, 200));
$(document).on('click', '.chore-delete-button', function(e)
{
var objectName = SanitizeHtml($(e.currentTarget).attr('data-chore-name'));
var objectId = $(e.currentTarget).attr('data-chore-id');
bootbox.confirm({
message: __t('Are you sure to delete chore "%s"?', objectName),
closeButton: false,
buttons: {
confirm: {
label: __t('Yes'),
className: 'btn-success'
},
cancel: {
label: __t('No'),
className: 'btn-danger'
}
},
callback: function(result)
{
if (result === true)
{
Grocy.Api.Delete('objects/chores/' + objectId, {},
function(result)
{
window.location.href = U('/chores');
},
function(xhr)
{
console.error(xhr);
}
);
}
}
});
});
|
var locationsTable = $('#locations-table').DataTable({
'order': [[1, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
]
});
$('#locations-table tbody').removeClass("d-none");
locationsTable.columns.adjust().draw();
$("#search").on("keyup", Delay(function()
{
var value = $(this).val();
if (value === "all")
{
value = "";
}
locationsTable.search(value).draw();
}, 200));
$(document).on('click', '.location-delete-button', function(e)
{
var objectName = $(e.currentTarget).attr('data-location-name');
var objectId = $(e.currentTarget).attr('data-location-id');
bootbox.confirm({
message: __t('Are you sure to delete location "%s"?', objectName),
closeButton: false,
buttons: {
confirm: {
label: __t('Yes'),
className: 'btn-success'
},
cancel: {
label: __t('No'),
className: 'btn-danger'
}
},
callback: function(result)
{
if (result === true)
{
Grocy.Api.Delete('objects/locations/' + objectId, {},
function(result)
{
window.location.href = U('/locations');
},
function(xhr)
{
console.error(xhr);
}
);
}
}
});
});
| var locationsTable = $('#locations-table').DataTable({
'order': [[1, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
]
});
$('#locations-table tbody').removeClass("d-none");
locationsTable.columns.adjust().draw();
$("#search").on("keyup", Delay(function()
{
var value = $(this).val();
if (value === "all")
{
value = "";
}
locationsTable.search(value).draw();
}, 200));
$(document).on('click', '.location-delete-button', function(e)
{
var objectName = SanitizeHtml($(e.currentTarget).attr('data-location-name'));
var objectId = $(e.currentTarget).attr('data-location-id');
bootbox.confirm({
message: __t('Are you sure to delete location "%s"?', objectName),
closeButton: false,
buttons: {
confirm: {
label: __t('Yes'),
className: 'btn-success'
},
cancel: {
label: __t('No'),
className: 'btn-danger'
}
},
callback: function(result)
{
if (result === true)
{
Grocy.Api.Delete('objects/locations/' + objectId, {},
function(result)
{
window.location.href = U('/locations');
},
function(xhr)
{
console.error(xhr);
}
);
}
}
});
});
|
var groupsTable = $('#productgroups-table').DataTable({
'order': [[1, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
]
});
$('#productgroups-table tbody').removeClass("d-none");
groupsTable.columns.adjust().draw();
$("#search").on("keyup", Delay(function()
{
var value = $(this).val();
if (value === "all")
{
value = "";
}
groupsTable.search(value).draw();
}, 200));
$(document).on('click', '.product-group-delete-button', function(e)
{
var objectName = $(e.currentTarget).attr('data-group-name');
var objectId = $(e.currentTarget).attr('data-group-id');
bootbox.confirm({
message: __t('Are you sure to delete product group "%s"?', objectName),
closeButton: false,
buttons: {
confirm: {
label: __t('Yes'),
className: 'btn-success'
},
cancel: {
label: __t('No'),
className: 'btn-danger'
}
},
callback: function(result)
{
if (result === true)
{
Grocy.Api.Delete('objects/product_groups/' + objectId, {},
function(result)
{
window.location.href = U('/productgroups');
},
function(xhr)
{
console.error(xhr);
}
);
}
}
});
});
$(window).on("message", function(e)
{
var data = e.originalEvent.data;
if (data.Message === "CloseAllModals")
{
window.location.reload();
}
});
| var groupsTable = $('#productgroups-table').DataTable({
'order': [[1, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
]
});
$('#productgroups-table tbody').removeClass("d-none");
groupsTable.columns.adjust().draw();
$("#search").on("keyup", Delay(function()
{
var value = $(this).val();
if (value === "all")
{
value = "";
}
groupsTable.search(value).draw();
}, 200));
$(document).on('click', '.product-group-delete-button', function(e)
{
var objectName = SanitizeHtml($(e.currentTarget).attr('data-group-name'));
var objectId = $(e.currentTarget).attr('data-group-id');
bootbox.confirm({
message: __t('Are you sure to delete product group "%s"?', objectName),
closeButton: false,
buttons: {
confirm: {
label: __t('Yes'),
className: 'btn-success'
},
cancel: {
label: __t('No'),
className: 'btn-danger'
}
},
callback: function(result)
{
if (result === true)
{
Grocy.Api.Delete('objects/product_groups/' + objectId, {},
function(result)
{
window.location.href = U('/productgroups');
},
function(xhr)
{
console.error(xhr);
}
);
}
}
});
});
$(window).on("message", function(e)
{
var data = e.originalEvent.data;
if (data.Message === "CloseAllModals")
{
window.location.reload();
}
});
|
var productsTable = $('#products-table').DataTable({
'order': [[1, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
]
});
$('#products-table tbody').removeClass("d-none");
productsTable.columns.adjust().draw();
$("#search").on("keyup", Delay(function()
{
var value = $(this).val();
if (value === "all")
{
value = "";
}
productsTable.search(value).draw();
}, 200));
$("#product-group-filter").on("change", function()
{
var value = $("#product-group-filter option:selected").text();
if (value === __t("All"))
{
value = "";
}
productsTable.column(7).search(value).draw();
});
if (typeof GetUriParam("product-group") !== "undefined")
{
$("#product-group-filter").val(GetUriParam("product-group"));
$("#product-group-filter").trigger("change");
}
$(document).on('click', '.product-delete-button', function(e)
{
var objectName = $(e.currentTarget).attr('data-product-name');
var objectId = $(e.currentTarget).attr('data-product-id');
Grocy.Api.Get('stock/products/' + objectId,
function(productDetails)
{
var stockAmount = productDetails.stock_amount || '0';
if (stockAmount.toString() == "0")
{
bootbox.confirm({
message: __t('Are you sure you want to deactivate this product "%s"?', objectName),
closeButton: false,
buttons: {
confirm: {
label: __t('Yes'),
className: 'btn-success'
},
cancel: {
label: __t('No'),
className: 'btn-danger'
}
},
callback: function(result)
{
if (result === true)
{
jsonData = {};
jsonData.active = 0;
Grocy.Api.Put('objects/products/' + objectId, jsonData,
function(result)
{
window.location.href = U('/products');
},
function(xhr)
{
console.error(xhr);
}
);
}
}
});
}
else
{
bootbox.alert({
title: __t('Deactivation not possible'),
message: __t('This product cannot be deactivated because it is in stock, please remove the stock amount first.') + '<br><br>' + __t('Stock amount') + ': ' + stockAmount + ' ' + __n(stockAmount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural),
closeButton: false
});
}
},
function(xhr)
{
console.error(xhr);
}
);
});
| var productsTable = $('#products-table').DataTable({
'order': [[1, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
]
});
$('#products-table tbody').removeClass("d-none");
productsTable.columns.adjust().draw();
$("#search").on("keyup", Delay(function()
{
var value = $(this).val();
if (value === "all")
{
value = "";
}
productsTable.search(value).draw();
}, 200));
$("#product-group-filter").on("change", function()
{
var value = $("#product-group-filter option:selected").text();
if (value === __t("All"))
{
value = "";
}
productsTable.column(7).search(value).draw();
});
if (typeof GetUriParam("product-group") !== "undefined")
{
$("#product-group-filter").val(GetUriParam("product-group"));
$("#product-group-filter").trigger("change");
}
$(document).on('click', '.product-delete-button', function(e)
{
var objectName = SanitizeHtml($(e.currentTarget).attr('data-product-name'));
var objectId = $(e.currentTarget).attr('data-product-id');
Grocy.Api.Get('stock/products/' + objectId,
function(productDetails)
{
var stockAmount = productDetails.stock_amount || '0';
if (stockAmount.toString() == "0")
{
bootbox.confirm({
message: __t('Are you sure you want to deactivate this product "%s"?', objectName),
closeButton: false,
buttons: {
confirm: {
label: __t('Yes'),
className: 'btn-success'
},
cancel: {
label: __t('No'),
className: 'btn-danger'
}
},
callback: function(result)
{
if (result === true)
{
jsonData = {};
jsonData.active = 0;
Grocy.Api.Put('objects/products/' + objectId, jsonData,
function(result)
{
window.location.href = U('/products');
},
function(xhr)
{
console.error(xhr);
}
);
}
}
});
}
else
{
bootbox.alert({
title: __t('Deactivation not possible'),
message: __t('This product cannot be deactivated because it is in stock, please remove the stock amount first.') + '<br><br>' + __t('Stock amount') + ': ' + stockAmount + ' ' + __n(stockAmount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural),
closeButton: false
});
}
},
function(xhr)
{
console.error(xhr);
}
);
});
|
var quantityUnitsTable = $('#quantityunits-table').DataTable({
'order': [[1, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
]
});
$('#quantityunits-table tbody').removeClass("d-none");
quantityUnitsTable.columns.adjust().draw();
$("#search").on("keyup", Delay(function()
{
var value = $(this).val();
if (value === "all")
{
value = "";
}
quantityUnitsTable.search(value).draw();
}, 200));
$(document).on('click', '.quantityunit-delete-button', function(e)
{
var objectName = $(e.currentTarget).attr('data-quantityunit-name');
var objectId = $(e.currentTarget).attr('data-quantityunit-id');
bootbox.confirm({
message: __t('Are you sure to delete quantity unit "%s"?', objectName),
closeButton: false,
buttons: {
confirm: {
label: 'Yes',
className: 'btn-success'
},
cancel: {
label: 'No',
className: 'btn-danger'
}
},
callback: function(result)
{
if (result === true)
{
Grocy.Api.Delete('objects/quantity_units/' + objectId, {},
function(result)
{
window.location.href = U('/quantityunits');
},
function(xhr)
{
console.error(xhr);
}
);
}
}
});
});
| var quantityUnitsTable = $('#quantityunits-table').DataTable({
'order': [[1, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
]
});
$('#quantityunits-table tbody').removeClass("d-none");
quantityUnitsTable.columns.adjust().draw();
$("#search").on("keyup", Delay(function()
{
var value = $(this).val();
if (value === "all")
{
value = "";
}
quantityUnitsTable.search(value).draw();
}, 200));
$(document).on('click', '.quantityunit-delete-button', function(e)
{
var objectName = SanitizeHtml($(e.currentTarget).attr('data-quantityunit-name'));
var objectId = $(e.currentTarget).attr('data-quantityunit-id');
bootbox.confirm({
message: __t('Are you sure to delete quantity unit "%s"?', objectName),
closeButton: false,
buttons: {
confirm: {
label: 'Yes',
className: 'btn-success'
},
cancel: {
label: 'No',
className: 'btn-danger'
}
},
callback: function(result)
{
if (result === true)
{
Grocy.Api.Delete('objects/quantity_units/' + objectId, {},
function(result)
{
window.location.href = U('/quantityunits');
},
function(xhr)
{
console.error(xhr);
}
);
}
}
});
});
|
var locationsTable = $('#shoppinglocations-table').DataTable({
'order': [[1, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
]
});
$('#shoppinglocations-table tbody').removeClass("d-none");
locationsTable.columns.adjust().draw();
$("#search").on("keyup", Delay(function()
{
var value = $(this).val();
if (value === "all")
{
value = "";
}
locationsTable.search(value).draw();
}, 200));
$(document).on('click', '.shoppinglocation-delete-button', function(e)
{
var objectName = $(e.currentTarget).attr('data-shoppinglocation-name');
var objectId = $(e.currentTarget).attr('data-shoppinglocation-id');
bootbox.confirm({
message: __t('Are you sure to delete store "%s"?', objectName),
closeButton: false,
buttons: {
confirm: {
label: __t('Yes'),
className: 'btn-success'
},
cancel: {
label: __t('No'),
className: 'btn-danger'
}
},
callback: function(result)
{
if (result === true)
{
Grocy.Api.Delete('objects/shopping_locations/' + objectId, {},
function(result)
{
window.location.href = U('/shoppinglocations');
},
function(xhr)
{
console.error(xhr);
}
);
}
}
});
});
| var locationsTable = $('#shoppinglocations-table').DataTable({
'order': [[1, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
]
});
$('#shoppinglocations-table tbody').removeClass("d-none");
locationsTable.columns.adjust().draw();
$("#search").on("keyup", Delay(function()
{
var value = $(this).val();
if (value === "all")
{
value = "";
}
locationsTable.search(value).draw();
}, 200));
$(document).on('click', '.shoppinglocation-delete-button', function(e)
{
var objectName = SanitizeHtml($(e.currentTarget).attr('data-shoppinglocation-name'));
var objectId = $(e.currentTarget).attr('data-shoppinglocation-id');
bootbox.confirm({
message: __t('Are you sure to delete store "%s"?', objectName),
closeButton: false,
buttons: {
confirm: {
label: __t('Yes'),
className: 'btn-success'
},
cancel: {
label: __t('No'),
className: 'btn-danger'
}
},
callback: function(result)
{
if (result === true)
{
Grocy.Api.Delete('objects/shopping_locations/' + objectId, {},
function(result)
{
window.location.href = U('/shoppinglocations');
},
function(xhr)
{
console.error(xhr);
}
);
}
}
});
});
|
var categoriesTable = $('#taskcategories-table').DataTable({
'order': [[1, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
]
});
$('#taskcategories-table tbody').removeClass("d-none");
categoriesTable.columns.adjust().draw();
$("#search").on("keyup", Delay(function()
{
var value = $(this).val();
if (value === "all")
{
value = "";
}
categoriesTable.search(value).draw();
}, 200));
$(document).on('click', '.task-category-delete-button', function(e)
{
var objectName = $(e.currentTarget).attr('data-category-name');
var objectId = $(e.currentTarget).attr('data-category-id');
bootbox.confirm({
message: __t('Are you sure to delete task category "%s"?', objectName),
closeButton: false,
buttons: {
confirm: {
label: __t('Yes'),
className: 'btn-success'
},
cancel: {
label: __t('No'),
className: 'btn-danger'
}
},
callback: function(result)
{
if (result === true)
{
Grocy.Api.Delete('objects/task_categories/' + objectId, {},
function(result)
{
window.location.href = U('/taskcategories');
},
function(xhr)
{
console.error(xhr);
}
);
}
}
});
});
| var categoriesTable = $('#taskcategories-table').DataTable({
'order': [[1, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
]
});
$('#taskcategories-table tbody').removeClass("d-none");
categoriesTable.columns.adjust().draw();
$("#search").on("keyup", Delay(function()
{
var value = $(this).val();
if (value === "all")
{
value = "";
}
categoriesTable.search(value).draw();
}, 200));
$(document).on('click', '.task-category-delete-button', function(e)
{
var objectName = SanitizeHtml($(e.currentTarget).attr('data-category-name'));
var objectId = $(e.currentTarget).attr('data-category-id');
bootbox.confirm({
message: __t('Are you sure to delete task category "%s"?', objectName),
closeButton: false,
buttons: {
confirm: {
label: __t('Yes'),
className: 'btn-success'
},
cancel: {
label: __t('No'),
className: 'btn-danger'
}
},
callback: function(result)
{
if (result === true)
{
Grocy.Api.Delete('objects/task_categories/' + objectId, {},
function(result)
{
window.location.href = U('/taskcategories');
},
function(xhr)
{
console.error(xhr);
}
);
}
}
});
});
|
var userentitiesTable = $('#userentities-table').DataTable({
'order': [[1, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
]
});
$('#userentities-table tbody').removeClass("d-none");
userentitiesTable.columns.adjust().draw();
$("#search").on("keyup", Delay(function()
{
var value = $(this).val();
if (value === "all")
{
value = "";
}
userentitiesTable.search(value).draw();
}, 200));
$(document).on('click', '.userentity-delete-button', function(e)
{
var objectName = $(e.currentTarget).attr('data-userentity-name');
var objectId = $(e.currentTarget).attr('data-userentity-id');
bootbox.confirm({
message: __t('Are you sure to delete userentity "%s"?', objectName),
closeButton: false,
buttons: {
confirm: {
label: __t('Yes'),
className: 'btn-success'
},
cancel: {
label: __t('No'),
className: 'btn-danger'
}
},
callback: function(result)
{
if (result === true)
{
Grocy.Api.Delete('objects/userentities/' + objectId, {},
function(result)
{
window.location.href = U('/userentities');
},
function(xhr)
{
console.error(xhr);
}
);
}
}
});
});
| var userentitiesTable = $('#userentities-table').DataTable({
'order': [[1, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
]
});
$('#userentities-table tbody').removeClass("d-none");
userentitiesTable.columns.adjust().draw();
$("#search").on("keyup", Delay(function()
{
var value = $(this).val();
if (value === "all")
{
value = "";
}
userentitiesTable.search(value).draw();
}, 200));
$(document).on('click', '.userentity-delete-button', function(e)
{
var objectName = SanitizeHtml($(e.currentTarget).attr('data-userentity-name'));
var objectId = $(e.currentTarget).attr('data-userentity-id');
bootbox.confirm({
message: __t('Are you sure to delete userentity "%s"?', objectName),
closeButton: false,
buttons: {
confirm: {
label: __t('Yes'),
className: 'btn-success'
},
cancel: {
label: __t('No'),
className: 'btn-danger'
}
},
callback: function(result)
{
if (result === true)
{
Grocy.Api.Delete('objects/userentities/' + objectId, {},
function(result)
{
window.location.href = U('/userentities');
},
function(xhr)
{
console.error(xhr);
}
);
}
}
});
});
|
var userfieldsTable = $('#userfields-table').DataTable({
'order': [[1, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
]
});
$('#userfields-table tbody').removeClass("d-none");
userfieldsTable.columns.adjust().draw();
$("#search").on("keyup", Delay(function()
{
var value = $(this).val();
if (value === "all")
{
value = "";
}
userfieldsTable.search(value).draw();
}, 200));
$("#entity-filter").on("change", function()
{
var value = $("#entity-filter option:selected").text();
if (value === __t("All"))
{
value = "";
}
userfieldsTable.column(1).search(value).draw();
$("#new-userfield-button").attr("href", U("/userfield/new?entity=" + value));
});
$(document).on('click', '.userfield-delete-button', function(e)
{
var objectName = $(e.currentTarget).attr('data-userfield-name');
var objectId = $(e.currentTarget).attr('data-userfield-id');
bootbox.confirm({
message: __t('Are you sure to delete user field "%s"?', objectName),
closeButton: false,
buttons: {
confirm: {
label: __t('Yes'),
className: 'btn-success'
},
cancel: {
label: __t('No'),
className: 'btn-danger'
}
},
callback: function(result)
{
if (result === true)
{
Grocy.Api.Delete('objects/userfields/' + objectId, {},
function(result)
{
window.location.href = U('/userfields');
},
function(xhr)
{
console.error(xhr);
}
);
}
}
});
});
if (typeof GetUriParam("entity") !== "undefined" && !GetUriParam("entity").isEmpty())
{
$("#entity-filter").val(GetUriParam("entity"));
$("#entity-filter").trigger("change");
}
| var userfieldsTable = $('#userfields-table').DataTable({
'order': [[1, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
]
});
$('#userfields-table tbody').removeClass("d-none");
userfieldsTable.columns.adjust().draw();
$("#search").on("keyup", Delay(function()
{
var value = $(this).val();
if (value === "all")
{
value = "";
}
userfieldsTable.search(value).draw();
}, 200));
$("#entity-filter").on("change", function()
{
var value = $("#entity-filter option:selected").text();
if (value === __t("All"))
{
value = "";
}
userfieldsTable.column(1).search(value).draw();
$("#new-userfield-button").attr("href", U("/userfield/new?entity=" + value));
});
$(document).on('click', '.userfield-delete-button', function(e)
{
var objectName = SanitizeHtml($(e.currentTarget).attr('data-userfield-name'));
var objectId = $(e.currentTarget).attr('data-userfield-id');
bootbox.confirm({
message: __t('Are you sure to delete user field "%s"?', objectName),
closeButton: false,
buttons: {
confirm: {
label: __t('Yes'),
className: 'btn-success'
},
cancel: {
label: __t('No'),
className: 'btn-danger'
}
},
callback: function(result)
{
if (result === true)
{
Grocy.Api.Delete('objects/userfields/' + objectId, {},
function(result)
{
window.location.href = U('/userfields');
},
function(xhr)
{
console.error(xhr);
}
);
}
}
});
});
if (typeof GetUriParam("entity") !== "undefined" && !GetUriParam("entity").isEmpty())
{
$("#entity-filter").val(GetUriParam("entity"));
$("#entity-filter").trigger("change");
}
|
var usersTable = $('#users-table').DataTable({
'order': [[1, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
]
});
$('#users-table tbody').removeClass("d-none");
usersTable.columns.adjust().draw();
$("#search").on("keyup", Delay(function()
{
var value = $(this).val();
if (value === "all")
{
value = "";
}
usersTable.search(value).draw();
}, 200));
$(document).on('click', '.user-delete-button', function(e)
{
var objectName = $(e.currentTarget).attr('data-user-username');
var objectId = $(e.currentTarget).attr('data-user-id');
bootbox.confirm({
message: __t('Are you sure to delete user "%s"?', objectName),
closeButton: false,
buttons: {
confirm: {
label: __t('Yes'),
className: 'btn-success'
},
cancel: {
label: __t('No'),
className: 'btn-danger'
}
},
callback: function(result)
{
if (result === true)
{
Grocy.Api.Delete('users/' + objectId, {},
function(result)
{
window.location.href = U('/users');
},
function(xhr)
{
console.error(xhr);
}
);
}
}
});
});
| var usersTable = $('#users-table').DataTable({
'order': [[1, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
]
});
$('#users-table tbody').removeClass("d-none");
usersTable.columns.adjust().draw();
$("#search").on("keyup", Delay(function()
{
var value = $(this).val();
if (value === "all")
{
value = "";
}
usersTable.search(value).draw();
}, 200));
$(document).on('click', '.user-delete-button', function(e)
{
var objectName = SanitizeHtml($(e.currentTarget).attr('data-user-username'));
var objectId = $(e.currentTarget).attr('data-user-id');
bootbox.confirm({
message: __t('Are you sure to delete user "%s"?', objectName),
closeButton: false,
buttons: {
confirm: {
label: __t('Yes'),
className: 'btn-success'
},
cancel: {
label: __t('No'),
className: 'btn-danger'
}
},
callback: function(result)
{
if (result === true)
{
Grocy.Api.Delete('users/' + objectId, {},
function(result)
{
window.location.href = U('/users');
},
function(xhr)
{
console.error(xhr);
}
);
}
}
});
});
|
None | Import('*')
# Local includes
env.Append(CPPPATH = ['#'])
prog = env.Program('tar', 'tar.cpp')
Return('prog')
|
None | (function(factory) {
/* global define */
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else if (typeof module === 'object' && module.exports) {
// Node/CommonJS
module.exports = factory(require('jquery'));
} else {
// Browser globals
factory(window.jQuery);
}
}(function($) {
// Extends plugins for adding hello.
// - plugin is external module for customizing.
$.extend($.summernote.plugins, {
/**
* @param {Object} context - context object has status of editor.
*/
'hello': function(context) {
var self = this;
// ui has renders to build ui elements.
// - you can create a button with `ui.button`
var ui = $.summernote.ui;
// add hello button
context.memo('button.hello', function() {
// create button
var button = ui.button({
contents: '<i class="fa fa-child"/> Hello',
tooltip: 'hello',
click: function() {
self.$panel.show();
self.$panel.hide(500);
// invoke insertText method with 'hello' on editor module.
context.invoke('editor.insertText', 'hello');
},
});
// create jQuery object from button instance.
var $hello = button.render();
return $hello;
});
// This events will be attached when editor is initialized.
this.events = {
// This will be called after modules are initialized.
'summernote.init': function(we, e) {
console.log('summernote initialized', we, e);
},
// This will be called when user releases a key on editable.
'summernote.keyup': function(we, e) {
console.log('summernote keyup', we, e);
},
};
// This method will be called when editor is initialized by $('..').summernote();
// You can create elements for plugin
this.initialize = function() {
this.$panel = $('<div class="hello-panel"/>').css({
position: 'absolute',
width: 100,
height: 100,
left: '50%',
top: '50%',
background: 'red',
}).hide();
this.$panel.appendTo('body');
};
// This methods will be called when editor is destroyed by $('..').summernote('destroy');
// You should remove elements on `initialize`.
this.destroy = function() {
this.$panel.remove();
this.$panel = null;
};
},
});
}));
|
/*! Summernote v0.8.10 | (c) 2013- Alan Hong and other contributors | MIT license */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):e(t.jQuery)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e=function(){function e(t,e,o,n){this.markup=t,this.children=e,this.options=o,this.callback=n}return e.prototype.render=function(e){var o=t(this.markup);if(this.options&&this.options.contents&&o.html(this.options.contents),this.options&&this.options.className&&o.addClass(this.options.className),this.options&&this.options.data&&t.each(this.options.data,function(t,e){o.attr("data-"+t,e)}),this.options&&this.options.click&&o.on("click",this.options.click),this.children){var n=o.find(".note-children-container");this.children.forEach(function(t){t.render(n.length?n:o)})}return this.callback&&this.callback(o,this.options),this.options&&this.options.callback&&this.options.callback(o),e&&e.append(o),o},e}(),o=function(o,n){return function(){var i="object"==typeof arguments[1]?arguments[1]:arguments[0],r=t.isArray(arguments[0])?arguments[0]:[];return i&&i.children&&(r=i.children),new e(o,r,i,n)}},n=o('<div class="note-editor note-frame card"/>'),i=o('<div class="note-toolbar-wrapper"><div class="note-toolbar card-header" role="toolbar"></div></div>'),r=o('<div class="note-editing-area"/>'),s=o('<textarea class="note-codable" role="textbox" aria-multiline="true"/>'),a=o('<div class="note-editable card-block" contentEditable="true" role="textbox" aria-multiline="true"/>'),l=o(['<output class="note-status-output" aria-live="polite"/>','<div class="note-statusbar" role="status">',' <output class="note-status-output" aria-live="polite"></output>',' <div class="note-resizebar" role="seperator" aria-orientation="horizontal" aria-label="Resize">',' <div class="note-icon-bar"/>',' <div class="note-icon-bar"/>',' <div class="note-icon-bar"/>'," </div>","</div>"].join("")),c=o('<div class="note-editor"/>'),d=o(['<output class="note-status-output" aria-live="polite"/>','<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"/>'].join("")),u=o('<div class="note-btn-group btn-group">'),h=o('<div class="dropdown-menu" role="list">',function(e,o){var n=t.isArray(o.items)?o.items.map(function(t){var e="string"==typeof t?t:t.value||"",n=o.template?o.template(t):t,i="object"==typeof t?t.option:void 0;return'<a class="dropdown-item" href="#" '+('data-value="'+e+'"'+(void 0!==i?' data-option="'+i+'"':""))+' role="listitem" aria-label="'+t+'">'+n+"</a>"}).join(""):o.items;e.html(n).attr({"aria-label":o.title})}),p=o('<div class="dropdown-menu note-check" role="list">',function(e,o){var n=t.isArray(o.items)?o.items.map(function(t){var e="string"==typeof t?t:t.value||"",n=o.template?o.template(t):t;return'<a class="dropdown-item" href="#" data-value="'+e+'" role="listitem" aria-label="'+t+'">'+b(o.checkClassName)+" "+n+"</a>"}).join(""):o.items;e.html(n).attr({"aria-label":o.title})}),f=o('<div class="note-color-palette"/>',function(t,e){for(var o=[],n=0,i=e.colors.length;n<i;n++){for(var r=e.eventName,s=e.colors[n],a=e.colorsName[n],l=[],c=0,d=s.length;c<d;c++){var u=s[c],h=a[c];l.push(['<button type="button" class="note-color-btn"','style="background-color:',u,'" ','data-event="',r,'" ','data-value="',u,'" ','title="',h,'" ','aria-label="',h,'" ','data-toggle="button" tabindex="-1"></button>'].join(""))}o.push('<div class="note-color-row">'+l.join("")+"</div>")}t.html(o.join("")),e.tooltip&&t.find(".note-color-btn").tooltip({container:e.container,trigger:"hover",placement:"bottom"})}),m=o('<div class="modal" aria-hidden="false" tabindex="-1" role="dialog"/>',function(t,e){e.fade&&t.addClass("fade"),t.attr({"aria-label":e.title}),t.html(['<div class="modal-dialog">',' <div class="modal-content">',e.title?' <div class="modal-header"> <h4 class="modal-title">'+e.title+'</h4> <button type="button" class="close" data-dismiss="modal" aria-label="Close" aria-hidden="true">×</button> </div>':"",' <div class="modal-body">'+e.body+"</div>",e.footer?' <div class="modal-footer">'+e.footer+"</div>":""," </div>","</div>"].join(""))}),g=o(['<div class="note-popover popover in">',' <div class="arrow"/>',' <div class="popover-content note-children-container"/>',"</div>"].join(""),function(t,e){var o=void 0!==e.direction?e.direction:"bottom";t.addClass(o),e.hideArrow&&t.find(".arrow").hide()}),v=o('<label class="custom-control custom-checkbox"></label>',function(t,e){e.id&&t.attr("for",e.id),t.html([' <input role="checkbox" type="checkbox" class="custom-control-input"'+(e.id?' id="'+e.id+'"':""),e.checked?" checked":"",' aria-checked="'+(e.checked?"true":"false")+'"/>',' <span class="custom-control-indicator"></span>',' <span class="custom-control-description">'+(e.text?e.text:"")+"</span>","</label>"].join(""))}),b=function(t,e){return"<"+(e=e||"i")+' class="'+t+'"/>'},y={editor:n,toolbar:i,editingArea:r,codable:s,editable:a,statusbar:l,airEditor:c,airEditable:d,buttonGroup:u,dropdown:h,dropdownButtonContents:function(t){return t},dropdownCheck:p,palette:f,dialog:m,popover:g,icon:b,checkbox:v,options:{},button:function(t,e){return o('<button type="button" class="note-btn btn btn-light btn-sm" role="button" tabindex="-1">',function(t,e){e&&e.tooltip&&t.attr({title:e.tooltip,"aria-label":e.tooltip}).tooltip({container:e.container,trigger:"hover",placement:"bottom"})})(t,e)},toggleBtn:function(t,e){t.toggleClass("disabled",!e),t.attr("disabled",!e)},toggleBtnActive:function(t,e){t.toggleClass("active",e)},onDialogShown:function(t,e){t.one("shown.bs.modal",e)},onDialogHidden:function(t,e){t.one("hidden.bs.modal",e)},showDialog:function(t){t.modal("show")},hideDialog:function(t){t.modal("hide")},createLayout:function(t,e){var o=(e.airMode?y.airEditor([y.editingArea([y.airEditable()])]):y.editor([y.toolbar(),y.editingArea([y.codable(),y.editable()]),y.statusbar()])).render();return o.insertAfter(t),{note:t,editor:o,toolbar:o.find(".note-toolbar"),editingArea:o.find(".note-editing-area"),editable:o.find(".note-editable"),codable:o.find(".note-codable"),statusbar:o.find(".note-statusbar")}},removeLayout:function(t,e){t.html(e.editable.html()),e.editor.remove(),t.show()}};var k=0;var C={eq:function(t){return function(e){return t===e}},eq2:function(t,e){return t===e},peq2:function(t){return function(e,o){return e[t]===o[t]}},ok:function(){return!0},fail:function(){return!1},self:function(t){return t},not:function(t){return function(){return!t.apply(t,arguments)}},and:function(t,e){return function(o){return t(o)&&e(o)}},invoke:function(t,e){return function(){return t[e].apply(t,arguments)}},uniqueId:function(t){var e=++k+"";return t?t+e:e},rect2bnd:function(t){var e=$(document);return{top:t.top+e.scrollTop(),left:t.left+e.scrollLeft(),width:t.right-t.left,height:t.bottom-t.top}},invertObject:function(t){var e={};for(var o in t)t.hasOwnProperty(o)&&(e[t[o]]=o);return e},namespaceToCamel:function(t,e){return(e=e||"")+t.split(".").map(function(t){return t.substring(0,1).toUpperCase()+t.substring(1)}).join("")},debounce:function(t,e,o){var n,i=this;return function(){var r=i,s=arguments,a=o&&!n;clearTimeout(n),n=setTimeout(function(){n=null,o||t.apply(r,s)},e),a&&t.apply(r,s)}}};function w(t){return t[0]}function x(t){return t[t.length-1]}function S(t){return t.slice(1)}function T(e,o){return t.inArray(o,e)}function I(t,e){return-1!==T(t,e)}var N={head:w,last:x,initial:function(t){return t.slice(0,t.length-1)},tail:S,prev:function(t,e){var o=T(t,e);return-1===o?null:t[o-1]},next:function(t,e){var o=T(t,e);return-1===o?null:t[o+1]},find:function(t,e){for(var o=0,n=t.length;o<n;o++){var i=t[o];if(e(i))return i}},contains:I,all:function(t,e){for(var o=0,n=t.length;o<n;o++)if(!e(t[o]))return!1;return!0},sum:function(t,e){return e=e||C.self,t.reduce(function(t,o){return t+e(o)},0)},from:function(t){for(var e=[],o=t.length,n=-1;++n<o;)e[n]=t[n];return e},isEmpty:function(t){return!t||!t.length},clusterBy:function(t,e){return t.length?S(t).reduce(function(t,o){var n=x(t);return e(x(n),o)?n[n.length]=o:t[t.length]=[o],t},[[w(t)]]):[]},compact:function(t){for(var e=[],o=0,n=t.length;o<n;o++)t[o]&&e.push(t[o]);return e},unique:function(t){for(var e=[],o=0,n=t.length;o<n;o++)I(e,t[o])||e.push(t[o]);return e}},E="function"==typeof define&&define.amd;var A,R=navigator.userAgent,P=/MSIE|Trident/i.test(R);if(P){var L=/MSIE (\d+[.]\d+)/.exec(R);L&&(A=parseFloat(L[1])),(L=/Trident\/.*rv:([0-9]{1,}[.0-9]{0,})/.exec(R))&&(A=parseFloat(L[1]))}var H=/Edge\/\d+/.test(R),D=!!window.CodeMirror;if(!D&&E)if("function"==typeof __webpack_require__)try{require.resolve("codemirror"),D=!0}catch(t){}else if("undefined"!=typeof require)if(void 0!==require.resolve)try{require.resolve("codemirror"),D=!0}catch(t){}else void 0!==require.specified&&(D=require.specified("codemirror"));var F="ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0,B=P||H?"DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted":"input",z={isMac:navigator.appVersion.indexOf("Mac")>-1,isMSIE:P,isEdge:H,isFF:!H&&/firefox/i.test(R),isPhantom:/PhantomJS/i.test(R),isWebkit:!H&&/webkit/i.test(R),isChrome:!H&&/chrome/i.test(R),isSafari:!H&&/safari/i.test(R),browserVersion:A,jqueryVersion:parseFloat(t.fn.jquery),isSupportAmd:E,isSupportTouch:F,hasCodeMirror:D,isFontInstalled:function(e){var o="Comic Sans MS"===e?"Courier New":"Comic Sans MS",n=t("<div>").css({position:"absolute",left:"-9999px",top:"-9999px",fontSize:"200px"}).text("mmmmmmmmmwwwwwww").appendTo(document.body),i=n.css("fontFamily",o).width(),r=n.css("fontFamily",e+","+o).width();return n.remove(),i!==r},isW3CRangeSupport:!!document.createRange,inputEventName:B},M=String.fromCharCode(160);function O(e){return e&&t(e).hasClass("note-editable")}function U(t){return t=t.toUpperCase(),function(e){return e&&e.nodeName.toUpperCase()===t}}function j(t){return t&&3===t.nodeType}function q(t){return t&&/^BR|^IMG|^HR|^IFRAME|^BUTTON|^INPUT/.test(t.nodeName.toUpperCase())}function K(t){return!O(t)&&(t&&/^DIV|^P|^LI|^H[1-7]/.test(t.nodeName.toUpperCase()))}var V=U("PRE"),W=U("LI");var G=U("TABLE"),_=U("DATA");function Z(t){return!(tt(t)||Y(t)||Q(t)||K(t)||G(t)||X(t)||_(t))}function Y(t){return t&&/^UL|^OL/.test(t.nodeName.toUpperCase())}var Q=U("HR");function J(t){return t&&/^TD|^TH/.test(t.nodeName.toUpperCase())}var X=U("BLOCKQUOTE");function tt(t){return J(t)||X(t)||O(t)}var et=U("A");var ot=U("BODY");var nt=z.isMSIE&&z.browserVersion<11?" ":"<br>";function it(t){return j(t)?t.nodeValue.length:t?t.childNodes.length:0}function rt(t){var e=it(t);return 0===e||(!j(t)&&1===e&&t.innerHTML===nt||!(!N.all(t.childNodes,j)||""!==t.innerHTML))}function st(t){q(t)||it(t)||(t.innerHTML=nt)}function at(t,e){for(;t;){if(e(t))return t;if(O(t))break;t=t.parentNode}return null}function lt(t,e){e=e||C.fail;var o=[];return at(t,function(t){return O(t)||o.push(t),e(t)}),o}function ct(t,e){e=e||C.fail;for(var o=[];t&&!e(t);)o.push(t),t=t.nextSibling;return o}function dt(t,e){var o=e.nextSibling,n=e.parentNode;return o?n.insertBefore(t,o):n.appendChild(t),t}function ut(e,o){return t.each(o,function(t,o){e.appendChild(o)}),e}function ht(t){return 0===t.offset}function pt(t){return t.offset===it(t.node)}function ft(t){return ht(t)||pt(t)}function mt(t,e){for(;t&&t!==e;){if(0!==vt(t))return!1;t=t.parentNode}return!0}function gt(t,e){if(!e)return!1;for(;t&&t!==e;){if(vt(t)!==it(t.parentNode)-1)return!1;t=t.parentNode}return!0}function vt(t){for(var e=0;t=t.previousSibling;)e+=1;return e}function bt(t){return!!(t&&t.childNodes&&t.childNodes.length)}function yt(t,e){var o,n;if(0===t.offset){if(O(t.node))return null;o=t.node.parentNode,n=vt(t.node)}else bt(t.node)?n=it(o=t.node.childNodes[t.offset-1]):(o=t.node,n=e?0:t.offset-1);return{node:o,offset:n}}function kt(t,e){var o,n;if(it(t.node)===t.offset){if(O(t.node))return null;o=t.node.parentNode,n=vt(t.node)+1}else bt(t.node)?(o=t.node.childNodes[t.offset],n=0):(o=t.node,n=e?it(t.node):t.offset+1);return{node:o,offset:n}}function Ct(t,e){return t.node===e.node&&t.offset===e.offset}function wt(t,e){var o=e&&e.isSkipPaddingBlankHTML,n=e&&e.isNotSplitEdgePoint;if(ft(t)&&(j(t.node)||n)){if(ht(t))return t.node;if(pt(t))return t.node.nextSibling}if(j(t.node))return t.node.splitText(t.offset);var i=t.node.childNodes[t.offset],r=dt(t.node.cloneNode(!1),t.node);return ut(r,ct(i)),o||(st(t.node),st(r)),r}function xt(t,e,o){var n=lt(e.node,C.eq(t));return n.length?1===n.length?wt(e,o):n.reduce(function(t,n){return t===e.node&&(t=wt(e,o)),wt({node:n,offset:t?vt(t):it(n)},o)}):null}function St(t){return document.createElement(t)}function Tt(t,e){if(t&&t.parentNode){if(t.removeNode)return t.removeNode(e);var o=t.parentNode;if(!e){for(var n=[],i=0,r=t.childNodes.length;i<r;i++)n.push(t.childNodes[i]);for(i=0,r=n.length;i<r;i++)o.insertBefore(n[i],t)}o.removeChild(t)}}var It=U("TEXTAREA");function $t(t,e){var o=It(t[0])?t.val():t.html();return e?o.replace(/[\n\r]/g,""):o}var Nt={NBSP_CHAR:M,ZERO_WIDTH_NBSP_CHAR:"\ufeff",blank:nt,emptyPara:"<p>"+nt+"</p>",makePredByNodeName:U,isEditable:O,isControlSizing:function(e){return e&&t(e).hasClass("note-control-sizing")},isText:j,isElement:function(t){return t&&1===t.nodeType},isVoid:q,isPara:K,isPurePara:function(t){return K(t)&&!W(t)},isHeading:function(t){return t&&/^H[1-7]/.test(t.nodeName.toUpperCase())},isInline:Z,isBlock:C.not(Z),isBodyInline:function(t){return Z(t)&&!at(t,K)},isBody:ot,isParaInline:function(t){return Z(t)&&!!at(t,K)},isPre:V,isList:Y,isTable:G,isData:_,isCell:J,isBlockquote:X,isBodyContainer:tt,isAnchor:et,isDiv:U("DIV"),isLi:W,isBR:U("BR"),isSpan:U("SPAN"),isB:U("B"),isU:U("U"),isS:U("S"),isI:U("I"),isImg:U("IMG"),isTextarea:It,isEmpty:rt,isEmptyAnchor:C.and(et,rt),isClosestSibling:function(t,e){return t.nextSibling===e||t.previousSibling===e},withClosestSiblings:function(t,e){e=e||C.ok;var o=[];return t.previousSibling&&e(t.previousSibling)&&o.push(t.previousSibling),o.push(t),t.nextSibling&&e(t.nextSibling)&&o.push(t.nextSibling),o},nodeLength:it,isLeftEdgePoint:ht,isRightEdgePoint:pt,isEdgePoint:ft,isLeftEdgeOf:mt,isRightEdgeOf:gt,isLeftEdgePointOf:function(t,e){return ht(t)&&mt(t.node,e)},isRightEdgePointOf:function(t,e){return pt(t)&>(t.node,e)},prevPoint:yt,nextPoint:kt,isSamePoint:Ct,isVisiblePoint:function(t){if(j(t.node)||!bt(t.node)||rt(t.node))return!0;var e=t.node.childNodes[t.offset-1],o=t.node.childNodes[t.offset];return!(e&&!q(e)||o&&!q(o))},prevPointUntil:function(t,e){for(;t;){if(e(t))return t;t=yt(t)}return null},nextPointUntil:function(t,e){for(;t;){if(e(t))return t;t=kt(t)}return null},isCharPoint:function(t){if(!j(t.node))return!1;var e=t.node.nodeValue.charAt(t.offset-1);return e&&" "!==e&&e!==M},walkPoint:function(t,e,o,n){for(var i=t;i&&(o(i),!Ct(i,e));)i=kt(i,n&&t.node!==i.node&&e.node!==i.node)},ancestor:at,singleChildAncestor:function(t,e){for(t=t.parentNode;t&&1===it(t);){if(e(t))return t;if(O(t))break;t=t.parentNode}return null},listAncestor:lt,lastAncestor:function(t,e){var o=lt(t);return N.last(o.filter(e))},listNext:ct,listPrev:function(t,e){e=e||C.fail;for(var o=[];t&&!e(t);)o.push(t),t=t.previousSibling;return o},listDescendant:function(t,e){var o=[];return e=e||C.ok,function n(i){t!==i&&e(i)&&o.push(i);for(var r=0,s=i.childNodes.length;r<s;r++)n(i.childNodes[r])}(t),o},commonAncestor:function(e,o){for(var n=lt(e),i=o;i;i=i.parentNode)if(t.inArray(i,n)>-1)return i;return null},wrap:function(e,o){var n=e.parentNode,i=t("<"+o+">")[0];return n.insertBefore(i,e),i.appendChild(e),i},insertAfter:dt,appendChildNodes:ut,position:vt,hasChildren:bt,makeOffsetPath:function(t,e){return lt(e,C.eq(t)).map(vt).reverse()},fromOffsetPath:function(t,e){for(var o=t,n=0,i=e.length;n<i;n++)o=o.childNodes.length<=e[n]?o.childNodes[o.childNodes.length-1]:o.childNodes[e[n]];return o},splitTree:xt,splitPoint:function(t,e){var o,n,i=e?K:tt,r=lt(t.node,i),s=N.last(r)||t.node;i(s)?(o=r[r.length-2],n=s):n=(o=s).parentNode;var a=o&&xt(o,t,{isSkipPaddingBlankHTML:e,isNotSplitEdgePoint:e});return a||n!==t.node||(a=t.node.childNodes[t.offset]),{rightNode:a,container:n}},create:St,createText:function(t){return document.createTextNode(t)},remove:Tt,removeWhile:function(t,e){for(;t&&!O(t)&&e(t);){var o=t.parentNode;Tt(t),t=o}},replace:function(t,e){if(t.nodeName.toUpperCase()===e.toUpperCase())return t;var o=St(e);return t.style.cssText&&(o.style.cssText=t.style.cssText),ut(o,N.from(t.childNodes)),dt(o,t),Tt(t),o},html:function(e,o){var n=$t(e);o&&(n=n.replace(/<(\/?)(\b(?!!)[^>\s]*)(.*?)(\s*\/?>)/g,function(t,e,o){o=o.toUpperCase();var n=/^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(o)&&!!e,i=/^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(o);return t+(n||i?"\n":"")}),n=t.trim(n));return n},value:$t,posFromPlaceholder:function(e){var o=t(e),n=o.offset(),i=o.outerHeight(!0);return{left:n.left,top:n.top+i}},attachEvents:function(t,e){Object.keys(e).forEach(function(o){t.on(o,e[o])})},detachEvents:function(t,e){Object.keys(e).forEach(function(o){t.off(o,e[o])})},isCustomStyleTag:function(t){return t&&!j(t)&&N.contains(t.classList,"note-styletag")}};t.summernote=t.summernote||{lang:{}},t.extend(t.summernote.lang,{"en-US":{font:{bold:"Bold",italic:"Italic",underline:"Underline",clear:"Remove Font Style",height:"Line Height",name:"Font Family",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript",size:"Font Size"},image:{image:"Picture",insert:"Insert Image",resizeFull:"Resize Full",resizeHalf:"Resize Half",resizeQuarter:"Resize Quarter",floatLeft:"Float Left",floatRight:"Float Right",floatNone:"Float None",shapeRounded:"Shape: Rounded",shapeCircle:"Shape: Circle",shapeThumbnail:"Shape: Thumbnail",shapeNone:"Shape: None",dragImageHere:"Drag image or text here",dropImage:"Drop image or Text",selectFromFiles:"Select from files",maximumFileSize:"Maximum file size",maximumFileSizeError:"Maximum file size exceeded.",url:"Image URL",remove:"Remove Image",original:"Original"},video:{video:"Video",videoLink:"Video Link",insert:"Insert Video",url:"Video URL",providers:"(YouTube, Vimeo, Vine, Instagram, DailyMotion or Youku)"},link:{link:"Link",insert:"Insert Link",unlink:"Unlink",edit:"Edit",textToDisplay:"Text to display",url:"To what URL should this link go?",openInNewWindow:"Open in new window"},table:{table:"Table",addRowAbove:"Add row above",addRowBelow:"Add row below",addColLeft:"Add column left",addColRight:"Add column right",delRow:"Delete row",delCol:"Delete column",delTable:"Delete table"},hr:{insert:"Insert Horizontal Rule"},style:{style:"Style",p:"Normal",blockquote:"Quote",pre:"Code",h1:"Header 1",h2:"Header 2",h3:"Header 3",h4:"Header 4",h5:"Header 5",h6:"Header 6"},lists:{unordered:"Unordered list",ordered:"Ordered list"},options:{help:"Help",fullscreen:"Full Screen",codeview:"Code View"},paragraph:{paragraph:"Paragraph",outdent:"Outdent",indent:"Indent",left:"Align left",center:"Align center",right:"Align right",justify:"Justify full"},color:{recent:"Recent Color",more:"More Color",background:"Background Color",foreground:"Foreground Color",transparent:"Transparent",setTransparent:"Set transparent",reset:"Reset",resetToDefault:"Reset to default"},shortcut:{shortcuts:"Keyboard shortcuts",close:"Close",textFormatting:"Text formatting",action:"Action",paragraphFormatting:"Paragraph formatting",documentStyle:"Document Style",extraKeys:"Extra keys"},help:{insertParagraph:"Insert Paragraph",undo:"Undoes the last command",redo:"Redoes the last command",tab:"Tab",untab:"Untab",bold:"Set a bold style",italic:"Set a italic style",underline:"Set a underline style",strikethrough:"Set a strikethrough style",removeFormat:"Clean a style",justifyLeft:"Set left align",justifyCenter:"Set center align",justifyRight:"Set right align",justifyFull:"Set full align",insertUnorderedList:"Toggle unordered list",insertOrderedList:"Toggle ordered list",outdent:"Outdent on current paragraph",indent:"Indent on current paragraph",formatPara:"Change current block's format as a paragraph(P tag)",formatH1:"Change current block's format as H1",formatH2:"Change current block's format as H2",formatH3:"Change current block's format as H3",formatH4:"Change current block's format as H4",formatH5:"Change current block's format as H5",formatH6:"Change current block's format as H6",insertHorizontalRule:"Insert horizontal rule","linkDialog.show":"Show Link Dialog"},history:{undo:"Undo",redo:"Redo"},specialChar:{specialChar:"SPECIAL CHARACTERS",select:"Select Special characters"}}});var Et={BACKSPACE:8,TAB:9,ENTER:13,SPACE:32,DELETE:46,LEFT:37,UP:38,RIGHT:39,DOWN:40,NUM0:48,NUM1:49,NUM2:50,NUM3:51,NUM4:52,NUM5:53,NUM6:54,NUM7:55,NUM8:56,B:66,E:69,I:73,J:74,K:75,L:76,R:82,S:83,U:85,V:86,Y:89,Z:90,SLASH:191,LEFTBRACKET:219,BACKSLASH:220,RIGHTBRACKET:221},At={isEdit:function(t){return N.contains([Et.BACKSPACE,Et.TAB,Et.ENTER,Et.SPACE,Et.DELETE],t)},isMove:function(t){return N.contains([Et.LEFT,Et.UP,Et.RIGHT,Et.DOWN],t)},nameFromCode:C.invertObject(Et),code:Et};function Rt(t,e){var o,n,i=t.parentElement(),r=document.body.createTextRange(),s=N.from(i.childNodes);for(o=0;o<s.length;o++)if(!Nt.isText(s[o])){if(r.moveToElementText(s[o]),r.compareEndPoints("StartToStart",t)>=0)break;n=s[o]}if(0!==o&&Nt.isText(s[o-1])){var a=document.body.createTextRange(),l=null;a.moveToElementText(n||i),a.collapse(!n),l=n?n.nextSibling:i.firstChild;var c=t.duplicate();c.setEndPoint("StartToStart",a);for(var d=c.text.replace(/[\r\n]/g,"").length;d>l.nodeValue.length&&l.nextSibling;)d-=l.nodeValue.length,l=l.nextSibling;l.nodeValue;e&&l.nextSibling&&Nt.isText(l.nextSibling)&&d===l.nodeValue.length&&(d-=l.nodeValue.length,l=l.nextSibling),i=l,o=d}return{cont:i,offset:o}}function Pt(t){var e=function(t,o){var n,i;if(Nt.isText(t)){var r=Nt.listPrev(t,C.not(Nt.isText)),s=N.last(r).previousSibling;n=s||t.parentNode,o+=N.sum(N.tail(r),Nt.nodeLength),i=!s}else{if(n=t.childNodes[o]||t,Nt.isText(n))return e(n,0);o=0,i=!1}return{node:n,collapseToStart:i,offset:o}},o=document.body.createTextRange(),n=e(t.node,t.offset);return o.moveToElementText(n.node),o.collapse(n.collapseToStart),o.moveStart("character",n.offset),o}var Lt=function(){function e(t,e,o,n){this.sc=t,this.so=e,this.ec=o,this.eo=n,this.isOnEditable=this.makeIsOn(Nt.isEditable),this.isOnList=this.makeIsOn(Nt.isList),this.isOnAnchor=this.makeIsOn(Nt.isAnchor),this.isOnCell=this.makeIsOn(Nt.isCell),this.isOnData=this.makeIsOn(Nt.isData)}return e.prototype.nativeRange=function(){if(z.isW3CRangeSupport){var t=document.createRange();return t.setStart(this.sc,this.so),t.setEnd(this.ec,this.eo),t}var e=Pt({node:this.sc,offset:this.so});return e.setEndPoint("EndToEnd",Pt({node:this.ec,offset:this.eo})),e},e.prototype.getPoints=function(){return{sc:this.sc,so:this.so,ec:this.ec,eo:this.eo}},e.prototype.getStartPoint=function(){return{node:this.sc,offset:this.so}},e.prototype.getEndPoint=function(){return{node:this.ec,offset:this.eo}},e.prototype.select=function(){var t=this.nativeRange();if(z.isW3CRangeSupport){var e=document.getSelection();e.rangeCount>0&&e.removeAllRanges(),e.addRange(t)}else t.select();return this},e.prototype.scrollIntoView=function(e){var o=t(e).height();return e.scrollTop+o<this.sc.offsetTop&&(e.scrollTop+=Math.abs(e.scrollTop+o-this.sc.offsetTop)),this},e.prototype.normalize=function(){var t=function(t,e){if(Nt.isVisiblePoint(t)&&!Nt.isEdgePoint(t)||Nt.isVisiblePoint(t)&&Nt.isRightEdgePoint(t)&&!e||Nt.isVisiblePoint(t)&&Nt.isLeftEdgePoint(t)&&e||Nt.isVisiblePoint(t)&&Nt.isBlock(t.node)&&Nt.isEmpty(t.node))return t;var o=Nt.ancestor(t.node,Nt.isBlock);if((Nt.isLeftEdgePointOf(t,o)||Nt.isVoid(Nt.prevPoint(t).node))&&!e||(Nt.isRightEdgePointOf(t,o)||Nt.isVoid(Nt.nextPoint(t).node))&&e){if(Nt.isVisiblePoint(t))return t;e=!e}return(e?Nt.nextPointUntil(Nt.nextPoint(t),Nt.isVisiblePoint):Nt.prevPointUntil(Nt.prevPoint(t),Nt.isVisiblePoint))||t},o=t(this.getEndPoint(),!1),n=this.isCollapsed()?o:t(this.getStartPoint(),!0);return new e(n.node,n.offset,o.node,o.offset)},e.prototype.nodes=function(t,e){t=t||C.ok;var o=e&&e.includeAncestor,n=e&&e.fullyContains,i=this.getStartPoint(),r=this.getEndPoint(),s=[],a=[];return Nt.walkPoint(i,r,function(e){var i;Nt.isEditable(e.node)||(n?(Nt.isLeftEdgePoint(e)&&a.push(e.node),Nt.isRightEdgePoint(e)&&N.contains(a,e.node)&&(i=e.node)):i=o?Nt.ancestor(e.node,t):e.node,i&&t(i)&&s.push(i))},!0),N.unique(s)},e.prototype.commonAncestor=function(){return Nt.commonAncestor(this.sc,this.ec)},e.prototype.expand=function(t){var o=Nt.ancestor(this.sc,t),n=Nt.ancestor(this.ec,t);if(!o&&!n)return new e(this.sc,this.so,this.ec,this.eo);var i=this.getPoints();return o&&(i.sc=o,i.so=0),n&&(i.ec=n,i.eo=Nt.nodeLength(n)),new e(i.sc,i.so,i.ec,i.eo)},e.prototype.collapse=function(t){return t?new e(this.sc,this.so,this.sc,this.so):new e(this.ec,this.eo,this.ec,this.eo)},e.prototype.splitText=function(){var t=this.sc===this.ec,o=this.getPoints();return Nt.isText(this.ec)&&!Nt.isEdgePoint(this.getEndPoint())&&this.ec.splitText(this.eo),Nt.isText(this.sc)&&!Nt.isEdgePoint(this.getStartPoint())&&(o.sc=this.sc.splitText(this.so),o.so=0,t&&(o.ec=o.sc,o.eo=this.eo-this.so)),new e(o.sc,o.so,o.ec,o.eo)},e.prototype.deleteContents=function(){if(this.isCollapsed())return this;var o=this.splitText(),n=o.nodes(null,{fullyContains:!0}),i=Nt.prevPointUntil(o.getStartPoint(),function(t){return!N.contains(n,t.node)}),r=[];return t.each(n,function(t,e){var o=e.parentNode;i.node!==o&&1===Nt.nodeLength(o)&&r.push(o),Nt.remove(e,!1)}),t.each(r,function(t,e){Nt.remove(e,!1)}),new e(i.node,i.offset,i.node,i.offset).normalize()},e.prototype.makeIsOn=function(t){return function(){var e=Nt.ancestor(this.sc,t);return!!e&&e===Nt.ancestor(this.ec,t)}},e.prototype.isLeftEdgeOf=function(t){if(!Nt.isLeftEdgePoint(this.getStartPoint()))return!1;var e=Nt.ancestor(this.sc,t);return e&&Nt.isLeftEdgeOf(this.sc,e)},e.prototype.isCollapsed=function(){return this.sc===this.ec&&this.so===this.eo},e.prototype.wrapBodyInlineWithPara=function(){if(Nt.isBodyContainer(this.sc)&&Nt.isEmpty(this.sc))return this.sc.innerHTML=Nt.emptyPara,new e(this.sc.firstChild,0,this.sc.firstChild,0);var t,o=this.normalize();if(Nt.isParaInline(this.sc)||Nt.isPara(this.sc))return o;if(Nt.isInline(o.sc)){var n=Nt.listAncestor(o.sc,C.not(Nt.isInline));t=N.last(n),Nt.isInline(t)||(t=n[n.length-2]||o.sc.childNodes[o.so])}else t=o.sc.childNodes[o.so>0?o.so-1:0];var i=Nt.listPrev(t,Nt.isParaInline).reverse();if((i=i.concat(Nt.listNext(t.nextSibling,Nt.isParaInline))).length){var r=Nt.wrap(N.head(i),"p");Nt.appendChildNodes(r,N.tail(i))}return this.normalize()},e.prototype.insertNode=function(t){var e=this.wrapBodyInlineWithPara().deleteContents(),o=Nt.splitPoint(e.getStartPoint(),Nt.isInline(t));return o.rightNode?o.rightNode.parentNode.insertBefore(t,o.rightNode):o.container.appendChild(t),t},e.prototype.pasteHTML=function(e){var o=t("<div></div>").html(e)[0],n=N.from(o.childNodes),i=this.wrapBodyInlineWithPara().deleteContents();return n.reverse().map(function(t){return i.insertNode(t)}).reverse()},e.prototype.toString=function(){var t=this.nativeRange();return z.isW3CRangeSupport?t.toString():t.text},e.prototype.getWordRange=function(t){var o=this.getEndPoint();if(!Nt.isCharPoint(o))return this;var n=Nt.prevPointUntil(o,function(t){return!Nt.isCharPoint(t)});return t&&(o=Nt.nextPointUntil(o,function(t){return!Nt.isCharPoint(t)})),new e(n.node,n.offset,o.node,o.offset)},e.prototype.bookmark=function(t){return{s:{path:Nt.makeOffsetPath(t,this.sc),offset:this.so},e:{path:Nt.makeOffsetPath(t,this.ec),offset:this.eo}}},e.prototype.paraBookmark=function(t){return{s:{path:N.tail(Nt.makeOffsetPath(N.head(t),this.sc)),offset:this.so},e:{path:N.tail(Nt.makeOffsetPath(N.last(t),this.ec)),offset:this.eo}}},e.prototype.getClientRects=function(){return this.nativeRange().getClientRects()},e}(),Ht={create:function(t,e,o,n){if(4===arguments.length)return new Lt(t,e,o,n);if(2===arguments.length)return new Lt(t,e,o=t,n=e);var i=this.createFromSelection();return i||1!==arguments.length?i:(i=this.createFromNode(arguments[0])).collapse(Nt.emptyPara===arguments[0].innerHTML)},createFromSelection:function(){var t,e,o,n;if(z.isW3CRangeSupport){var i=document.getSelection();if(!i||0===i.rangeCount)return null;if(Nt.isBody(i.anchorNode))return null;var r=i.getRangeAt(0);t=r.startContainer,e=r.startOffset,o=r.endContainer,n=r.endOffset}else{var s=document.selection.createRange(),a=s.duplicate();a.collapse(!1);var l=s;l.collapse(!0);var c=Rt(l,!0),d=Rt(a,!1);Nt.isText(c.node)&&Nt.isLeftEdgePoint(c)&&Nt.isTextNode(d.node)&&Nt.isRightEdgePoint(d)&&d.node.nextSibling===c.node&&(c=d),t=c.cont,e=c.offset,o=d.cont,n=d.offset}return new Lt(t,e,o,n)},createFromNode:function(t){var e=t,o=0,n=t,i=Nt.nodeLength(n);return Nt.isVoid(e)&&(o=Nt.listPrev(e).length-1,e=e.parentNode),Nt.isBR(n)?(i=Nt.listPrev(n).length-1,n=n.parentNode):Nt.isVoid(n)&&(i=Nt.listPrev(n).length,n=n.parentNode),this.create(e,o,n,i)},createFromNodeBefore:function(t){return this.createFromNode(t).collapse(!0)},createFromNodeAfter:function(t){return this.createFromNode(t).collapse()},createFromBookmark:function(t,e){var o=Nt.fromOffsetPath(t,e.s.path),n=e.s.offset,i=Nt.fromOffsetPath(t,e.e.path),r=e.e.offset;return new Lt(o,n,i,r)},createFromParaBookmark:function(t,e){var o=t.s.offset,n=t.e.offset,i=Nt.fromOffsetPath(N.head(e),t.s.path),r=Nt.fromOffsetPath(N.last(e),t.e.path);return new Lt(i,o,r,n)}};var Dt=function(){function t(t){this.stack=[],this.stackOffset=-1,this.$editable=t,this.editable=t[0]}return t.prototype.makeSnapshot=function(){var t=Ht.create(this.editable);return{contents:this.$editable.html(),bookmark:t?t.bookmark(this.editable):{s:{path:[],offset:0},e:{path:[],offset:0}}}},t.prototype.applySnapshot=function(t){null!==t.contents&&this.$editable.html(t.contents),null!==t.bookmark&&Ht.createFromBookmark(this.editable,t.bookmark).select()},t.prototype.rewind=function(){this.$editable.html()!==this.stack[this.stackOffset].contents&&this.recordUndo(),this.stackOffset=0,this.applySnapshot(this.stack[this.stackOffset])},t.prototype.reset=function(){this.stack=[],this.stackOffset=-1,this.$editable.html(""),this.recordUndo()},t.prototype.undo=function(){this.$editable.html()!==this.stack[this.stackOffset].contents&&this.recordUndo(),this.stackOffset>0&&(this.stackOffset--,this.applySnapshot(this.stack[this.stackOffset]))},t.prototype.redo=function(){this.stack.length-1>this.stackOffset&&(this.stackOffset++,this.applySnapshot(this.stack[this.stackOffset]))},t.prototype.recordUndo=function(){this.stackOffset++,this.stack.length>this.stackOffset&&(this.stack=this.stack.slice(0,this.stackOffset)),this.stack.push(this.makeSnapshot())},t}(),Ft=function(){function e(){}return e.prototype.jQueryCSS=function(e,o){if(z.jqueryVersion<1.9){var n={};return t.each(o,function(t,o){n[o]=e.css(o)}),n}return e.css(o)},e.prototype.fromNode=function(t){var e=this.jQueryCSS(t,["font-family","font-size","text-align","list-style-type","line-height"])||{};return e["font-size"]=parseInt(e["font-size"],10),e},e.prototype.stylePara=function(e,o){t.each(e.nodes(Nt.isPara,{includeAncestor:!0}),function(e,n){t(n).css(o)})},e.prototype.styleNodes=function(e,o){e=e.splitText();var n=o&&o.nodeName||"SPAN",i=!(!o||!o.expandClosestSibling),r=!(!o||!o.onlyPartialContains);if(e.isCollapsed())return[e.insertNode(Nt.create(n))];var s=Nt.makePredByNodeName(n),a=e.nodes(Nt.isText,{fullyContains:!0}).map(function(t){return Nt.singleChildAncestor(t,s)||Nt.wrap(t,n)});if(i){if(r){var l=e.nodes();s=C.and(s,function(t){return N.contains(l,t)})}return a.map(function(e){var o=Nt.withClosestSiblings(e,s),n=N.head(o),i=N.tail(o);return t.each(i,function(t,e){Nt.appendChildNodes(n,e.childNodes),Nt.remove(e)}),N.head(o)})}return a},e.prototype.current=function(e){var o=t(Nt.isElement(e.sc)?e.sc:e.sc.parentNode),n=this.fromNode(o);try{n=t.extend(n,{"font-bold":document.queryCommandState("bold")?"bold":"normal","font-italic":document.queryCommandState("italic")?"italic":"normal","font-underline":document.queryCommandState("underline")?"underline":"normal","font-subscript":document.queryCommandState("subscript")?"subscript":"normal","font-superscript":document.queryCommandState("superscript")?"superscript":"normal","font-strikethrough":document.queryCommandState("strikethrough")?"strikethrough":"normal","font-family":document.queryCommandValue("fontname")||n["font-family"]})}catch(t){}if(e.isOnList()){var i=t.inArray(n["list-style-type"],["circle","disc","disc-leading-zero","square"])>-1;n["list-style"]=i?"unordered":"ordered"}else n["list-style"]="none";var r=Nt.ancestor(e.sc,Nt.isPara);if(r&&r.style["line-height"])n["line-height"]=r.style.lineHeight;else{var s=parseInt(n["line-height"],10)/parseInt(n["font-size"],10);n["line-height"]=s.toFixed(1)}return n.anchor=e.isOnAnchor()&&Nt.ancestor(e.sc,Nt.isAnchor),n.ancestors=Nt.listAncestor(e.sc,Nt.isEditable),n.range=e,n},e}(),Bt=function(){function e(){}return e.prototype.insertOrderedList=function(t){this.toggleList("OL",t)},e.prototype.insertUnorderedList=function(t){this.toggleList("UL",t)},e.prototype.indent=function(e){var o=this,n=Ht.create(e).wrapBodyInlineWithPara(),i=n.nodes(Nt.isPara,{includeAncestor:!0}),r=N.clusterBy(i,C.peq2("parentNode"));t.each(r,function(e,n){var i=N.head(n);Nt.isLi(i)?o.wrapList(n,i.parentNode.nodeName):t.each(n,function(e,o){t(o).css("marginLeft",function(t,e){return(parseInt(e,10)||0)+25})})}),n.select()},e.prototype.outdent=function(e){var o=this,n=Ht.create(e).wrapBodyInlineWithPara(),i=n.nodes(Nt.isPara,{includeAncestor:!0}),r=N.clusterBy(i,C.peq2("parentNode"));t.each(r,function(e,n){var i=N.head(n);Nt.isLi(i)?o.releaseList([n]):t.each(n,function(e,o){t(o).css("marginLeft",function(t,e){return(e=parseInt(e,10)||0)>25?e-25:""})})}),n.select()},e.prototype.toggleList=function(e,o){var n=this,i=Ht.create(o).wrapBodyInlineWithPara(),r=i.nodes(Nt.isPara,{includeAncestor:!0}),s=i.paraBookmark(r),a=N.clusterBy(r,C.peq2("parentNode"));if(N.find(r,Nt.isPurePara)){var l=[];t.each(a,function(t,o){l=l.concat(n.wrapList(o,e))}),r=l}else{var c=i.nodes(Nt.isList,{includeAncestor:!0}).filter(function(o){return!t.nodeName(o,e)});c.length?t.each(c,function(t,o){Nt.replace(o,e)}):r=this.releaseList(a,!0)}Ht.createFromParaBookmark(s,r).select()},e.prototype.wrapList=function(t,e){var o=N.head(t),n=N.last(t),i=Nt.isList(o.previousSibling)&&o.previousSibling,r=Nt.isList(n.nextSibling)&&n.nextSibling,s=i||Nt.insertAfter(Nt.create(e||"UL"),n);return t=t.map(function(t){return Nt.isPurePara(t)?Nt.replace(t,"LI"):t}),Nt.appendChildNodes(s,t),r&&(Nt.appendChildNodes(s,N.from(r.childNodes)),Nt.remove(r)),t},e.prototype.releaseList=function(e,o){var n=[];return t.each(e,function(e,i){var r=N.head(i),s=N.last(i),a=o?Nt.lastAncestor(r,Nt.isList):r.parentNode,l=a.childNodes.length>1?Nt.splitTree(a,{node:s.parentNode,offset:Nt.position(s)+1},{isSkipPaddingBlankHTML:!0}):null,c=Nt.splitTree(a,{node:r.parentNode,offset:Nt.position(r)},{isSkipPaddingBlankHTML:!0});i=o?Nt.listDescendant(c,Nt.isLi):N.from(c.childNodes).filter(Nt.isLi),!o&&Nt.isList(a.parentNode)||(i=i.map(function(t){return Nt.replace(t,"P")})),t.each(N.from(i).reverse(),function(t,e){Nt.insertAfter(e,a)});var d=N.compact([a,c,l]);t.each(d,function(e,o){var n=[o].concat(Nt.listDescendant(o,Nt.isList));t.each(n.reverse(),function(t,e){Nt.nodeLength(e)||Nt.remove(e,!0)})}),n=n.concat(i)}),n},e}(),zt=function(){function e(){this.bullet=new Bt}return e.prototype.insertTab=function(t,e){var o=Nt.createText(new Array(e+1).join(Nt.NBSP_CHAR));(t=t.deleteContents()).insertNode(o,!0),(t=Ht.create(o,e)).select()},e.prototype.insertParagraph=function(e){var o=Ht.create(e);o=(o=o.deleteContents()).wrapBodyInlineWithPara();var n,i=Nt.ancestor(o.sc,Nt.isPara);if(i){if(Nt.isEmpty(i)&&Nt.isLi(i))return void this.bullet.toggleList(i.parentNode.nodeName);if(Nt.isEmpty(i)&&Nt.isPara(i)&&Nt.isBlockquote(i.parentNode))Nt.insertAfter(i,i.parentNode),n=i;else{n=Nt.splitTree(i,o.getStartPoint());var r=Nt.listDescendant(i,Nt.isEmptyAnchor);r=r.concat(Nt.listDescendant(n,Nt.isEmptyAnchor)),t.each(r,function(t,e){Nt.remove(e)}),(Nt.isHeading(n)||Nt.isPre(n)||Nt.isCustomStyleTag(n))&&Nt.isEmpty(n)&&(n=Nt.replace(n,"p"))}}else{var s=o.sc.childNodes[o.so];n=t(Nt.emptyPara)[0],s?o.sc.insertBefore(n,s):o.sc.appendChild(n)}Ht.create(n,0).normalize().select().scrollIntoView(e)},e}(),Mt=function(t,e,o,n){var i={colPos:0,rowPos:0},r=[],s=[];function a(t,e,o,n,i,s,a){var l={baseRow:o,baseCell:n,isRowSpan:i,isColSpan:s,isVirtual:a};r[t]||(r[t]=[]),r[t][e]=l}function l(t,e){if(!r[t])return e;if(!r[t][e])return e;for(var o=e;r[t][o];)if(o++,!r[t][o])return o}function c(t,e){var o=l(t.rowIndex,e.cellIndex),n=e.colSpan>1,r=e.rowSpan>1,s=t.rowIndex===i.rowPos&&e.cellIndex===i.colPos;a(t.rowIndex,o,t,e,r,n,!1);var c=e.attributes.rowSpan?parseInt(e.attributes.rowSpan.value,10):0;if(c>1)for(var u=1;u<c;u++){var h=t.rowIndex+u;d(h,o,e,s),a(h,o,t,e,!0,n,!0)}var p=e.attributes.colSpan?parseInt(e.attributes.colSpan.value,10):0;if(p>1)for(var f=1;f<p;f++){var m=l(t.rowIndex,o+f);d(t.rowIndex,m,e,s),a(t.rowIndex,m,t,e,r,!0,!0)}}function d(t,e,o,n){t===i.rowPos&&i.colPos>=o.cellIndex&&o.cellIndex<=e&&!n&&i.colPos++}function u(t){switch(e){case Mt.where.Column:if(t.isColSpan)return Mt.resultAction.SubtractSpanCount;break;case Mt.where.Row:if(!t.isVirtual&&t.isRowSpan)return Mt.resultAction.AddCell;if(t.isRowSpan)return Mt.resultAction.SubtractSpanCount}return Mt.resultAction.RemoveCell}function h(t){switch(e){case Mt.where.Column:if(t.isColSpan)return Mt.resultAction.SumSpanCount;if(t.isRowSpan&&t.isVirtual)return Mt.resultAction.Ignore;break;case Mt.where.Row:if(t.isRowSpan)return Mt.resultAction.SumSpanCount;if(t.isColSpan&&t.isVirtual)return Mt.resultAction.Ignore}return Mt.resultAction.AddCell}this.getActionList=function(){for(var t,n,a,l=e===Mt.where.Row?i.rowPos:-1,c=e===Mt.where.Column?i.colPos:-1,d=0,p=!0;p;){var f=l>=0?l:d,m=c>=0?c:d,g=r[f];if(!g)return p=!1,s;var v=g[m];if(!v)return p=!1,s;var b=Mt.resultAction.Ignore;switch(o){case Mt.requestAction.Add:b=h(v);break;case Mt.requestAction.Delete:b=u(v)}s.push((t=b,n=f,a=m,{baseCell:v.baseCell,action:t,virtualTable:{rowIndex:n,cellIndex:a}})),d++}return s},t&&t.tagName&&("td"===t.tagName.toLowerCase()||"th"===t.tagName.toLowerCase())?(i.colPos=t.cellIndex,t.parentElement&&t.parentElement.tagName&&"tr"===t.parentElement.tagName.toLowerCase()?i.rowPos=t.parentElement.rowIndex:console.error("Impossible to identify start Row point.",t)):console.error("Impossible to identify start Cell point.",t),function(){for(var t=n.rows,e=0;e<t.length;e++)for(var o=t[e].cells,i=0;i<o.length;i++)c(t[e],o[i])}()};Mt.where={Row:0,Column:1},Mt.requestAction={Add:0,Delete:1},Mt.resultAction={Ignore:0,SubtractSpanCount:1,RemoveCell:2,AddCell:3,SumSpanCount:4};var Ot,Ut=function(){function e(){}return e.prototype.tab=function(t,e){var o=Nt.ancestor(t.commonAncestor(),Nt.isCell),n=Nt.ancestor(o,Nt.isTable),i=Nt.listDescendant(n,Nt.isCell),r=N[e?"prev":"next"](i,o);r&&Ht.create(r,0).select()},e.prototype.addRow=function(e,o){for(var n=Nt.ancestor(e.commonAncestor(),Nt.isCell),i=t(n).closest("tr"),r=this.recoverAttributes(i),s=t("<tr"+r+"></tr>"),a=new Mt(n,Mt.where.Row,Mt.requestAction.Add,t(i).closest("table")[0]).getActionList(),l=0;l<a.length;l++){var c=a[l],d=this.recoverAttributes(c.baseCell);switch(c.action){case Mt.resultAction.AddCell:s.append("<td"+d+">"+Nt.blank+"</td>");break;case Mt.resultAction.SumSpanCount:if("top"===o)if((c.baseCell.parent?c.baseCell.closest("tr").rowIndex:0)<=i[0].rowIndex){var u=t("<div></div>").append(t("<td"+d+">"+Nt.blank+"</td>").removeAttr("rowspan")).html();s.append(u);break}var h=parseInt(c.baseCell.rowSpan,10);h++,c.baseCell.setAttribute("rowSpan",h)}}if("top"===o)i.before(s);else{if(n.rowSpan>1){var p=i[0].rowIndex+(n.rowSpan-2);return void t(t(i).parent().find("tr")[p]).after(t(s))}i.after(s)}},e.prototype.addCol=function(e,o){var n=Nt.ancestor(e.commonAncestor(),Nt.isCell),i=t(n).closest("tr");t(i).siblings().push(i);for(var r=new Mt(n,Mt.where.Column,Mt.requestAction.Add,t(i).closest("table")[0]).getActionList(),s=0;s<r.length;s++){var a=r[s],l=this.recoverAttributes(a.baseCell);switch(a.action){case Mt.resultAction.AddCell:"right"===o?t(a.baseCell).after("<td"+l+">"+Nt.blank+"</td>"):t(a.baseCell).before("<td"+l+">"+Nt.blank+"</td>");break;case Mt.resultAction.SumSpanCount:if("right"===o){var c=parseInt(a.baseCell.colSpan,10);c++,a.baseCell.setAttribute("colSpan",c)}else t(a.baseCell).before("<td"+l+">"+Nt.blank+"</td>")}}},e.prototype.recoverAttributes=function(t){var e="";if(!t)return e;for(var o=t.attributes||[],n=0;n<o.length;n++)"id"!==o[n].name.toLowerCase()&&o[n].specified&&(e+=" "+o[n].name+"='"+o[n].value+"'");return e},e.prototype.deleteRow=function(e){for(var o=Nt.ancestor(e.commonAncestor(),Nt.isCell),n=t(o).closest("tr"),i=n.children("td, th").index(t(o)),r=n[0].rowIndex,s=new Mt(o,Mt.where.Row,Mt.requestAction.Delete,t(n).closest("table")[0]).getActionList(),a=0;a<s.length;a++)if(s[a]){var l=s[a].baseCell,c=s[a].virtualTable,d=l.rowSpan&&l.rowSpan>1,u=d?parseInt(l.rowSpan,10):0;switch(s[a].action){case Mt.resultAction.Ignore:continue;case Mt.resultAction.AddCell:var h=n.next("tr")[0];if(!h)continue;var p=n[0].cells[i];d&&(u>2?(u--,h.insertBefore(p,h.cells[i]),h.cells[i].setAttribute("rowSpan",u),h.cells[i].innerHTML=""):2===u&&(h.insertBefore(p,h.cells[i]),h.cells[i].removeAttribute("rowSpan"),h.cells[i].innerHTML=""));continue;case Mt.resultAction.SubtractSpanCount:d&&(u>2?(u--,l.setAttribute("rowSpan",u),c.rowIndex!==r&&l.cellIndex===i&&(l.innerHTML="")):2===u&&(l.removeAttribute("rowSpan"),c.rowIndex!==r&&l.cellIndex===i&&(l.innerHTML="")));continue;case Mt.resultAction.RemoveCell:continue}}n.remove()},e.prototype.deleteCol=function(e){for(var o=Nt.ancestor(e.commonAncestor(),Nt.isCell),n=t(o).closest("tr"),i=n.children("td, th").index(t(o)),r=new Mt(o,Mt.where.Column,Mt.requestAction.Delete,t(n).closest("table")[0]).getActionList(),s=0;s<r.length;s++)if(r[s])switch(r[s].action){case Mt.resultAction.Ignore:continue;case Mt.resultAction.SubtractSpanCount:var a=r[s].baseCell;if(a.colSpan&&a.colSpan>1){var l=a.colSpan?parseInt(a.colSpan,10):0;l>2?(l--,a.setAttribute("colSpan",l),a.cellIndex===i&&(a.innerHTML="")):2===l&&(a.removeAttribute("colSpan"),a.cellIndex===i&&(a.innerHTML=""))}continue;case Mt.resultAction.RemoveCell:Nt.remove(r[s].baseCell,!0);continue}},e.prototype.createTable=function(e,o,n){for(var i,r=[],s=0;s<e;s++)r.push("<td>"+Nt.blank+"</td>");i=r.join("");for(var a,l=[],c=0;c<o;c++)l.push("<tr>"+i+"</tr>");a=l.join("");var d=t("<table>"+a+"</table>");return n&&n.tableClassName&&d.addClass(n.tableClassName),d[0]},e.prototype.deleteTable=function(e){var o=Nt.ancestor(e.commonAncestor(),Nt.isCell);t(o).closest("table").remove()},e}(),jt=function(){function e(e){var o=this;this.context=e,this.$note=e.layoutInfo.note,this.$editor=e.layoutInfo.editor,this.$editable=e.layoutInfo.editable,this.options=e.options,this.lang=this.options.langInfo,this.editable=this.$editable[0],this.lastRange=null,this.style=new Ft,this.table=new Ut,this.typing=new zt,this.bullet=new Bt,this.history=new Dt(this.$editable),this.context.memo("help.undo",this.lang.help.undo),this.context.memo("help.redo",this.lang.help.redo),this.context.memo("help.tab",this.lang.help.tab),this.context.memo("help.untab",this.lang.help.untab),this.context.memo("help.insertParagraph",this.lang.help.insertParagraph),this.context.memo("help.insertOrderedList",this.lang.help.insertOrderedList),this.context.memo("help.insertUnorderedList",this.lang.help.insertUnorderedList),this.context.memo("help.indent",this.lang.help.indent),this.context.memo("help.outdent",this.lang.help.outdent),this.context.memo("help.formatPara",this.lang.help.formatPara),this.context.memo("help.insertHorizontalRule",this.lang.help.insertHorizontalRule),this.context.memo("help.fontName",this.lang.help.fontName);for(var n=["bold","italic","underline","strikethrough","superscript","subscript","justifyLeft","justifyCenter","justifyRight","justifyFull","formatBlock","removeFormat","backColor"],i=0,r=n.length;i<r;i++)this[n[i]]=function(t){return function(e){o.beforeCommand(),document.execCommand(t,!1,e),o.afterCommand(!0)}}(n[i]),this.context.memo("help."+n[i],this.lang.help[n[i]]);this.fontName=this.wrapCommand(function(t){return o.fontStyling("font-family","'"+t+"'")}),this.fontSize=this.wrapCommand(function(t){return o.fontStyling("font-size",t+"px")});for(i=1;i<=6;i++)this["formatH"+i]=function(t){return function(){o.formatBlock("H"+t)}}(i),this.context.memo("help.formatH"+i,this.lang.help["formatH"+i]);this.insertParagraph=this.wrapCommand(function(){o.typing.insertParagraph(o.editable)}),this.insertOrderedList=this.wrapCommand(function(){o.bullet.insertOrderedList(o.editable)}),this.insertUnorderedList=this.wrapCommand(function(){o.bullet.insertUnorderedList(o.editable)}),this.indent=this.wrapCommand(function(){o.bullet.indent(o.editable)}),this.outdent=this.wrapCommand(function(){o.bullet.outdent(o.editable)}),this.insertNode=this.wrapCommand(function(e){o.isLimited(t(e).text().length)||(o.createRange().insertNode(e),Ht.createFromNodeAfter(e).select())}),this.insertText=this.wrapCommand(function(t){if(!o.isLimited(t.length)){var e=o.createRange().insertNode(Nt.createText(t));Ht.create(e,Nt.nodeLength(e)).select()}}),this.pasteHTML=this.wrapCommand(function(t){if(!o.isLimited(t.length)){var e=o.createRange().pasteHTML(t);Ht.createFromNodeAfter(N.last(e)).select()}}),this.formatBlock=this.wrapCommand(function(t,e){var n=o.options.callbacks.onApplyCustomStyle;n?n.call(o,e,o.context,o.onFormatBlock):o.onFormatBlock(t,e)}),this.insertHorizontalRule=this.wrapCommand(function(){var t=o.createRange().insertNode(Nt.create("HR"));t.nextSibling&&Ht.create(t.nextSibling,0).normalize().select()}),this.lineHeight=this.wrapCommand(function(t){o.style.stylePara(o.createRange(),{lineHeight:t})}),this.createLink=this.wrapCommand(function(e){var n=e.url,i=e.text,r=e.isNewWindow,s=e.range||o.createRange(),a=s.toString()!==i;"string"==typeof n&&(n=n.trim()),n=o.options.onCreateLink?o.options.onCreateLink(n):/^[A-Za-z][A-Za-z0-9+-.]*\:[\/\/]?/.test(n)?n:"http://"+n;var l=[];if(a){var c=(s=s.deleteContents()).insertNode(t("<A>"+i+"</A>")[0]);l.push(c)}else l=o.style.styleNodes(s,{nodeName:"A",expandClosestSibling:!0,onlyPartialContains:!0});t.each(l,function(e,o){t(o).attr("href",n),r?t(o).attr("target","_blank"):t(o).removeAttr("target")});var d=Ht.createFromNodeBefore(N.head(l)).getStartPoint(),u=Ht.createFromNodeAfter(N.last(l)).getEndPoint();Ht.create(d.node,d.offset,u.node,u.offset).select()}),this.color=this.wrapCommand(function(t){var e=t.foreColor,o=t.backColor;e&&document.execCommand("foreColor",!1,e),o&&document.execCommand("backColor",!1,o)}),this.foreColor=this.wrapCommand(function(t){document.execCommand("styleWithCSS",!1,!0),document.execCommand("foreColor",!1,t)}),this.insertTable=this.wrapCommand(function(t){var e=t.split("x");o.createRange().deleteContents().insertNode(o.table.createTable(e[0],e[1],o.options))}),this.removeMedia=this.wrapCommand(function(){var e=t(o.restoreTarget()).parent();e.parent("figure").length?e.parent("figure").remove():e=t(o.restoreTarget()).detach(),o.context.triggerEvent("media.delete",e,o.$editable)}),this.floatMe=this.wrapCommand(function(e){var n=t(o.restoreTarget());n.toggleClass("note-float-left","left"===e),n.toggleClass("note-float-right","right"===e),n.css("float",e)}),this.resize=this.wrapCommand(function(e){t(o.restoreTarget()).css({width:100*e+"%",height:""})})}return e.prototype.initialize=function(){var t=this;this.$editable.on("keydown",function(e){if(e.keyCode===At.code.ENTER&&t.context.triggerEvent("enter",e),t.context.triggerEvent("keydown",e),e.isDefaultPrevented()||(t.options.shortcuts?t.handleKeyMap(e):t.preventDefaultEditableShortCuts(e)),t.isLimited(1,e))return!1}).on("keyup",function(e){t.context.triggerEvent("keyup",e)}).on("focus",function(e){t.context.triggerEvent("focus",e)}).on("blur",function(e){t.context.triggerEvent("blur",e)}).on("mousedown",function(e){t.context.triggerEvent("mousedown",e)}).on("mouseup",function(e){t.context.triggerEvent("mouseup",e)}).on("scroll",function(e){t.context.triggerEvent("scroll",e)}).on("paste",function(e){t.context.triggerEvent("paste",e)}),this.$editable.html(Nt.html(this.$note)||Nt.emptyPara),this.$editable.on(z.inputEventName,C.debounce(function(){t.context.triggerEvent("change",t.$editable.html())},100)),this.$editor.on("focusin",function(e){t.context.triggerEvent("focusin",e)}).on("focusout",function(e){t.context.triggerEvent("focusout",e)}),this.options.airMode||(this.options.width&&this.$editor.outerWidth(this.options.width),this.options.height&&this.$editable.outerHeight(this.options.height),this.options.maxHeight&&this.$editable.css("max-height",this.options.maxHeight),this.options.minHeight&&this.$editable.css("min-height",this.options.minHeight)),this.history.recordUndo()},e.prototype.destroy=function(){this.$editable.off()},e.prototype.handleKeyMap=function(t){var e=this.options.keyMap[z.isMac?"mac":"pc"],o=[];t.metaKey&&o.push("CMD"),t.ctrlKey&&!t.altKey&&o.push("CTRL"),t.shiftKey&&o.push("SHIFT");var n=At.nameFromCode[t.keyCode];n&&o.push(n);var i=e[o.join("+")];i?!1!==this.context.invoke(i)&&t.preventDefault():At.isEdit(t.keyCode)&&this.afterCommand()},e.prototype.preventDefaultEditableShortCuts=function(t){(t.ctrlKey||t.metaKey)&&N.contains([66,73,85],t.keyCode)&&t.preventDefault()},e.prototype.isLimited=function(t,e){return t=t||0,(void 0===e||!(At.isMove(e.keyCode)||e.ctrlKey||e.metaKey||N.contains([At.code.BACKSPACE,At.code.DELETE],e.keyCode)))&&(this.options.maxTextLength>0&&this.$editable.text().length+t>=this.options.maxTextLength)},e.prototype.createRange=function(){return this.focus(),Ht.create(this.editable)},e.prototype.saveRange=function(t){this.lastRange=this.createRange(),t&&this.lastRange.collapse().select()},e.prototype.restoreRange=function(){this.lastRange&&(this.lastRange.select(),this.focus())},e.prototype.saveTarget=function(t){this.$editable.data("target",t)},e.prototype.clearTarget=function(){this.$editable.removeData("target")},e.prototype.restoreTarget=function(){return this.$editable.data("target")},e.prototype.currentStyle=function(){var t=Ht.create();return t&&(t=t.normalize()),t?this.style.current(t):this.style.fromNode(this.$editable)},e.prototype.styleFromNode=function(t){return this.style.fromNode(t)},e.prototype.undo=function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.undo(),this.context.triggerEvent("change",this.$editable.html())},e.prototype.redo=function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.redo(),this.context.triggerEvent("change",this.$editable.html())},e.prototype.beforeCommand=function(){this.context.triggerEvent("before.command",this.$editable.html()),this.focus()},e.prototype.afterCommand=function(t){this.normalizeContent(),this.history.recordUndo(),t||this.context.triggerEvent("change",this.$editable.html())},e.prototype.tab=function(){var t=this.createRange();if(t.isCollapsed()&&t.isOnCell())this.table.tab(t);else{if(0===this.options.tabSize)return!1;this.isLimited(this.options.tabSize)||(this.beforeCommand(),this.typing.insertTab(t,this.options.tabSize),this.afterCommand())}},e.prototype.untab=function(){var t=this.createRange();if(t.isCollapsed()&&t.isOnCell())this.table.tab(t,!0);else if(0===this.options.tabSize)return!1},e.prototype.wrapCommand=function(t){var e=this;return function(){e.beforeCommand(),t.apply(e,arguments),e.afterCommand()}},e.prototype.insertImage=function(e,o){var n,i=this;return(n=e,t.Deferred(function(e){var o=t("<img>");o.one("load",function(){o.off("error abort"),e.resolve(o)}).one("error abort",function(){o.off("load").detach(),e.reject(o)}).css({display:"none"}).appendTo(document.body).attr("src",n)}).promise()).then(function(t){i.beforeCommand(),"function"==typeof o?o(t):("string"==typeof o&&t.attr("data-filename",o),t.css("width",Math.min(i.$editable.width(),t.width()))),t.show(),Ht.create(i.editable).insertNode(t[0]),Ht.createFromNodeAfter(t[0]).select(),i.afterCommand()}).fail(function(t){i.context.triggerEvent("image.upload.error",t)})},e.prototype.insertImages=function(e){var o=this;t.each(e,function(e,n){var i,r=n.name;o.options.maximumImageFileSize&&o.options.maximumImageFileSize<n.size?o.context.triggerEvent("image.upload.error",o.lang.image.maximumFileSizeError):(i=n,t.Deferred(function(e){t.extend(new FileReader,{onload:function(t){var o=t.target.result;e.resolve(o)},onerror:function(t){e.reject(t)}}).readAsDataURL(i)}).promise()).then(function(t){return o.insertImage(t,r)}).fail(function(){o.context.triggerEvent("image.upload.error")})})},e.prototype.insertImagesOrCallback=function(t){this.options.callbacks.onImageUpload?this.context.triggerEvent("image.upload",t):this.insertImages(t)},e.prototype.getSelectedText=function(){var t=this.createRange();return t.isOnAnchor()&&(t=Ht.createFromNode(Nt.ancestor(t.sc,Nt.isAnchor))),t.toString()},e.prototype.onFormatBlock=function(e,o){if(e=z.isMSIE?"<"+e+">":e,document.execCommand("FormatBlock",!1,e),o&&o.length){var n=o[0].className||"";if(n){var i=this.createRange();t([i.sc,i.ec]).closest(e).addClass(n)}}},e.prototype.formatPara=function(){this.formatBlock("P")},e.prototype.fontStyling=function(e,o){var n=this.createRange();if(n){var i=this.style.styleNodes(n);if(t(i).css(e,o),n.isCollapsed()){var r=N.head(i);r&&!Nt.nodeLength(r)&&(r.innerHTML=Nt.ZERO_WIDTH_NBSP_CHAR,Ht.createFromNodeAfter(r.firstChild).select(),this.$editable.data("bogus",r))}}},e.prototype.unlink=function(){var t=this.createRange();if(t.isOnAnchor()){var e=Nt.ancestor(t.sc,Nt.isAnchor);(t=Ht.createFromNode(e)).select(),this.beforeCommand(),document.execCommand("unlink"),this.afterCommand()}},e.prototype.getLinkInfo=function(){var e=this.createRange().expand(Nt.isAnchor),o=t(N.head(e.nodes(Nt.isAnchor))),n={range:e,text:e.toString(),url:o.length?o.attr("href"):""};return o.length&&(n.isNewWindow="_blank"===o.attr("target")),n},e.prototype.addRow=function(t){var e=this.createRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.addRow(e,t),this.afterCommand())},e.prototype.addCol=function(t){var e=this.createRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.addCol(e,t),this.afterCommand())},e.prototype.deleteRow=function(){var t=this.createRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.deleteRow(t),this.afterCommand())},e.prototype.deleteCol=function(){var t=this.createRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.deleteCol(t),this.afterCommand())},e.prototype.deleteTable=function(){var t=this.createRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.deleteTable(t),this.afterCommand())},e.prototype.resizeTo=function(t,e,o){var n;if(o){var i=t.y/t.x,r=e.data("ratio");n={width:r>i?t.x:t.y/r,height:r>i?t.x*r:t.y}}else n={width:t.x,height:t.y};e.css(n)},e.prototype.hasFocus=function(){return this.$editable.is(":focus")},e.prototype.focus=function(){this.hasFocus()||this.$editable.focus()},e.prototype.isEmpty=function(){return Nt.isEmpty(this.$editable[0])||Nt.emptyPara===this.$editable.html()},e.prototype.empty=function(){this.context.invoke("code",Nt.emptyPara)},e.prototype.normalizeContent=function(){this.$editable[0].normalize()},e}(),qt=function(){function t(t){this.context=t,this.$editable=t.layoutInfo.editable}return t.prototype.initialize=function(){this.$editable.on("paste",this.pasteByEvent.bind(this))},t.prototype.pasteByEvent=function(t){var e=t.originalEvent.clipboardData;if(e&&e.items&&e.items.length){var o=N.head(e.items);"file"===o.kind&&-1!==o.type.indexOf("image/")&&this.context.invoke("editor.insertImagesOrCallback",[o.getAsFile()]),this.context.invoke("editor.afterCommand")}},t}(),Kt=function(){function e(e){this.context=e,this.$eventListener=t(document),this.$editor=e.layoutInfo.editor,this.$editable=e.layoutInfo.editable,this.options=e.options,this.lang=this.options.langInfo,this.documentEventHandlers={},this.$dropzone=t(['<div class="note-dropzone">',' <div class="note-dropzone-message"/>',"</div>"].join("")).prependTo(this.$editor)}return e.prototype.initialize=function(){this.options.disableDragAndDrop?(this.documentEventHandlers.onDrop=function(t){t.preventDefault()},this.$eventListener=this.$dropzone,this.$eventListener.on("drop",this.documentEventHandlers.onDrop)):this.attachDragAndDropEvent()},e.prototype.attachDragAndDropEvent=function(){var e=this,o=t(),n=this.$dropzone.find(".note-dropzone-message");this.documentEventHandlers.onDragenter=function(t){var i=e.context.invoke("codeview.isActivated"),r=e.$editor.width()>0&&e.$editor.height()>0;i||o.length||!r||(e.$editor.addClass("dragover"),e.$dropzone.width(e.$editor.width()),e.$dropzone.height(e.$editor.height()),n.text(e.lang.image.dragImageHere)),o=o.add(t.target)},this.documentEventHandlers.onDragleave=function(t){(o=o.not(t.target)).length||e.$editor.removeClass("dragover")},this.documentEventHandlers.onDrop=function(){o=t(),e.$editor.removeClass("dragover")},this.$eventListener.on("dragenter",this.documentEventHandlers.onDragenter).on("dragleave",this.documentEventHandlers.onDragleave).on("drop",this.documentEventHandlers.onDrop),this.$dropzone.on("dragenter",function(){e.$dropzone.addClass("hover"),n.text(e.lang.image.dropImage)}).on("dragleave",function(){e.$dropzone.removeClass("hover"),n.text(e.lang.image.dragImageHere)}),this.$dropzone.on("drop",function(o){var n=o.originalEvent.dataTransfer;o.preventDefault(),n&&n.files&&n.files.length?(e.$editable.focus(),e.context.invoke("editor.insertImagesOrCallback",n.files)):t.each(n.types,function(o,i){var r=n.getData(i);i.toLowerCase().indexOf("text")>-1?e.context.invoke("editor.pasteHTML",r):t(r).each(function(t,o){e.context.invoke("editor.insertNode",o)})})}).on("dragover",!1)},e.prototype.destroy=function(){var t=this;Object.keys(this.documentEventHandlers).forEach(function(e){t.$eventListener.off(e.substr(2).toLowerCase(),t.documentEventHandlers[e])}),this.documentEventHandlers={}},e}();z.hasCodeMirror&&(z.isSupportAmd?require(["codemirror"],function(t){Ot=t}):Ot=window.CodeMirror);var Vt=function(){function t(t){this.context=t,this.$editor=t.layoutInfo.editor,this.$editable=t.layoutInfo.editable,this.$codable=t.layoutInfo.codable,this.options=t.options}return t.prototype.sync=function(){this.isActivated()&&z.hasCodeMirror&&this.$codable.data("cmEditor").save()},t.prototype.isActivated=function(){return this.$editor.hasClass("codeview")},t.prototype.toggle=function(){this.isActivated()?this.deactivate():this.activate(),this.context.triggerEvent("codeview.toggled")},t.prototype.activate=function(){var t=this;if(this.$codable.val(Nt.html(this.$editable,this.options.prettifyHtml)),this.$codable.height(this.$editable.height()),this.context.invoke("toolbar.updateCodeview",!0),this.$editor.addClass("codeview"),this.$codable.focus(),z.hasCodeMirror){var e=Ot.fromTextArea(this.$codable[0],this.options.codemirror);if(this.options.codemirror.tern){var o=new Ot.TernServer(this.options.codemirror.tern);e.ternServer=o,e.on("cursorActivity",function(t){o.updateArgHints(t)})}e.on("blur",function(o){t.context.triggerEvent("blur.codeview",e.getValue(),o)}),e.setSize(null,this.$editable.outerHeight()),this.$codable.data("cmEditor",e)}else this.$codable.on("blur",function(e){t.context.triggerEvent("blur.codeview",t.$codable.val(),e)})},t.prototype.deactivate=function(){if(z.hasCodeMirror){var t=this.$codable.data("cmEditor");this.$codable.val(t.getValue()),t.toTextArea()}var e=Nt.value(this.$codable,this.options.prettifyHtml)||Nt.emptyPara,o=this.$editable.html()!==e;this.$editable.html(e),this.$editable.height(this.options.height?this.$codable.height():"auto"),this.$editor.removeClass("codeview"),o&&this.context.triggerEvent("change",this.$editable.html(),this.$editable),this.$editable.focus(),this.context.invoke("toolbar.updateCodeview",!1)},t.prototype.destroy=function(){this.isActivated()&&this.deactivate()},t}(),Wt=function(){function e(e){this.$document=t(document),this.$statusbar=e.layoutInfo.statusbar,this.$editable=e.layoutInfo.editable,this.options=e.options}return e.prototype.initialize=function(){var t=this;this.options.airMode||this.options.disableResizeEditor?this.destroy():this.$statusbar.on("mousedown",function(e){e.preventDefault(),e.stopPropagation();var o=t.$editable.offset().top-t.$document.scrollTop(),n=function(e){var n=e.clientY-(o+24);n=t.options.minheight>0?Math.max(n,t.options.minheight):n,n=t.options.maxHeight>0?Math.min(n,t.options.maxHeight):n,t.$editable.height(n)};t.$document.on("mousemove",n).one("mouseup",function(){t.$document.off("mousemove",n)})})},e.prototype.destroy=function(){this.$statusbar.off(),this.$statusbar.addClass("locked")},e}(),Gt=function(){function e(e){var o=this;this.context=e,this.$editor=e.layoutInfo.editor,this.$toolbar=e.layoutInfo.toolbar,this.$editable=e.layoutInfo.editable,this.$codable=e.layoutInfo.codable,this.$window=t(window),this.$scrollbar=t("html, body"),this.onResize=function(){o.resizeTo({h:o.$window.height()-o.$toolbar.outerHeight()})}}return e.prototype.resizeTo=function(t){this.$editable.css("height",t.h),this.$codable.css("height",t.h),this.$codable.data("cmeditor")&&this.$codable.data("cmeditor").setsize(null,t.h)},e.prototype.toggle=function(){this.$editor.toggleClass("fullscreen"),this.isFullscreen()?(this.$editable.data("orgHeight",this.$editable.css("height")),this.$window.on("resize",this.onResize).trigger("resize"),this.$scrollbar.css("overflow","hidden")):(this.$window.off("resize",this.onResize),this.resizeTo({h:this.$editable.data("orgHeight")}),this.$scrollbar.css("overflow","visible")),this.context.invoke("toolbar.updateFullscreen",this.isFullscreen())},e.prototype.isFullscreen=function(){return this.$editor.hasClass("fullscreen")},e}(),_t=function(){function e(e){var o=this;this.context=e,this.$document=t(document),this.$editingArea=e.layoutInfo.editingArea,this.options=e.options,this.lang=this.options.langInfo,this.events={"summernote.mousedown":function(t,e){o.update(e.target)&&e.preventDefault()},"summernote.keyup summernote.scroll summernote.change summernote.dialog.shown":function(){o.update()},"summernote.disable":function(){o.hide()},"summernote.codeview.toggled":function(){o.update()}}}return e.prototype.initialize=function(){var e=this;this.$handle=t(['<div class="note-handle">','<div class="note-control-selection">','<div class="note-control-selection-bg"></div>','<div class="note-control-holder note-control-nw"></div>','<div class="note-control-holder note-control-ne"></div>','<div class="note-control-holder note-control-sw"></div>','<div class="',this.options.disableResizeImage?"note-control-holder":"note-control-sizing",' note-control-se"></div>',this.options.disableResizeImage?"":'<div class="note-control-selection-info"></div>',"</div>","</div>"].join("")).prependTo(this.$editingArea),this.$handle.on("mousedown",function(t){if(Nt.isControlSizing(t.target)){t.preventDefault(),t.stopPropagation();var o=e.$handle.find(".note-control-selection").data("target"),n=o.offset(),i=e.$document.scrollTop(),r=function(t){e.context.invoke("editor.resizeTo",{x:t.clientX-n.left,y:t.clientY-(n.top-i)},o,!t.shiftKey),e.update(o[0])};e.$document.on("mousemove",r).one("mouseup",function(t){t.preventDefault(),e.$document.off("mousemove",r),e.context.invoke("editor.afterCommand")}),o.data("ratio")||o.data("ratio",o.height()/o.width())}}),this.$handle.on("wheel",function(t){t.preventDefault(),e.update()})},e.prototype.destroy=function(){this.$handle.remove()},e.prototype.update=function(e){if(this.context.isDisabled())return!1;var o=Nt.isImg(e),n=this.$handle.find(".note-control-selection");if(this.context.invoke("imagePopover.update",e),o){var i=t(e),r=i.position(),s={left:r.left+parseInt(i.css("marginLeft"),10),top:r.top+parseInt(i.css("marginTop"),10)},a={w:i.outerWidth(!1),h:i.outerHeight(!1)};n.css({display:"block",left:s.left,top:s.top,width:a.w,height:a.h}).data("target",i);var l=new Image;l.src=i.attr("src");var c=a.w+"x"+a.h+" ("+this.lang.image.original+": "+l.width+"x"+l.height+")";n.find(".note-control-selection-info").text(c),this.context.invoke("editor.saveTarget",e)}else this.hide();return o},e.prototype.hide=function(){this.context.invoke("editor.clearTarget"),this.$handle.children().hide()},e}(),Zt=/^([A-Za-z][A-Za-z0-9+-.]*\:[\/\/]?|mailto:[A-Z0-9._%+-]+@)?(www\.)?(.+)$/i,Yt=function(){function e(t){var e=this;this.context=t,this.events={"summernote.keyup":function(t,o){o.isDefaultPrevented()||e.handleKeyup(o)},"summernote.keydown":function(t,o){e.handleKeydown(o)}}}return e.prototype.initialize=function(){this.lastWordRange=null},e.prototype.destroy=function(){this.lastWordRange=null},e.prototype.replace=function(){if(this.lastWordRange){var e=this.lastWordRange.toString(),o=e.match(Zt);if(o&&(o[1]||o[2])){var n=o[1]?e:"http://"+e,i=t("<a />").html(e).attr("href",n)[0];this.lastWordRange.insertNode(i),this.lastWordRange=null,this.context.invoke("editor.focus")}}},e.prototype.handleKeydown=function(t){if(N.contains([At.code.ENTER,At.code.SPACE],t.keyCode)){var e=this.context.invoke("editor.createRange").getWordRange();this.lastWordRange=e}},e.prototype.handleKeyup=function(t){N.contains([At.code.ENTER,At.code.SPACE],t.keyCode)&&this.replace()},e}(),Qt=function(){function t(t){var e=this;this.$note=t.layoutInfo.note,this.events={"summernote.change":function(){e.$note.val(t.invoke("code"))}}}return t.prototype.shouldInitialize=function(){return Nt.isTextarea(this.$note[0])},t}(),Jt=function(){function e(t){var e=this;this.context=t,this.$editingArea=t.layoutInfo.editingArea,this.options=t.options,this.events={"summernote.init summernote.change":function(){e.update()},"summernote.codeview.toggled":function(){e.update()}}}return e.prototype.shouldInitialize=function(){return!!this.options.placeholder},e.prototype.initialize=function(){var e=this;this.$placeholder=t('<div class="note-placeholder">'),this.$placeholder.on("click",function(){e.context.invoke("focus")}).text(this.options.placeholder).prependTo(this.$editingArea),this.update()},e.prototype.destroy=function(){this.$placeholder.remove()},e.prototype.update=function(){var t=!this.context.invoke("codeview.isActivated")&&this.context.invoke("editor.isEmpty");this.$placeholder.toggle(t)},e}(),Xt=function(){function e(e){this.ui=t.summernote.ui,this.context=e,this.$toolbar=e.layoutInfo.toolbar,this.options=e.options,this.lang=this.options.langInfo,this.invertedKeyMap=C.invertObject(this.options.keyMap[z.isMac?"mac":"pc"])}return e.prototype.representShortcut=function(t){var e=this.invertedKeyMap[t];return this.options.shortcuts&&e?(z.isMac&&(e=e.replace("CMD","⌘").replace("SHIFT","⇧"))," ("+(e=e.replace("BACKSLASH","\\").replace("SLASH","/").replace("LEFTBRACKET","[").replace("RIGHTBRACKET","]"))+")"):""},e.prototype.button=function(t){return!this.options.tooltip&&t.tooltip&&delete t.tooltip,t.container=this.options.container,this.ui.button(t)},e.prototype.initialize=function(){this.addToolbarButtons(),this.addImagePopoverButtons(),this.addLinkPopoverButtons(),this.addTablePopoverButtons(),this.fontInstalledMap={}},e.prototype.destroy=function(){delete this.fontInstalledMap},e.prototype.isFontInstalled=function(t){return this.fontInstalledMap.hasOwnProperty(t)||(this.fontInstalledMap[t]=z.isFontInstalled(t)||N.contains(this.options.fontNamesIgnoreCheck,t)),this.fontInstalledMap[t]},e.prototype.isFontDeservedToAdd=function(e){return""!==(e=e.toLowerCase())&&this.isFontInstalled(e)&&-1===t.inArray(e,["sans-serif","serif","monospace","cursive","fantasy"])},e.prototype.addToolbarButtons=function(){var e=this;this.context.memo("button.style",function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.magic),e.options),tooltip:e.lang.style.style,data:{toggle:"dropdown"}}),e.ui.dropdown({className:"dropdown-style",items:e.options.styleTags,title:e.lang.style.style,template:function(t){"string"==typeof t&&(t={tag:t,title:e.lang.style.hasOwnProperty(t)?e.lang.style[t]:t});var o=t.tag,n=t.title;return"<"+o+(t.style?' style="'+t.style+'" ':"")+(t.className?' class="'+t.className+'"':"")+">"+n+"</"+o+">"},click:e.context.createInvokeHandler("editor.formatBlock")})]).render()});for(var o=function(t,o){var i=n.options.styleTags[t];n.context.memo("button.style."+i,function(){return e.button({className:"note-btn-style-"+i,contents:'<div data-value="'+i+'">'+i.toUpperCase()+"</div>",tooltip:e.lang.style[i],click:e.context.createInvokeHandler("editor.formatBlock")}).render()})},n=this,i=0,r=this.options.styleTags.length;i<r;i++)o(i);this.context.memo("button.bold",function(){return e.button({className:"note-btn-bold",contents:e.ui.icon(e.options.icons.bold),tooltip:e.lang.font.bold+e.representShortcut("bold"),click:e.context.createInvokeHandlerAndUpdateState("editor.bold")}).render()}),this.context.memo("button.italic",function(){return e.button({className:"note-btn-italic",contents:e.ui.icon(e.options.icons.italic),tooltip:e.lang.font.italic+e.representShortcut("italic"),click:e.context.createInvokeHandlerAndUpdateState("editor.italic")}).render()}),this.context.memo("button.underline",function(){return e.button({className:"note-btn-underline",contents:e.ui.icon(e.options.icons.underline),tooltip:e.lang.font.underline+e.representShortcut("underline"),click:e.context.createInvokeHandlerAndUpdateState("editor.underline")}).render()}),this.context.memo("button.clear",function(){return e.button({contents:e.ui.icon(e.options.icons.eraser),tooltip:e.lang.font.clear+e.representShortcut("removeFormat"),click:e.context.createInvokeHandler("editor.removeFormat")}).render()}),this.context.memo("button.strikethrough",function(){return e.button({className:"note-btn-strikethrough",contents:e.ui.icon(e.options.icons.strikethrough),tooltip:e.lang.font.strikethrough+e.representShortcut("strikethrough"),click:e.context.createInvokeHandlerAndUpdateState("editor.strikethrough")}).render()}),this.context.memo("button.superscript",function(){return e.button({className:"note-btn-superscript",contents:e.ui.icon(e.options.icons.superscript),tooltip:e.lang.font.superscript,click:e.context.createInvokeHandlerAndUpdateState("editor.superscript")}).render()}),this.context.memo("button.subscript",function(){return e.button({className:"note-btn-subscript",contents:e.ui.icon(e.options.icons.subscript),tooltip:e.lang.font.subscript,click:e.context.createInvokeHandlerAndUpdateState("editor.subscript")}).render()}),this.context.memo("button.fontname",function(){var o=e.context.invoke("editor.currentStyle");return t.each(o["font-family"].split(","),function(o,n){n=n.trim().replace(/['"]+/g,""),e.isFontDeservedToAdd(n)&&-1===t.inArray(n,e.options.fontNames)&&e.options.fontNames.push(n)}),e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents('<span class="note-current-fontname"/>',e.options),tooltip:e.lang.font.name,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({className:"dropdown-fontname",checkClassName:e.options.icons.menuCheck,items:e.options.fontNames.filter(e.isFontInstalled.bind(e)),title:e.lang.font.name,template:function(t){return"<span style=\"font-family: '"+t+"'\">"+t+"</span>"},click:e.context.createInvokeHandlerAndUpdateState("editor.fontName")})]).render()}),this.context.memo("button.fontsize",function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents('<span class="note-current-fontsize"/>',e.options),tooltip:e.lang.font.size,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({className:"dropdown-fontsize",checkClassName:e.options.icons.menuCheck,items:e.options.fontSizes,title:e.lang.font.size,click:e.context.createInvokeHandlerAndUpdateState("editor.fontSize")})]).render()}),this.context.memo("button.color",function(){return e.ui.buttonGroup({className:"note-color",children:[e.button({className:"note-current-color-button",contents:e.ui.icon(e.options.icons.font+" note-recent-color"),tooltip:e.lang.color.recent,click:function(o){var n=t(o.currentTarget);e.context.invoke("editor.color",{backColor:n.attr("data-backColor"),foreColor:n.attr("data-foreColor")})},callback:function(t){t.find(".note-recent-color").css("background-color","#FFFF00"),t.attr("data-backColor","#FFFF00")}}),e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents("",e.options),tooltip:e.lang.color.more,data:{toggle:"dropdown"}}),e.ui.dropdown({items:['<div class="note-palette">',' <div class="note-palette-title">'+e.lang.color.background+"</div>"," <div>",' <button type="button" class="note-color-reset btn btn-light" data-event="backColor" data-value="inherit">',e.lang.color.transparent," </button>"," </div>",' <div class="note-holder" data-event="backColor"/>',"</div>",'<div class="note-palette">',' <div class="note-palette-title">'+e.lang.color.foreground+"</div>"," <div>",' <button type="button" class="note-color-reset btn btn-light" data-event="removeFormat" data-value="foreColor">',e.lang.color.resetToDefault," </button>"," </div>",' <div class="note-holder" data-event="foreColor"/>',"</div>"].join(""),callback:function(o){o.find(".note-holder").each(function(o,n){var i=t(n);i.append(e.ui.palette({colors:e.options.colors,colorsName:e.options.colorsName,eventName:i.data("event"),container:e.options.container,tooltip:e.options.tooltip}).render())})},click:function(o){var n=t(o.target),i=n.data("event"),r=n.data("value");if(i&&r){var s="backColor"===i?"background-color":"color",a=n.closest(".note-color").find(".note-recent-color"),l=n.closest(".note-color").find(".note-current-color-button");a.css(s,r),l.attr("data-"+i,r),e.context.invoke("editor."+i,r)}}})]}).render()}),this.context.memo("button.ul",function(){return e.button({contents:e.ui.icon(e.options.icons.unorderedlist),tooltip:e.lang.lists.unordered+e.representShortcut("insertUnorderedList"),click:e.context.createInvokeHandler("editor.insertUnorderedList")}).render()}),this.context.memo("button.ol",function(){return e.button({contents:e.ui.icon(e.options.icons.orderedlist),tooltip:e.lang.lists.ordered+e.representShortcut("insertOrderedList"),click:e.context.createInvokeHandler("editor.insertOrderedList")}).render()});var s=this.button({contents:this.ui.icon(this.options.icons.alignLeft),tooltip:this.lang.paragraph.left+this.representShortcut("justifyLeft"),click:this.context.createInvokeHandler("editor.justifyLeft")}),a=this.button({contents:this.ui.icon(this.options.icons.alignCenter),tooltip:this.lang.paragraph.center+this.representShortcut("justifyCenter"),click:this.context.createInvokeHandler("editor.justifyCenter")}),l=this.button({contents:this.ui.icon(this.options.icons.alignRight),tooltip:this.lang.paragraph.right+this.representShortcut("justifyRight"),click:this.context.createInvokeHandler("editor.justifyRight")}),c=this.button({contents:this.ui.icon(this.options.icons.alignJustify),tooltip:this.lang.paragraph.justify+this.representShortcut("justifyFull"),click:this.context.createInvokeHandler("editor.justifyFull")}),d=this.button({contents:this.ui.icon(this.options.icons.outdent),tooltip:this.lang.paragraph.outdent+this.representShortcut("outdent"),click:this.context.createInvokeHandler("editor.outdent")}),u=this.button({contents:this.ui.icon(this.options.icons.indent),tooltip:this.lang.paragraph.indent+this.representShortcut("indent"),click:this.context.createInvokeHandler("editor.indent")});this.context.memo("button.justifyLeft",C.invoke(s,"render")),this.context.memo("button.justifyCenter",C.invoke(a,"render")),this.context.memo("button.justifyRight",C.invoke(l,"render")),this.context.memo("button.justifyFull",C.invoke(c,"render")),this.context.memo("button.outdent",C.invoke(d,"render")),this.context.memo("button.indent",C.invoke(u,"render")),this.context.memo("button.paragraph",function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.alignLeft),e.options),tooltip:e.lang.paragraph.paragraph,data:{toggle:"dropdown"}}),e.ui.dropdown([e.ui.buttonGroup({className:"note-align",children:[s,a,l,c]}),e.ui.buttonGroup({className:"note-list",children:[d,u]})])]).render()}),this.context.memo("button.height",function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.textHeight),e.options),tooltip:e.lang.font.height,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({items:e.options.lineHeights,checkClassName:e.options.icons.menuCheck,className:"dropdown-line-height",title:e.lang.font.height,click:e.context.createInvokeHandler("editor.lineHeight")})]).render()}),this.context.memo("button.table",function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.table),e.options),tooltip:e.lang.table.table,data:{toggle:"dropdown"}}),e.ui.dropdown({title:e.lang.table.table,className:"note-table",items:['<div class="note-dimension-picker">',' <div class="note-dimension-picker-mousecatcher" data-event="insertTable" data-value="1x1"/>',' <div class="note-dimension-picker-highlighted"/>',' <div class="note-dimension-picker-unhighlighted"/>',"</div>",'<div class="note-dimension-display">1 x 1</div>'].join("")})],{callback:function(t){t.find(".note-dimension-picker-mousecatcher").css({width:e.options.insertTableMaxSize.col+"em",height:e.options.insertTableMaxSize.row+"em"}).mousedown(e.context.createInvokeHandler("editor.insertTable")).on("mousemove",e.tableMoveHandler.bind(e))}}).render()}),this.context.memo("button.link",function(){return e.button({contents:e.ui.icon(e.options.icons.link),tooltip:e.lang.link.link+e.representShortcut("linkDialog.show"),click:e.context.createInvokeHandler("linkDialog.show")}).render()}),this.context.memo("button.picture",function(){return e.button({contents:e.ui.icon(e.options.icons.picture),tooltip:e.lang.image.image,click:e.context.createInvokeHandler("imageDialog.show")}).render()}),this.context.memo("button.video",function(){return e.button({contents:e.ui.icon(e.options.icons.video),tooltip:e.lang.video.video,click:e.context.createInvokeHandler("videoDialog.show")}).render()}),this.context.memo("button.hr",function(){return e.button({contents:e.ui.icon(e.options.icons.minus),tooltip:e.lang.hr.insert+e.representShortcut("insertHorizontalRule"),click:e.context.createInvokeHandler("editor.insertHorizontalRule")}).render()}),this.context.memo("button.fullscreen",function(){return e.button({className:"btn-fullscreen",contents:e.ui.icon(e.options.icons.arrowsAlt),tooltip:e.lang.options.fullscreen,click:e.context.createInvokeHandler("fullscreen.toggle")}).render()}),this.context.memo("button.codeview",function(){return e.button({className:"btn-codeview",contents:e.ui.icon(e.options.icons.code),tooltip:e.lang.options.codeview,click:e.context.createInvokeHandler("codeview.toggle")}).render()}),this.context.memo("button.redo",function(){return e.button({contents:e.ui.icon(e.options.icons.redo),tooltip:e.lang.history.redo+e.representShortcut("redo"),click:e.context.createInvokeHandler("editor.redo")}).render()}),this.context.memo("button.undo",function(){return e.button({contents:e.ui.icon(e.options.icons.undo),tooltip:e.lang.history.undo+e.representShortcut("undo"),click:e.context.createInvokeHandler("editor.undo")}).render()}),this.context.memo("button.help",function(){return e.button({contents:e.ui.icon(e.options.icons.question),tooltip:e.lang.options.help,click:e.context.createInvokeHandler("helpDialog.show")}).render()})},e.prototype.addImagePopoverButtons=function(){var t=this;this.context.memo("button.imageSize100",function(){return t.button({contents:'<span class="note-fontsize-10">100%</span>',tooltip:t.lang.image.resizeFull,click:t.context.createInvokeHandler("editor.resize","1")}).render()}),this.context.memo("button.imageSize50",function(){return t.button({contents:'<span class="note-fontsize-10">50%</span>',tooltip:t.lang.image.resizeHalf,click:t.context.createInvokeHandler("editor.resize","0.5")}).render()}),this.context.memo("button.imageSize25",function(){return t.button({contents:'<span class="note-fontsize-10">25%</span>',tooltip:t.lang.image.resizeQuarter,click:t.context.createInvokeHandler("editor.resize","0.25")}).render()}),this.context.memo("button.floatLeft",function(){return t.button({contents:t.ui.icon(t.options.icons.alignLeft),tooltip:t.lang.image.floatLeft,click:t.context.createInvokeHandler("editor.floatMe","left")}).render()}),this.context.memo("button.floatRight",function(){return t.button({contents:t.ui.icon(t.options.icons.alignRight),tooltip:t.lang.image.floatRight,click:t.context.createInvokeHandler("editor.floatMe","right")}).render()}),this.context.memo("button.floatNone",function(){return t.button({contents:t.ui.icon(t.options.icons.alignJustify),tooltip:t.lang.image.floatNone,click:t.context.createInvokeHandler("editor.floatMe","none")}).render()}),this.context.memo("button.removeMedia",function(){return t.button({contents:t.ui.icon(t.options.icons.trash),tooltip:t.lang.image.remove,click:t.context.createInvokeHandler("editor.removeMedia")}).render()})},e.prototype.addLinkPopoverButtons=function(){var t=this;this.context.memo("button.linkDialogShow",function(){return t.button({contents:t.ui.icon(t.options.icons.link),tooltip:t.lang.link.edit,click:t.context.createInvokeHandler("linkDialog.show")}).render()}),this.context.memo("button.unlink",function(){return t.button({contents:t.ui.icon(t.options.icons.unlink),tooltip:t.lang.link.unlink,click:t.context.createInvokeHandler("editor.unlink")}).render()})},e.prototype.addTablePopoverButtons=function(){var t=this;this.context.memo("button.addRowUp",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.rowAbove),tooltip:t.lang.table.addRowAbove,click:t.context.createInvokeHandler("editor.addRow","top")}).render()}),this.context.memo("button.addRowDown",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.rowBelow),tooltip:t.lang.table.addRowBelow,click:t.context.createInvokeHandler("editor.addRow","bottom")}).render()}),this.context.memo("button.addColLeft",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.colBefore),tooltip:t.lang.table.addColLeft,click:t.context.createInvokeHandler("editor.addCol","left")}).render()}),this.context.memo("button.addColRight",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.colAfter),tooltip:t.lang.table.addColRight,click:t.context.createInvokeHandler("editor.addCol","right")}).render()}),this.context.memo("button.deleteRow",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.rowRemove),tooltip:t.lang.table.delRow,click:t.context.createInvokeHandler("editor.deleteRow")}).render()}),this.context.memo("button.deleteCol",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.colRemove),tooltip:t.lang.table.delCol,click:t.context.createInvokeHandler("editor.deleteCol")}).render()}),this.context.memo("button.deleteTable",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.trash),tooltip:t.lang.table.delTable,click:t.context.createInvokeHandler("editor.deleteTable")}).render()})},e.prototype.build=function(e,o){for(var n=0,i=o.length;n<i;n++){for(var r=o[n],s=t.isArray(r)?r[0]:r,a=t.isArray(r)?1===r.length?[r[0]]:r[1]:[r],l=this.ui.buttonGroup({className:"note-"+s}).render(),c=0,d=a.length;c<d;c++){var u=this.context.memo("button."+a[c]);u&&l.append("function"==typeof u?u(this.context):u)}l.appendTo(e)}},e.prototype.updateCurrentStyle=function(e){var o=this,n=e||this.$toolbar,i=this.context.invoke("editor.currentStyle");if(this.updateBtnStates(n,{".note-btn-bold":function(){return"bold"===i["font-bold"]},".note-btn-italic":function(){return"italic"===i["font-italic"]},".note-btn-underline":function(){return"underline"===i["font-underline"]},".note-btn-subscript":function(){return"subscript"===i["font-subscript"]},".note-btn-superscript":function(){return"superscript"===i["font-superscript"]},".note-btn-strikethrough":function(){return"strikethrough"===i["font-strikethrough"]}}),i["font-family"]){var r=i["font-family"].split(",").map(function(t){return t.replace(/[\'\"]/g,"").replace(/\s+$/,"").replace(/^\s+/,"")}),s=N.find(r,this.isFontInstalled.bind(this));n.find(".dropdown-fontname a").each(function(e,o){var n=t(o),i=n.data("value")+""==s+"";n.toggleClass("checked",i)}),n.find(".note-current-fontname").text(s).css("font-family",s)}if(i["font-size"]){var a=i["font-size"];n.find(".dropdown-fontsize a").each(function(e,o){var n=t(o),i=n.data("value")+""==a+"";n.toggleClass("checked",i)}),n.find(".note-current-fontsize").text(a)}if(i["line-height"]){var l=i["line-height"];n.find(".dropdown-line-height li a").each(function(e,n){var i=t(n).data("value")+""==l+"";o.className=i?"checked":""})}},e.prototype.updateBtnStates=function(e,o){var n=this;t.each(o,function(t,o){n.ui.toggleBtnActive(e.find(t),o())})},e.prototype.tableMoveHandler=function(e){var o,n=t(e.target.parentNode),i=n.next(),r=n.find(".note-dimension-picker-mousecatcher"),s=n.find(".note-dimension-picker-highlighted"),a=n.find(".note-dimension-picker-unhighlighted");if(void 0===e.offsetX){var l=t(e.target).offset();o={x:e.pageX-l.left,y:e.pageY-l.top}}else o={x:e.offsetX,y:e.offsetY};var c=Math.ceil(o.x/18)||1,d=Math.ceil(o.y/18)||1;s.css({width:c+"em",height:d+"em"}),r.data("value",c+"x"+d),c>3&&c<this.options.insertTableMaxSize.col&&a.css({width:c+1+"em"}),d>3&&d<this.options.insertTableMaxSize.row&&a.css({height:d+1+"em"}),i.html(c+" x "+d)},e}(),te=function(){function e(e){this.context=e,this.$window=t(window),this.$document=t(document),this.ui=t.summernote.ui,this.$note=e.layoutInfo.note,this.$editor=e.layoutInfo.editor,this.$toolbar=e.layoutInfo.toolbar,this.options=e.options,this.followScroll=this.followScroll.bind(this)}return e.prototype.shouldInitialize=function(){return!this.options.airMode},e.prototype.initialize=function(){var t=this;this.options.toolbar=this.options.toolbar||[],this.options.toolbar.length?this.context.invoke("buttons.build",this.$toolbar,this.options.toolbar):this.$toolbar.hide(),this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer),this.changeContainer(!1),this.$note.on("summernote.keyup summernote.mouseup summernote.change",function(){t.context.invoke("buttons.updateCurrentStyle")}),this.context.invoke("buttons.updateCurrentStyle"),this.options.followingToolbar&&this.$window.on("scroll resize",this.followScroll)},e.prototype.destroy=function(){this.$toolbar.children().remove(),this.options.followingToolbar&&this.$window.off("scroll resize",this.followScroll)},e.prototype.followScroll=function(){if(this.$editor.hasClass("fullscreen"))return!1;var e=this.$toolbar.parent(".note-toolbar-wrapper"),o=this.$editor.outerHeight(),n=this.$editor.width(),i=this.$toolbar.height();e.css({height:i});var r=0;this.options.otherStaticBar&&(r=t(this.options.otherStaticBar).outerHeight());var s=this.$document.scrollTop(),a=this.$editor.offset().top;s>a-r&&s<a+o-r-i?this.$toolbar.css({position:"fixed",top:r,width:n}):this.$toolbar.css({position:"relative",top:0,width:"100%"})},e.prototype.changeContainer=function(t){t?this.$toolbar.prependTo(this.$editor):this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer)},e.prototype.updateFullscreen=function(t){this.ui.toggleBtnActive(this.$toolbar.find(".btn-fullscreen"),t),this.changeContainer(t)},e.prototype.updateCodeview=function(t){this.ui.toggleBtnActive(this.$toolbar.find(".btn-codeview"),t),t?this.deactivate():this.activate()},e.prototype.activate=function(t){var e=this.$toolbar.find("button");t||(e=e.not(".btn-codeview")),this.ui.toggleBtn(e,!0)},e.prototype.deactivate=function(t){var e=this.$toolbar.find("button");t||(e=e.not(".btn-codeview")),this.ui.toggleBtn(e,!1)},e}(),ee=function(){function e(e){this.context=e,this.ui=t.summernote.ui,this.$body=t(document.body),this.$editor=e.layoutInfo.editor,this.options=e.options,this.lang=this.options.langInfo,e.memo("help.linkDialog.show",this.options.langInfo.help["linkDialog.show"])}return e.prototype.initialize=function(){var e=this.options.dialogsInBody?this.$body:this.$editor,o=['<div class="form-group note-form-group">','<label class="note-form-label">'+this.lang.link.textToDisplay+"</label>",'<input class="note-link-text form-control note-form-control note-input" type="text" />',"</div>",'<div class="form-group note-form-group">','<label class="note-form-label">'+this.lang.link.url+"</label>",'<input class="note-link-url form-control note-form-control note-input" type="text" value="http://" />',"</div>",this.options.disableLinkTarget?"":t("<div/>").append(this.ui.checkbox({id:"sn-checkbox-open-in-new-window",text:this.lang.link.openInNewWindow,checked:!0}).render()).html()].join(""),n='<button type="submit" href="#" class="btn btn-primary note-btn note-btn-primary note-link-btn" disabled>'+this.lang.link.insert+"</button>";this.$dialog=this.ui.dialog({className:"link-dialog",title:this.lang.link.insert,fade:this.options.dialogsFade,body:o,footer:n}).render().appendTo(e)},e.prototype.destroy=function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()},e.prototype.bindEnterKey=function(t,e){t.on("keypress",function(t){t.keyCode===At.code.ENTER&&(t.preventDefault(),e.trigger("click"))})},e.prototype.toggleLinkBtn=function(t,e,o){this.ui.toggleBtn(t,e.val()&&o.val())},e.prototype.showLinkDialog=function(e){var o=this;return t.Deferred(function(t){var n=o.$dialog.find(".note-link-text"),i=o.$dialog.find(".note-link-url"),r=o.$dialog.find(".note-link-btn"),s=o.$dialog.find("input[type=checkbox]");o.ui.onDialogShown(o.$dialog,function(){o.context.triggerEvent("dialog.shown"),e.url||(e.url=e.text),n.val(e.text);var a=function(){o.toggleLinkBtn(r,n,i),e.text=n.val()};n.on("input",a).on("paste",function(){setTimeout(a,0)});var l=function(){o.toggleLinkBtn(r,n,i),e.text||n.val(i.val())};i.on("input",l).on("paste",function(){setTimeout(l,0)}).val(e.url),z.isSupportTouch||i.trigger("focus"),o.toggleLinkBtn(r,n,i),o.bindEnterKey(i,r),o.bindEnterKey(n,r);var c=void 0!==e.isNewWindow?e.isNewWindow:o.context.options.linkTargetBlank;s.prop("checked",c),r.one("click",function(r){r.preventDefault(),t.resolve({range:e.range,url:i.val(),text:n.val(),isNewWindow:s.is(":checked")}),o.ui.hideDialog(o.$dialog)})}),o.ui.onDialogHidden(o.$dialog,function(){n.off("input paste keypress"),i.off("input paste keypress"),r.off("click"),"pending"===t.state()&&t.reject()}),o.ui.showDialog(o.$dialog)}).promise()},e.prototype.show=function(){var t=this,e=this.context.invoke("editor.getLinkInfo");this.context.invoke("editor.saveRange"),this.showLinkDialog(e).then(function(e){t.context.invoke("editor.restoreRange"),t.context.invoke("editor.createLink",e)}).fail(function(){t.context.invoke("editor.restoreRange")})},e}(),oe=function(){function e(e){var o=this;this.context=e,this.ui=t.summernote.ui,this.options=e.options,this.events={"summernote.keyup summernote.mouseup summernote.change summernote.scroll":function(){o.update()},"summernote.disable summernote.dialog.shown":function(){o.hide()}}}return e.prototype.shouldInitialize=function(){return!N.isEmpty(this.options.popover.link)},e.prototype.initialize=function(){this.$popover=this.ui.popover({className:"note-link-popover",callback:function(t){t.find(".popover-content,.note-popover-content").prepend('<span><a target="_blank"></a> </span>')}}).render().appendTo(this.options.container);var t=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",t,this.options.popover.link)},e.prototype.destroy=function(){this.$popover.remove()},e.prototype.update=function(){if(this.context.invoke("editor.hasFocus")){var e=this.context.invoke("editor.createRange");if(e.isCollapsed()&&e.isOnAnchor()){var o=Nt.ancestor(e.sc,Nt.isAnchor),n=t(o).attr("href");this.$popover.find("a").attr("href",n).html(n);var i=Nt.posFromPlaceholder(o);this.$popover.css({display:"block",left:i.left,top:i.top})}else this.hide()}else this.hide()},e.prototype.hide=function(){this.$popover.hide()},e}(),ne=function(){function e(e){this.context=e,this.ui=t.summernote.ui,this.$body=t(document.body),this.$editor=e.layoutInfo.editor,this.options=e.options,this.lang=this.options.langInfo}return e.prototype.initialize=function(){var t=this.options.dialogsInBody?this.$body:this.$editor,e="";if(this.options.maximumImageFileSize){var o=Math.floor(Math.log(this.options.maximumImageFileSize)/Math.log(1024)),n=1*(this.options.maximumImageFileSize/Math.pow(1024,o)).toFixed(2)+" "+" KMGTP"[o]+"B";e="<small>"+this.lang.image.maximumFileSize+" : "+n+"</small>"}var i=['<div class="form-group note-form-group note-group-select-from-files">','<label class="note-form-label">'+this.lang.image.selectFromFiles+"</label>",'<input class="note-image-input note-form-control note-input" ',' type="file" name="files" accept="image/*" multiple="multiple" />',e,"</div>",'<div class="form-group note-group-image-url" style="overflow:auto;">','<label class="note-form-label">'+this.lang.image.url+"</label>",'<input class="note-image-url form-control note-form-control note-input ',' col-md-12" type="text" />',"</div>"].join(""),r='<button type="submit" href="#" class="btn btn-primary note-btn note-btn-primary note-image-btn" disabled>'+this.lang.image.insert+"</button>";this.$dialog=this.ui.dialog({title:this.lang.image.insert,fade:this.options.dialogsFade,body:i,footer:r}).render().appendTo(t)},e.prototype.destroy=function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()},e.prototype.bindEnterKey=function(t,e){t.on("keypress",function(t){t.keyCode===At.code.ENTER&&(t.preventDefault(),e.trigger("click"))})},e.prototype.show=function(){var t=this;this.context.invoke("editor.saveRange"),this.showImageDialog().then(function(e){t.ui.hideDialog(t.$dialog),t.context.invoke("editor.restoreRange"),"string"==typeof e?t.context.invoke("editor.insertImage",e):t.context.invoke("editor.insertImagesOrCallback",e)}).fail(function(){t.context.invoke("editor.restoreRange")})},e.prototype.showImageDialog=function(){var e=this;return t.Deferred(function(t){var o=e.$dialog.find(".note-image-input"),n=e.$dialog.find(".note-image-url"),i=e.$dialog.find(".note-image-btn");e.ui.onDialogShown(e.$dialog,function(){e.context.triggerEvent("dialog.shown"),o.replaceWith(o.clone().on("change",function(e){t.resolve(e.target.files||e.target.value)}).val("")),i.click(function(e){e.preventDefault(),t.resolve(n.val())}),n.on("keyup paste",function(){var t=n.val();e.ui.toggleBtn(i,t)}).val(""),z.isSupportTouch||n.trigger("focus"),e.bindEnterKey(n,i)}),e.ui.onDialogHidden(e.$dialog,function(){o.off("change"),n.off("keyup paste keypress"),i.off("click"),"pending"===t.state()&&t.reject()}),e.ui.showDialog(e.$dialog)})},e}(),ie=function(){function e(e){var o=this;this.context=e,this.ui=t.summernote.ui,this.editable=e.layoutInfo.editable[0],this.options=e.options,this.events={"summernote.disable":function(){o.hide()}}}return e.prototype.shouldInitialize=function(){return!N.isEmpty(this.options.popover.image)},e.prototype.initialize=function(){this.$popover=this.ui.popover({className:"note-image-popover"}).render().appendTo(this.options.container);var t=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",t,this.options.popover.image)},e.prototype.destroy=function(){this.$popover.remove()},e.prototype.update=function(t){if(Nt.isImg(t)){var e=Nt.posFromPlaceholder(t),o=Nt.posFromPlaceholder(this.editable);this.$popover.css({display:"block",left:this.options.popatmouse?event.pageX-20:e.left,top:this.options.popatmouse?event.pageY:Math.min(e.top,o.top)})}else this.hide()},e.prototype.hide=function(){this.$popover.hide()},e}(),re=function(){function e(e){var o=this;this.context=e,this.ui=t.summernote.ui,this.options=e.options,this.events={"summernote.mousedown":function(t,e){o.update(e.target)},"summernote.keyup summernote.scroll summernote.change":function(){o.update()},"summernote.disable":function(){o.hide()}}}return e.prototype.shouldInitialize=function(){return!N.isEmpty(this.options.popover.table)},e.prototype.initialize=function(){this.$popover=this.ui.popover({className:"note-table-popover"}).render().appendTo(this.options.container);var t=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",t,this.options.popover.table),z.isFF&&document.execCommand("enableInlineTableEditing",!1,!1)},e.prototype.destroy=function(){this.$popover.remove()},e.prototype.update=function(t){if(this.context.isDisabled())return!1;var e=Nt.isCell(t);if(e){var o=Nt.posFromPlaceholder(t);this.$popover.css({display:"block",left:o.left,top:o.top})}else this.hide();return e},e.prototype.hide=function(){this.$popover.hide()},e}(),se=function(){function e(e){this.context=e,this.ui=t.summernote.ui,this.$body=t(document.body),this.$editor=e.layoutInfo.editor,this.options=e.options,this.lang=this.options.langInfo}return e.prototype.initialize=function(){var t=this.options.dialogsInBody?this.$body:this.$editor,e=['<div class="form-group note-form-group row-fluid">','<label class="note-form-label">'+this.lang.video.url+' <small class="text-muted">'+this.lang.video.providers+"</small></label>",'<input class="note-video-url form-control note-form-control note-input" type="text" />',"</div>"].join(""),o='<button type="submit" href="#" class="btn btn-primary note-btn note-btn-primary note-video-btn" disabled>'+this.lang.video.insert+"</button>";this.$dialog=this.ui.dialog({title:this.lang.video.insert,fade:this.options.dialogsFade,body:e,footer:o}).render().appendTo(t)},e.prototype.destroy=function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()},e.prototype.bindEnterKey=function(t,e){t.on("keypress",function(t){t.keyCode===At.code.ENTER&&(t.preventDefault(),e.trigger("click"))})},e.prototype.createVideoNode=function(e){var o,n=e.match(/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/),i=e.match(/(?:www\.|\/\/)instagram\.com\/p\/(.[a-zA-Z0-9_-]*)/),r=e.match(/\/\/vine\.co\/v\/([a-zA-Z0-9]+)/),s=e.match(/\/\/(player\.)?vimeo\.com\/([a-z]*\/)*(\d+)[?]?.*/),a=e.match(/.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/),l=e.match(/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/),c=e.match(/\/\/v\.qq\.com.*?vid=(.+)/),d=e.match(/\/\/v\.qq\.com\/x?\/?(page|cover).*?\/([^\/]+)\.html\??.*/),u=e.match(/^.+.(mp4|m4v)$/),h=e.match(/^.+.(ogg|ogv)$/),p=e.match(/^.+.(webm)$/);if(n&&11===n[1].length){var f=n[1];o=t("<iframe>").attr("frameborder",0).attr("src","//www.youtube.com/embed/"+f).attr("width","640").attr("height","360")}else if(i&&i[0].length)o=t("<iframe>").attr("frameborder",0).attr("src","https://instagram.com/p/"+i[1]+"/embed/").attr("width","612").attr("height","710").attr("scrolling","no").attr("allowtransparency","true");else if(r&&r[0].length)o=t("<iframe>").attr("frameborder",0).attr("src",r[0]+"/embed/simple").attr("width","600").attr("height","600").attr("class","vine-embed");else if(s&&s[3].length)o=t("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("src","//player.vimeo.com/video/"+s[3]).attr("width","640").attr("height","360");else if(a&&a[2].length)o=t("<iframe>").attr("frameborder",0).attr("src","//www.dailymotion.com/embed/video/"+a[2]).attr("width","640").attr("height","360");else if(l&&l[1].length)o=t("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","498").attr("width","510").attr("src","//player.youku.com/embed/"+l[1]);else if(c&&c[1].length||d&&d[2].length){var m=c&&c[1].length?c[1]:d[2];o=t("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","310").attr("width","500").attr("src","http://v.qq.com/iframe/player.html?vid="+m+"&auto=0")}else{if(!(u||h||p))return!1;o=t("<video controls>").attr("src",e).attr("width","640").attr("height","360")}return o.addClass("note-video-clip"),o[0]},e.prototype.show=function(){var t=this,e=this.context.invoke("editor.getSelectedText");this.context.invoke("editor.saveRange"),this.showVideoDialog(e).then(function(e){t.ui.hideDialog(t.$dialog),t.context.invoke("editor.restoreRange");var o=t.createVideoNode(e);o&&t.context.invoke("editor.insertNode",o)}).fail(function(){t.context.invoke("editor.restoreRange")})},e.prototype.showVideoDialog=function(e){var o=this;return t.Deferred(function(t){var n=o.$dialog.find(".note-video-url"),i=o.$dialog.find(".note-video-btn");o.ui.onDialogShown(o.$dialog,function(){o.context.triggerEvent("dialog.shown"),n.val(e).on("input",function(){o.ui.toggleBtn(i,n.val())}),z.isSupportTouch||n.trigger("focus"),i.click(function(e){e.preventDefault(),t.resolve(n.val())}),o.bindEnterKey(n,i)}),o.ui.onDialogHidden(o.$dialog,function(){n.off("input"),i.off("click"),"pending"===t.state()&&t.reject()}),o.ui.showDialog(o.$dialog)})},e}(),ae=function(){function e(e){this.context=e,this.ui=t.summernote.ui,this.$body=t(document.body),this.$editor=e.layoutInfo.editor,this.options=e.options,this.lang=this.options.langInfo}return e.prototype.initialize=function(){var t=this.options.dialogsInBody?this.$body:this.$editor,e=['<p class="text-center">','<a href="http://summernote.org/" target="_blank">Summernote 0.8.10</a> · ','<a href="https://github.com/summernote/summernote" target="_blank">Project</a> · ','<a href="https://github.com/summernote/summernote/issues" target="_blank">Issues</a>',"</p>"].join("");this.$dialog=this.ui.dialog({title:this.lang.options.help,fade:this.options.dialogsFade,body:this.createShortcutList(),footer:e,callback:function(t){t.find(".modal-body,.note-modal-body").css({"max-height":300,overflow:"scroll"})}}).render().appendTo(t)},e.prototype.destroy=function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()},e.prototype.createShortcutList=function(){var e=this,o=this.options.keyMap[z.isMac?"mac":"pc"];return Object.keys(o).map(function(n){var i=o[n],r=t('<div><div class="help-list-item"/></div>');return r.append(t("<label><kbd>"+n+"</kdb></label>").css({width:180,"margin-right":10})).append(t("<span/>").html(e.context.memo("help."+i)||i)),r.html()}).join("")},e.prototype.showHelpDialog=function(){var e=this;return t.Deferred(function(t){e.ui.onDialogShown(e.$dialog,function(){e.context.triggerEvent("dialog.shown"),t.resolve()}),e.ui.showDialog(e.$dialog)}).promise()},e.prototype.show=function(){var t=this;this.context.invoke("editor.saveRange"),this.showHelpDialog().then(function(){t.context.invoke("editor.restoreRange")})},e}(),le=function(){function e(e){var o=this;this.context=e,this.ui=t.summernote.ui,this.options=e.options,this.events={"summernote.keyup summernote.mouseup summernote.scroll":function(){o.update()},"summernote.disable summernote.change summernote.dialog.shown":function(){o.hide()},"summernote.focusout":function(t,e){z.isFF||e.relatedTarget&&Nt.ancestor(e.relatedTarget,C.eq(o.$popover[0]))||o.hide()}}}return e.prototype.shouldInitialize=function(){return this.options.airMode&&!N.isEmpty(this.options.popover.air)},e.prototype.initialize=function(){this.$popover=this.ui.popover({className:"note-air-popover"}).render().appendTo(this.options.container);var t=this.$popover.find(".popover-content");this.context.invoke("buttons.build",t,this.options.popover.air)},e.prototype.destroy=function(){this.$popover.remove()},e.prototype.update=function(){var t=this.context.invoke("editor.currentStyle");if(t.range&&!t.range.isCollapsed()){var e=N.last(t.range.getClientRects());if(e){var o=C.rect2bnd(e);this.$popover.css({display:"block",left:Math.max(o.left+o.width/2,0)-20,top:o.top+o.height}),this.context.invoke("buttons.updateCurrentStyle",this.$popover)}}else this.hide()},e.prototype.hide=function(){this.$popover.hide()},e}(),ce=function(){function e(e){var o=this;this.context=e,this.ui=t.summernote.ui,this.$editable=e.layoutInfo.editable,this.options=e.options,this.hint=this.options.hint||[],this.direction=this.options.hintDirection||"bottom",this.hints=t.isArray(this.hint)?this.hint:[this.hint],this.events={"summernote.keyup":function(t,e){e.isDefaultPrevented()||o.handleKeyup(e)},"summernote.keydown":function(t,e){o.handleKeydown(e)},"summernote.disable summernote.dialog.shown":function(){o.hide()}}}return e.prototype.shouldInitialize=function(){return this.hints.length>0},e.prototype.initialize=function(){var e=this;this.lastWordRange=null,this.$popover=this.ui.popover({className:"note-hint-popover",hideArrow:!0,direction:""}).render().appendTo(this.options.container),this.$popover.hide(),this.$content=this.$popover.find(".popover-content,.note-popover-content"),this.$content.on("click",".note-hint-item",function(){e.$content.find(".active").removeClass("active"),t(e).addClass("active"),e.replace()})},e.prototype.destroy=function(){this.$popover.remove()},e.prototype.selectItem=function(t){this.$content.find(".active").removeClass("active"),t.addClass("active"),this.$content[0].scrollTop=t[0].offsetTop-this.$content.innerHeight()/2},e.prototype.moveDown=function(){var t=this.$content.find(".note-hint-item.active"),e=t.next();if(e.length)this.selectItem(e);else{var o=t.parent().next();o.length||(o=this.$content.find(".note-hint-group").first()),this.selectItem(o.find(".note-hint-item").first())}},e.prototype.moveUp=function(){var t=this.$content.find(".note-hint-item.active"),e=t.prev();if(e.length)this.selectItem(e);else{var o=t.parent().prev();o.length||(o=this.$content.find(".note-hint-group").last()),this.selectItem(o.find(".note-hint-item").last())}},e.prototype.replace=function(){var t=this.$content.find(".note-hint-item.active");if(t.length){var e=this.nodeFromItem(t);this.lastWordRange.insertNode(e),Ht.createFromNode(e).collapse().select(),this.lastWordRange=null,this.hide(),this.context.triggerEvent("change",this.$editable.html(),this.$editable[0]),this.context.invoke("editor.focus")}},e.prototype.nodeFromItem=function(t){var e=this.hints[t.data("index")],o=t.data("item"),n=e.content?e.content(o):o;return"string"==typeof n&&(n=Nt.createText(n)),n},e.prototype.createItemTemplates=function(e,o){var n=this.hints[e];return o.map(function(o,i){var r=t('<div class="note-hint-item"/>');return r.append(n.template?n.template(o):o+""),r.data({index:e,item:o}),r})},e.prototype.handleKeydown=function(t){this.$popover.is(":visible")&&(t.keyCode===At.code.ENTER?(t.preventDefault(),this.replace()):t.keyCode===At.code.UP?(t.preventDefault(),this.moveUp()):t.keyCode===At.code.DOWN&&(t.preventDefault(),this.moveDown()))},e.prototype.searchKeyword=function(t,e,o){var n=this.hints[t];if(n&&n.match.test(e)&&n.search){var i=n.match.exec(e);n.search(i[1],o)}else o()},e.prototype.createGroup=function(e,o){var n=this,i=t('<div class="note-hint-group note-hint-group-'+e+'"/>');return this.searchKeyword(e,o,function(t){(t=t||[]).length&&(i.html(n.createItemTemplates(e,t)),n.show())}),i},e.prototype.handleKeyup=function(t){var e=this;if(!N.contains([At.code.ENTER,At.code.UP,At.code.DOWN],t.keyCode)){var o=this.context.invoke("editor.createRange").getWordRange(),n=o.toString();if(this.hints.length&&n){this.$content.empty();var i=C.rect2bnd(N.last(o.getClientRects()));i&&(this.$popover.hide(),this.lastWordRange=o,this.hints.forEach(function(t,o){t.match.test(n)&&e.createGroup(o,n).appendTo(e.$content)}),this.$content.find(".note-hint-item:first").addClass("active"),"top"===this.direction?this.$popover.css({left:i.left,top:i.top-this.$popover.outerHeight()-5}):this.$popover.css({left:i.left,top:i.top+i.height+5}))}else this.hide()}},e.prototype.show=function(){this.$popover.show()},e.prototype.hide=function(){this.$popover.hide()},e}(),de=function(){function e(e,o){this.ui=t.summernote.ui,this.$note=e,this.memos={},this.modules={},this.layoutInfo={},this.options=o,this.initialize()}return e.prototype.initialize=function(){return this.layoutInfo=this.ui.createLayout(this.$note,this.options),this._initialize(),this.$note.hide(),this},e.prototype.destroy=function(){this._destroy(),this.$note.removeData("summernote"),this.ui.removeLayout(this.$note,this.layoutInfo)},e.prototype.reset=function(){var t=this.isDisabled();this.code(Nt.emptyPara),this._destroy(),this._initialize(),t&&this.disable()},e.prototype._initialize=function(){var e=this,o=t.extend({},this.options.buttons);Object.keys(o).forEach(function(t){e.memo("button."+t,o[t])});var n=t.extend({},this.options.modules,t.summernote.plugins||{});Object.keys(n).forEach(function(t){e.module(t,n[t],!0)}),Object.keys(this.modules).forEach(function(t){e.initializeModule(t)})},e.prototype._destroy=function(){var t=this;Object.keys(this.modules).reverse().forEach(function(e){t.removeModule(e)}),Object.keys(this.memos).forEach(function(e){t.removeMemo(e)}),this.triggerEvent("destroy",this)},e.prototype.code=function(t){var e=this.invoke("codeview.isActivated");if(void 0===t)return this.invoke("codeview.sync"),e?this.layoutInfo.codable.val():this.layoutInfo.editable.html();e?this.layoutInfo.codable.val(t):this.layoutInfo.editable.html(t),this.$note.val(t),this.triggerEvent("change",t)},e.prototype.isDisabled=function(){return"false"===this.layoutInfo.editable.attr("contenteditable")},e.prototype.enable=function(){this.layoutInfo.editable.attr("contenteditable",!0),this.invoke("toolbar.activate",!0),this.triggerEvent("disable",!1)},e.prototype.disable=function(){this.invoke("codeview.isActivated")&&this.invoke("codeview.deactivate"),this.layoutInfo.editable.attr("contenteditable",!1),this.invoke("toolbar.deactivate",!0),this.triggerEvent("disable",!0)},e.prototype.triggerEvent=function(){var t=N.head(arguments),e=N.tail(N.from(arguments)),o=this.options.callbacks[C.namespaceToCamel(t,"on")];o&&o.apply(this.$note[0],e),this.$note.trigger("summernote."+t,e)},e.prototype.initializeModule=function(t){var e=this.modules[t];e.shouldInitialize=e.shouldInitialize||C.ok,e.shouldInitialize()&&(e.initialize&&e.initialize(),e.events&&Nt.attachEvents(this.$note,e.events))},e.prototype.module=function(t,e,o){if(1===arguments.length)return this.modules[t];this.modules[t]=new e(this),o||this.initializeModule(t)},e.prototype.removeModule=function(t){var e=this.modules[t];e.shouldInitialize()&&(e.events&&Nt.detachEvents(this.$note,e.events),e.destroy&&e.destroy()),delete this.modules[t]},e.prototype.memo=function(t,e){if(1===arguments.length)return this.memos[t];this.memos[t]=e},e.prototype.removeMemo=function(t){this.memos[t]&&this.memos[t].destroy&&this.memos[t].destroy(),delete this.memos[t]},e.prototype.createInvokeHandlerAndUpdateState=function(t,e){var o=this;return function(n){o.createInvokeHandler(t,e)(n),o.invoke("buttons.updateCurrentStyle")}},e.prototype.createInvokeHandler=function(e,o){var n=this;return function(i){i.preventDefault();var r=t(i.target);n.invoke(e,o||r.closest("[data-value]").data("value"),r)}},e.prototype.invoke=function(){var t=N.head(arguments),e=N.tail(N.from(arguments)),o=t.split("."),n=o.length>1,i=n&&N.head(o),r=n?N.last(o):N.head(o),s=this.modules[i||"editor"];return!i&&this[r]?this[r].apply(this,e):s&&s[r]&&s.shouldInitialize()?s[r].apply(s,e):void 0},e}();t.fn.extend({summernote:function(){var e=t.type(N.head(arguments)),o="string"===e,n="object"===e,i=t.extend({},t.summernote.options,n?N.head(arguments):{});i.langInfo=t.extend(!0,{},t.summernote.lang["en-US"],t.summernote.lang[i.lang]),i.icons=t.extend(!0,{},t.summernote.options.icons,i.icons),i.tooltip="auto"===i.tooltip?!z.isSupportTouch:i.tooltip,this.each(function(e,o){var n=t(o);if(!n.data("summernote")){var r=new de(n,i);n.data("summernote",r),n.data("summernote").triggerEvent("init",r.layoutInfo)}});var r=this.first();if(r.length){var s=r.data("summernote");if(o)return s.invoke.apply(s,N.from(arguments));i.focus&&s.invoke("editor.focus")}return this}}),t.summernote=t.extend(t.summernote,{version:"0.8.10",ui:y,dom:Nt,plugins:{},options:{modules:{editor:jt,clipboard:qt,dropzone:Kt,codeview:Vt,statusbar:Wt,fullscreen:Gt,handle:_t,hintPopover:ce,autoLink:Yt,autoSync:Qt,placeholder:Jt,buttons:Xt,toolbar:te,linkDialog:ee,linkPopover:oe,imageDialog:ne,imagePopover:ie,tablePopover:re,videoDialog:se,helpDialog:ae,airPopover:le},buttons:{},lang:"en-US",followingToolbar:!0,otherStaticBar:"",toolbar:[["style",["style"]],["font",["bold","underline","clear"]],["fontname",["fontname"]],["color",["color"]],["para",["ul","ol","paragraph"]],["table",["table"]],["insert",["link","picture","video"]],["view",["fullscreen","codeview","help"]]],popatmouse:!0,popover:{image:[["imagesize",["imageSize100","imageSize50","imageSize25"]],["float",["floatLeft","floatRight","floatNone"]],["remove",["removeMedia"]]],link:[["link",["linkDialogShow","unlink"]]],table:[["add",["addRowDown","addRowUp","addColLeft","addColRight"]],["delete",["deleteRow","deleteCol","deleteTable"]]],air:[["color",["color"]],["font",["bold","underline","clear"]],["para",["ul","paragraph"]],["table",["table"]],["insert",["link","picture"]]]},airMode:!1,width:null,height:null,linkTargetBlank:!0,focus:!1,tabSize:4,styleWithSpan:!0,shortcuts:!0,textareaAutoSync:!0,hintDirection:"bottom",tooltip:"auto",container:"body",maxTextLength:0,styleTags:["p",{title:"Blockquote",tag:"blockquote",className:"blockquote",value:"blockquote"},"h1","h2","h3","h4","h5","h6"],fontNames:["Arial","Arial Black","Comic Sans MS","Courier New","Helvetica Neue","Helvetica","Impact","Lucida Grande","Tahoma","Times New Roman","Verdana"],fontSizes:["8","9","10","11","12","14","18","24","36"],colors:[["#000000","#424242","#636363","#9C9C94","#CEC6CE","#EFEFEF","#F7F7F7","#FFFFFF"],["#FF0000","#FF9C00","#FFFF00","#00FF00","#00FFFF","#0000FF","#9C00FF","#FF00FF"],["#F7C6CE","#FFE7CE","#FFEFC6","#D6EFD6","#CEDEE7","#CEE7F7","#D6D6E7","#E7D6DE"],["#E79C9C","#FFC69C","#FFE79C","#B5D6A5","#A5C6CE","#9CC6EF","#B5A5D6","#D6A5BD"],["#E76363","#F7AD6B","#FFD663","#94BD7B","#73A5AD","#6BADDE","#8C7BC6","#C67BA5"],["#CE0000","#E79439","#EFC631","#6BA54A","#4A7B8C","#3984C6","#634AA5","#A54A7B"],["#9C0000","#B56308","#BD9400","#397B21","#104A5A","#085294","#311873","#731842"],["#630000","#7B3900","#846300","#295218","#083139","#003163","#21104A","#4A1031"]],colorsName:[["Black","Tundora","Dove Gray","Star Dust","Pale Slate","Gallery","Alabaster","White"],["Red","Orange Peel","Yellow","Green","Cyan","Blue","Electric Violet","Magenta"],["Azalea","Karry","Egg White","Zanah","Botticelli","Tropical Blue","Mischka","Twilight"],["Tonys Pink","Peach Orange","Cream Brulee","Sprout","Casper","Perano","Cold Purple","Careys Pink"],["Mandy","Rajah","Dandelion","Olivine","Gulf Stream","Viking","Blue Marguerite","Puce"],["Guardsman Red","Fire Bush","Golden Dream","Chelsea Cucumber","Smalt Blue","Boston Blue","Butterfly Bush","Cadillac"],["Sangria","Mai Tai","Buddha Gold","Forest Green","Eden","Venice Blue","Meteorite","Claret"],["Rosewood","Cinnamon","Olive","Parsley","Tiber","Midnight Blue","Valentino","Loulou"]],lineHeights:["1.0","1.2","1.4","1.5","1.6","1.8","2.0","3.0"],tableClassName:"table table-bordered",insertTableMaxSize:{col:10,row:10},dialogsInBody:!1,dialogsFade:!1,maximumImageFileSize:null,callbacks:{onInit:null,onFocus:null,onBlur:null,onBlurCodeview:null,onEnter:null,onKeyup:null,onKeydown:null,onImageUpload:null,onImageUploadError:null},codemirror:{mode:"text/html",htmlMode:!0,lineNumbers:!0},keyMap:{pc:{ENTER:"insertParagraph","CTRL+Z":"undo","CTRL+Y":"redo",TAB:"tab","SHIFT+TAB":"untab","CTRL+B":"bold","CTRL+I":"italic","CTRL+U":"underline","CTRL+SHIFT+S":"strikethrough","CTRL+BACKSLASH":"removeFormat","CTRL+SHIFT+L":"justifyLeft","CTRL+SHIFT+E":"justifyCenter","CTRL+SHIFT+R":"justifyRight","CTRL+SHIFT+J":"justifyFull","CTRL+SHIFT+NUM7":"insertUnorderedList","CTRL+SHIFT+NUM8":"insertOrderedList","CTRL+LEFTBRACKET":"outdent","CTRL+RIGHTBRACKET":"indent","CTRL+NUM0":"formatPara","CTRL+NUM1":"formatH1","CTRL+NUM2":"formatH2","CTRL+NUM3":"formatH3","CTRL+NUM4":"formatH4","CTRL+NUM5":"formatH5","CTRL+NUM6":"formatH6","CTRL+ENTER":"insertHorizontalRule","CTRL+K":"linkDialog.show"},mac:{ENTER:"insertParagraph","CMD+Z":"undo","CMD+SHIFT+Z":"redo",TAB:"tab","SHIFT+TAB":"untab","CMD+B":"bold","CMD+I":"italic","CMD+U":"underline","CMD+SHIFT+S":"strikethrough","CMD+BACKSLASH":"removeFormat","CMD+SHIFT+L":"justifyLeft","CMD+SHIFT+E":"justifyCenter","CMD+SHIFT+R":"justifyRight","CMD+SHIFT+J":"justifyFull","CMD+SHIFT+NUM7":"insertUnorderedList","CMD+SHIFT+NUM8":"insertOrderedList","CMD+LEFTBRACKET":"outdent","CMD+RIGHTBRACKET":"indent","CMD+NUM0":"formatPara","CMD+NUM1":"formatH1","CMD+NUM2":"formatH2","CMD+NUM3":"formatH3","CMD+NUM4":"formatH4","CMD+NUM5":"formatH5","CMD+NUM6":"formatH6","CMD+ENTER":"insertHorizontalRule","CMD+K":"linkDialog.show"}},icons:{align:"note-icon-align",alignCenter:"note-icon-align-center",alignJustify:"note-icon-align-justify",alignLeft:"note-icon-align-left",alignRight:"note-icon-align-right",rowBelow:"note-icon-row-below",colBefore:"note-icon-col-before",colAfter:"note-icon-col-after",rowAbove:"note-icon-row-above",rowRemove:"note-icon-row-remove",colRemove:"note-icon-col-remove",indent:"note-icon-align-indent",outdent:"note-icon-align-outdent",arrowsAlt:"note-icon-arrows-alt",bold:"note-icon-bold",caret:"note-icon-caret",circle:"note-icon-circle",close:"note-icon-close",code:"note-icon-code",eraser:"note-icon-eraser",font:"note-icon-font",frame:"note-icon-frame",italic:"note-icon-italic",link:"note-icon-link",unlink:"note-icon-chain-broken",magic:"note-icon-magic",menuCheck:"note-icon-menu-check",minus:"note-icon-minus",orderedlist:"note-icon-orderedlist",pencil:"note-icon-pencil",picture:"note-icon-picture",question:"note-icon-question",redo:"note-icon-redo",square:"note-icon-square",strikethrough:"note-icon-strikethrough",subscript:"note-icon-subscript",superscript:"note-icon-superscript",table:"note-icon-table",textHeight:"note-icon-text-height",trash:"note-icon-trash",underline:"note-icon-underline",undo:"note-icon-undo",unorderedlist:"note-icon-unorderedlist",video:"note-icon-video"}}})}); | /*! Summernote v0.8.12 | (c) 2013- Alan Hong and other contributors | MIT license */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):e((t=t||self).jQuery)}(this,function(C){"use strict";C=C&&C.hasOwnProperty("default")?C.default:C;var i=function(){function t(t,e,o,n){this.markup=t,this.children=e,this.options=o,this.callback=n}return t.prototype.render=function(t){var o=C(this.markup);if(this.options&&this.options.contents&&o.html(this.options.contents),this.options&&this.options.className&&o.addClass(this.options.className),this.options&&this.options.data&&C.each(this.options.data,function(t,e){o.attr("data-"+t,e)}),this.options&&this.options.click&&o.on("click",this.options.click),this.children){var e=o.find(".note-children-container");this.children.forEach(function(t){t.render(e.length?e:o)})}return this.callback&&this.callback(o,this.options),this.options&&this.options.callback&&this.options.callback(o),t&&t.append(o),o},t}(),o=function(o,n){return function(){var t="object"==typeof arguments[1]?arguments[1]:arguments[0],e=Array.isArray(arguments[0])?arguments[0]:[];return t&&t.children&&(e=t.children),new i(o,e,t,n)}},t=o('<div class="note-editor note-frame card"/>'),e=o('<div class="note-toolbar card-header" role="toolbar"></div>'),n=o('<div class="note-editing-area"/>'),r=o('<textarea class="note-codable" role="textbox" aria-multiline="true"/>'),s=o('<div class="note-editable card-block" contentEditable="true" role="textbox" aria-multiline="true"/>'),a=o(['<output class="note-status-output" aria-live="polite"/>','<div class="note-statusbar" role="status">',' <output class="note-status-output" aria-live="polite"></output>',' <div class="note-resizebar" role="seperator" aria-orientation="horizontal" aria-label="Resize">',' <div class="note-icon-bar"/>',' <div class="note-icon-bar"/>',' <div class="note-icon-bar"/>'," </div>","</div>"].join("")),l=o('<div class="note-editor"/>'),c=o(['<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"/>','<output class="note-status-output" aria-live="polite"/>'].join("")),d=o('<div class="note-btn-group btn-group">'),u=o('<div class="dropdown-menu" role="list">',function(t,i){var e=Array.isArray(i.items)?i.items.map(function(t){var e="string"==typeof t?t:t.value||"",o=i.template?i.template(t):t,n="object"==typeof t?t.option:void 0;return'<a class="dropdown-item" href="#" '+('data-value="'+e+'"'+(void 0!==n?' data-option="'+n+'"':""))+' role="listitem" aria-label="'+e+'">'+o+"</a>"}).join(""):i.items;t.html(e).attr({"aria-label":i.title})}),h=o('<div class="dropdown-menu note-check" role="list">',function(t,n){var e=Array.isArray(n.items)?n.items.map(function(t){var e="string"==typeof t?t:t.value||"",o=n.template?n.template(t):t;return'<a class="dropdown-item" href="#" data-value="'+e+'" role="listitem" aria-label="'+t+'">'+v(n.checkClassName)+" "+o+"</a>"}).join(""):n.items;t.html(e).attr({"aria-label":n.title})}),p=o('<div class="note-color-palette"/>',function(t,e){for(var o=[],n=0,i=e.colors.length;n<i;n++){for(var r=e.eventName,s=e.colors[n],a=e.colorsName[n],l=[],c=0,d=s.length;c<d;c++){var u=s[c],h=a[c];l.push(['<button type="button" class="note-color-btn"','style="background-color:',u,'" ','data-event="',r,'" ','data-value="',u,'" ','title="',h,'" ','aria-label="',h,'" ','data-toggle="button" tabindex="-1"></button>'].join(""))}o.push('<div class="note-color-row">'+l.join("")+"</div>")}t.html(o.join("")),e.tooltip&&t.find(".note-color-btn").tooltip({container:e.container,trigger:"hover",placement:"bottom"})}),f=o('<div class="modal" aria-hidden="false" tabindex="-1" role="dialog"/>',function(t,e){e.fade&&t.addClass("fade"),t.attr({"aria-label":e.title}),t.html(['<div class="modal-dialog">',' <div class="modal-content">',e.title?' <div class="modal-header"> <h4 class="modal-title">'+e.title+'</h4> <button type="button" class="close" data-dismiss="modal" aria-label="Close" aria-hidden="true">×</button> </div>':"",' <div class="modal-body">'+e.body+"</div>",e.footer?' <div class="modal-footer">'+e.footer+"</div>":""," </div>","</div>"].join(""))}),m=o(['<div class="note-popover popover in">',' <div class="arrow"/>',' <div class="popover-content note-children-container"/>',"</div>"].join(""),function(t,e){var o=void 0!==e.direction?e.direction:"bottom";t.addClass(o),e.hideArrow&&t.find(".arrow").hide()}),g=o('<div class="form-check"></div>',function(t,e){t.html(['<label class="form-check-label"'+(e.id?' for="'+e.id+'"':"")+">",' <input role="checkbox" type="checkbox" class="form-check-input"'+(e.id?' id="'+e.id+'"':""),e.checked?" checked":"",' aria-label="'+(e.text?e.text:"")+'"',' aria-checked="'+(e.checked?"true":"false")+'"/>'," "+(e.text?e.text:"")+"</label>"].join(""))}),v=function(t,e){return"<"+(e=e||"i")+' class="'+t+'"/>'},b={editor:t,toolbar:e,editingArea:n,codable:r,editable:s,statusbar:a,airEditor:l,airEditable:c,buttonGroup:d,dropdown:u,dropdownButtonContents:function(t){return t},dropdownCheck:h,palette:p,dialog:f,popover:m,icon:v,checkbox:g,options:{},button:function(t,e){return o('<button type="button" class="note-btn btn btn-light btn-sm" role="button" tabindex="-1">',function(t,e){e&&e.tooltip&&t.attr({title:e.tooltip,"aria-label":e.tooltip}).tooltip({container:void 0!==e.container?e.container:"body",trigger:"hover",placement:"bottom"}).on("click",function(t){C(t.currentTarget).tooltip("hide")})})(t,e)},toggleBtn:function(t,e){t.toggleClass("disabled",!e),t.attr("disabled",!e)},toggleBtnActive:function(t,e){t.toggleClass("active",e)},onDialogShown:function(t,e){t.one("shown.bs.modal",e)},onDialogHidden:function(t,e){t.one("hidden.bs.modal",e)},showDialog:function(t){t.modal("show")},hideDialog:function(t){t.modal("hide")},createLayout:function(t,e){var o=(e.airMode?b.airEditor([b.editingArea([b.airEditable()])]):b.editor([b.toolbar(),b.editingArea([b.codable(),b.editable()]),b.statusbar()])).render();return o.insertAfter(t),{note:t,editor:o,toolbar:o.find(".note-toolbar"),editingArea:o.find(".note-editing-area"),editable:o.find(".note-editable"),codable:o.find(".note-codable"),statusbar:o.find(".note-statusbar")}},removeLayout:function(t,e){t.html(e.editable.html()),e.editor.remove(),t.show()}};C.summernote=C.summernote||{lang:{}},C.extend(C.summernote.lang,{"en-US":{font:{bold:"Bold",italic:"Italic",underline:"Underline",clear:"Remove Font Style",height:"Line Height",name:"Font Family",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript",size:"Font Size"},image:{image:"Picture",insert:"Insert Image",resizeFull:"Resize full",resizeHalf:"Resize half",resizeQuarter:"Resize quarter",resizeNone:"Original size",floatLeft:"Float Left",floatRight:"Float Right",floatNone:"Remove float",shapeRounded:"Shape: Rounded",shapeCircle:"Shape: Circle",shapeThumbnail:"Shape: Thumbnail",shapeNone:"Shape: None",dragImageHere:"Drag image or text here",dropImage:"Drop image or Text",selectFromFiles:"Select from files",maximumFileSize:"Maximum file size",maximumFileSizeError:"Maximum file size exceeded.",url:"Image URL",remove:"Remove Image",original:"Original"},video:{video:"Video",videoLink:"Video Link",insert:"Insert Video",url:"Video URL",providers:"(YouTube, Vimeo, Vine, Instagram, DailyMotion or Youku)"},link:{link:"Link",insert:"Insert Link",unlink:"Unlink",edit:"Edit",textToDisplay:"Text to display",url:"To what URL should this link go?",openInNewWindow:"Open in new window"},table:{table:"Table",addRowAbove:"Add row above",addRowBelow:"Add row below",addColLeft:"Add column left",addColRight:"Add column right",delRow:"Delete row",delCol:"Delete column",delTable:"Delete table"},hr:{insert:"Insert Horizontal Rule"},style:{style:"Style",p:"Normal",blockquote:"Quote",pre:"Code",h1:"Header 1",h2:"Header 2",h3:"Header 3",h4:"Header 4",h5:"Header 5",h6:"Header 6"},lists:{unordered:"Unordered list",ordered:"Ordered list"},options:{help:"Help",fullscreen:"Full Screen",codeview:"Code View"},paragraph:{paragraph:"Paragraph",outdent:"Outdent",indent:"Indent",left:"Align left",center:"Align center",right:"Align right",justify:"Justify full"},color:{recent:"Recent Color",more:"More Color",background:"Background Color",foreground:"Foreground Color",transparent:"Transparent",setTransparent:"Set transparent",reset:"Reset",resetToDefault:"Reset to default",cpSelect:"Select"},shortcut:{shortcuts:"Keyboard shortcuts",close:"Close",textFormatting:"Text formatting",action:"Action",paragraphFormatting:"Paragraph formatting",documentStyle:"Document Style",extraKeys:"Extra keys"},help:{insertParagraph:"Insert Paragraph",undo:"Undoes the last command",redo:"Redoes the last command",tab:"Tab",untab:"Untab",bold:"Set a bold style",italic:"Set a italic style",underline:"Set a underline style",strikethrough:"Set a strikethrough style",removeFormat:"Clean a style",justifyLeft:"Set left align",justifyCenter:"Set center align",justifyRight:"Set right align",justifyFull:"Set full align",insertUnorderedList:"Toggle unordered list",insertOrderedList:"Toggle ordered list",outdent:"Outdent on current paragraph",indent:"Indent on current paragraph",formatPara:"Change current block's format as a paragraph(P tag)",formatH1:"Change current block's format as H1",formatH2:"Change current block's format as H2",formatH3:"Change current block's format as H3",formatH4:"Change current block's format as H4",formatH5:"Change current block's format as H5",formatH6:"Change current block's format as H6",insertHorizontalRule:"Insert horizontal rule","linkDialog.show":"Show Link Dialog"},history:{undo:"Undo",redo:"Redo"},specialChar:{specialChar:"SPECIAL CHARACTERS",select:"Select Special characters"}}});var y="function"==typeof define&&define.amd;var k,w=navigator.userAgent,x=/MSIE|Trident/i.test(w);if(x){var S=/MSIE (\d+[.]\d+)/.exec(w);S&&(k=parseFloat(S[1])),(S=/Trident\/.*rv:([0-9]{1,}[.0-9]{0,})/.exec(w))&&(k=parseFloat(S[1]))}var I=/Edge\/\d+/.test(w),T=!!window.CodeMirror,N="ontouchstart"in window||0<navigator.MaxTouchPoints||0<navigator.msMaxTouchPoints,E=x||I?"DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted":"input",R={isMac:-1<navigator.appVersion.indexOf("Mac"),isMSIE:x,isEdge:I,isFF:!I&&/firefox/i.test(w),isPhantom:/PhantomJS/i.test(w),isWebkit:!I&&/webkit/i.test(w),isChrome:!I&&/chrome/i.test(w),isSafari:!I&&/safari/i.test(w),browserVersion:k,jqueryVersion:parseFloat(C.fn.jquery),isSupportAmd:y,isSupportTouch:N,hasCodeMirror:T,isFontInstalled:function(t){var e="Comic Sans MS"===t?"Courier New":"Comic Sans MS",o="mmmmmmmmmmwwwww",n=document.createElement("canvas").getContext("2d");n.font="200px '"+e+"'";var i=n.measureText(o).width;return n.font="200px '"+t+"', '"+e+"'",i!==n.measureText(o).width},isW3CRangeSupport:!!document.createRange,inputEventName:E};var L=0;var A={eq:function(e){return function(t){return e===t}},eq2:function(t,e){return t===e},peq2:function(o){return function(t,e){return t[o]===e[o]}},ok:function(){return!0},fail:function(){return!1},self:function(t){return t},not:function(t){return function(){return!t.apply(t,arguments)}},and:function(e,o){return function(t){return e(t)&&o(t)}},invoke:function(t,e){return function(){return t[e].apply(t,arguments)}},uniqueId:function(t){var e=++L+"";return t?t+e:e},rect2bnd:function(t){var e=$(document);return{top:t.top+e.scrollTop(),left:t.left+e.scrollLeft(),width:t.right-t.left,height:t.bottom-t.top}},invertObject:function(t){var e={};for(var o in t)t.hasOwnProperty(o)&&(e[t[o]]=o);return e},namespaceToCamel:function(t,e){return(e=e||"")+t.split(".").map(function(t){return t.substring(0,1).toUpperCase()+t.substring(1)}).join("")},debounce:function(n,i,r){var s;return function(){var t=this,e=arguments,o=r&&!s;clearTimeout(s),s=setTimeout(function(){s=null,r||n.apply(t,e)},i),o&&n.apply(t,e)}},isValidUrl:function(t){return/[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/gi.test(t)}};function F(t){return t[0]}function P(t){return t[t.length-1]}function H(t){return t.slice(1)}function D(t,e){return!!(t&&t.length&&e)&&-1!==t.indexOf(e)}var B={head:F,last:P,initial:function(t){return t.slice(0,t.length-1)},tail:H,prev:function(t,e){if(t&&t.length&&e){var o=t.indexOf(e);return-1===o?null:t[o-1]}return null},next:function(t,e){if(t&&t.length&&e){var o=t.indexOf(e);return-1===o?null:t[o+1]}return null},find:function(t,e){for(var o=0,n=t.length;o<n;o++){var i=t[o];if(e(i))return i}},contains:D,all:function(t,e){for(var o=0,n=t.length;o<n;o++)if(!e(t[o]))return!1;return!0},sum:function(t,o){return o=o||A.self,t.reduce(function(t,e){return t+o(e)},0)},from:function(t){for(var e=[],o=t.length,n=-1;++n<o;)e[n]=t[n];return e},isEmpty:function(t){return!t||!t.length},clusterBy:function(t,n){return t.length?H(t).reduce(function(t,e){var o=P(t);return n(P(o),e)?o[o.length]=e:t[t.length]=[e],t},[[F(t)]]):[]},compact:function(t){for(var e=[],o=0,n=t.length;o<n;o++)t[o]&&e.push(t[o]);return e},unique:function(t){for(var e=[],o=0,n=t.length;o<n;o++)D(e,t[o])||e.push(t[o]);return e}},z=String.fromCharCode(160);function M(t){return t&&C(t).hasClass("note-editable")}function O(e){return e=e.toUpperCase(),function(t){return t&&t.nodeName.toUpperCase()===e}}function U(t){return t&&3===t.nodeType}function j(t){return t&&/^BR|^IMG|^HR|^IFRAME|^BUTTON|^INPUT|^AUDIO|^VIDEO|^EMBED/.test(t.nodeName.toUpperCase())}function K(t){return!M(t)&&(t&&/^DIV|^P|^LI|^H[1-7]/.test(t.nodeName.toUpperCase()))}var W=O("PRE"),q=O("LI");var V=O("TABLE"),G=O("DATA");function _(t){return!(X(t)||Z(t)||Y(t)||K(t)||V(t)||J(t)||G(t))}function Z(t){return t&&/^UL|^OL/.test(t.nodeName.toUpperCase())}var Y=O("HR");function Q(t){return t&&/^TD|^TH/.test(t.nodeName.toUpperCase())}var J=O("BLOCKQUOTE");function X(t){return Q(t)||J(t)||M(t)}var tt=O("A");var et=O("BODY");var ot=R.isMSIE&&R.browserVersion<11?" ":"<br>";function nt(t){return U(t)?t.nodeValue.length:t?t.childNodes.length:0}function it(t){var e=nt(t);return 0===e||(!U(t)&&1===e&&t.innerHTML===ot||!(!B.all(t.childNodes,U)||""!==t.innerHTML))}function rt(t){j(t)||nt(t)||(t.innerHTML=ot)}function st(t,e){for(;t;){if(e(t))return t;if(M(t))break;t=t.parentNode}return null}function at(t,e){e=e||A.fail;var o=[];return st(t,function(t){return M(t)||o.push(t),e(t)}),o}function lt(t,e){e=e||A.fail;for(var o=[];t&&!e(t);)o.push(t),t=t.nextSibling;return o}function ct(t,e){var o=e.nextSibling,n=e.parentNode;return o?n.insertBefore(t,o):n.appendChild(t),t}function dt(o,t){return C.each(t,function(t,e){o.appendChild(e)}),o}function ut(t){return 0===t.offset}function ht(t){return t.offset===nt(t.node)}function pt(t){return ut(t)||ht(t)}function ft(t,e){for(;t&&t!==e;){if(0!==gt(t))return!1;t=t.parentNode}return!0}function mt(t,e){if(!e)return!1;for(;t&&t!==e;){if(gt(t)!==nt(t.parentNode)-1)return!1;t=t.parentNode}return!0}function gt(t){for(var e=0;t=t.previousSibling;)e+=1;return e}function vt(t){return!!(t&&t.childNodes&&t.childNodes.length)}function bt(t,e){var o,n;if(0===t.offset){if(M(t.node))return null;o=t.node.parentNode,n=gt(t.node)}else n=vt(t.node)?nt(o=t.node.childNodes[t.offset-1]):(o=t.node,e?0:t.offset-1);return{node:o,offset:n}}function yt(t,e){var o,n;if(nt(t.node)===t.offset){if(M(t.node))return null;o=t.node.parentNode,n=gt(t.node)+1}else n=vt(t.node)?(o=t.node.childNodes[t.offset],0):(o=t.node,e?nt(t.node):t.offset+1);return{node:o,offset:n}}function kt(t,e){return t.node===e.node&&t.offset===e.offset}function Ct(t,e){var o=e&&e.isSkipPaddingBlankHTML,n=e&&e.isNotSplitEdgePoint,i=e&&e.isDiscardEmptySplits;if(i&&(o=!0),pt(t)&&(U(t.node)||n)){if(ut(t))return t.node;if(ht(t))return t.node.nextSibling}if(U(t.node))return t.node.splitText(t.offset);var r=t.node.childNodes[t.offset],s=ct(t.node.cloneNode(!1),t.node);return dt(s,lt(r)),o||(rt(t.node),rt(s)),i&&(it(t.node)&&St(t.node),it(s))?(St(s),t.node.nextSibling):s}function wt(t,o,n){var e=at(o.node,A.eq(t));return e.length?1===e.length?Ct(o,n):e.reduce(function(t,e){return t===o.node&&(t=Ct(o,n)),Ct({node:e,offset:t?gt(t):nt(e)},n)}):null}function xt(t){return document.createElement(t)}function St(t,e){if(t&&t.parentNode){if(t.removeNode)return t.removeNode(e);var o=t.parentNode;if(!e){for(var n=[],i=0,r=t.childNodes.length;i<r;i++)n.push(t.childNodes[i]);for(i=0,r=n.length;i<r;i++)o.insertBefore(n[i],t)}o.removeChild(t)}}var It=O("TEXTAREA");function Tt(t,e){var o=It(t[0])?t.val():t.html();return e?o.replace(/[\n\r]/g,""):o}var $t={NBSP_CHAR:z,ZERO_WIDTH_NBSP_CHAR:"\ufeff",blank:ot,emptyPara:"<p>"+ot+"</p>",makePredByNodeName:O,isEditable:M,isControlSizing:function(t){return t&&C(t).hasClass("note-control-sizing")},isText:U,isElement:function(t){return t&&1===t.nodeType},isVoid:j,isPara:K,isPurePara:function(t){return K(t)&&!q(t)},isHeading:function(t){return t&&/^H[1-7]/.test(t.nodeName.toUpperCase())},isInline:_,isBlock:A.not(_),isBodyInline:function(t){return _(t)&&!st(t,K)},isBody:et,isParaInline:function(t){return _(t)&&!!st(t,K)},isPre:W,isList:Z,isTable:V,isData:G,isCell:Q,isBlockquote:J,isBodyContainer:X,isAnchor:tt,isDiv:O("DIV"),isLi:q,isBR:O("BR"),isSpan:O("SPAN"),isB:O("B"),isU:O("U"),isS:O("S"),isI:O("I"),isImg:O("IMG"),isTextarea:It,isEmpty:it,isEmptyAnchor:A.and(tt,it),isClosestSibling:function(t,e){return t.nextSibling===e||t.previousSibling===e},withClosestSiblings:function(t,e){e=e||A.ok;var o=[];return t.previousSibling&&e(t.previousSibling)&&o.push(t.previousSibling),o.push(t),t.nextSibling&&e(t.nextSibling)&&o.push(t.nextSibling),o},nodeLength:nt,isLeftEdgePoint:ut,isRightEdgePoint:ht,isEdgePoint:pt,isLeftEdgeOf:ft,isRightEdgeOf:mt,isLeftEdgePointOf:function(t,e){return ut(t)&&ft(t.node,e)},isRightEdgePointOf:function(t,e){return ht(t)&&mt(t.node,e)},prevPoint:bt,nextPoint:yt,isSamePoint:kt,isVisiblePoint:function(t){if(U(t.node)||!vt(t.node)||it(t.node))return!0;var e=t.node.childNodes[t.offset-1],o=t.node.childNodes[t.offset];return!(e&&!j(e)||o&&!j(o))},prevPointUntil:function(t,e){for(;t;){if(e(t))return t;t=bt(t)}return null},nextPointUntil:function(t,e){for(;t;){if(e(t))return t;t=yt(t)}return null},isCharPoint:function(t){if(!U(t.node))return!1;var e=t.node.nodeValue.charAt(t.offset-1);return e&&" "!==e&&e!==z},walkPoint:function(t,e,o,n){for(var i=t;i&&(o(i),!kt(i,e));)i=yt(i,n&&t.node!==i.node&&e.node!==i.node)},ancestor:st,singleChildAncestor:function(t,e){for(t=t.parentNode;t&&1===nt(t);){if(e(t))return t;if(M(t))break;t=t.parentNode}return null},listAncestor:at,lastAncestor:function(t,e){var o=at(t);return B.last(o.filter(e))},listNext:lt,listPrev:function(t,e){e=e||A.fail;for(var o=[];t&&!e(t);)o.push(t),t=t.previousSibling;return o},listDescendant:function(i,r){var s=[];return r=r||A.ok,function t(e){i!==e&&r(e)&&s.push(e);for(var o=0,n=e.childNodes.length;o<n;o++)t(e.childNodes[o])}(i),s},commonAncestor:function(t,e){for(var o=at(t),n=e;n;n=n.parentNode)if(-1<o.indexOf(n))return n;return null},wrap:function(t,e){var o=t.parentNode,n=C("<"+e+">")[0];return o.insertBefore(n,t),n.appendChild(t),n},insertAfter:ct,appendChildNodes:dt,position:gt,hasChildren:vt,makeOffsetPath:function(t,e){return at(e,A.eq(t)).map(gt).reverse()},fromOffsetPath:function(t,e){for(var o=t,n=0,i=e.length;n<i;n++)o=o.childNodes.length<=e[n]?o.childNodes[o.childNodes.length-1]:o.childNodes[e[n]];return o},splitTree:wt,splitPoint:function(t,e){var o,n,i=e?K:X,r=at(t.node,i),s=B.last(r)||t.node;n=i(s)?(o=r[r.length-2],s):(o=s).parentNode;var a=o&&wt(o,t,{isSkipPaddingBlankHTML:e,isNotSplitEdgePoint:e});return a||n!==t.node||(a=t.node.childNodes[t.offset]),{rightNode:a,container:n}},create:xt,createText:function(t){return document.createTextNode(t)},remove:St,removeWhile:function(t,e){for(;t&&!M(t)&&e(t);){var o=t.parentNode;St(t),t=o}},replace:function(t,e){if(t.nodeName.toUpperCase()===e.toUpperCase())return t;var o=xt(e);return t.style.cssText&&(o.style.cssText=t.style.cssText),dt(o,B.from(t.childNodes)),ct(o,t),St(t),o},html:function(t,e){var o=Tt(t);e&&(o=(o=o.replace(/<(\/?)(\b(?!!)[^>\s]*)(.*?)(\s*\/?>)/g,function(t,e,o){o=o.toUpperCase();var n=/^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(o)&&!!e,i=/^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(o);return t+(n||i?"\n":"")})).trim());return o},value:Tt,posFromPlaceholder:function(t){var e=C(t),o=e.offset(),n=e.outerHeight(!0);return{left:o.left,top:o.top+n}},attachEvents:function(e,o){Object.keys(o).forEach(function(t){e.on(t,o[t])})},detachEvents:function(e,o){Object.keys(o).forEach(function(t){e.off(t,o[t])})},isCustomStyleTag:function(t){return t&&!U(t)&&B.contains(t.classList,"note-styletag")}},Nt=function(){function t(t,e){this.ui=C.summernote.ui,this.$note=t,this.memos={},this.modules={},this.layoutInfo={},this.options=e,this.initialize()}return t.prototype.initialize=function(){return this.layoutInfo=this.ui.createLayout(this.$note,this.options),this._initialize(),this.$note.hide(),this},t.prototype.destroy=function(){this._destroy(),this.$note.removeData("summernote"),this.ui.removeLayout(this.$note,this.layoutInfo)},t.prototype.reset=function(){var t=this.isDisabled();this.code($t.emptyPara),this._destroy(),this._initialize(),t&&this.disable()},t.prototype._initialize=function(){var e=this,o=C.extend({},this.options.buttons);Object.keys(o).forEach(function(t){e.memo("button."+t,o[t])});var n=C.extend({},this.options.modules,C.summernote.plugins||{});Object.keys(n).forEach(function(t){e.module(t,n[t],!0)}),Object.keys(this.modules).forEach(function(t){e.initializeModule(t)})},t.prototype._destroy=function(){var e=this;Object.keys(this.modules).reverse().forEach(function(t){e.removeModule(t)}),Object.keys(this.memos).forEach(function(t){e.removeMemo(t)}),this.triggerEvent("destroy",this)},t.prototype.code=function(t){var e=this.invoke("codeview.isActivated");if(void 0===t)return this.invoke("codeview.sync"),e?this.layoutInfo.codable.val():this.layoutInfo.editable.html();e?this.layoutInfo.codable.val(t):this.layoutInfo.editable.html(t),this.$note.val(t),this.triggerEvent("change",t,this.layoutInfo.editable)},t.prototype.isDisabled=function(){return"false"===this.layoutInfo.editable.attr("contenteditable")},t.prototype.enable=function(){this.layoutInfo.editable.attr("contenteditable",!0),this.invoke("toolbar.activate",!0),this.triggerEvent("disable",!1)},t.prototype.disable=function(){this.invoke("codeview.isActivated")&&this.invoke("codeview.deactivate"),this.layoutInfo.editable.attr("contenteditable",!1),this.invoke("toolbar.deactivate",!0),this.triggerEvent("disable",!0)},t.prototype.triggerEvent=function(){var t=B.head(arguments),e=B.tail(B.from(arguments)),o=this.options.callbacks[A.namespaceToCamel(t,"on")];o&&o.apply(this.$note[0],e),this.$note.trigger("summernote."+t,e)},t.prototype.initializeModule=function(t){var e=this.modules[t];e.shouldInitialize=e.shouldInitialize||A.ok,e.shouldInitialize()&&(e.initialize&&e.initialize(),e.events&&$t.attachEvents(this.$note,e.events))},t.prototype.module=function(t,e,o){if(1===arguments.length)return this.modules[t];this.modules[t]=new e(this),o||this.initializeModule(t)},t.prototype.removeModule=function(t){var e=this.modules[t];e.shouldInitialize()&&(e.events&&$t.detachEvents(this.$note,e.events),e.destroy&&e.destroy()),delete this.modules[t]},t.prototype.memo=function(t,e){if(1===arguments.length)return this.memos[t];this.memos[t]=e},t.prototype.removeMemo=function(t){this.memos[t]&&this.memos[t].destroy&&this.memos[t].destroy(),delete this.memos[t]},t.prototype.createInvokeHandlerAndUpdateState=function(e,o){var n=this;return function(t){n.createInvokeHandler(e,o)(t),n.invoke("buttons.updateCurrentStyle")}},t.prototype.createInvokeHandler=function(o,n){var i=this;return function(t){t.preventDefault();var e=C(t.target);i.invoke(o,n||e.closest("[data-value]").data("value"),e)}},t.prototype.invoke=function(){var t=B.head(arguments),e=B.tail(B.from(arguments)),o=t.split("."),n=1<o.length,i=n&&B.head(o),r=n?B.last(o):B.head(o),s=this.modules[i||"editor"];return!i&&this[r]?this[r].apply(this,e):s&&s[r]&&s.shouldInitialize()?s[r].apply(s,e):void 0},t}();function Et(t,e){var o,n,i=t.parentElement(),r=document.body.createTextRange(),s=B.from(i.childNodes);for(o=0;o<s.length;o++)if(!$t.isText(s[o])){if(r.moveToElementText(s[o]),0<=r.compareEndPoints("StartToStart",t))break;n=s[o]}if(0!==o&&$t.isText(s[o-1])){var a=document.body.createTextRange(),l=null;a.moveToElementText(n||i),a.collapse(!n),l=n?n.nextSibling:i.firstChild;var c=t.duplicate();c.setEndPoint("StartToStart",a);for(var d=c.text.replace(/[\r\n]/g,"").length;d>l.nodeValue.length&&l.nextSibling;)d-=l.nodeValue.length,l=l.nextSibling;l.nodeValue;e&&l.nextSibling&&$t.isText(l.nextSibling)&&d===l.nodeValue.length&&(d-=l.nodeValue.length,l=l.nextSibling),i=l,o=d}return{cont:i,offset:o}}function Rt(t){var s=function(t,e){var o,n;if($t.isText(t)){var i=$t.listPrev(t,A.not($t.isText)),r=B.last(i).previousSibling;o=r||t.parentNode,e+=B.sum(B.tail(i),$t.nodeLength),n=!r}else{if(o=t.childNodes[e]||t,$t.isText(o))return s(o,0);e=0,n=!1}return{node:o,collapseToStart:n,offset:e}},e=document.body.createTextRange(),o=s(t.node,t.offset);return e.moveToElementText(o.node),e.collapse(o.collapseToStart),e.moveStart("character",o.offset),e}C.fn.extend({summernote:function(){var t=C.type(B.head(arguments)),e="string"===t,o="object"===t,i=C.extend({},C.summernote.options,o?B.head(arguments):{});i.langInfo=C.extend(!0,{},C.summernote.lang["en-US"],C.summernote.lang[i.lang]),i.icons=C.extend(!0,{},C.summernote.options.icons,i.icons),i.tooltip="auto"===i.tooltip?!R.isSupportTouch:i.tooltip,this.each(function(t,e){var o=C(e);if(!o.data("summernote")){var n=new Nt(o,i);o.data("summernote",n),o.data("summernote").triggerEvent("init",n.layoutInfo)}});var n=this.first();if(n.length){var r=n.data("summernote");if(e)return r.invoke.apply(r,B.from(arguments));i.focus&&r.invoke("editor.focus")}return this}});var Lt=function(){function r(t,e,o,n){this.sc=t,this.so=e,this.ec=o,this.eo=n,this.isOnEditable=this.makeIsOn($t.isEditable),this.isOnList=this.makeIsOn($t.isList),this.isOnAnchor=this.makeIsOn($t.isAnchor),this.isOnCell=this.makeIsOn($t.isCell),this.isOnData=this.makeIsOn($t.isData)}return r.prototype.nativeRange=function(){if(R.isW3CRangeSupport){var t=document.createRange();return t.setStart(this.sc,this.sc.data&&this.so>this.sc.data.length?0:this.so),t.setEnd(this.ec,this.sc.data?Math.min(this.eo,this.sc.data.length):this.eo),t}var e=Rt({node:this.sc,offset:this.so});return e.setEndPoint("EndToEnd",Rt({node:this.ec,offset:this.eo})),e},r.prototype.getPoints=function(){return{sc:this.sc,so:this.so,ec:this.ec,eo:this.eo}},r.prototype.getStartPoint=function(){return{node:this.sc,offset:this.so}},r.prototype.getEndPoint=function(){return{node:this.ec,offset:this.eo}},r.prototype.select=function(){var t=this.nativeRange();if(R.isW3CRangeSupport){var e=document.getSelection();0<e.rangeCount&&e.removeAllRanges(),e.addRange(t)}else t.select();return this},r.prototype.scrollIntoView=function(t){var e=C(t).height();return t.scrollTop+e<this.sc.offsetTop&&(t.scrollTop+=Math.abs(t.scrollTop+e-this.sc.offsetTop)),this},r.prototype.normalize=function(){var t=function(t,e){if($t.isVisiblePoint(t)&&(!$t.isEdgePoint(t)||$t.isRightEdgePoint(t)&&!e||$t.isLeftEdgePoint(t)&&e||$t.isRightEdgePoint(t)&&e&&$t.isVoid(t.node.nextSibling)||$t.isLeftEdgePoint(t)&&!e&&$t.isVoid(t.node.previousSibling)||$t.isBlock(t.node)&&$t.isEmpty(t.node)))return t;var o=$t.ancestor(t.node,$t.isBlock);if(($t.isLeftEdgePointOf(t,o)||$t.isVoid($t.prevPoint(t).node))&&!e||($t.isRightEdgePointOf(t,o)||$t.isVoid($t.nextPoint(t).node))&&e){if($t.isVisiblePoint(t))return t;e=!e}return(e?$t.nextPointUntil($t.nextPoint(t),$t.isVisiblePoint):$t.prevPointUntil($t.prevPoint(t),$t.isVisiblePoint))||t},e=t(this.getEndPoint(),!1),o=this.isCollapsed()?e:t(this.getStartPoint(),!0);return new r(o.node,o.offset,e.node,e.offset)},r.prototype.nodes=function(o,t){o=o||A.ok;var n=t&&t.includeAncestor,i=t&&t.fullyContains,e=this.getStartPoint(),r=this.getEndPoint(),s=[],a=[];return $t.walkPoint(e,r,function(t){var e;$t.isEditable(t.node)||(i?($t.isLeftEdgePoint(t)&&a.push(t.node),$t.isRightEdgePoint(t)&&B.contains(a,t.node)&&(e=t.node)):e=n?$t.ancestor(t.node,o):t.node,e&&o(e)&&s.push(e))},!0),B.unique(s)},r.prototype.commonAncestor=function(){return $t.commonAncestor(this.sc,this.ec)},r.prototype.expand=function(t){var e=$t.ancestor(this.sc,t),o=$t.ancestor(this.ec,t);if(!e&&!o)return new r(this.sc,this.so,this.ec,this.eo);var n=this.getPoints();return e&&(n.sc=e,n.so=0),o&&(n.ec=o,n.eo=$t.nodeLength(o)),new r(n.sc,n.so,n.ec,n.eo)},r.prototype.collapse=function(t){return t?new r(this.sc,this.so,this.sc,this.so):new r(this.ec,this.eo,this.ec,this.eo)},r.prototype.splitText=function(){var t=this.sc===this.ec,e=this.getPoints();return $t.isText(this.ec)&&!$t.isEdgePoint(this.getEndPoint())&&this.ec.splitText(this.eo),$t.isText(this.sc)&&!$t.isEdgePoint(this.getStartPoint())&&(e.sc=this.sc.splitText(this.so),e.so=0,t&&(e.ec=e.sc,e.eo=this.eo-this.so)),new r(e.sc,e.so,e.ec,e.eo)},r.prototype.deleteContents=function(){if(this.isCollapsed())return this;var t=this.splitText(),e=t.nodes(null,{fullyContains:!0}),n=$t.prevPointUntil(t.getStartPoint(),function(t){return!B.contains(e,t.node)}),i=[];return C.each(e,function(t,e){var o=e.parentNode;n.node!==o&&1===$t.nodeLength(o)&&i.push(o),$t.remove(e,!1)}),C.each(i,function(t,e){$t.remove(e,!1)}),new r(n.node,n.offset,n.node,n.offset).normalize()},r.prototype.makeIsOn=function(e){return function(){var t=$t.ancestor(this.sc,e);return!!t&&t===$t.ancestor(this.ec,e)}},r.prototype.isLeftEdgeOf=function(t){if(!$t.isLeftEdgePoint(this.getStartPoint()))return!1;var e=$t.ancestor(this.sc,t);return e&&$t.isLeftEdgeOf(this.sc,e)},r.prototype.isCollapsed=function(){return this.sc===this.ec&&this.so===this.eo},r.prototype.wrapBodyInlineWithPara=function(){if($t.isBodyContainer(this.sc)&&$t.isEmpty(this.sc))return this.sc.innerHTML=$t.emptyPara,new r(this.sc.firstChild,0,this.sc.firstChild,0);var t,e=this.normalize();if($t.isParaInline(this.sc)||$t.isPara(this.sc))return e;if($t.isInline(e.sc)){var o=$t.listAncestor(e.sc,A.not($t.isInline));t=B.last(o),$t.isInline(t)||(t=o[o.length-2]||e.sc.childNodes[e.so])}else t=e.sc.childNodes[0<e.so?e.so-1:0];var n=$t.listPrev(t,$t.isParaInline).reverse();if((n=n.concat($t.listNext(t.nextSibling,$t.isParaInline))).length){var i=$t.wrap(B.head(n),"p");$t.appendChildNodes(i,B.tail(n))}return this.normalize()},r.prototype.insertNode=function(t){var e=this.wrapBodyInlineWithPara().deleteContents(),o=$t.splitPoint(e.getStartPoint(),$t.isInline(t));return o.rightNode?o.rightNode.parentNode.insertBefore(t,o.rightNode):o.container.appendChild(t),t},r.prototype.pasteHTML=function(t){var e=C("<div></div>").html(t)[0],o=B.from(e.childNodes),n=this.wrapBodyInlineWithPara().deleteContents();return 0<n.so&&(o=o.reverse()),o=o.map(function(t){return n.insertNode(t)}),0<n.so&&(o=o.reverse()),o},r.prototype.toString=function(){var t=this.nativeRange();return R.isW3CRangeSupport?t.toString():t.text},r.prototype.getWordRange=function(t){var e=this.getEndPoint();if(!$t.isCharPoint(e))return this;var o=$t.prevPointUntil(e,function(t){return!$t.isCharPoint(t)});return t&&(e=$t.nextPointUntil(e,function(t){return!$t.isCharPoint(t)})),new r(o.node,o.offset,e.node,e.offset)},r.prototype.bookmark=function(t){return{s:{path:$t.makeOffsetPath(t,this.sc),offset:this.so},e:{path:$t.makeOffsetPath(t,this.ec),offset:this.eo}}},r.prototype.paraBookmark=function(t){return{s:{path:B.tail($t.makeOffsetPath(B.head(t),this.sc)),offset:this.so},e:{path:B.tail($t.makeOffsetPath(B.last(t),this.ec)),offset:this.eo}}},r.prototype.getClientRects=function(){return this.nativeRange().getClientRects()},r}(),At={create:function(t,e,o,n){if(4===arguments.length)return new Lt(t,e,o,n);if(2===arguments.length)return new Lt(o=t,n=e,o,n);var i=this.createFromSelection();return i||1!==arguments.length?i:(i=this.createFromNode(t)).collapse($t.emptyPara===t.innerHTML)},createFromSelection:function(){var t,e,o,n;if(R.isW3CRangeSupport){var i=document.getSelection();if(!i||0===i.rangeCount)return null;if($t.isBody(i.anchorNode))return null;var r=i.getRangeAt(0);t=r.startContainer,e=r.startOffset,o=r.endContainer,n=r.endOffset}else{var s=document.selection.createRange(),a=s.duplicate();a.collapse(!1);var l=s;l.collapse(!0);var c=Et(l,!0),d=Et(a,!1);$t.isText(c.node)&&$t.isLeftEdgePoint(c)&&$t.isTextNode(d.node)&&$t.isRightEdgePoint(d)&&d.node.nextSibling===c.node&&(c=d),t=c.cont,e=c.offset,o=d.cont,n=d.offset}return new Lt(t,e,o,n)},createFromNode:function(t){var e=t,o=0,n=t,i=$t.nodeLength(n);return $t.isVoid(e)&&(o=$t.listPrev(e).length-1,e=e.parentNode),$t.isBR(n)?(i=$t.listPrev(n).length-1,n=n.parentNode):$t.isVoid(n)&&(i=$t.listPrev(n).length,n=n.parentNode),this.create(e,o,n,i)},createFromNodeBefore:function(t){return this.createFromNode(t).collapse(!0)},createFromNodeAfter:function(t){return this.createFromNode(t).collapse()},createFromBookmark:function(t,e){var o=$t.fromOffsetPath(t,e.s.path),n=e.s.offset,i=$t.fromOffsetPath(t,e.e.path),r=e.e.offset;return new Lt(o,n,i,r)},createFromParaBookmark:function(t,e){var o=t.s.offset,n=t.e.offset,i=$t.fromOffsetPath(B.head(e),t.s.path),r=$t.fromOffsetPath(B.last(e),t.e.path);return new Lt(i,o,r,n)}},Ft={BACKSPACE:8,TAB:9,ENTER:13,SPACE:32,DELETE:46,LEFT:37,UP:38,RIGHT:39,DOWN:40,NUM0:48,NUM1:49,NUM2:50,NUM3:51,NUM4:52,NUM5:53,NUM6:54,NUM7:55,NUM8:56,B:66,E:69,I:73,J:74,K:75,L:76,R:82,S:83,U:85,V:86,Y:89,Z:90,SLASH:191,LEFTBRACKET:219,BACKSLASH:220,RIGHTBRACKET:221},Pt={isEdit:function(t){return B.contains([Ft.BACKSPACE,Ft.TAB,Ft.ENTER,Ft.SPACE,Ft.DELETE],t)},isMove:function(t){return B.contains([Ft.LEFT,Ft.UP,Ft.RIGHT,Ft.DOWN],t)},nameFromCode:A.invertObject(Ft),code:Ft};var Ht=function(){function t(t){this.stack=[],this.stackOffset=-1,this.$editable=t,this.editable=t[0]}return t.prototype.makeSnapshot=function(){var t=At.create(this.editable);return{contents:this.$editable.html(),bookmark:t&&t.isOnEditable()?t.bookmark(this.editable):{s:{path:[],offset:0},e:{path:[],offset:0}}}},t.prototype.applySnapshot=function(t){null!==t.contents&&this.$editable.html(t.contents),null!==t.bookmark&&At.createFromBookmark(this.editable,t.bookmark).select()},t.prototype.rewind=function(){this.$editable.html()!==this.stack[this.stackOffset].contents&&this.recordUndo(),this.stackOffset=0,this.applySnapshot(this.stack[this.stackOffset])},t.prototype.commit=function(){this.stack=[],this.stackOffset=-1,this.recordUndo()},t.prototype.reset=function(){this.stack=[],this.stackOffset=-1,this.$editable.html(""),this.recordUndo()},t.prototype.undo=function(){this.$editable.html()!==this.stack[this.stackOffset].contents&&this.recordUndo(),0<this.stackOffset&&(this.stackOffset--,this.applySnapshot(this.stack[this.stackOffset]))},t.prototype.redo=function(){this.stack.length-1>this.stackOffset&&(this.stackOffset++,this.applySnapshot(this.stack[this.stackOffset]))},t.prototype.recordUndo=function(){this.stackOffset++,this.stack.length>this.stackOffset&&(this.stack=this.stack.slice(0,this.stackOffset)),this.stack.push(this.makeSnapshot())},t}(),Dt=function(){function t(){}return t.prototype.jQueryCSS=function(o,t){if(R.jqueryVersion<1.9){var n={};return C.each(t,function(t,e){n[e]=o.css(e)}),n}return o.css(t)},t.prototype.fromNode=function(t){var e=this.jQueryCSS(t,["font-family","font-size","text-align","list-style-type","line-height"])||{};return e["font-size"]=parseInt(e["font-size"],10),e},t.prototype.stylePara=function(t,o){C.each(t.nodes($t.isPara,{includeAncestor:!0}),function(t,e){C(e).css(o)})},t.prototype.styleNodes=function(t,e){t=t.splitText();var o=e&&e.nodeName||"SPAN",n=!(!e||!e.expandClosestSibling),i=!(!e||!e.onlyPartialContains);if(t.isCollapsed())return[t.insertNode($t.create(o))];var r=$t.makePredByNodeName(o),s=t.nodes($t.isText,{fullyContains:!0}).map(function(t){return $t.singleChildAncestor(t,r)||$t.wrap(t,o)});if(n){if(i){var a=t.nodes();r=A.and(r,function(t){return B.contains(a,t)})}return s.map(function(t){var e=$t.withClosestSiblings(t,r),o=B.head(e),n=B.tail(e);return C.each(n,function(t,e){$t.appendChildNodes(o,e.childNodes),$t.remove(e)}),B.head(e)})}return s},t.prototype.current=function(t){var e=C($t.isElement(t.sc)?t.sc:t.sc.parentNode),o=this.fromNode(e);try{o=C.extend(o,{"font-bold":document.queryCommandState("bold")?"bold":"normal","font-italic":document.queryCommandState("italic")?"italic":"normal","font-underline":document.queryCommandState("underline")?"underline":"normal","font-subscript":document.queryCommandState("subscript")?"subscript":"normal","font-superscript":document.queryCommandState("superscript")?"superscript":"normal","font-strikethrough":document.queryCommandState("strikethrough")?"strikethrough":"normal","font-family":document.queryCommandValue("fontname")||o["font-family"]})}catch(t){}if(t.isOnList()){var n=-1<["circle","disc","disc-leading-zero","square"].indexOf(o["list-style-type"]);o["list-style"]=n?"unordered":"ordered"}else o["list-style"]="none";var i=$t.ancestor(t.sc,$t.isPara);if(i&&i.style["line-height"])o["line-height"]=i.style.lineHeight;else{var r=parseInt(o["line-height"],10)/parseInt(o["font-size"],10);o["line-height"]=r.toFixed(1)}return o.anchor=t.isOnAnchor()&&$t.ancestor(t.sc,$t.isAnchor),o.ancestors=$t.listAncestor(t.sc,$t.isEditable),o.range=t,o},t}(),Bt=function(){function t(){}return t.prototype.insertOrderedList=function(t){this.toggleList("OL",t)},t.prototype.insertUnorderedList=function(t){this.toggleList("UL",t)},t.prototype.indent=function(t){var i=this,e=At.create(t).wrapBodyInlineWithPara(),o=e.nodes($t.isPara,{includeAncestor:!0}),n=B.clusterBy(o,A.peq2("parentNode"));C.each(n,function(t,e){var o=B.head(e);if($t.isLi(o)){var n=i.findList(o.previousSibling);n?e.map(function(t){return n.appendChild(t)}):(i.wrapList(e,o.parentNode.nodeName),e.map(function(t){return t.parentNode}).map(function(t){return i.appendToPrevious(t)}))}else C.each(e,function(t,e){C(e).css("marginLeft",function(t,e){return(parseInt(e,10)||0)+25})})}),e.select()},t.prototype.outdent=function(t){var n=this,e=At.create(t).wrapBodyInlineWithPara(),o=e.nodes($t.isPara,{includeAncestor:!0}),i=B.clusterBy(o,A.peq2("parentNode"));C.each(i,function(t,e){var o=B.head(e);$t.isLi(o)?n.releaseList([e]):C.each(e,function(t,e){C(e).css("marginLeft",function(t,e){return 25<(e=parseInt(e,10)||0)?e-25:""})})}),e.select()},t.prototype.toggleList=function(o,t){var n=this,e=At.create(t).wrapBodyInlineWithPara(),i=e.nodes($t.isPara,{includeAncestor:!0}),r=e.paraBookmark(i),s=B.clusterBy(i,A.peq2("parentNode"));if(B.find(i,$t.isPurePara)){var a=[];C.each(s,function(t,e){a=a.concat(n.wrapList(e,o))}),i=a}else{var l=e.nodes($t.isList,{includeAncestor:!0}).filter(function(t){return!C.nodeName(t,o)});l.length?C.each(l,function(t,e){$t.replace(e,o)}):i=this.releaseList(s,!0)}At.createFromParaBookmark(r,i).select()},t.prototype.wrapList=function(t,e){var o=B.head(t),n=B.last(t),i=$t.isList(o.previousSibling)&&o.previousSibling,r=$t.isList(n.nextSibling)&&n.nextSibling,s=i||$t.insertAfter($t.create(e||"UL"),n);return t=t.map(function(t){return $t.isPurePara(t)?$t.replace(t,"LI"):t}),$t.appendChildNodes(s,t),r&&($t.appendChildNodes(s,B.from(r.childNodes)),$t.remove(r)),t},t.prototype.releaseList=function(t,c){var d=this,u=[];return C.each(t,function(t,e){var o=B.head(e),n=B.last(e),i=c?$t.lastAncestor(o,$t.isList):o.parentNode,r=i.parentNode;if("LI"===i.parentNode.nodeName)e.map(function(t){var e=d.findNextSiblings(t);r.nextSibling?r.parentNode.insertBefore(t,r.nextSibling):r.parentNode.appendChild(t),e.length&&(d.wrapList(e,i.nodeName),t.appendChild(e[0].parentNode))}),0===i.children.length&&r.removeChild(i),0===r.childNodes.length&&r.parentNode.removeChild(r);else{var s=1<i.childNodes.length?$t.splitTree(i,{node:n.parentNode,offset:$t.position(n)+1},{isSkipPaddingBlankHTML:!0}):null,a=$t.splitTree(i,{node:o.parentNode,offset:$t.position(o)},{isSkipPaddingBlankHTML:!0});e=c?$t.listDescendant(a,$t.isLi):B.from(a.childNodes).filter($t.isLi),!c&&$t.isList(i.parentNode)||(e=e.map(function(t){return $t.replace(t,"P")})),C.each(B.from(e).reverse(),function(t,e){$t.insertAfter(e,i)});var l=B.compact([i,a,s]);C.each(l,function(t,e){var o=[e].concat($t.listDescendant(e,$t.isList));C.each(o.reverse(),function(t,e){$t.nodeLength(e)||$t.remove(e,!0)})})}u=u.concat(e)}),u},t.prototype.appendToPrevious=function(t){return t.previousSibling?$t.appendChildNodes(t.previousSibling,[t]):this.wrapList([t],"LI")},t.prototype.findList=function(t){return t?B.find(t.children,function(t){return-1<["OL","UL"].indexOf(t.nodeName)}):null},t.prototype.findNextSiblings=function(t){for(var e=[];t.nextSibling;)e.push(t.nextSibling),t=t.nextSibling;return e},t}(),zt=function(){function t(t){this.bullet=new Bt,this.options=t.options}return t.prototype.insertTab=function(t,e){var o=$t.createText(new Array(e+1).join($t.NBSP_CHAR));(t=t.deleteContents()).insertNode(o,!0),(t=At.create(o,e)).select()},t.prototype.insertParagraph=function(t,e){e=(e=(e=e||At.create(t)).deleteContents()).wrapBodyInlineWithPara();var o,n=$t.ancestor(e.sc,$t.isPara);if(n){if($t.isEmpty(n)&&$t.isLi(n))return void this.bullet.toggleList(n.parentNode.nodeName);var i=null;if(1===this.options.blockquoteBreakingLevel?i=$t.ancestor(n,$t.isBlockquote):2===this.options.blockquoteBreakingLevel&&(i=$t.lastAncestor(n,$t.isBlockquote)),i){o=C($t.emptyPara)[0],$t.isRightEdgePoint(e.getStartPoint())&&$t.isBR(e.sc.nextSibling)&&C(e.sc.nextSibling).remove();var r=$t.splitTree(i,e.getStartPoint(),{isDiscardEmptySplits:!0});r?r.parentNode.insertBefore(o,r):$t.insertAfter(o,i)}else{o=$t.splitTree(n,e.getStartPoint());var s=$t.listDescendant(n,$t.isEmptyAnchor);s=s.concat($t.listDescendant(o,$t.isEmptyAnchor)),C.each(s,function(t,e){$t.remove(e)}),($t.isHeading(o)||$t.isPre(o)||$t.isCustomStyleTag(o))&&$t.isEmpty(o)&&(o=$t.replace(o,"p"))}}else{var a=e.sc.childNodes[e.so];o=C($t.emptyPara)[0],a?e.sc.insertBefore(o,a):e.sc.appendChild(o)}At.create(o,0).normalize().select().scrollIntoView(t)},t}(),Mt=function(t,h,p,i){var f={colPos:0,rowPos:0},m=[],g=[];function v(t,e,o,n,i,r,s){var a={baseRow:o,baseCell:n,isRowSpan:i,isColSpan:r,isVirtual:s};m[t]||(m[t]=[]),m[t][e]=a}function b(t,e){if(!m[t])return e;if(!m[t][e])return e;for(var o=e;m[t][o];)if(o++,!m[t][o])return o}function r(t,e){var o=b(t.rowIndex,e.cellIndex),n=1<e.colSpan,i=1<e.rowSpan,r=t.rowIndex===f.rowPos&&e.cellIndex===f.colPos;v(t.rowIndex,o,t,e,i,n,!1);var s=e.attributes.rowSpan?parseInt(e.attributes.rowSpan.value,10):0;if(1<s)for(var a=1;a<s;a++){var l=t.rowIndex+a;y(l,o,e,r),v(l,o,t,e,!0,n,!0)}var c=e.attributes.colSpan?parseInt(e.attributes.colSpan.value,10):0;if(1<c)for(var d=1;d<c;d++){var u=b(t.rowIndex,o+d);y(t.rowIndex,u,e,r),v(t.rowIndex,u,t,e,i,!0,!0)}}function y(t,e,o,n){t===f.rowPos&&f.colPos>=o.cellIndex&&o.cellIndex<=e&&!n&&f.colPos++}function k(t){switch(h){case Mt.where.Column:if(t.isColSpan)return Mt.resultAction.SubtractSpanCount;break;case Mt.where.Row:if(!t.isVirtual&&t.isRowSpan)return Mt.resultAction.AddCell;if(t.isRowSpan)return Mt.resultAction.SubtractSpanCount}return Mt.resultAction.RemoveCell}function C(t){switch(h){case Mt.where.Column:if(t.isColSpan)return Mt.resultAction.SumSpanCount;if(t.isRowSpan&&t.isVirtual)return Mt.resultAction.Ignore;break;case Mt.where.Row:if(t.isRowSpan)return Mt.resultAction.SumSpanCount;if(t.isColSpan&&t.isVirtual)return Mt.resultAction.Ignore}return Mt.resultAction.AddCell}this.getActionList=function(){for(var t,e,o,n=h===Mt.where.Row?f.rowPos:-1,i=h===Mt.where.Column?f.colPos:-1,r=0,s=!0;s;){var a=0<=n?n:r,l=0<=i?i:r,c=m[a];if(!c)return s=!1,g;var d=c[l];if(!d)return s=!1,g;var u=Mt.resultAction.Ignore;switch(p){case Mt.requestAction.Add:u=C(d);break;case Mt.requestAction.Delete:u=k(d)}g.push((t=u,e=a,o=l,{baseCell:d.baseCell,action:t,virtualTable:{rowIndex:e,cellIndex:o}})),r++}return g},t&&t.tagName&&("td"===t.tagName.toLowerCase()||"th"===t.tagName.toLowerCase())?(f.colPos=t.cellIndex,t.parentElement&&t.parentElement.tagName&&"tr"===t.parentElement.tagName.toLowerCase()?f.rowPos=t.parentElement.rowIndex:console.error("Impossible to identify start Row point.",t)):console.error("Impossible to identify start Cell point.",t),function(){for(var t=i.rows,e=0;e<t.length;e++)for(var o=t[e].cells,n=0;n<o.length;n++)r(t[e],o[n])}()};Mt.where={Row:0,Column:1},Mt.requestAction={Add:0,Delete:1},Mt.resultAction={Ignore:0,SubtractSpanCount:1,RemoveCell:2,AddCell:3,SumSpanCount:4};var Ot,Ut=function(){function t(){}return t.prototype.tab=function(t,e){var o=$t.ancestor(t.commonAncestor(),$t.isCell),n=$t.ancestor(o,$t.isTable),i=$t.listDescendant(n,$t.isCell),r=B[e?"prev":"next"](i,o);r&&At.create(r,0).select()},t.prototype.addRow=function(t,e){for(var o=$t.ancestor(t.commonAncestor(),$t.isCell),n=C(o).closest("tr"),i=this.recoverAttributes(n),r=C("<tr"+i+"></tr>"),s=new Mt(o,Mt.where.Row,Mt.requestAction.Add,C(n).closest("table")[0]).getActionList(),a=0;a<s.length;a++){var l=s[a],c=this.recoverAttributes(l.baseCell);switch(l.action){case Mt.resultAction.AddCell:r.append("<td"+c+">"+$t.blank+"</td>");break;case Mt.resultAction.SumSpanCount:if("top"===e)if((l.baseCell.parent?l.baseCell.closest("tr").rowIndex:0)<=n[0].rowIndex){var d=C("<div></div>").append(C("<td"+c+">"+$t.blank+"</td>").removeAttr("rowspan")).html();r.append(d);break}var u=parseInt(l.baseCell.rowSpan,10);u++,l.baseCell.setAttribute("rowSpan",u)}}if("top"===e)n.before(r);else{if(1<o.rowSpan){var h=n[0].rowIndex+(o.rowSpan-2);return void C(C(n).parent().find("tr")[h]).after(C(r))}n.after(r)}},t.prototype.addCol=function(t,e){var o=$t.ancestor(t.commonAncestor(),$t.isCell),n=C(o).closest("tr");C(n).siblings().push(n);for(var i=new Mt(o,Mt.where.Column,Mt.requestAction.Add,C(n).closest("table")[0]).getActionList(),r=0;r<i.length;r++){var s=i[r],a=this.recoverAttributes(s.baseCell);switch(s.action){case Mt.resultAction.AddCell:"right"===e?C(s.baseCell).after("<td"+a+">"+$t.blank+"</td>"):C(s.baseCell).before("<td"+a+">"+$t.blank+"</td>");break;case Mt.resultAction.SumSpanCount:if("right"===e){var l=parseInt(s.baseCell.colSpan,10);l++,s.baseCell.setAttribute("colSpan",l)}else C(s.baseCell).before("<td"+a+">"+$t.blank+"</td>")}}},t.prototype.recoverAttributes=function(t){var e="";if(!t)return e;for(var o=t.attributes||[],n=0;n<o.length;n++)"id"!==o[n].name.toLowerCase()&&o[n].specified&&(e+=" "+o[n].name+"='"+o[n].value+"'");return e},t.prototype.deleteRow=function(t){for(var e=$t.ancestor(t.commonAncestor(),$t.isCell),o=C(e).closest("tr"),n=o.children("td, th").index(C(e)),i=o[0].rowIndex,r=new Mt(e,Mt.where.Row,Mt.requestAction.Delete,C(o).closest("table")[0]).getActionList(),s=0;s<r.length;s++)if(r[s]){var a=r[s].baseCell,l=r[s].virtualTable,c=a.rowSpan&&1<a.rowSpan,d=c?parseInt(a.rowSpan,10):0;switch(r[s].action){case Mt.resultAction.Ignore:continue;case Mt.resultAction.AddCell:var u=o.next("tr")[0];if(!u)continue;var h=o[0].cells[n];c&&(2<d?(d--,u.insertBefore(h,u.cells[n]),u.cells[n].setAttribute("rowSpan",d),u.cells[n].innerHTML=""):2===d&&(u.insertBefore(h,u.cells[n]),u.cells[n].removeAttribute("rowSpan"),u.cells[n].innerHTML=""));continue;case Mt.resultAction.SubtractSpanCount:c&&(2<d?(d--,a.setAttribute("rowSpan",d),l.rowIndex!==i&&a.cellIndex===n&&(a.innerHTML="")):2===d&&(a.removeAttribute("rowSpan"),l.rowIndex!==i&&a.cellIndex===n&&(a.innerHTML="")));continue;case Mt.resultAction.RemoveCell:continue}}o.remove()},t.prototype.deleteCol=function(t){for(var e=$t.ancestor(t.commonAncestor(),$t.isCell),o=C(e).closest("tr"),n=o.children("td, th").index(C(e)),i=new Mt(e,Mt.where.Column,Mt.requestAction.Delete,C(o).closest("table")[0]).getActionList(),r=0;r<i.length;r++)if(i[r])switch(i[r].action){case Mt.resultAction.Ignore:continue;case Mt.resultAction.SubtractSpanCount:var s=i[r].baseCell;if(s.colSpan&&1<s.colSpan){var a=s.colSpan?parseInt(s.colSpan,10):0;2<a?(a--,s.setAttribute("colSpan",a),s.cellIndex===n&&(s.innerHTML="")):2===a&&(s.removeAttribute("colSpan"),s.cellIndex===n&&(s.innerHTML=""))}continue;case Mt.resultAction.RemoveCell:$t.remove(i[r].baseCell,!0);continue}},t.prototype.createTable=function(t,e,o){for(var n,i=[],r=0;r<t;r++)i.push("<td>"+$t.blank+"</td>");n=i.join("");for(var s,a=[],l=0;l<e;l++)a.push("<tr>"+n+"</tr>");s=a.join("");var c=C("<table>"+s+"</table>");return o&&o.tableClassName&&c.addClass(o.tableClassName),c[0]},t.prototype.deleteTable=function(t){var e=$t.ancestor(t.commonAncestor(),$t.isCell);C(e).closest("table").remove()},t}(),jt=function(){function t(t){var u=this;this.context=t,this.$note=t.layoutInfo.note,this.$editor=t.layoutInfo.editor,this.$editable=t.layoutInfo.editable,this.options=t.options,this.lang=this.options.langInfo,this.editable=this.$editable[0],this.lastRange=null,this.style=new Dt,this.table=new Ut,this.typing=new zt(t),this.bullet=new Bt,this.history=new Ht(this.$editable),this.context.memo("help.undo",this.lang.help.undo),this.context.memo("help.redo",this.lang.help.redo),this.context.memo("help.tab",this.lang.help.tab),this.context.memo("help.untab",this.lang.help.untab),this.context.memo("help.insertParagraph",this.lang.help.insertParagraph),this.context.memo("help.insertOrderedList",this.lang.help.insertOrderedList),this.context.memo("help.insertUnorderedList",this.lang.help.insertUnorderedList),this.context.memo("help.indent",this.lang.help.indent),this.context.memo("help.outdent",this.lang.help.outdent),this.context.memo("help.formatPara",this.lang.help.formatPara),this.context.memo("help.insertHorizontalRule",this.lang.help.insertHorizontalRule),this.context.memo("help.fontName",this.lang.help.fontName);for(var e=["bold","italic","underline","strikethrough","superscript","subscript","justifyLeft","justifyCenter","justifyRight","justifyFull","formatBlock","removeFormat","backColor"],o=0,n=e.length;o<n;o++)this[e[o]]=function(e){return function(t){u.beforeCommand(),document.execCommand(e,!1,t),u.afterCommand(!0)}}(e[o]),this.context.memo("help."+e[o],this.lang.help[e[o]]);this.fontName=this.wrapCommand(function(t){return u.fontStyling("font-family","'"+t+"'")}),this.fontSize=this.wrapCommand(function(t){return u.fontStyling("font-size",t+"px")});for(o=1;o<=6;o++)this["formatH"+o]=function(t){return function(){u.formatBlock("H"+t)}}(o),this.context.memo("help.formatH"+o,this.lang.help["formatH"+o]);this.insertParagraph=this.wrapCommand(function(){u.typing.insertParagraph(u.editable)}),this.insertOrderedList=this.wrapCommand(function(){u.bullet.insertOrderedList(u.editable)}),this.insertUnorderedList=this.wrapCommand(function(){u.bullet.insertUnorderedList(u.editable)}),this.indent=this.wrapCommand(function(){u.bullet.indent(u.editable)}),this.outdent=this.wrapCommand(function(){u.bullet.outdent(u.editable)}),this.insertNode=this.wrapCommand(function(t){u.isLimited(C(t).text().length)||(u.getLastRange().insertNode(t),At.createFromNodeAfter(t).select(),u.setLastRange())}),this.insertText=this.wrapCommand(function(t){if(!u.isLimited(t.length)){var e=u.getLastRange().insertNode($t.createText(t));At.create(e,$t.nodeLength(e)).select(),u.setLastRange()}}),this.pasteHTML=this.wrapCommand(function(t){if(!u.isLimited(t.length)){t=u.context.invoke("codeview.purify",t);var e=u.getLastRange().pasteHTML(t);At.createFromNodeAfter(B.last(e)).select(),u.setLastRange()}}),this.formatBlock=this.wrapCommand(function(t,e){var o=u.options.callbacks.onApplyCustomStyle;o?o.call(u,e,u.context,u.onFormatBlock):u.onFormatBlock(t,e)}),this.insertHorizontalRule=this.wrapCommand(function(){var t=u.getLastRange().insertNode($t.create("HR"));t.nextSibling&&(At.create(t.nextSibling,0).normalize().select(),u.setLastRange())}),this.lineHeight=this.wrapCommand(function(t){u.style.stylePara(u.getLastRange(),{lineHeight:t})}),this.createLink=this.wrapCommand(function(t){var o=t.url,e=t.text,n=t.isNewWindow,i=t.range||u.getLastRange(),r=e.length-i.toString().length;if(!(0<r&&u.isLimited(r))){var s=i.toString()!==e;"string"==typeof o&&(o=o.trim()),o=u.options.onCreateLink?u.options.onCreateLink(o):/^([A-Za-z][A-Za-z0-9+-.]*\:|#|\/)/.test(o)?o:"http://"+o;var a=[];if(s){var l=(i=i.deleteContents()).insertNode(C("<A>"+e+"</A>")[0]);a.push(l)}else a=u.style.styleNodes(i,{nodeName:"A",expandClosestSibling:!0,onlyPartialContains:!0});C.each(a,function(t,e){C(e).attr("href",o),n?C(e).attr("target","_blank"):C(e).removeAttr("target")});var c=At.createFromNodeBefore(B.head(a)).getStartPoint(),d=At.createFromNodeAfter(B.last(a)).getEndPoint();At.create(c.node,c.offset,d.node,d.offset).select(),u.setLastRange()}}),this.color=this.wrapCommand(function(t){var e=t.foreColor,o=t.backColor;e&&document.execCommand("foreColor",!1,e),o&&document.execCommand("backColor",!1,o)}),this.foreColor=this.wrapCommand(function(t){document.execCommand("styleWithCSS",!1,!0),document.execCommand("foreColor",!1,t)}),this.insertTable=this.wrapCommand(function(t){var e=t.split("x");u.getLastRange().deleteContents().insertNode(u.table.createTable(e[0],e[1],u.options))}),this.removeMedia=this.wrapCommand(function(){var t=C(u.restoreTarget()).parent();t.parent("figure").length?t.parent("figure").remove():t=C(u.restoreTarget()).detach(),u.context.triggerEvent("media.delete",t,u.$editable)}),this.floatMe=this.wrapCommand(function(t){var e=C(u.restoreTarget());e.toggleClass("note-float-left","left"===t),e.toggleClass("note-float-right","right"===t),e.css("float","none"===t?"":t)}),this.resize=this.wrapCommand(function(t){var e=C(u.restoreTarget());0===(t=parseFloat(t))?e.css("width",""):e.css({width:100*t+"%",height:""})})}return t.prototype.initialize=function(){var e=this;this.$editable.on("keydown",function(t){if(t.keyCode===Pt.code.ENTER&&e.context.triggerEvent("enter",t),e.context.triggerEvent("keydown",t),t.isDefaultPrevented()||(e.options.shortcuts?e.handleKeyMap(t):e.preventDefaultEditableShortCuts(t)),e.isLimited(1,t))return!1}).on("keyup",function(t){e.setLastRange(),e.context.triggerEvent("keyup",t)}).on("focus",function(t){e.setLastRange(),e.context.triggerEvent("focus",t)}).on("blur",function(t){e.context.triggerEvent("blur",t)}).on("mousedown",function(t){e.context.triggerEvent("mousedown",t)}).on("mouseup",function(t){e.setLastRange(),e.context.triggerEvent("mouseup",t)}).on("scroll",function(t){e.context.triggerEvent("scroll",t)}).on("paste",function(t){e.setLastRange(),e.context.triggerEvent("paste",t)}),this.$editable.attr("spellcheck",this.options.spellCheck),this.$editable.html($t.html(this.$note)||$t.emptyPara),this.$editable.on(R.inputEventName,A.debounce(function(){e.context.triggerEvent("change",e.$editable.html(),e.$editable)},10)),this.$editor.on("focusin",function(t){e.context.triggerEvent("focusin",t)}).on("focusout",function(t){e.context.triggerEvent("focusout",t)}),this.options.airMode||(this.options.width&&this.$editor.outerWidth(this.options.width),this.options.height&&this.$editable.outerHeight(this.options.height),this.options.maxHeight&&this.$editable.css("max-height",this.options.maxHeight),this.options.minHeight&&this.$editable.css("min-height",this.options.minHeight)),this.history.recordUndo(),this.setLastRange()},t.prototype.destroy=function(){this.$editable.off()},t.prototype.handleKeyMap=function(t){var e=this.options.keyMap[R.isMac?"mac":"pc"],o=[];t.metaKey&&o.push("CMD"),t.ctrlKey&&!t.altKey&&o.push("CTRL"),t.shiftKey&&o.push("SHIFT");var n=Pt.nameFromCode[t.keyCode];n&&o.push(n);var i=e[o.join("+")];i?!1!==this.context.invoke(i)&&t.preventDefault():Pt.isEdit(t.keyCode)&&this.afterCommand()},t.prototype.preventDefaultEditableShortCuts=function(t){(t.ctrlKey||t.metaKey)&&B.contains([66,73,85],t.keyCode)&&t.preventDefault()},t.prototype.isLimited=function(t,e){return t=t||0,(void 0===e||!(Pt.isMove(e.keyCode)||e.ctrlKey||e.metaKey||B.contains([Pt.code.BACKSPACE,Pt.code.DELETE],e.keyCode)))&&(0<this.options.maxTextLength&&this.$editable.text().length+t>=this.options.maxTextLength)},t.prototype.createRange=function(){return this.focus(),this.setLastRange(),this.getLastRange()},t.prototype.setLastRange=function(){this.lastRange=At.create(this.editable)},t.prototype.getLastRange=function(){return this.lastRange||this.setLastRange(),this.lastRange},t.prototype.saveRange=function(t){t&&this.getLastRange().collapse().select()},t.prototype.restoreRange=function(){this.lastRange&&(this.lastRange.select(),this.focus())},t.prototype.saveTarget=function(t){this.$editable.data("target",t)},t.prototype.clearTarget=function(){this.$editable.removeData("target")},t.prototype.restoreTarget=function(){return this.$editable.data("target")},t.prototype.currentStyle=function(){var t=At.create();return t&&(t=t.normalize()),t?this.style.current(t):this.style.fromNode(this.$editable)},t.prototype.styleFromNode=function(t){return this.style.fromNode(t)},t.prototype.undo=function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.undo(),this.context.triggerEvent("change",this.$editable.html(),this.$editable)},t.prototype.commit=function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.commit(),this.context.triggerEvent("change",this.$editable.html(),this.$editable)},t.prototype.redo=function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.redo(),this.context.triggerEvent("change",this.$editable.html(),this.$editable)},t.prototype.beforeCommand=function(){this.context.triggerEvent("before.command",this.$editable.html()),this.focus()},t.prototype.afterCommand=function(t){this.normalizeContent(),this.history.recordUndo(),t||this.context.triggerEvent("change",this.$editable.html(),this.$editable)},t.prototype.tab=function(){var t=this.getLastRange();if(t.isCollapsed()&&t.isOnCell())this.table.tab(t);else{if(0===this.options.tabSize)return!1;this.isLimited(this.options.tabSize)||(this.beforeCommand(),this.typing.insertTab(t,this.options.tabSize),this.afterCommand())}},t.prototype.untab=function(){var t=this.getLastRange();if(t.isCollapsed()&&t.isOnCell())this.table.tab(t,!0);else if(0===this.options.tabSize)return!1},t.prototype.wrapCommand=function(t){return function(){this.beforeCommand(),t.apply(this,arguments),this.afterCommand()}},t.prototype.insertImage=function(t,e){var o,n=this;return(o=t,C.Deferred(function(t){var e=C("<img>");e.one("load",function(){e.off("error abort"),t.resolve(e)}).one("error abort",function(){e.off("load").detach(),t.reject(e)}).css({display:"none"}).appendTo(document.body).attr("src",o)}).promise()).then(function(t){n.beforeCommand(),"function"==typeof e?e(t):("string"==typeof e&&t.attr("data-filename",e),t.css("width",Math.min(n.$editable.width(),t.width()))),t.show(),At.create(n.editable).insertNode(t[0]),At.createFromNodeAfter(t[0]).select(),n.setLastRange(),n.afterCommand()}).fail(function(t){n.context.triggerEvent("image.upload.error",t)})},t.prototype.insertImagesAsDataURL=function(t){var i=this;C.each(t,function(t,e){var n,o=e.name;i.options.maximumImageFileSize&&i.options.maximumImageFileSize<e.size?i.context.triggerEvent("image.upload.error",i.lang.image.maximumFileSizeError):(n=e,C.Deferred(function(o){C.extend(new FileReader,{onload:function(t){var e=t.target.result;o.resolve(e)},onerror:function(t){o.reject(t)}}).readAsDataURL(n)}).promise()).then(function(t){return i.insertImage(t,o)}).fail(function(){i.context.triggerEvent("image.upload.error")})})},t.prototype.insertImagesOrCallback=function(t){this.options.callbacks.onImageUpload?this.context.triggerEvent("image.upload",t):this.insertImagesAsDataURL(t)},t.prototype.getSelectedText=function(){var t=this.getLastRange();return t.isOnAnchor()&&(t=At.createFromNode($t.ancestor(t.sc,$t.isAnchor))),t.toString()},t.prototype.onFormatBlock=function(t,e){if(document.execCommand("FormatBlock",!1,R.isMSIE?"<"+t+">":t),e&&e.length&&(e[0].tagName.toUpperCase()!==t.toUpperCase()&&(e=e.find(t)),e&&e.length)){var o=e[0].className||"";if(o){var n=this.createRange();C([n.sc,n.ec]).closest(t).addClass(o)}}},t.prototype.formatPara=function(){this.formatBlock("P")},t.prototype.fontStyling=function(t,e){var o=this.getLastRange();if(o){var n=this.style.styleNodes(o);if(C(n).css(t,e),o.isCollapsed()){var i=B.head(n);i&&!$t.nodeLength(i)&&(i.innerHTML=$t.ZERO_WIDTH_NBSP_CHAR,At.createFromNodeAfter(i.firstChild).select(),this.setLastRange(),this.$editable.data("bogus",i))}}},t.prototype.unlink=function(){var t=this.getLastRange();if(t.isOnAnchor()){var e=$t.ancestor(t.sc,$t.isAnchor);(t=At.createFromNode(e)).select(),this.setLastRange(),this.beforeCommand(),document.execCommand("unlink"),this.afterCommand()}},t.prototype.getLinkInfo=function(){var t=this.getLastRange().expand($t.isAnchor),e=C(B.head(t.nodes($t.isAnchor))),o={range:t,text:t.toString(),url:e.length?e.attr("href"):""};return e.length&&(o.isNewWindow="_blank"===e.attr("target")),o},t.prototype.addRow=function(t){var e=this.getLastRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.addRow(e,t),this.afterCommand())},t.prototype.addCol=function(t){var e=this.getLastRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.addCol(e,t),this.afterCommand())},t.prototype.deleteRow=function(){var t=this.getLastRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.deleteRow(t),this.afterCommand())},t.prototype.deleteCol=function(){var t=this.getLastRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.deleteCol(t),this.afterCommand())},t.prototype.deleteTable=function(){var t=this.getLastRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.deleteTable(t),this.afterCommand())},t.prototype.resizeTo=function(t,e,o){var n;if(o){var i=t.y/t.x,r=e.data("ratio");n={width:i<r?t.x:t.y/r,height:i<r?t.x*r:t.y}}else n={width:t.x,height:t.y};e.css(n)},t.prototype.hasFocus=function(){return this.$editable.is(":focus")},t.prototype.focus=function(){this.hasFocus()||this.$editable.focus()},t.prototype.isEmpty=function(){return $t.isEmpty(this.$editable[0])||$t.emptyPara===this.$editable.html()},t.prototype.empty=function(){this.context.invoke("code",$t.emptyPara)},t.prototype.normalizeContent=function(){this.$editable[0].normalize()},t}(),Kt=function(){function t(t){this.context=t,this.$editable=t.layoutInfo.editable}return t.prototype.initialize=function(){this.$editable.on("paste",this.pasteByEvent.bind(this))},t.prototype.pasteByEvent=function(t){var e=t.originalEvent.clipboardData;if(e&&e.items&&e.items.length){var o=1<e.items.length?e.items[1]:B.head(e.items);"file"===o.kind&&-1!==o.type.indexOf("image/")&&this.context.invoke("editor.insertImagesOrCallback",[o.getAsFile()]),this.context.invoke("editor.afterCommand")}},t}(),Wt=function(){function t(t){this.context=t,this.$eventListener=C(document),this.$editor=t.layoutInfo.editor,this.$editable=t.layoutInfo.editable,this.options=t.options,this.lang=this.options.langInfo,this.documentEventHandlers={},this.$dropzone=C(['<div class="note-dropzone">',' <div class="note-dropzone-message"/>',"</div>"].join("")).prependTo(this.$editor)}return t.prototype.initialize=function(){this.options.disableDragAndDrop?(this.documentEventHandlers.onDrop=function(t){t.preventDefault()},this.$eventListener=this.$dropzone,this.$eventListener.on("drop",this.documentEventHandlers.onDrop)):this.attachDragAndDropEvent()},t.prototype.attachDragAndDropEvent=function(){var i=this,n=C(),r=this.$dropzone.find(".note-dropzone-message");this.documentEventHandlers.onDragenter=function(t){var e=i.context.invoke("codeview.isActivated"),o=0<i.$editor.width()&&0<i.$editor.height();e||n.length||!o||(i.$editor.addClass("dragover"),i.$dropzone.width(i.$editor.width()),i.$dropzone.height(i.$editor.height()),r.text(i.lang.image.dragImageHere)),n=n.add(t.target)},this.documentEventHandlers.onDragleave=function(t){(n=n.not(t.target)).length||i.$editor.removeClass("dragover")},this.documentEventHandlers.onDrop=function(){n=C(),i.$editor.removeClass("dragover")},this.$eventListener.on("dragenter",this.documentEventHandlers.onDragenter).on("dragleave",this.documentEventHandlers.onDragleave).on("drop",this.documentEventHandlers.onDrop),this.$dropzone.on("dragenter",function(){i.$dropzone.addClass("hover"),r.text(i.lang.image.dropImage)}).on("dragleave",function(){i.$dropzone.removeClass("hover"),r.text(i.lang.image.dragImageHere)}),this.$dropzone.on("drop",function(t){var n=t.originalEvent.dataTransfer;t.preventDefault(),n&&n.files&&n.files.length?(i.$editable.focus(),i.context.invoke("editor.insertImagesOrCallback",n.files)):C.each(n.types,function(t,e){var o=n.getData(e);-1<e.toLowerCase().indexOf("text")?i.context.invoke("editor.pasteHTML",o):C(o).each(function(t,e){i.context.invoke("editor.insertNode",e)})})}).on("dragover",!1)},t.prototype.destroy=function(){var e=this;Object.keys(this.documentEventHandlers).forEach(function(t){e.$eventListener.off(t.substr(2).toLowerCase(),e.documentEventHandlers[t])}),this.documentEventHandlers={}},t}();R.hasCodeMirror&&(Ot=window.CodeMirror);var qt=function(){function t(t){this.context=t,this.$editor=t.layoutInfo.editor,this.$editable=t.layoutInfo.editable,this.$codable=t.layoutInfo.codable,this.options=t.options}return t.prototype.sync=function(){this.isActivated()&&R.hasCodeMirror&&this.$codable.data("cmEditor").save()},t.prototype.isActivated=function(){return this.$editor.hasClass("codeview")},t.prototype.toggle=function(){this.isActivated()?this.deactivate():this.activate(),this.context.triggerEvent("codeview.toggled")},t.prototype.purify=function(t){if(this.options.codeviewFilter&&(t=t.replace(this.options.codeviewFilterRegex,""),this.options.codeviewIframeFilter)){var i=this.options.codeviewIframeWhitelistSrc.concat(this.options.codeviewIframeWhitelistSrcBase);t=t.replace(/(<iframe.*?>.*?(?:<\/iframe>)?)/gi,function(t){if(/<.+src(?==?('|"|\s)?)[\s\S]+src(?=('|"|\s)?)[^>]*?>/i.test(t))return"";for(var e=0,o=i;e<o.length;e++){var n=o[e];if(new RegExp('src="(https?:)?//'+n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+'/(.+)"').test(t))return t}return""})}return t},t.prototype.activate=function(){var e=this;if(this.$codable.val($t.html(this.$editable,this.options.prettifyHtml)),this.$codable.height(this.$editable.height()),this.context.invoke("toolbar.updateCodeview",!0),this.$editor.addClass("codeview"),this.$codable.focus(),R.hasCodeMirror){var o=Ot.fromTextArea(this.$codable[0],this.options.codemirror);if(this.options.codemirror.tern){var n=new Ot.TernServer(this.options.codemirror.tern);o.ternServer=n,o.on("cursorActivity",function(t){n.updateArgHints(t)})}o.on("blur",function(t){e.context.triggerEvent("blur.codeview",o.getValue(),t)}),o.on("change",function(t){e.context.triggerEvent("change.codeview",o.getValue(),o)}),o.setSize(null,this.$editable.outerHeight()),this.$codable.data("cmEditor",o)}else this.$codable.on("blur",function(t){e.context.triggerEvent("blur.codeview",e.$codable.val(),t)}),this.$codable.on("input",function(t){e.context.triggerEvent("change.codeview",e.$codable.val(),e.$codable)})},t.prototype.deactivate=function(){if(R.hasCodeMirror){var t=this.$codable.data("cmEditor");this.$codable.val(t.getValue()),t.toTextArea()}var e=this.purify($t.value(this.$codable,this.options.prettifyHtml)||$t.emptyPara),o=this.$editable.html()!==e;this.$editable.html(e),this.$editable.height(this.options.height?this.$codable.height():"auto"),this.$editor.removeClass("codeview"),o&&this.context.triggerEvent("change",this.$editable.html(),this.$editable),this.$editable.focus(),this.context.invoke("toolbar.updateCodeview",!1)},t.prototype.destroy=function(){this.isActivated()&&this.deactivate()},t}(),Vt=function(){function t(t){this.$document=C(document),this.$statusbar=t.layoutInfo.statusbar,this.$editable=t.layoutInfo.editable,this.options=t.options}return t.prototype.initialize=function(){var n=this;this.options.airMode||this.options.disableResizeEditor?this.destroy():this.$statusbar.on("mousedown",function(t){t.preventDefault(),t.stopPropagation();var o=n.$editable.offset().top-n.$document.scrollTop(),e=function(t){var e=t.clientY-(o+24);e=0<n.options.minheight?Math.max(e,n.options.minheight):e,e=0<n.options.maxHeight?Math.min(e,n.options.maxHeight):e,n.$editable.height(e)};n.$document.on("mousemove",e).one("mouseup",function(){n.$document.off("mousemove",e)})})},t.prototype.destroy=function(){this.$statusbar.off(),this.$statusbar.addClass("locked")},t}(),Gt=function(){function t(t){var e=this;this.context=t,this.$editor=t.layoutInfo.editor,this.$toolbar=t.layoutInfo.toolbar,this.$editable=t.layoutInfo.editable,this.$codable=t.layoutInfo.codable,this.$window=C(window),this.$scrollbar=C("html, body"),this.onResize=function(){e.resizeTo({h:e.$window.height()-e.$toolbar.outerHeight()})}}return t.prototype.resizeTo=function(t){this.$editable.css("height",t.h),this.$codable.css("height",t.h),this.$codable.data("cmeditor")&&this.$codable.data("cmeditor").setsize(null,t.h)},t.prototype.toggle=function(){this.$editor.toggleClass("fullscreen"),this.isFullscreen()?(this.$editable.data("orgHeight",this.$editable.css("height")),this.$editable.data("orgMaxHeight",this.$editable.css("maxHeight")),this.$editable.css("maxHeight",""),this.$window.on("resize",this.onResize).trigger("resize"),this.$scrollbar.css("overflow","hidden")):(this.$window.off("resize",this.onResize),this.resizeTo({h:this.$editable.data("orgHeight")}),this.$editable.css("maxHeight",this.$editable.css("orgMaxHeight")),this.$scrollbar.css("overflow","visible")),this.context.invoke("toolbar.updateFullscreen",this.isFullscreen())},t.prototype.isFullscreen=function(){return this.$editor.hasClass("fullscreen")},t}(),_t=function(){function t(t){var o=this;this.context=t,this.$document=C(document),this.$editingArea=t.layoutInfo.editingArea,this.options=t.options,this.lang=this.options.langInfo,this.events={"summernote.mousedown":function(t,e){o.update(e.target,e)&&e.preventDefault()},"summernote.keyup summernote.scroll summernote.change summernote.dialog.shown":function(){o.update()},"summernote.disable":function(){o.hide()},"summernote.codeview.toggled":function(){o.update()}}}return t.prototype.initialize=function(){var r=this;this.$handle=C(['<div class="note-handle">','<div class="note-control-selection">','<div class="note-control-selection-bg"></div>','<div class="note-control-holder note-control-nw"></div>','<div class="note-control-holder note-control-ne"></div>','<div class="note-control-holder note-control-sw"></div>','<div class="',this.options.disableResizeImage?"note-control-holder":"note-control-sizing",' note-control-se"></div>',this.options.disableResizeImage?"":'<div class="note-control-selection-info"></div>',"</div>","</div>"].join("")).prependTo(this.$editingArea),this.$handle.on("mousedown",function(t){if($t.isControlSizing(t.target)){t.preventDefault(),t.stopPropagation();var e=r.$handle.find(".note-control-selection").data("target"),o=e.offset(),n=r.$document.scrollTop(),i=function(t){r.context.invoke("editor.resizeTo",{x:t.clientX-o.left,y:t.clientY-(o.top-n)},e,!t.shiftKey),r.update(e[0])};r.$document.on("mousemove",i).one("mouseup",function(t){t.preventDefault(),r.$document.off("mousemove",i),r.context.invoke("editor.afterCommand")}),e.data("ratio")||e.data("ratio",e.height()/e.width())}}),this.$handle.on("wheel",function(t){t.preventDefault(),r.update()})},t.prototype.destroy=function(){this.$handle.remove()},t.prototype.update=function(t,e){if(this.context.isDisabled())return!1;var o=$t.isImg(t),n=this.$handle.find(".note-control-selection");if(this.context.invoke("imagePopover.update",t,e),o){var i=C(t),r=i.position(),s={left:r.left+parseInt(i.css("marginLeft"),10),top:r.top+parseInt(i.css("marginTop"),10)},a={w:i.outerWidth(!1),h:i.outerHeight(!1)};n.css({display:"block",left:s.left,top:s.top,width:a.w,height:a.h}).data("target",i);var l=new Image;l.src=i.attr("src");var c=a.w+"x"+a.h+" ("+this.lang.image.original+": "+l.width+"x"+l.height+")";n.find(".note-control-selection-info").text(c),this.context.invoke("editor.saveTarget",t)}else this.hide();return o},t.prototype.hide=function(){this.context.invoke("editor.clearTarget"),this.$handle.children().hide()},t}(),Zt=/^([A-Za-z][A-Za-z0-9+-.]*\:[\/]{2}|mailto:[A-Z0-9._%+-]+@)?(www\.)?(.+)$/i,Yt=function(){function t(t){var o=this;this.context=t,this.events={"summernote.keyup":function(t,e){e.isDefaultPrevented()||o.handleKeyup(e)},"summernote.keydown":function(t,e){o.handleKeydown(e)}}}return t.prototype.initialize=function(){this.lastWordRange=null},t.prototype.destroy=function(){this.lastWordRange=null},t.prototype.replace=function(){if(this.lastWordRange){var t=this.lastWordRange.toString(),e=t.match(Zt);if(e&&(e[1]||e[2])){var o=e[1]?t:"http://"+t,n=C("<a />").html(t).attr("href",o)[0];this.context.options.linkTargetBlank&&C(n).attr("target","_blank"),this.lastWordRange.insertNode(n),this.lastWordRange=null,this.context.invoke("editor.focus")}}},t.prototype.handleKeydown=function(t){if(B.contains([Pt.code.ENTER,Pt.code.SPACE],t.keyCode)){var e=this.context.invoke("editor.createRange").getWordRange();this.lastWordRange=e}},t.prototype.handleKeyup=function(t){B.contains([Pt.code.ENTER,Pt.code.SPACE],t.keyCode)&&this.replace()},t}(),Qt=function(){function t(t){var e=this;this.$note=t.layoutInfo.note,this.events={"summernote.change":function(){e.$note.val(t.invoke("code"))}}}return t.prototype.shouldInitialize=function(){return $t.isTextarea(this.$note[0])},t}(),Jt=function(){function t(t){var o=this;this.context=t,this.options=t.options.replace||{},this.keys=[Pt.code.ENTER,Pt.code.SPACE,Pt.code.PERIOD,Pt.code.COMMA,Pt.code.SEMICOLON,Pt.code.SLASH],this.previousKeydownCode=null,this.events={"summernote.keyup":function(t,e){e.isDefaultPrevented()||o.handleKeyup(e)},"summernote.keydown":function(t,e){o.handleKeydown(e)}}}return t.prototype.shouldInitialize=function(){return!!this.options.match},t.prototype.initialize=function(){this.lastWord=null},t.prototype.destroy=function(){this.lastWord=null},t.prototype.replace=function(){if(this.lastWord){var o=this,t=this.lastWord.toString();this.options.match(t,function(t){if(t){var e="";if("string"==typeof t?e=$t.createText(t):t instanceof jQuery?e=t[0]:t instanceof Node&&(e=t),!e)return;o.lastWord.insertNode(e),o.lastWord=null,o.context.invoke("editor.focus")}})}},t.prototype.handleKeydown=function(t){if(this.previousKeydownCode&&B.contains(this.keys,this.previousKeydownCode))this.previousKeydownCode=t.keyCode;else{if(B.contains(this.keys,t.keyCode)){var e=this.context.invoke("editor.createRange").getWordRange();this.lastWord=e}this.previousKeydownCode=t.keyCode}},t.prototype.handleKeyup=function(t){B.contains(this.keys,t.keyCode)&&this.replace()},t}(),Xt=function(){function t(t){var e=this;this.context=t,this.$editingArea=t.layoutInfo.editingArea,this.options=t.options,this.events={"summernote.init summernote.change":function(){e.update()},"summernote.codeview.toggled":function(){e.update()}}}return t.prototype.shouldInitialize=function(){return!!this.options.placeholder},t.prototype.initialize=function(){var t=this;this.$placeholder=C('<div class="note-placeholder">'),this.$placeholder.on("click",function(){t.context.invoke("focus")}).html(this.options.placeholder).prependTo(this.$editingArea),this.update()},t.prototype.destroy=function(){this.$placeholder.remove()},t.prototype.update=function(){var t=!this.context.invoke("codeview.isActivated")&&this.context.invoke("editor.isEmpty");this.$placeholder.toggle(t)},t}(),te=function(){function t(t){this.ui=C.summernote.ui,this.context=t,this.$toolbar=t.layoutInfo.toolbar,this.options=t.options,this.lang=this.options.langInfo,this.invertedKeyMap=A.invertObject(this.options.keyMap[R.isMac?"mac":"pc"])}return t.prototype.representShortcut=function(t){var e=this.invertedKeyMap[t];return this.options.shortcuts&&e?(R.isMac&&(e=e.replace("CMD","⌘").replace("SHIFT","⇧"))," ("+(e=e.replace("BACKSLASH","\\").replace("SLASH","/").replace("LEFTBRACKET","[").replace("RIGHTBRACKET","]"))+")"):""},t.prototype.button=function(t){return!this.options.tooltip&&t.tooltip&&delete t.tooltip,t.container=this.options.container,this.ui.button(t)},t.prototype.initialize=function(){this.addToolbarButtons(),this.addImagePopoverButtons(),this.addLinkPopoverButtons(),this.addTablePopoverButtons(),this.fontInstalledMap={}},t.prototype.destroy=function(){delete this.fontInstalledMap},t.prototype.isFontInstalled=function(t){return this.fontInstalledMap.hasOwnProperty(t)||(this.fontInstalledMap[t]=R.isFontInstalled(t)||B.contains(this.options.fontNamesIgnoreCheck,t)),this.fontInstalledMap[t]},t.prototype.isFontDeservedToAdd=function(t){return""!==(t=t.toLowerCase())&&this.isFontInstalled(t)&&-1===["sans-serif","serif","monospace","cursive","fantasy"].indexOf(t)},t.prototype.colorPalette=function(h,t,o,n){var p=this;return this.ui.buttonGroup({className:"note-color "+h,children:[this.button({className:"note-current-color-button",contents:this.ui.icon(this.options.icons.font+" note-recent-color"),tooltip:t,click:function(t){var e=C(t.currentTarget);o&&n?p.context.invoke("editor.color",{backColor:e.attr("data-backColor"),foreColor:e.attr("data-foreColor")}):o?p.context.invoke("editor.color",{backColor:e.attr("data-backColor")}):n&&p.context.invoke("editor.color",{foreColor:e.attr("data-foreColor")})},callback:function(t){var e=t.find(".note-recent-color");o&&(e.css("background-color",p.options.colorButton.backColor),t.attr("data-backColor",p.options.colorButton.backColor)),n?(e.css("color",p.options.colorButton.foreColor),t.attr("data-foreColor",p.options.colorButton.foreColor)):e.css("color","transparent")}}),this.button({className:"dropdown-toggle",contents:this.ui.dropdownButtonContents("",this.options),tooltip:this.lang.color.more,data:{toggle:"dropdown"}}),this.ui.dropdown({items:(o?['<div class="note-palette">',' <div class="note-palette-title">'+this.lang.color.background+"</div>"," <div>",' <button type="button" class="note-color-reset btn btn-light" data-event="backColor" data-value="inherit">',this.lang.color.transparent," </button>"," </div>",' <div class="note-holder" data-event="backColor"/>'," <div>",' <button type="button" class="note-color-select btn" data-event="openPalette" data-value="backColorPicker">',this.lang.color.cpSelect," </button>",' <input type="color" id="backColorPicker" class="note-btn note-color-select-btn" value="'+this.options.colorButton.backColor+'" data-event="backColorPalette">'," </div>",' <div class="note-holder-custom" id="backColorPalette" data-event="backColor"/>',"</div>"].join(""):"")+(n?['<div class="note-palette">',' <div class="note-palette-title">'+this.lang.color.foreground+"</div>"," <div>",' <button type="button" class="note-color-reset btn btn-light" data-event="removeFormat" data-value="foreColor">',this.lang.color.resetToDefault," </button>"," </div>",' <div class="note-holder" data-event="foreColor"/>'," <div>",' <button type="button" class="note-color-select btn" data-event="openPalette" data-value="foreColorPicker">',this.lang.color.cpSelect," </button>",' <input type="color" id="foreColorPicker" class="note-btn note-color-select-btn" value="'+this.options.colorButton.foreColor+'" data-event="foreColorPalette">',' <div class="note-holder-custom" id="foreColorPalette" data-event="foreColor"/>',"</div>"].join(""):""),callback:function(o){o.find(".note-holder").each(function(t,e){var o=C(e);o.append(p.ui.palette({colors:p.options.colors,colorsName:p.options.colorsName,eventName:o.data("event"),container:p.options.container,tooltip:p.options.tooltip}).render())});var n=[["#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF"]];o.find(".note-holder-custom").each(function(t,e){var o=C(e);o.append(p.ui.palette({colors:n,colorsName:n,eventName:o.data("event"),container:p.options.container,tooltip:p.options.tooltip}).render())}),o.find("input[type=color]").each(function(t,e){C(e).change(function(){var t=o.find("#"+C(this).data("event")).find(".note-color-btn").first(),e=this.value.toUpperCase();t.css("background-color",e).attr("aria-label",e).attr("data-value",e).attr("data-original-title",e),t.click()})})},click:function(t){t.stopPropagation();var e=C("."+h),o=C(t.target),n=o.data("event"),i=o.attr("data-value");if("openPalette"===n){var r=e.find("#"+i),s=C(e.find("#"+r.data("event")).find(".note-color-row")[0]),a=s.find(".note-color-btn").last().detach(),l=r.val();a.css("background-color",l).attr("aria-label",l).attr("data-value",l).attr("data-original-title",l),s.prepend(a),r.click()}else if(B.contains(["backColor","foreColor"],n)){var c="backColor"===n?"background-color":"color",d=o.closest(".note-color").find(".note-recent-color"),u=o.closest(".note-color").find(".note-current-color-button");d.css(c,i),u.attr("data-"+n,i),p.context.invoke("editor."+n,i)}}})]}).render()},t.prototype.addToolbarButtons=function(){var n=this;this.context.memo("button.style",function(){return n.ui.buttonGroup([n.button({className:"dropdown-toggle",contents:n.ui.dropdownButtonContents(n.ui.icon(n.options.icons.magic),n.options),tooltip:n.lang.style.style,data:{toggle:"dropdown"}}),n.ui.dropdown({className:"dropdown-style",items:n.options.styleTags,title:n.lang.style.style,template:function(t){"string"==typeof t&&(t={tag:t,title:n.lang.style.hasOwnProperty(t)?n.lang.style[t]:t});var e=t.tag,o=t.title;return"<"+e+(t.style?' style="'+t.style+'" ':"")+(t.className?' class="'+t.className+'"':"")+">"+o+"</"+e+">"},click:n.context.createInvokeHandler("editor.formatBlock")})]).render()});for(var t=function(t,e){var o=i.options.styleTags[t];i.context.memo("button.style."+o,function(){return n.button({className:"note-btn-style-"+o,contents:'<div data-value="'+o+'">'+o.toUpperCase()+"</div>",tooltip:n.lang.style[o],click:n.context.createInvokeHandler("editor.formatBlock")}).render()})},i=this,e=0,o=this.options.styleTags.length;e<o;e++)t(e);this.context.memo("button.bold",function(){return n.button({className:"note-btn-bold",contents:n.ui.icon(n.options.icons.bold),tooltip:n.lang.font.bold+n.representShortcut("bold"),click:n.context.createInvokeHandlerAndUpdateState("editor.bold")}).render()}),this.context.memo("button.italic",function(){return n.button({className:"note-btn-italic",contents:n.ui.icon(n.options.icons.italic),tooltip:n.lang.font.italic+n.representShortcut("italic"),click:n.context.createInvokeHandlerAndUpdateState("editor.italic")}).render()}),this.context.memo("button.underline",function(){return n.button({className:"note-btn-underline",contents:n.ui.icon(n.options.icons.underline),tooltip:n.lang.font.underline+n.representShortcut("underline"),click:n.context.createInvokeHandlerAndUpdateState("editor.underline")}).render()}),this.context.memo("button.clear",function(){return n.button({contents:n.ui.icon(n.options.icons.eraser),tooltip:n.lang.font.clear+n.representShortcut("removeFormat"),click:n.context.createInvokeHandler("editor.removeFormat")}).render()}),this.context.memo("button.strikethrough",function(){return n.button({className:"note-btn-strikethrough",contents:n.ui.icon(n.options.icons.strikethrough),tooltip:n.lang.font.strikethrough+n.representShortcut("strikethrough"),click:n.context.createInvokeHandlerAndUpdateState("editor.strikethrough")}).render()}),this.context.memo("button.superscript",function(){return n.button({className:"note-btn-superscript",contents:n.ui.icon(n.options.icons.superscript),tooltip:n.lang.font.superscript,click:n.context.createInvokeHandlerAndUpdateState("editor.superscript")}).render()}),this.context.memo("button.subscript",function(){return n.button({className:"note-btn-subscript",contents:n.ui.icon(n.options.icons.subscript),tooltip:n.lang.font.subscript,click:n.context.createInvokeHandlerAndUpdateState("editor.subscript")}).render()}),this.context.memo("button.fontname",function(){var t=n.context.invoke("editor.currentStyle");return C.each(t["font-family"].split(","),function(t,e){e=e.trim().replace(/['"]+/g,""),n.isFontDeservedToAdd(e)&&-1===n.options.fontNames.indexOf(e)&&n.options.fontNames.push(e)}),n.ui.buttonGroup([n.button({className:"dropdown-toggle",contents:n.ui.dropdownButtonContents('<span class="note-current-fontname"/>',n.options),tooltip:n.lang.font.name,data:{toggle:"dropdown"}}),n.ui.dropdownCheck({className:"dropdown-fontname",checkClassName:n.options.icons.menuCheck,items:n.options.fontNames.filter(n.isFontInstalled.bind(n)),title:n.lang.font.name,template:function(t){return"<span style=\"font-family: '"+t+"'\">"+t+"</span>"},click:n.context.createInvokeHandlerAndUpdateState("editor.fontName")})]).render()}),this.context.memo("button.fontsize",function(){return n.ui.buttonGroup([n.button({className:"dropdown-toggle",contents:n.ui.dropdownButtonContents('<span class="note-current-fontsize"/>',n.options),tooltip:n.lang.font.size,data:{toggle:"dropdown"}}),n.ui.dropdownCheck({className:"dropdown-fontsize",checkClassName:n.options.icons.menuCheck,items:n.options.fontSizes,title:n.lang.font.size,click:n.context.createInvokeHandlerAndUpdateState("editor.fontSize")})]).render()}),this.context.memo("button.color",function(){return n.colorPalette("note-color-all",n.lang.color.recent,!0,!0)}),this.context.memo("button.forecolor",function(){return n.colorPalette("note-color-fore",n.lang.color.foreground,!1,!0)}),this.context.memo("button.backcolor",function(){return n.colorPalette("note-color-back",n.lang.color.background,!0,!1)}),this.context.memo("button.ul",function(){return n.button({contents:n.ui.icon(n.options.icons.unorderedlist),tooltip:n.lang.lists.unordered+n.representShortcut("insertUnorderedList"),click:n.context.createInvokeHandler("editor.insertUnorderedList")}).render()}),this.context.memo("button.ol",function(){return n.button({contents:n.ui.icon(n.options.icons.orderedlist),tooltip:n.lang.lists.ordered+n.representShortcut("insertOrderedList"),click:n.context.createInvokeHandler("editor.insertOrderedList")}).render()});var r=this.button({contents:this.ui.icon(this.options.icons.alignLeft),tooltip:this.lang.paragraph.left+this.representShortcut("justifyLeft"),click:this.context.createInvokeHandler("editor.justifyLeft")}),s=this.button({contents:this.ui.icon(this.options.icons.alignCenter),tooltip:this.lang.paragraph.center+this.representShortcut("justifyCenter"),click:this.context.createInvokeHandler("editor.justifyCenter")}),a=this.button({contents:this.ui.icon(this.options.icons.alignRight),tooltip:this.lang.paragraph.right+this.representShortcut("justifyRight"),click:this.context.createInvokeHandler("editor.justifyRight")}),l=this.button({contents:this.ui.icon(this.options.icons.alignJustify),tooltip:this.lang.paragraph.justify+this.representShortcut("justifyFull"),click:this.context.createInvokeHandler("editor.justifyFull")}),c=this.button({contents:this.ui.icon(this.options.icons.outdent),tooltip:this.lang.paragraph.outdent+this.representShortcut("outdent"),click:this.context.createInvokeHandler("editor.outdent")}),d=this.button({contents:this.ui.icon(this.options.icons.indent),tooltip:this.lang.paragraph.indent+this.representShortcut("indent"),click:this.context.createInvokeHandler("editor.indent")});this.context.memo("button.justifyLeft",A.invoke(r,"render")),this.context.memo("button.justifyCenter",A.invoke(s,"render")),this.context.memo("button.justifyRight",A.invoke(a,"render")),this.context.memo("button.justifyFull",A.invoke(l,"render")),this.context.memo("button.outdent",A.invoke(c,"render")),this.context.memo("button.indent",A.invoke(d,"render")),this.context.memo("button.paragraph",function(){return n.ui.buttonGroup([n.button({className:"dropdown-toggle",contents:n.ui.dropdownButtonContents(n.ui.icon(n.options.icons.alignLeft),n.options),tooltip:n.lang.paragraph.paragraph,data:{toggle:"dropdown"}}),n.ui.dropdown([n.ui.buttonGroup({className:"note-align",children:[r,s,a,l]}),n.ui.buttonGroup({className:"note-list",children:[c,d]})])]).render()}),this.context.memo("button.height",function(){return n.ui.buttonGroup([n.button({className:"dropdown-toggle",contents:n.ui.dropdownButtonContents(n.ui.icon(n.options.icons.textHeight),n.options),tooltip:n.lang.font.height,data:{toggle:"dropdown"}}),n.ui.dropdownCheck({items:n.options.lineHeights,checkClassName:n.options.icons.menuCheck,className:"dropdown-line-height",title:n.lang.font.height,click:n.context.createInvokeHandler("editor.lineHeight")})]).render()}),this.context.memo("button.table",function(){return n.ui.buttonGroup([n.button({className:"dropdown-toggle",contents:n.ui.dropdownButtonContents(n.ui.icon(n.options.icons.table),n.options),tooltip:n.lang.table.table,data:{toggle:"dropdown"}}),n.ui.dropdown({title:n.lang.table.table,className:"note-table",items:['<div class="note-dimension-picker">',' <div class="note-dimension-picker-mousecatcher" data-event="insertTable" data-value="1x1"/>',' <div class="note-dimension-picker-highlighted"/>',' <div class="note-dimension-picker-unhighlighted"/>',"</div>",'<div class="note-dimension-display">1 x 1</div>'].join("")})],{callback:function(t){t.find(".note-dimension-picker-mousecatcher").css({width:n.options.insertTableMaxSize.col+"em",height:n.options.insertTableMaxSize.row+"em"}).mousedown(n.context.createInvokeHandler("editor.insertTable")).on("mousemove",n.tableMoveHandler.bind(n))}}).render()}),this.context.memo("button.link",function(){return n.button({contents:n.ui.icon(n.options.icons.link),tooltip:n.lang.link.link+n.representShortcut("linkDialog.show"),click:n.context.createInvokeHandler("linkDialog.show")}).render()}),this.context.memo("button.picture",function(){return n.button({contents:n.ui.icon(n.options.icons.picture),tooltip:n.lang.image.image,click:n.context.createInvokeHandler("imageDialog.show")}).render()}),this.context.memo("button.video",function(){return n.button({contents:n.ui.icon(n.options.icons.video),tooltip:n.lang.video.video,click:n.context.createInvokeHandler("videoDialog.show")}).render()}),this.context.memo("button.hr",function(){return n.button({contents:n.ui.icon(n.options.icons.minus),tooltip:n.lang.hr.insert+n.representShortcut("insertHorizontalRule"),click:n.context.createInvokeHandler("editor.insertHorizontalRule")}).render()}),this.context.memo("button.fullscreen",function(){return n.button({className:"btn-fullscreen",contents:n.ui.icon(n.options.icons.arrowsAlt),tooltip:n.lang.options.fullscreen,click:n.context.createInvokeHandler("fullscreen.toggle")}).render()}),this.context.memo("button.codeview",function(){return n.button({className:"btn-codeview",contents:n.ui.icon(n.options.icons.code),tooltip:n.lang.options.codeview,click:n.context.createInvokeHandler("codeview.toggle")}).render()}),this.context.memo("button.redo",function(){return n.button({contents:n.ui.icon(n.options.icons.redo),tooltip:n.lang.history.redo+n.representShortcut("redo"),click:n.context.createInvokeHandler("editor.redo")}).render()}),this.context.memo("button.undo",function(){return n.button({contents:n.ui.icon(n.options.icons.undo),tooltip:n.lang.history.undo+n.representShortcut("undo"),click:n.context.createInvokeHandler("editor.undo")}).render()}),this.context.memo("button.help",function(){return n.button({contents:n.ui.icon(n.options.icons.question),tooltip:n.lang.options.help,click:n.context.createInvokeHandler("helpDialog.show")}).render()})},t.prototype.addImagePopoverButtons=function(){var t=this;this.context.memo("button.resizeFull",function(){return t.button({contents:'<span class="note-fontsize-10">100%</span>',tooltip:t.lang.image.resizeFull,click:t.context.createInvokeHandler("editor.resize","1")}).render()}),this.context.memo("button.resizeHalf",function(){return t.button({contents:'<span class="note-fontsize-10">50%</span>',tooltip:t.lang.image.resizeHalf,click:t.context.createInvokeHandler("editor.resize","0.5")}).render()}),this.context.memo("button.resizeQuarter",function(){return t.button({contents:'<span class="note-fontsize-10">25%</span>',tooltip:t.lang.image.resizeQuarter,click:t.context.createInvokeHandler("editor.resize","0.25")}).render()}),this.context.memo("button.resizeNone",function(){return t.button({contents:t.ui.icon(t.options.icons.rollback),tooltip:t.lang.image.resizeNone,click:t.context.createInvokeHandler("editor.resize","0")}).render()}),this.context.memo("button.floatLeft",function(){return t.button({contents:t.ui.icon(t.options.icons.floatLeft),tooltip:t.lang.image.floatLeft,click:t.context.createInvokeHandler("editor.floatMe","left")}).render()}),this.context.memo("button.floatRight",function(){return t.button({contents:t.ui.icon(t.options.icons.floatRight),tooltip:t.lang.image.floatRight,click:t.context.createInvokeHandler("editor.floatMe","right")}).render()}),this.context.memo("button.floatNone",function(){return t.button({contents:t.ui.icon(t.options.icons.rollback),tooltip:t.lang.image.floatNone,click:t.context.createInvokeHandler("editor.floatMe","none")}).render()}),this.context.memo("button.removeMedia",function(){return t.button({contents:t.ui.icon(t.options.icons.trash),tooltip:t.lang.image.remove,click:t.context.createInvokeHandler("editor.removeMedia")}).render()})},t.prototype.addLinkPopoverButtons=function(){var t=this;this.context.memo("button.linkDialogShow",function(){return t.button({contents:t.ui.icon(t.options.icons.link),tooltip:t.lang.link.edit,click:t.context.createInvokeHandler("linkDialog.show")}).render()}),this.context.memo("button.unlink",function(){return t.button({contents:t.ui.icon(t.options.icons.unlink),tooltip:t.lang.link.unlink,click:t.context.createInvokeHandler("editor.unlink")}).render()})},t.prototype.addTablePopoverButtons=function(){var t=this;this.context.memo("button.addRowUp",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.rowAbove),tooltip:t.lang.table.addRowAbove,click:t.context.createInvokeHandler("editor.addRow","top")}).render()}),this.context.memo("button.addRowDown",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.rowBelow),tooltip:t.lang.table.addRowBelow,click:t.context.createInvokeHandler("editor.addRow","bottom")}).render()}),this.context.memo("button.addColLeft",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.colBefore),tooltip:t.lang.table.addColLeft,click:t.context.createInvokeHandler("editor.addCol","left")}).render()}),this.context.memo("button.addColRight",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.colAfter),tooltip:t.lang.table.addColRight,click:t.context.createInvokeHandler("editor.addCol","right")}).render()}),this.context.memo("button.deleteRow",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.rowRemove),tooltip:t.lang.table.delRow,click:t.context.createInvokeHandler("editor.deleteRow")}).render()}),this.context.memo("button.deleteCol",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.colRemove),tooltip:t.lang.table.delCol,click:t.context.createInvokeHandler("editor.deleteCol")}).render()}),this.context.memo("button.deleteTable",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.trash),tooltip:t.lang.table.delTable,click:t.context.createInvokeHandler("editor.deleteTable")}).render()})},t.prototype.build=function(t,e){for(var o=0,n=e.length;o<n;o++){for(var i=e[o],r=Array.isArray(i)?i[0]:i,s=Array.isArray(i)?1===i.length?[i[0]]:i[1]:[i],a=this.ui.buttonGroup({className:"note-"+r}).render(),l=0,c=s.length;l<c;l++){var d=this.context.memo("button."+s[l]);d&&a.append("function"==typeof d?d():d)}a.appendTo(t)}},t.prototype.updateCurrentStyle=function(t){var n=this,e=t||this.$toolbar,o=this.context.invoke("editor.currentStyle");if(this.updateBtnStates(e,{".note-btn-bold":function(){return"bold"===o["font-bold"]},".note-btn-italic":function(){return"italic"===o["font-italic"]},".note-btn-underline":function(){return"underline"===o["font-underline"]},".note-btn-subscript":function(){return"subscript"===o["font-subscript"]},".note-btn-superscript":function(){return"superscript"===o["font-superscript"]},".note-btn-strikethrough":function(){return"strikethrough"===o["font-strikethrough"]}}),o["font-family"]){var i=o["font-family"].split(",").map(function(t){return t.replace(/[\'\"]/g,"").replace(/\s+$/,"").replace(/^\s+/,"")}),r=B.find(i,this.isFontInstalled.bind(this));e.find(".dropdown-fontname a").each(function(t,e){var o=C(e),n=o.data("value")+""==r+"";o.toggleClass("checked",n)}),e.find(".note-current-fontname").text(r).css("font-family",r)}if(o["font-size"]){var s=o["font-size"];e.find(".dropdown-fontsize a").each(function(t,e){var o=C(e),n=o.data("value")+""==s+"";o.toggleClass("checked",n)}),e.find(".note-current-fontsize").text(s)}if(o["line-height"]){var a=o["line-height"];e.find(".dropdown-line-height li a").each(function(t,e){var o=C(e).data("value")+""==a+"";n.className=o?"checked":""})}},t.prototype.updateBtnStates=function(o,t){var n=this;C.each(t,function(t,e){n.ui.toggleBtnActive(o.find(t),e())})},t.prototype.tableMoveHandler=function(t){var e,o=C(t.target.parentNode),n=o.next(),i=o.find(".note-dimension-picker-mousecatcher"),r=o.find(".note-dimension-picker-highlighted"),s=o.find(".note-dimension-picker-unhighlighted");if(void 0===t.offsetX){var a=C(t.target).offset();e={x:t.pageX-a.left,y:t.pageY-a.top}}else e={x:t.offsetX,y:t.offsetY};var l=Math.ceil(e.x/18)||1,c=Math.ceil(e.y/18)||1;r.css({width:l+"em",height:c+"em"}),i.data("value",l+"x"+c),3<l&&l<this.options.insertTableMaxSize.col&&s.css({width:l+1+"em"}),3<c&&c<this.options.insertTableMaxSize.row&&s.css({height:c+1+"em"}),n.html(l+" x "+c)},t}(),ee=function(){function t(t){this.context=t,this.$window=C(window),this.$document=C(document),this.ui=C.summernote.ui,this.$note=t.layoutInfo.note,this.$editor=t.layoutInfo.editor,this.$toolbar=t.layoutInfo.toolbar,this.$editable=t.layoutInfo.editable,this.$statusbar=t.layoutInfo.statusbar,this.options=t.options,this.isFollowing=!1,this.followScroll=this.followScroll.bind(this)}return t.prototype.shouldInitialize=function(){return!this.options.airMode},t.prototype.initialize=function(){var t=this;this.options.toolbar=this.options.toolbar||[],this.options.toolbar.length?this.context.invoke("buttons.build",this.$toolbar,this.options.toolbar):this.$toolbar.hide(),this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer),this.changeContainer(!1),this.$note.on("summernote.keyup summernote.mouseup summernote.change",function(){t.context.invoke("buttons.updateCurrentStyle")}),this.context.invoke("buttons.updateCurrentStyle"),this.options.followingToolbar&&this.$window.on("scroll resize",this.followScroll)},t.prototype.destroy=function(){this.$toolbar.children().remove(),this.options.followingToolbar&&this.$window.off("scroll resize",this.followScroll)},t.prototype.followScroll=function(){if(this.$editor.hasClass("fullscreen"))return!1;var t=this.$editor.outerHeight(),e=this.$editor.width(),o=this.$toolbar.height(),n=this.$statusbar.height(),i=0;this.options.otherStaticBar&&(i=C(this.options.otherStaticBar).outerHeight());var r=this.$document.scrollTop(),s=this.$editor.offset().top,a=s-i,l=s+t-i-o-n;!this.isFollowing&&a<r&&r<l-o?(this.isFollowing=!0,this.$toolbar.css({position:"fixed",top:i,width:e}),this.$editable.css({marginTop:this.$toolbar.height()+5})):this.isFollowing&&(r<a||l<r)&&(this.isFollowing=!1,this.$toolbar.css({position:"relative",top:0,width:"100%"}),this.$editable.css({marginTop:""}))},t.prototype.changeContainer=function(t){t?this.$toolbar.prependTo(this.$editor):this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer),this.followScroll()},t.prototype.updateFullscreen=function(t){this.ui.toggleBtnActive(this.$toolbar.find(".btn-fullscreen"),t),this.changeContainer(t)},t.prototype.updateCodeview=function(t){this.ui.toggleBtnActive(this.$toolbar.find(".btn-codeview"),t),t?this.deactivate():this.activate()},t.prototype.activate=function(t){var e=this.$toolbar.find("button");t||(e=e.not(".btn-codeview")),this.ui.toggleBtn(e,!0)},t.prototype.deactivate=function(t){var e=this.$toolbar.find("button");t||(e=e.not(".btn-codeview")),this.ui.toggleBtn(e,!1)},t}(),oe=function(){function t(t){this.context=t,this.ui=C.summernote.ui,this.$body=C(document.body),this.$editor=t.layoutInfo.editor,this.options=t.options,this.lang=this.options.langInfo,t.memo("help.linkDialog.show",this.options.langInfo.help["linkDialog.show"])}return t.prototype.initialize=function(){var t=this.options.dialogsInBody?this.$body:this.$editor,e=['<div class="form-group note-form-group">','<label class="note-form-label">'+this.lang.link.textToDisplay+"</label>",'<input class="note-link-text form-control note-form-control note-input" type="text" />',"</div>",'<div class="form-group note-form-group">','<label class="note-form-label">'+this.lang.link.url+"</label>",'<input class="note-link-url form-control note-form-control note-input" type="text" value="http://" />',"</div>",this.options.disableLinkTarget?"":C("<div/>").append(this.ui.checkbox({className:"sn-checkbox-open-in-new-window",text:this.lang.link.openInNewWindow,checked:!0}).render()).html()].join(""),o='<input type="button" href="#" class="btn btn-primary note-btn note-btn-primary note-link-btn" value="'+this.lang.link.insert+'" disabled>';this.$dialog=this.ui.dialog({className:"link-dialog",title:this.lang.link.insert,fade:this.options.dialogsFade,body:e,footer:o}).render().appendTo(t)},t.prototype.destroy=function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()},t.prototype.bindEnterKey=function(t,e){t.on("keypress",function(t){t.keyCode===Pt.code.ENTER&&(t.preventDefault(),e.trigger("click"))})},t.prototype.toggleLinkBtn=function(t,e,o){this.ui.toggleBtn(t,e.val()&&o.val())},t.prototype.showLinkDialog=function(s){var a=this;return C.Deferred(function(e){var o=a.$dialog.find(".note-link-text"),n=a.$dialog.find(".note-link-url"),i=a.$dialog.find(".note-link-btn"),r=a.$dialog.find(".sn-checkbox-open-in-new-window input[type=checkbox]");a.ui.onDialogShown(a.$dialog,function(){a.context.triggerEvent("dialog.shown"),!s.url&&A.isValidUrl(s.text)&&(s.url=s.text),o.on("input paste propertychange",function(){s.text=o.val(),a.toggleLinkBtn(i,o,n)}).val(s.text),n.on("input paste propertychange",function(){s.text||o.val(n.val()),a.toggleLinkBtn(i,o,n)}).val(s.url),R.isSupportTouch||n.trigger("focus"),a.toggleLinkBtn(i,o,n),a.bindEnterKey(n,i),a.bindEnterKey(o,i);var t=void 0!==s.isNewWindow?s.isNewWindow:a.context.options.linkTargetBlank;r.prop("checked",t),i.one("click",function(t){t.preventDefault(),e.resolve({range:s.range,url:n.val(),text:o.val(),isNewWindow:r.is(":checked")}),a.ui.hideDialog(a.$dialog)})}),a.ui.onDialogHidden(a.$dialog,function(){o.off(),n.off(),i.off(),"pending"===e.state()&&e.reject()}),a.ui.showDialog(a.$dialog)}).promise()},t.prototype.show=function(){var e=this,t=this.context.invoke("editor.getLinkInfo");this.context.invoke("editor.saveRange"),this.showLinkDialog(t).then(function(t){e.context.invoke("editor.restoreRange"),e.context.invoke("editor.createLink",t)}).fail(function(){e.context.invoke("editor.restoreRange")})},t}(),ne=function(){function t(t){var e=this;this.context=t,this.ui=C.summernote.ui,this.options=t.options,this.events={"summernote.keyup summernote.mouseup summernote.change summernote.scroll":function(){e.update()},"summernote.disable summernote.dialog.shown":function(){e.hide()}}}return t.prototype.shouldInitialize=function(){return!B.isEmpty(this.options.popover.link)},t.prototype.initialize=function(){this.$popover=this.ui.popover({className:"note-link-popover",callback:function(t){t.find(".popover-content,.note-popover-content").prepend('<span><a target="_blank"></a> </span>')}}).render().appendTo(this.options.container);var t=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",t,this.options.popover.link)},t.prototype.destroy=function(){this.$popover.remove()},t.prototype.update=function(){if(this.context.invoke("editor.hasFocus")){var t=this.context.invoke("editor.getLastRange");if(t.isCollapsed()&&t.isOnAnchor()){var e=$t.ancestor(t.sc,$t.isAnchor),o=C(e).attr("href");this.$popover.find("a").attr("href",o).html(o);var n=$t.posFromPlaceholder(e);this.$popover.css({display:"block",left:n.left,top:n.top})}else this.hide()}else this.hide()},t.prototype.hide=function(){this.$popover.hide()},t}(),ie=function(){function t(t){this.context=t,this.ui=C.summernote.ui,this.$body=C(document.body),this.$editor=t.layoutInfo.editor,this.options=t.options,this.lang=this.options.langInfo}return t.prototype.initialize=function(){var t=this.options.dialogsInBody?this.$body:this.$editor,e="";if(this.options.maximumImageFileSize){var o=Math.floor(Math.log(this.options.maximumImageFileSize)/Math.log(1024)),n=1*(this.options.maximumImageFileSize/Math.pow(1024,o)).toFixed(2)+" "+" KMGTP"[o]+"B";e="<small>"+this.lang.image.maximumFileSize+" : "+n+"</small>"}var i=['<div class="form-group note-form-group note-group-select-from-files">','<label class="note-form-label">'+this.lang.image.selectFromFiles+"</label>",'<input class="note-image-input form-control-file note-form-control note-input" ',' type="file" name="files" accept="image/*" multiple="multiple" />',e,"</div>",'<div class="form-group note-group-image-url" style="overflow:auto;">','<label class="note-form-label">'+this.lang.image.url+"</label>",'<input class="note-image-url form-control note-form-control note-input ',' col-md-12" type="text" />',"</div>"].join(""),r='<input type="button" href="#" class="btn btn-primary note-btn note-btn-primary note-image-btn" value="'+this.lang.image.insert+'" disabled>';this.$dialog=this.ui.dialog({title:this.lang.image.insert,fade:this.options.dialogsFade,body:i,footer:r}).render().appendTo(t)},t.prototype.destroy=function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()},t.prototype.bindEnterKey=function(t,e){t.on("keypress",function(t){t.keyCode===Pt.code.ENTER&&(t.preventDefault(),e.trigger("click"))})},t.prototype.show=function(){var e=this;this.context.invoke("editor.saveRange"),this.showImageDialog().then(function(t){e.ui.hideDialog(e.$dialog),e.context.invoke("editor.restoreRange"),"string"==typeof t?e.options.callbacks.onImageLinkInsert?e.context.triggerEvent("image.link.insert",t):e.context.invoke("editor.insertImage",t):e.context.invoke("editor.insertImagesOrCallback",t)}).fail(function(){e.context.invoke("editor.restoreRange")})},t.prototype.showImageDialog=function(){var i=this;return C.Deferred(function(e){var t=i.$dialog.find(".note-image-input"),o=i.$dialog.find(".note-image-url"),n=i.$dialog.find(".note-image-btn");i.ui.onDialogShown(i.$dialog,function(){i.context.triggerEvent("dialog.shown"),t.replaceWith(t.clone().on("change",function(t){e.resolve(t.target.files||t.target.value)}).val("")),o.on("input paste propertychange",function(){i.ui.toggleBtn(n,o.val())}).val(""),R.isSupportTouch||o.trigger("focus"),n.click(function(t){t.preventDefault(),e.resolve(o.val())}),i.bindEnterKey(o,n)}),i.ui.onDialogHidden(i.$dialog,function(){t.off(),o.off(),n.off(),"pending"===e.state()&&e.reject()}),i.ui.showDialog(i.$dialog)})},t}(),re=function(){function t(t){var e=this;this.context=t,this.ui=C.summernote.ui,this.editable=t.layoutInfo.editable[0],this.options=t.options,this.events={"summernote.disable":function(){e.hide()}}}return t.prototype.shouldInitialize=function(){return!B.isEmpty(this.options.popover.image)},t.prototype.initialize=function(){this.$popover=this.ui.popover({className:"note-image-popover"}).render().appendTo(this.options.container);var t=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",t,this.options.popover.image)},t.prototype.destroy=function(){this.$popover.remove()},t.prototype.update=function(t,e){if($t.isImg(t)){var o=$t.posFromPlaceholder(t),n=$t.posFromPlaceholder(this.editable);this.$popover.css({display:"block",left:this.options.popatmouse?e.pageX-20:o.left,top:this.options.popatmouse?e.pageY:Math.min(o.top,n.top)})}else this.hide()},t.prototype.hide=function(){this.$popover.hide()},t}(),se=function(){function t(t){var o=this;this.context=t,this.ui=C.summernote.ui,this.options=t.options,this.events={"summernote.mousedown":function(t,e){o.update(e.target)},"summernote.keyup summernote.scroll summernote.change":function(){o.update()},"summernote.disable":function(){o.hide()}}}return t.prototype.shouldInitialize=function(){return!B.isEmpty(this.options.popover.table)},t.prototype.initialize=function(){this.$popover=this.ui.popover({className:"note-table-popover"}).render().appendTo(this.options.container);var t=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",t,this.options.popover.table),R.isFF&&document.execCommand("enableInlineTableEditing",!1,!1)},t.prototype.destroy=function(){this.$popover.remove()},t.prototype.update=function(t){if(this.context.isDisabled())return!1;var e=$t.isCell(t);if(e){var o=$t.posFromPlaceholder(t);this.$popover.css({display:"block",left:o.left,top:o.top})}else this.hide();return e},t.prototype.hide=function(){this.$popover.hide()},t}(),ae=function(){function t(t){this.context=t,this.ui=C.summernote.ui,this.$body=C(document.body),this.$editor=t.layoutInfo.editor,this.options=t.options,this.lang=this.options.langInfo}return t.prototype.initialize=function(){var t=this.options.dialogsInBody?this.$body:this.$editor,e=['<div class="form-group note-form-group row-fluid">','<label class="note-form-label">'+this.lang.video.url+' <small class="text-muted">'+this.lang.video.providers+"</small></label>",'<input class="note-video-url form-control note-form-control note-input" type="text" />',"</div>"].join(""),o='<input type="button" href="#" class="btn btn-primary note-btn note-btn-primary note-video-btn" value="'+this.lang.video.insert+'" disabled>';this.$dialog=this.ui.dialog({title:this.lang.video.insert,fade:this.options.dialogsFade,body:e,footer:o}).render().appendTo(t)},t.prototype.destroy=function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()},t.prototype.bindEnterKey=function(t,e){t.on("keypress",function(t){t.keyCode===Pt.code.ENTER&&(t.preventDefault(),e.trigger("click"))})},t.prototype.createVideoNode=function(t){var e,o=t.match(/\/\/(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))([\w|-]{11})(?:(?:[\?&]t=)(\S+))?$/),n=t.match(/(?:www\.|\/\/)instagram\.com\/p\/(.[a-zA-Z0-9_-]*)/),i=t.match(/\/\/vine\.co\/v\/([a-zA-Z0-9]+)/),r=t.match(/\/\/(player\.)?vimeo\.com\/([a-z]*\/)*(\d+)[?]?.*/),s=t.match(/.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/),a=t.match(/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/),l=t.match(/\/\/v\.qq\.com.*?vid=(.+)/),c=t.match(/\/\/v\.qq\.com\/x?\/?(page|cover).*?\/([^\/]+)\.html\??.*/),d=t.match(/^.+.(mp4|m4v)$/),u=t.match(/^.+.(ogg|ogv)$/),h=t.match(/^.+.(webm)$/),p=t.match(/(?:www\.|\/\/)facebook\.com\/([^\/]+)\/videos\/([0-9]+)/);if(o&&11===o[1].length){var f=o[1],m=0;if(void 0!==o[2]){var g=o[2].match(/^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/);if(g)for(var v=[3600,60,1],b=0,y=v.length;b<y;b++)m+=void 0!==g[b+1]?v[b]*parseInt(g[b+1],10):0}e=C("<iframe>").attr("frameborder",0).attr("src","//www.youtube.com/embed/"+f+(0<m?"?start="+m:"")).attr("width","640").attr("height","360")}else if(n&&n[0].length)e=C("<iframe>").attr("frameborder",0).attr("src","https://instagram.com/p/"+n[1]+"/embed/").attr("width","612").attr("height","710").attr("scrolling","no").attr("allowtransparency","true");else if(i&&i[0].length)e=C("<iframe>").attr("frameborder",0).attr("src",i[0]+"/embed/simple").attr("width","600").attr("height","600").attr("class","vine-embed");else if(r&&r[3].length)e=C("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("src","//player.vimeo.com/video/"+r[3]).attr("width","640").attr("height","360");else if(s&&s[2].length)e=C("<iframe>").attr("frameborder",0).attr("src","//www.dailymotion.com/embed/video/"+s[2]).attr("width","640").attr("height","360");else if(a&&a[1].length)e=C("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","498").attr("width","510").attr("src","//player.youku.com/embed/"+a[1]);else if(l&&l[1].length||c&&c[2].length){var k=l&&l[1].length?l[1]:c[2];e=C("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","310").attr("width","500").attr("src","http://v.qq.com/iframe/player.html?vid="+k+"&auto=0")}else if(d||u||h)e=C("<video controls>").attr("src",t).attr("width","640").attr("height","360");else{if(!p||!p[0].length)return!1;e=C("<iframe>").attr("frameborder",0).attr("src","https://www.facebook.com/plugins/video.php?href="+encodeURIComponent(p[0])+"&show_text=0&width=560").attr("width","560").attr("height","301").attr("scrolling","no").attr("allowtransparency","true")}return e.addClass("note-video-clip"),e[0]},t.prototype.show=function(){var o=this,t=this.context.invoke("editor.getSelectedText");this.context.invoke("editor.saveRange"),this.showVideoDialog(t).then(function(t){o.ui.hideDialog(o.$dialog),o.context.invoke("editor.restoreRange");var e=o.createVideoNode(t);e&&o.context.invoke("editor.insertNode",e)}).fail(function(){o.context.invoke("editor.restoreRange")})},t.prototype.showVideoDialog=function(t){var n=this;return C.Deferred(function(e){var o=n.$dialog.find(".note-video-url"),t=n.$dialog.find(".note-video-btn");n.ui.onDialogShown(n.$dialog,function(){n.context.triggerEvent("dialog.shown"),o.on("input paste propertychange",function(){n.ui.toggleBtn(t,o.val())}),R.isSupportTouch||o.trigger("focus"),t.click(function(t){t.preventDefault(),e.resolve(o.val())}),n.bindEnterKey(o,t)}),n.ui.onDialogHidden(n.$dialog,function(){o.off(),t.off(),"pending"===e.state()&&e.reject()}),n.ui.showDialog(n.$dialog)})},t}(),le=function(){function t(t){this.context=t,this.ui=C.summernote.ui,this.$body=C(document.body),this.$editor=t.layoutInfo.editor,this.options=t.options,this.lang=this.options.langInfo}return t.prototype.initialize=function(){var t=this.options.dialogsInBody?this.$body:this.$editor,e=['<p class="text-center">','<a href="http://summernote.org/" target="_blank">Summernote 0.8.12</a> · ','<a href="https://github.com/summernote/summernote" target="_blank">Project</a> · ','<a href="https://github.com/summernote/summernote/issues" target="_blank">Issues</a>',"</p>"].join("");this.$dialog=this.ui.dialog({title:this.lang.options.help,fade:this.options.dialogsFade,body:this.createShortcutList(),footer:e,callback:function(t){t.find(".modal-body,.note-modal-body").css({"max-height":300,overflow:"scroll"})}}).render().appendTo(t)},t.prototype.destroy=function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()},t.prototype.createShortcutList=function(){var n=this,i=this.options.keyMap[R.isMac?"mac":"pc"];return Object.keys(i).map(function(t){var e=i[t],o=C('<div><div class="help-list-item"/></div>');return o.append(C("<label><kbd>"+t+"</kdb></label>").css({width:180,"margin-right":10})).append(C("<span/>").html(n.context.memo("help."+e)||e)),o.html()}).join("")},t.prototype.showHelpDialog=function(){var e=this;return C.Deferred(function(t){e.ui.onDialogShown(e.$dialog,function(){e.context.triggerEvent("dialog.shown"),t.resolve()}),e.ui.showDialog(e.$dialog)}).promise()},t.prototype.show=function(){var t=this;this.context.invoke("editor.saveRange"),this.showHelpDialog().then(function(){t.context.invoke("editor.restoreRange")})},t}(),ce=function(){function t(t){var o=this;this.context=t,this.ui=C.summernote.ui,this.options=t.options,this.events={"summernote.keyup summernote.mouseup summernote.scroll":function(){o.update()},"summernote.disable summernote.change summernote.dialog.shown":function(){o.hide()},"summernote.focusout":function(t,e){R.isFF||e.relatedTarget&&$t.ancestor(e.relatedTarget,A.eq(o.$popover[0]))||o.hide()}}}return t.prototype.shouldInitialize=function(){return this.options.airMode&&!B.isEmpty(this.options.popover.air)},t.prototype.initialize=function(){this.$popover=this.ui.popover({className:"note-air-popover"}).render().appendTo(this.options.container);var t=this.$popover.find(".popover-content");this.context.invoke("buttons.build",t,this.options.popover.air)},t.prototype.destroy=function(){this.$popover.remove()},t.prototype.update=function(){var t=this.context.invoke("editor.currentStyle");if(t.range&&!t.range.isCollapsed()){var e=B.last(t.range.getClientRects());if(e){var o=A.rect2bnd(e);this.$popover.css({display:"block",left:Math.max(o.left+o.width/2,0)-20,top:o.top+o.height}),this.context.invoke("buttons.updateCurrentStyle",this.$popover)}}else this.hide()},t.prototype.hide=function(){this.$popover.hide()},t}(),de=function(){function t(t){var o=this;this.context=t,this.ui=C.summernote.ui,this.$editable=t.layoutInfo.editable,this.options=t.options,this.hint=this.options.hint||[],this.direction=this.options.hintDirection||"bottom",this.hints=Array.isArray(this.hint)?this.hint:[this.hint],this.events={"summernote.keyup":function(t,e){e.isDefaultPrevented()||o.handleKeyup(e)},"summernote.keydown":function(t,e){o.handleKeydown(e)},"summernote.disable summernote.dialog.shown":function(){o.hide()}}}return t.prototype.shouldInitialize=function(){return 0<this.hints.length},t.prototype.initialize=function(){var e=this;this.lastWordRange=null,this.$popover=this.ui.popover({className:"note-hint-popover",hideArrow:!0,direction:""}).render().appendTo(this.options.container),this.$popover.hide(),this.$content=this.$popover.find(".popover-content,.note-popover-content"),this.$content.on("click",".note-hint-item",function(t){e.$content.find(".active").removeClass("active"),C(t.currentTarget).addClass("active"),e.replace()})},t.prototype.destroy=function(){this.$popover.remove()},t.prototype.selectItem=function(t){this.$content.find(".active").removeClass("active"),t.addClass("active"),this.$content[0].scrollTop=t[0].offsetTop-this.$content.innerHeight()/2},t.prototype.moveDown=function(){var t=this.$content.find(".note-hint-item.active"),e=t.next();if(e.length)this.selectItem(e);else{var o=t.parent().next();o.length||(o=this.$content.find(".note-hint-group").first()),this.selectItem(o.find(".note-hint-item").first())}},t.prototype.moveUp=function(){var t=this.$content.find(".note-hint-item.active"),e=t.prev();if(e.length)this.selectItem(e);else{var o=t.parent().prev();o.length||(o=this.$content.find(".note-hint-group").last()),this.selectItem(o.find(".note-hint-item").last())}},t.prototype.replace=function(){var t=this.$content.find(".note-hint-item.active");if(t.length){var e=this.nodeFromItem(t);this.lastWordRange.insertNode(e),At.createFromNode(e).collapse().select(),this.lastWordRange=null,this.hide(),this.context.triggerEvent("change",this.$editable.html(),this.$editable[0]),this.context.invoke("editor.focus")}},t.prototype.nodeFromItem=function(t){var e=this.hints[t.data("index")],o=t.data("item"),n=e.content?e.content(o):o;return"string"==typeof n&&(n=$t.createText(n)),n},t.prototype.createItemTemplates=function(n,t){var i=this.hints[n];return t.map(function(t,e){var o=C('<div class="note-hint-item"/>');return o.append(i.template?i.template(t):t+""),o.data({index:n,item:t}),o})},t.prototype.handleKeydown=function(t){this.$popover.is(":visible")&&(t.keyCode===Pt.code.ENTER?(t.preventDefault(),this.replace()):t.keyCode===Pt.code.UP?(t.preventDefault(),this.moveUp()):t.keyCode===Pt.code.DOWN&&(t.preventDefault(),this.moveDown()))},t.prototype.searchKeyword=function(t,e,o){var n=this.hints[t];if(n&&n.match.test(e)&&n.search){var i=n.match.exec(e);n.search(i[1],o)}else o()},t.prototype.createGroup=function(e,t){var o=this,n=C('<div class="note-hint-group note-hint-group-'+e+'"/>');return this.searchKeyword(e,t,function(t){(t=t||[]).length&&(n.html(o.createItemTemplates(e,t)),o.show())}),n},t.prototype.handleKeyup=function(t){var o=this;if(!B.contains([Pt.code.ENTER,Pt.code.UP,Pt.code.DOWN],t.keyCode)){var e=this.context.invoke("editor.getLastRange").getWordRange(),n=e.toString();if(this.hints.length&&n){this.$content.empty();var i=A.rect2bnd(B.last(e.getClientRects()));i&&(this.$popover.hide(),this.lastWordRange=e,this.hints.forEach(function(t,e){t.match.test(n)&&o.createGroup(e,n).appendTo(o.$content)}),this.$content.find(".note-hint-item:first").addClass("active"),"top"===this.direction?this.$popover.css({left:i.left,top:i.top-this.$popover.outerHeight()-5}):this.$popover.css({left:i.left,top:i.top+i.height+5}))}else this.hide()}},t.prototype.show=function(){this.$popover.show()},t.prototype.hide=function(){this.$popover.hide()},t}();C.summernote=C.extend(C.summernote,{version:"0.8.12",plugins:{},dom:$t,range:At,options:{langInfo:C.summernote.lang["en-US"],modules:{editor:jt,clipboard:Kt,dropzone:Wt,codeview:qt,statusbar:Vt,fullscreen:Gt,handle:_t,hintPopover:de,autoLink:Yt,autoSync:Qt,autoReplace:Jt,placeholder:Xt,buttons:te,toolbar:ee,linkDialog:oe,linkPopover:ne,imageDialog:ie,imagePopover:re,tablePopover:se,videoDialog:ae,helpDialog:le,airPopover:ce},buttons:{},lang:"en-US",followingToolbar:!1,otherStaticBar:"",toolbar:[["style",["style"]],["font",["bold","underline","clear"]],["fontname",["fontname"]],["color",["color"]],["para",["ul","ol","paragraph"]],["table",["table"]],["insert",["link","picture","video"]],["view",["fullscreen","codeview","help"]]],popatmouse:!0,popover:{image:[["resize",["resizeFull","resizeHalf","resizeQuarter","resizeNone"]],["float",["floatLeft","floatRight","floatNone"]],["remove",["removeMedia"]]],link:[["link",["linkDialogShow","unlink"]]],table:[["add",["addRowDown","addRowUp","addColLeft","addColRight"]],["delete",["deleteRow","deleteCol","deleteTable"]]],air:[["color",["color"]],["font",["bold","underline","clear"]],["para",["ul","paragraph"]],["table",["table"]],["insert",["link","picture"]]]},airMode:!1,width:null,height:null,linkTargetBlank:!0,focus:!1,tabSize:4,styleWithSpan:!0,shortcuts:!0,textareaAutoSync:!0,hintDirection:"bottom",tooltip:"auto",container:"body",maxTextLength:0,blockquoteBreakingLevel:2,spellCheck:!0,styleTags:["p","blockquote","pre","h1","h2","h3","h4","h5","h6"],fontNames:["Arial","Arial Black","Comic Sans MS","Courier New","Helvetica Neue","Helvetica","Impact","Lucida Grande","Tahoma","Times New Roman","Verdana"],fontNamesIgnoreCheck:[],fontSizes:["8","9","10","11","12","14","18","24","36"],colors:[["#000000","#424242","#636363","#9C9C94","#CEC6CE","#EFEFEF","#F7F7F7","#FFFFFF"],["#FF0000","#FF9C00","#FFFF00","#00FF00","#00FFFF","#0000FF","#9C00FF","#FF00FF"],["#F7C6CE","#FFE7CE","#FFEFC6","#D6EFD6","#CEDEE7","#CEE7F7","#D6D6E7","#E7D6DE"],["#E79C9C","#FFC69C","#FFE79C","#B5D6A5","#A5C6CE","#9CC6EF","#B5A5D6","#D6A5BD"],["#E76363","#F7AD6B","#FFD663","#94BD7B","#73A5AD","#6BADDE","#8C7BC6","#C67BA5"],["#CE0000","#E79439","#EFC631","#6BA54A","#4A7B8C","#3984C6","#634AA5","#A54A7B"],["#9C0000","#B56308","#BD9400","#397B21","#104A5A","#085294","#311873","#731842"],["#630000","#7B3900","#846300","#295218","#083139","#003163","#21104A","#4A1031"]],colorsName:[["Black","Tundora","Dove Gray","Star Dust","Pale Slate","Gallery","Alabaster","White"],["Red","Orange Peel","Yellow","Green","Cyan","Blue","Electric Violet","Magenta"],["Azalea","Karry","Egg White","Zanah","Botticelli","Tropical Blue","Mischka","Twilight"],["Tonys Pink","Peach Orange","Cream Brulee","Sprout","Casper","Perano","Cold Purple","Careys Pink"],["Mandy","Rajah","Dandelion","Olivine","Gulf Stream","Viking","Blue Marguerite","Puce"],["Guardsman Red","Fire Bush","Golden Dream","Chelsea Cucumber","Smalt Blue","Boston Blue","Butterfly Bush","Cadillac"],["Sangria","Mai Tai","Buddha Gold","Forest Green","Eden","Venice Blue","Meteorite","Claret"],["Rosewood","Cinnamon","Olive","Parsley","Tiber","Midnight Blue","Valentino","Loulou"]],colorButton:{foreColor:"#000000",backColor:"#FFFF00"},lineHeights:["1.0","1.2","1.4","1.5","1.6","1.8","2.0","3.0"],tableClassName:"table table-bordered",insertTableMaxSize:{col:10,row:10},dialogsInBody:!1,dialogsFade:!1,maximumImageFileSize:null,callbacks:{onBeforeCommand:null,onBlur:null,onBlurCodeview:null,onChange:null,onChangeCodeview:null,onDialogShown:null,onEnter:null,onFocus:null,onImageLinkInsert:null,onImageUpload:null,onImageUploadError:null,onInit:null,onKeydown:null,onKeyup:null,onMousedown:null,onMouseup:null,onPaste:null,onScroll:null},codemirror:{mode:"text/html",htmlMode:!0,lineNumbers:!0},codeviewFilter:!1,codeviewFilterRegex:/<\/*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|ilayer|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|t(?:itle|extarea)|xml)[^>]*?>/gi,codeviewIframeFilter:!0,codeviewIframeWhitelistSrc:[],codeviewIframeWhitelistSrcBase:["www.youtube.com","www.youtube-nocookie.com","www.facebook.com","vine.co","instagram.com","player.vimeo.com","www.dailymotion.com","player.youku.com","v.qq.com"],keyMap:{pc:{ENTER:"insertParagraph","CTRL+Z":"undo","CTRL+Y":"redo",TAB:"tab","SHIFT+TAB":"untab","CTRL+B":"bold","CTRL+I":"italic","CTRL+U":"underline","CTRL+SHIFT+S":"strikethrough","CTRL+BACKSLASH":"removeFormat","CTRL+SHIFT+L":"justifyLeft","CTRL+SHIFT+E":"justifyCenter","CTRL+SHIFT+R":"justifyRight","CTRL+SHIFT+J":"justifyFull","CTRL+SHIFT+NUM7":"insertUnorderedList","CTRL+SHIFT+NUM8":"insertOrderedList","CTRL+LEFTBRACKET":"outdent","CTRL+RIGHTBRACKET":"indent","CTRL+NUM0":"formatPara","CTRL+NUM1":"formatH1","CTRL+NUM2":"formatH2","CTRL+NUM3":"formatH3","CTRL+NUM4":"formatH4","CTRL+NUM5":"formatH5","CTRL+NUM6":"formatH6","CTRL+ENTER":"insertHorizontalRule","CTRL+K":"linkDialog.show"},mac:{ENTER:"insertParagraph","CMD+Z":"undo","CMD+SHIFT+Z":"redo",TAB:"tab","SHIFT+TAB":"untab","CMD+B":"bold","CMD+I":"italic","CMD+U":"underline","CMD+SHIFT+S":"strikethrough","CMD+BACKSLASH":"removeFormat","CMD+SHIFT+L":"justifyLeft","CMD+SHIFT+E":"justifyCenter","CMD+SHIFT+R":"justifyRight","CMD+SHIFT+J":"justifyFull","CMD+SHIFT+NUM7":"insertUnorderedList","CMD+SHIFT+NUM8":"insertOrderedList","CMD+LEFTBRACKET":"outdent","CMD+RIGHTBRACKET":"indent","CMD+NUM0":"formatPara","CMD+NUM1":"formatH1","CMD+NUM2":"formatH2","CMD+NUM3":"formatH3","CMD+NUM4":"formatH4","CMD+NUM5":"formatH5","CMD+NUM6":"formatH6","CMD+ENTER":"insertHorizontalRule","CMD+K":"linkDialog.show"}},icons:{align:"note-icon-align",alignCenter:"note-icon-align-center",alignJustify:"note-icon-align-justify",alignLeft:"note-icon-align-left",alignRight:"note-icon-align-right",rowBelow:"note-icon-row-below",colBefore:"note-icon-col-before",colAfter:"note-icon-col-after",rowAbove:"note-icon-row-above",rowRemove:"note-icon-row-remove",colRemove:"note-icon-col-remove",indent:"note-icon-align-indent",outdent:"note-icon-align-outdent",arrowsAlt:"note-icon-arrows-alt",bold:"note-icon-bold",caret:"note-icon-caret",circle:"note-icon-circle",close:"note-icon-close",code:"note-icon-code",eraser:"note-icon-eraser",floatLeft:"note-icon-float-left",floatRight:"note-icon-float-right",font:"note-icon-font",frame:"note-icon-frame",italic:"note-icon-italic",link:"note-icon-link",unlink:"note-icon-chain-broken",magic:"note-icon-magic",menuCheck:"note-icon-menu-check",minus:"note-icon-minus",orderedlist:"note-icon-orderedlist",pencil:"note-icon-pencil",picture:"note-icon-picture",question:"note-icon-question",redo:"note-icon-redo",rollback:"note-icon-rollback",square:"note-icon-square",strikethrough:"note-icon-strikethrough",subscript:"note-icon-subscript",superscript:"note-icon-superscript",table:"note-icon-table",textHeight:"note-icon-text-height",trash:"note-icon-trash",underline:"note-icon-underline",undo:"note-icon-undo",unorderedlist:"note-icon-unorderedlist",video:"note-icon-video"}}}),C.summernote=C.extend(C.summernote,{ui:b}),C.summernote.options.styleTags=["p",{title:"Blockquote",tag:"blockquote",className:"blockquote",value:"blockquote"},"pre","h1","h2","h3","h4","h5","h6"]}); |
from app import apfell, links, use_ssl
from sanic import response
from jinja2 import Environment, PackageLoader
from sanic_jwt.decorators import scoped, inject_user
from app.routes.routes import respect_pivot
import urllib.parse
env = Environment(loader=PackageLoader('app', 'templates'))
@apfell.route("/apiui/command_help")
@inject_user()
@scoped(['auth:user', 'auth:apitoken_user'], False) # user or user-level api token are ok
async def apiui_command_help(request, user):
template = env.get_template('apiui_command_help.html')
if len(request.query_args) != 0:
data = urllib.parse.unquote(request.query_args[0][1])
print(data)
else:
data = ""
if use_ssl:
content = template.render(links=await respect_pivot(links, request), name=user['username'], http="https",
ws="wss", config=user['ui_config'], view_utc_time=user['view_utc_time'], agent=data)
else:
content = template.render(links=await respect_pivot(links, request), name=user['username'], http="http",
ws="ws", config=user['ui_config'], view_utc_time=user['view_utc_time'], agent=data)
return response.html(content)
# add links to the routes in this file at the bottom
links['apiui_command_help'] = apfell.url_for('apiui_command_help')
| from app import apfell, links, use_ssl, db_objects
from sanic import response
from jinja2 import Environment, PackageLoader
from sanic_jwt.decorators import scoped, inject_user
from app.routes.routes import respect_pivot
import urllib.parse
import app.database_models.model as db_model
env = Environment(loader=PackageLoader('app', 'templates'))
@apfell.route("/apiui/command_help")
@inject_user()
@scoped(['auth:user', 'auth:apitoken_user'], False) # user or user-level api token are ok
async def apiui_command_help(request, user):
template = env.get_template('apiui_command_help.html')
if len(request.query_args) != 0:
data = urllib.parse.unquote(request.query_args[0][1])
query = await db_model.payloadtype_query()
try:
payloadtype = await db_objects.get(query, ptype=data)
except Exception as e:
data = ""
else:
data = ""
if use_ssl:
content = template.render(links=await respect_pivot(links, request), name=user['username'], http="https",
ws="wss", config=user['ui_config'], view_utc_time=user['view_utc_time'], agent=data)
else:
content = template.render(links=await respect_pivot(links, request), name=user['username'], http="http",
ws="ws", config=user['ui_config'], view_utc_time=user['view_utc_time'], agent=data)
return response.html(content)
# add links to the routes in this file at the bottom
links['apiui_command_help'] = apfell.url_for('apiui_command_help')
|
$(document).ready(function(){function t(){api.IMAP.get().success(function(e){0==e.length?$("#lastlogindiv").hide():(0==(e=e[0]).enabled?$("#lastlogindiv").hide():$("#lastlogindiv").show(),$("#imapusername").val(e.username),$("#imaphost").val(e.host),$("#imapport").val(e.port),$("#imappassword").val(e.password),$("#use_tls").prop("checked",e.tls),$("#use_imap").prop("checked",e.enabled),$("#folder").val(e.folder),$("#restrictdomain").val(e.restrict_domain),$("#deletecampaign").prop("checked",e.delete_reported_campaign_email),$("#lastloginraw").val(e.last_login),$("#lastlogin").val(moment.utc(e.last_login).fromNow()),$("#imapfreq").val(e.imap_freq))}).error(function(){errorFlash("Error fetching IMAP settings")})}$('[data-toggle="tooltip"]').tooltip(),$("#apiResetForm").submit(function(e){return api.reset().success(function(e){user.api_key=e.data,successFlash(e.message),$("#api_key").val(user.api_key)}).error(function(e){errorFlash(e.message)}),!1}),$("#settingsForm").submit(function(e){return $.post("/settings",$(this).serialize()).done(function(e){successFlash(e.message)}).fail(function(e){errorFlash(e.responseJSON.message)}),!1}),$("#savesettings").click(function(){var e={};return e.host=$("#imaphost").val(),e.port=$("#imapport").val(),e.username=$("#imapusername").val(),e.password=$("#imappassword").val(),e.enabled=$("#use_imap").prop("checked"),e.tls=$("#use_tls").prop("checked"),e.folder=$("#folder").val(),e.imap_freq=$("#imapfreq").val(),e.restrict_domain=$("#restrictdomain").val(),e.delete_reported_campaign_email=$("#deletecampaign").prop("checked"),""==e.host?(errorFlash("No IMAP Host specified"),document.body.scrollTop=0,document.documentElement.scrollTop=0):""==e.port?(errorFlash("No IMAP Port specified"),document.body.scrollTop=0,document.documentElement.scrollTop=0):isNaN(e.port)||e.port<1||65535<e.port?(errorFlash("Invalid IMAP Port"),document.body.scrollTop=0,document.documentElement.scrollTop=0):(""==e.imap_freq&&(e.imap_freq="60"),api.IMAP.post(e).done(function(e){1==e.success?successFlashFade("Successfully updated IMAP settings.",2):errorFlash("Unable to update IMAP settings.")}).success(function(e){t()}).fail(function(e){errorFlash(e.responseJSON.message)}).always(function(e){document.body.scrollTop=0,document.documentElement.scrollTop=0})),!1}),$("#validateimap").click(function(){var e={};if(e.host=$("#imaphost").val(),e.port=$("#imapport").val(),e.username=$("#imapusername").val(),e.password=$("#imappassword").val(),e.tls=$("#use_tls").prop("checked"),""==e.host)return errorFlash("No IMAP Host specified"),document.body.scrollTop=0,document.documentElement.scrollTop=0,!1;if(""==e.port)return errorFlash("No IMAP Port specified"),document.body.scrollTop=0,document.documentElement.scrollTop=0,!1;if(isNaN(e.port)||e.port<1||65535<e.port)return errorFlash("Invalid IMAP Port"),document.body.scrollTop=0,document.documentElement.scrollTop=0,!1;var t=$("#validateimap").html();$("#imaphost").attr("disabled",!0),$("#imapport").attr("disabled",!0),$("#imapusername").attr("disabled",!0),$("#imappassword").attr("disabled",!0),$("#use_imap").attr("disabled",!0),$("#use_tls").attr("disabled",!0),$("#folder").attr("disabled",!0),$("#restrictdomain").attr("disabled",!0),$("#deletecampaign").attr("disabled",!0),$("#lastlogin").attr("disabled",!0),$("#imapfreq").attr("disabled",!0),$("#validateimap").attr("disabled",!0),$("#validateimap").html("<i class='fa fa-circle-o-notch fa-spin'></i> Testing..."),api.IMAP.validate(e).done(function(t){1==t.success?Swal.fire({title:"Success",html:"Logged into <b>"+$("#imaphost").val()+"</b>",type:"success"}):Swal.fire({title:"Failed!",html:"Unable to login to <b>"+$("#imaphost").val()+"</b>.",type:"error",showCancelButton:!0,cancelButtonText:"Close",confirmButtonText:"More Info",confirmButtonColor:"#428bca",allowOutsideClick:!1}).then(function(e){e.value&&Swal.fire({title:"Error:",text:t.message})})}).fail(function(){Swal.fire({title:"Failed!",text:"An unecpected error occured.",type:"error"})}).always(function(){$("#imaphost").attr("disabled",!1),$("#imapport").attr("disabled",!1),$("#imapusername").attr("disabled",!1),$("#imappassword").attr("disabled",!1),$("#use_imap").attr("disabled",!1),$("#use_tls").attr("disabled",!1),$("#folder").attr("disabled",!1),$("#restrictdomain").attr("disabled",!1),$("#deletecampaign").attr("disabled",!1),$("#lastlogin").attr("disabled",!1),$("#imapfreq").attr("disabled",!1),$("#validateimap").attr("disabled",!1),$("#validateimap").html(t)})}),$("#reporttab").click(function(){t()}),$("#advanced").click(function(){$("#advancedarea").toggle()});var e=localStorage.getItem("gophish.use_map");$("#use_map").prop("checked",JSON.parse(e)),$("#use_map").on("change",function(){localStorage.setItem("gophish.use_map",JSON.stringify(this.checked))}),t()}); | $(document).ready(function(){function t(){api.IMAP.get().success(function(e){0==e.length?$("#lastlogindiv").hide():(0==(e=e[0]).enabled?$("#lastlogindiv").hide():$("#lastlogindiv").show(),$("#imapusername").val(e.username),$("#imaphost").val(e.host),$("#imapport").val(e.port),$("#imappassword").val(e.password),$("#use_tls").prop("checked",e.tls),$("#use_imap").prop("checked",e.enabled),$("#folder").val(e.folder),$("#restrictdomain").val(e.restrict_domain),$("#deletecampaign").prop("checked",e.delete_reported_campaign_email),$("#lastloginraw").val(e.last_login),$("#lastlogin").val(moment.utc(e.last_login).fromNow()),$("#imapfreq").val(e.imap_freq))}).error(function(){errorFlash("Error fetching IMAP settings")})}$('[data-toggle="tooltip"]').tooltip(),$("#apiResetForm").submit(function(e){return api.reset().success(function(e){user.api_key=e.data,successFlash(e.message),$("#api_key").val(user.api_key)}).error(function(e){errorFlash(e.message)}),!1}),$("#settingsForm").submit(function(e){return $.post("/settings",$(this).serialize()).done(function(e){successFlash(e.message)}).fail(function(e){errorFlash(e.responseJSON.message)}),!1}),$("#savesettings").click(function(){var e={};return e.host=$("#imaphost").val(),e.port=$("#imapport").val(),e.username=$("#imapusername").val(),e.password=$("#imappassword").val(),e.enabled=$("#use_imap").prop("checked"),e.tls=$("#use_tls").prop("checked"),e.folder=$("#folder").val(),e.imap_freq=$("#imapfreq").val(),e.restrict_domain=$("#restrictdomain").val(),e.delete_reported_campaign_email=$("#deletecampaign").prop("checked"),""==e.host?(errorFlash("No IMAP Host specified"),document.body.scrollTop=0,document.documentElement.scrollTop=0):""==e.port?(errorFlash("No IMAP Port specified"),document.body.scrollTop=0,document.documentElement.scrollTop=0):isNaN(e.port)||e.port<1||65535<e.port?(errorFlash("Invalid IMAP Port"),document.body.scrollTop=0,document.documentElement.scrollTop=0):(""==e.imap_freq&&(e.imap_freq="60"),api.IMAP.post(e).done(function(e){1==e.success?successFlashFade("Successfully updated IMAP settings.",2):errorFlash("Unable to update IMAP settings.")}).success(function(e){t()}).fail(function(e){errorFlash(e.responseJSON.message)}).always(function(e){document.body.scrollTop=0,document.documentElement.scrollTop=0})),!1}),$("#validateimap").click(function(){var e={};if(e.host=$("#imaphost").val(),e.port=$("#imapport").val(),e.username=$("#imapusername").val(),e.password=$("#imappassword").val(),e.tls=$("#use_tls").prop("checked"),""==e.host)return errorFlash("No IMAP Host specified"),document.body.scrollTop=0,document.documentElement.scrollTop=0,!1;if(""==e.port)return errorFlash("No IMAP Port specified"),document.body.scrollTop=0,document.documentElement.scrollTop=0,!1;if(isNaN(e.port)||e.port<1||65535<e.port)return errorFlash("Invalid IMAP Port"),document.body.scrollTop=0,document.documentElement.scrollTop=0,!1;var t=$("#validateimap").html();$("#imaphost").attr("disabled",!0),$("#imapport").attr("disabled",!0),$("#imapusername").attr("disabled",!0),$("#imappassword").attr("disabled",!0),$("#use_imap").attr("disabled",!0),$("#use_tls").attr("disabled",!0),$("#folder").attr("disabled",!0),$("#restrictdomain").attr("disabled",!0),$("#deletecampaign").attr("disabled",!0),$("#lastlogin").attr("disabled",!0),$("#imapfreq").attr("disabled",!0),$("#validateimap").attr("disabled",!0),$("#validateimap").html("<i class='fa fa-circle-o-notch fa-spin'></i> Testing..."),api.IMAP.validate(e).done(function(t){1==t.success?Swal.fire({title:"Success",html:"Logged into <b>"+escapeHtml($("#imaphost").val())+"</b>",type:"success"}):Swal.fire({title:"Failed!",html:"Unable to login to <b>"+escapeHtml($("#imaphost").val())+"</b>.",type:"error",showCancelButton:!0,cancelButtonText:"Close",confirmButtonText:"More Info",confirmButtonColor:"#428bca",allowOutsideClick:!1}).then(function(e){e.value&&Swal.fire({title:"Error:",text:t.message})})}).fail(function(){Swal.fire({title:"Failed!",text:"An unecpected error occured.",type:"error"})}).always(function(){$("#imaphost").attr("disabled",!1),$("#imapport").attr("disabled",!1),$("#imapusername").attr("disabled",!1),$("#imappassword").attr("disabled",!1),$("#use_imap").attr("disabled",!1),$("#use_tls").attr("disabled",!1),$("#folder").attr("disabled",!1),$("#restrictdomain").attr("disabled",!1),$("#deletecampaign").attr("disabled",!1),$("#lastlogin").attr("disabled",!1),$("#imapfreq").attr("disabled",!1),$("#validateimap").attr("disabled",!1),$("#validateimap").html(t)})}),$("#reporttab").click(function(){t()}),$("#advanced").click(function(){$("#advancedarea").toggle()});var e=localStorage.getItem("gophish.use_map");$("#use_map").prop("checked",JSON.parse(e)),$("#use_map").on("change",function(){localStorage.setItem("gophish.use_map",JSON.stringify(this.checked))}),t()}); |
var profiles=[];function sendTestEmail(){var o=[];$.each($("#headersTable").DataTable().rows().data(),function(e,a){o.push({key:unescapeHtml(a[0]),value:unescapeHtml(a[1])})});var e={template:{},first_name:$("input[name=to_first_name]").val(),last_name:$("input[name=to_last_name]").val(),email:$("input[name=to_email]").val(),position:$("input[name=to_position]").val(),url:"",smtp:{from_address:$("#from").val(),host:$("#host").val(),username:$("#username").val(),password:$("#password").val(),ignore_cert_errors:$("#ignore_cert_errors").prop("checked"),headers:o}};btnHtml=$("#sendTestModalSubmit").html(),$("#sendTestModalSubmit").html('<i class="fa fa-spinner fa-spin"></i> Sending'),api.send_test_email(e).success(function(e){$("#sendTestEmailModal\\.flashes").empty().append('<div style="text-align:center" class="alert alert-success">\t <i class="fa fa-check-circle"></i> Email Sent!</div>'),$("#sendTestModalSubmit").html(btnHtml)}).error(function(e){$("#sendTestEmailModal\\.flashes").empty().append('<div style="text-align:center" class="alert alert-danger">\t <i class="fa fa-exclamation-circle"></i> '+e.responseJSON.message+"</div>"),$("#sendTestModalSubmit").html(btnHtml)})}function save(e){var o={headers:[]};$.each($("#headersTable").DataTable().rows().data(),function(e,a){o.headers.push({key:unescapeHtml(a[0]),value:unescapeHtml(a[1])})}),o.name=$("#name").val(),o.interface_type=$("#interface_type").val(),o.from_address=$("#from").val(),o.host=$("#host").val(),o.username=$("#username").val(),o.password=$("#password").val(),o.ignore_cert_errors=$("#ignore_cert_errors").prop("checked"),-1!=e?(o.id=profiles[e].id,api.SMTPId.put(o).success(function(e){successFlash("Profile edited successfully!"),load(),dismiss()}).error(function(e){modalError(e.responseJSON.message)})):api.SMTP.post(o).success(function(e){successFlash("Profile added successfully!"),load(),dismiss()}).error(function(e){modalError(e.responseJSON.message)})}function dismiss(){$("#modal\\.flashes").empty(),$("#name").val(""),$("#interface_type").val("SMTP"),$("#from").val(""),$("#host").val(""),$("#username").val(""),$("#password").val(""),$("#ignore_cert_errors").prop("checked",!0),$("#headersTable").dataTable().DataTable().clear().draw(),$("#modal").modal("hide")}var dismissSendTestEmailModal=function(){$("#sendTestEmailModal\\.flashes").empty(),$("#sendTestModalSubmit").html("<i class='fa fa-envelope'></i> Send")},deleteProfile=function(e){Swal.fire({title:"Are you sure?",text:"This will delete the sending profile. This can't be undone!",type:"warning",animation:!1,showCancelButton:!0,confirmButtonText:"Delete "+escapeHtml(profiles[e].name),confirmButtonColor:"#428bca",reverseButtons:!0,allowOutsideClick:!1,preConfirm:function(){return new Promise(function(a,o){api.SMTPId.delete(profiles[e].id).success(function(e){a()}).error(function(e){o(e.responseJSON.message)})})}}).then(function(e){e.value&&Swal.fire("Sending Profile Deleted!","This sending profile has been deleted!","success"),$('button:contains("OK")').on("click",function(){location.reload()})})};function edit(e){headers=$("#headersTable").dataTable({destroy:!0,columnDefs:[{orderable:!1,targets:"no-sort"}]}),$("#modalSubmit").unbind("click").click(function(){save(e)});var a={};-1!=e&&(a=profiles[e],$("#name").val(a.name),$("#interface_type").val(a.interface_type),$("#from").val(a.from_address),$("#host").val(a.host),$("#username").val(a.username),$("#password").val(a.password),$("#ignore_cert_errors").prop("checked",a.ignore_cert_errors),$.each(a.headers,function(e,a){addCustomHeader(a.key,a.value)}))}function copy(e){$("#modalSubmit").unbind("click").click(function(){save(-1)});var a;a=profiles[e],$("#name").val("Copy of "+a.name),$("#interface_type").val(a.interface_type),$("#from").val(a.from_address),$("#host").val(a.host),$("#username").val(a.username),$("#password").val(a.password),$("#ignore_cert_errors").prop("checked",a.ignore_cert_errors)}function load(){$("#profileTable").hide(),$("#emptyMessage").hide(),$("#loading").show(),api.SMTP.get().success(function(e){profiles=e,$("#loading").hide(),0<profiles.length?($("#profileTable").show(),profileTable=$("#profileTable").DataTable({destroy:!0,columnDefs:[{orderable:!1,targets:"no-sort"}]}),profileTable.clear(),profileRows=[],$.each(profiles,function(e,a){profileRows.push([escapeHtml(a.name),a.interface_type,moment(a.modified_date).format("MMMM Do YYYY, h:mm:ss a"),"<div class='pull-right'><span data-toggle='modal' data-backdrop='static' data-target='#modal'><button class='btn btn-primary' data-toggle='tooltip' data-placement='left' title='Edit Profile' onclick='edit("+e+")'> <i class='fa fa-pencil'></i> </button></span>\t\t <span data-toggle='modal' data-target='#modal'><button class='btn btn-primary' data-toggle='tooltip' data-placement='left' title='Copy Profile' onclick='copy("+e+")'> <i class='fa fa-copy'></i> </button></span> <button class='btn btn-danger' data-toggle='tooltip' data-placement='left' title='Delete Profile' onclick='deleteProfile("+e+")'> <i class='fa fa-trash-o'></i> </button></div>"])}),profileTable.rows.add(profileRows).draw(),$('[data-toggle="tooltip"]').tooltip()):$("#emptyMessage").show()}).error(function(){$("#loading").hide(),errorFlash("Error fetching profiles")})}function addCustomHeader(e,a){var o=[escapeHtml(e),escapeHtml(a),'<span style="cursor:pointer;"><i class="fa fa-trash-o"></i></span>'],s=headers.DataTable(),t=s.column(0).data().indexOf(escapeHtml(e));0<=t?s.row(t,{order:"index"}).data(o):s.row.add(o),s.draw()}$(document).ready(function(){$(".modal").on("hidden.bs.modal",function(e){$(this).removeClass("fv-modal-stack"),$("body").data("fv_open_modals",$("body").data("fv_open_modals")-1)}),$(".modal").on("shown.bs.modal",function(e){void 0===$("body").data("fv_open_modals")&&$("body").data("fv_open_modals",0),$(this).hasClass("fv-modal-stack")||($(this).addClass("fv-modal-stack"),$("body").data("fv_open_modals",$("body").data("fv_open_modals")+1),$(this).css("z-index",1040+10*$("body").data("fv_open_modals")),$(".modal-backdrop").not(".fv-modal-stack").css("z-index",1039+10*$("body").data("fv_open_modals")),$(".modal-backdrop").not("fv-modal-stack").addClass("fv-modal-stack"))}),$.fn.modal.Constructor.prototype.enforceFocus=function(){$(document).off("focusin.bs.modal").on("focusin.bs.modal",$.proxy(function(e){this.$element[0]===e.target||this.$element.has(e.target).length||$(e.target).closest(".cke_dialog, .cke").length||this.$element.trigger("focus")},this))},$(document).on("hidden.bs.modal",".modal",function(){$(".modal:visible").length&&$(document.body).addClass("modal-open")}),$("#modal").on("hidden.bs.modal",function(e){dismiss()}),$("#sendTestEmailModal").on("hidden.bs.modal",function(e){dismissSendTestEmailModal()}),$("#headersForm").on("submit",function(){return headerKey=$("#headerKey").val(),headerValue=$("#headerValue").val(),""==headerKey||""==headerValue||(addCustomHeader(headerKey,headerValue),$("#headersForm>div>input").val(""),$("#headerKey").focus()),!1}),$("#headersTable").on("click","span>i.fa-trash-o",function(){headers.DataTable().row($(this).parents("tr")).remove().draw()}),load()}); | var profiles=[];function sendTestEmail(){var s=[];$.each($("#headersTable").DataTable().rows().data(),function(e,a){s.push({key:unescapeHtml(a[0]),value:unescapeHtml(a[1])})});var e={template:{},first_name:$("input[name=to_first_name]").val(),last_name:$("input[name=to_last_name]").val(),email:$("input[name=to_email]").val(),position:$("input[name=to_position]").val(),url:"",smtp:{from_address:$("#from").val(),host:$("#host").val(),username:$("#username").val(),password:$("#password").val(),ignore_cert_errors:$("#ignore_cert_errors").prop("checked"),headers:s}};btnHtml=$("#sendTestModalSubmit").html(),$("#sendTestModalSubmit").html('<i class="fa fa-spinner fa-spin"></i> Sending'),api.send_test_email(e).success(function(e){$("#sendTestEmailModal\\.flashes").empty().append('<div style="text-align:center" class="alert alert-success">\t <i class="fa fa-check-circle"></i> Email Sent!</div>'),$("#sendTestModalSubmit").html(btnHtml)}).error(function(e){$("#sendTestEmailModal\\.flashes").empty().append('<div style="text-align:center" class="alert alert-danger">\t <i class="fa fa-exclamation-circle"></i> '+escapeHtml(e.responseJSON.message)+"</div>"),$("#sendTestModalSubmit").html(btnHtml)})}function save(e){var s={headers:[]};$.each($("#headersTable").DataTable().rows().data(),function(e,a){s.headers.push({key:unescapeHtml(a[0]),value:unescapeHtml(a[1])})}),s.name=$("#name").val(),s.interface_type=$("#interface_type").val(),s.from_address=$("#from").val(),s.host=$("#host").val(),s.username=$("#username").val(),s.password=$("#password").val(),s.ignore_cert_errors=$("#ignore_cert_errors").prop("checked"),-1!=e?(s.id=profiles[e].id,api.SMTPId.put(s).success(function(e){successFlash("Profile edited successfully!"),load(),dismiss()}).error(function(e){modalError(e.responseJSON.message)})):api.SMTP.post(s).success(function(e){successFlash("Profile added successfully!"),load(),dismiss()}).error(function(e){modalError(e.responseJSON.message)})}function dismiss(){$("#modal\\.flashes").empty(),$("#name").val(""),$("#interface_type").val("SMTP"),$("#from").val(""),$("#host").val(""),$("#username").val(""),$("#password").val(""),$("#ignore_cert_errors").prop("checked",!0),$("#headersTable").dataTable().DataTable().clear().draw(),$("#modal").modal("hide")}var dismissSendTestEmailModal=function(){$("#sendTestEmailModal\\.flashes").empty(),$("#sendTestModalSubmit").html("<i class='fa fa-envelope'></i> Send")},deleteProfile=function(e){Swal.fire({title:"Are you sure?",text:"This will delete the sending profile. This can't be undone!",type:"warning",animation:!1,showCancelButton:!0,confirmButtonText:"Delete "+escapeHtml(profiles[e].name),confirmButtonColor:"#428bca",reverseButtons:!0,allowOutsideClick:!1,preConfirm:function(){return new Promise(function(a,s){api.SMTPId.delete(profiles[e].id).success(function(e){a()}).error(function(e){s(e.responseJSON.message)})})}}).then(function(e){e.value&&Swal.fire("Sending Profile Deleted!","This sending profile has been deleted!","success"),$('button:contains("OK")').on("click",function(){location.reload()})})};function edit(e){headers=$("#headersTable").dataTable({destroy:!0,columnDefs:[{orderable:!1,targets:"no-sort"}]}),$("#modalSubmit").unbind("click").click(function(){save(e)});var a={};-1!=e&&(a=profiles[e],$("#name").val(a.name),$("#interface_type").val(a.interface_type),$("#from").val(a.from_address),$("#host").val(a.host),$("#username").val(a.username),$("#password").val(a.password),$("#ignore_cert_errors").prop("checked",a.ignore_cert_errors),$.each(a.headers,function(e,a){addCustomHeader(a.key,a.value)}))}function copy(e){$("#modalSubmit").unbind("click").click(function(){save(-1)});var a;a=profiles[e],$("#name").val("Copy of "+a.name),$("#interface_type").val(a.interface_type),$("#from").val(a.from_address),$("#host").val(a.host),$("#username").val(a.username),$("#password").val(a.password),$("#ignore_cert_errors").prop("checked",a.ignore_cert_errors)}function load(){$("#profileTable").hide(),$("#emptyMessage").hide(),$("#loading").show(),api.SMTP.get().success(function(e){profiles=e,$("#loading").hide(),0<profiles.length?($("#profileTable").show(),profileTable=$("#profileTable").DataTable({destroy:!0,columnDefs:[{orderable:!1,targets:"no-sort"}]}),profileTable.clear(),profileRows=[],$.each(profiles,function(e,a){profileRows.push([escapeHtml(a.name),a.interface_type,moment(a.modified_date).format("MMMM Do YYYY, h:mm:ss a"),"<div class='pull-right'><span data-toggle='modal' data-backdrop='static' data-target='#modal'><button class='btn btn-primary' data-toggle='tooltip' data-placement='left' title='Edit Profile' onclick='edit("+e+")'> <i class='fa fa-pencil'></i> </button></span>\t\t <span data-toggle='modal' data-target='#modal'><button class='btn btn-primary' data-toggle='tooltip' data-placement='left' title='Copy Profile' onclick='copy("+e+")'> <i class='fa fa-copy'></i> </button></span> <button class='btn btn-danger' data-toggle='tooltip' data-placement='left' title='Delete Profile' onclick='deleteProfile("+e+")'> <i class='fa fa-trash-o'></i> </button></div>"])}),profileTable.rows.add(profileRows).draw(),$('[data-toggle="tooltip"]').tooltip()):$("#emptyMessage").show()}).error(function(){$("#loading").hide(),errorFlash("Error fetching profiles")})}function addCustomHeader(e,a){var s=[escapeHtml(e),escapeHtml(a),'<span style="cursor:pointer;"><i class="fa fa-trash-o"></i></span>'],t=headers.DataTable(),o=t.column(0).data().indexOf(escapeHtml(e));0<=o?t.row(o,{order:"index"}).data(s):t.row.add(s),t.draw()}$(document).ready(function(){$(".modal").on("hidden.bs.modal",function(e){$(this).removeClass("fv-modal-stack"),$("body").data("fv_open_modals",$("body").data("fv_open_modals")-1)}),$(".modal").on("shown.bs.modal",function(e){void 0===$("body").data("fv_open_modals")&&$("body").data("fv_open_modals",0),$(this).hasClass("fv-modal-stack")||($(this).addClass("fv-modal-stack"),$("body").data("fv_open_modals",$("body").data("fv_open_modals")+1),$(this).css("z-index",1040+10*$("body").data("fv_open_modals")),$(".modal-backdrop").not(".fv-modal-stack").css("z-index",1039+10*$("body").data("fv_open_modals")),$(".modal-backdrop").not("fv-modal-stack").addClass("fv-modal-stack"))}),$.fn.modal.Constructor.prototype.enforceFocus=function(){$(document).off("focusin.bs.modal").on("focusin.bs.modal",$.proxy(function(e){this.$element[0]===e.target||this.$element.has(e.target).length||$(e.target).closest(".cke_dialog, .cke").length||this.$element.trigger("focus")},this))},$(document).on("hidden.bs.modal",".modal",function(){$(".modal:visible").length&&$(document.body).addClass("modal-open")}),$("#modal").on("hidden.bs.modal",function(e){dismiss()}),$("#sendTestEmailModal").on("hidden.bs.modal",function(e){dismissSendTestEmailModal()}),$("#headersForm").on("submit",function(){return headerKey=$("#headerKey").val(),headerValue=$("#headerValue").val(),""==headerKey||""==headerValue||(addCustomHeader(headerKey,headerValue),$("#headersForm>div>input").val(""),$("#headerKey").focus()),!1}),$("#headersTable").on("click","span>i.fa-trash-o",function(){headers.DataTable().row($(this).parents("tr")).remove().draw()}),load()}); |
{
"name": "ntesseract",
"version": "0.2.8",
"authors": [
"Tao Yuan <towyuan@outlook.com>",
"Desmond Morris <hi@desmondmorris.com>"
],
"description": "A simple wrapper for the Tesseract OCR package",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/taoyuan/ntesseract/"
},
"keywords": [
"tesseract",
"ocr",
"text recognition"
],
"dependencies": {
"glob": "^7.1.6",
"lodash.assign": "^4.2.0",
"node-uuid": "^1.4.7"
},
"devDependencies": {
"chai": "^4.2.0",
"mocha": "~8.2.1"
},
"scripts": {
"test": "mocha"
},
"license": "MIT",
"engine": {
"node": ">=0.6"
}
}
| {
"name": "ntesseract",
"version": "0.2.8",
"authors": [
"Tao Yuan <towyuan@outlook.com>",
"Desmond Morris <hi@desmondmorris.com>"
],
"description": "A simple wrapper for the Tesseract OCR package",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/taoyuan/ntesseract/"
},
"keywords": [
"tesseract",
"ocr",
"text recognition"
],
"dependencies": {
"glob": "^7.1.6",
"lodash.assign": "^4.2.0",
"node-uuid": "^1.4.7"
},
"devDependencies": {
"chai": "^4.2.0",
"mocha": "~8.2.1"
},
"scripts": {
"test": "mocha"
},
"license": "MIT",
"engine": {
"node": ">=8.0"
}
}
|
'use strict';
var execSync = require('child_process').execSync;
var sizeOf = require('image-size');
var mkdirp = require('mkdirp-promise');
var rimraf = require('rimraf-then');
var fs = require('fs');
var path = require('path');
function tileLevel(inPath, outPath, zoom, tileSize, pattern, quality) {
var dotExtension = pattern.replace(/.*(\.[^.]+)$/, '$1');
var patternedFilename = pattern.replace(/\{z\}/, '' + zoom)
.replace(/\{x\}/, '%[fx:page.x/' + tileSize + ']')
.replace(/\{y\}/, '%[fx:page.y/' + tileSize + ']')
.replace(/\.[^.]+$/, '');
var patternedFilenameWithoutTheFilename = '';
if (pattern.indexOf(path.sep) > 0) {
patternedFilenameWithoutTheFilename = pattern.replace(new RegExp(path.sep+'[^'+path.sep+']*$'), '')
.replace(/\{z\}/, '' + zoom);
}
return mkdirp(outPath + path.sep + patternedFilenameWithoutTheFilename)
.then(()=>{
var command = 'convert ' + inPath +
' -crop ' + tileSize + 'x' + tileSize +
' -set filename:tile "' + patternedFilename + '"' +
' -quality ' + quality + ' +repage +adjoin' +
' "' + outPath + '/%[filename:tile]' + dotExtension + '"' ;
execSync(command);
});
}
function imageBiggerThanTile(path, tileSize) {
var size = sizeOf(path);
return size.height > tileSize || size.width > tileSize;
}
function tileRec(inPath, outPath, zoom, tileSize, tempDir, pattern, zoomToDisplay, invertZoom, quality) {
var inPathMpc = tempDir + '/temp_level_' + zoom + '.mpc';
var inPathCache = tempDir + '/temp_level_' + zoom + '.cache';
execSync('convert ' + inPath + ' ' + inPathMpc);
return tileLevel(inPathMpc, outPath, zoomToDisplay, tileSize, pattern, quality)
.then(function () {
if (imageBiggerThanTile(inPath, tileSize)) {
var newZoom = zoom + 1;
var newZoomToDisplay = zoomToDisplay + 1;
if (!invertZoom) {
newZoomToDisplay = zoomToDisplay - 1;
}
var newInPath = tempDir + '/temp_level_' + zoom + '.png';
execSync('convert ' + inPathMpc + ' -resize 50% -quality ' + quality + ' ' + newInPath);
fs.unlinkSync(inPathMpc);
fs.unlinkSync(inPathCache);
return tileRec(newInPath, outPath, newZoom, tileSize, tempDir, pattern, newZoomToDisplay, invertZoom, quality);
} else {
fs.unlinkSync(inPathMpc);
fs.unlinkSync(inPathCache);
}
});
}
module.exports.tile = function (inPath, outPath, pattern, options) {
options = options || {};
var tileSize = options.tileSize || 256;
var tmpDir = options.tmpDir || process.env.TMPDIR || '/tmp';
var tempDir = tmpDir + '/image-tiler_' + process.pid;
var zoom = 0;
var zoomToDisplay = 0;
var quality = options.quality || 100;
if (!options.invertZoom) {
var size = sizeOf(inPath);
var halvingsWidth = Math.ceil(Math.log2(Math.ceil(size.width / tileSize)));
var halvingsheight = Math.ceil(Math.log2(Math.ceil(size.height / tileSize)));
zoomToDisplay = Math.max(halvingsWidth, halvingsheight);
}
return mkdirp(tempDir)
.then(()=>tileRec(inPath, outPath, zoom, tileSize, tempDir, pattern, zoomToDisplay, options.invertZoom, quality))
.then(()=>rimraf(tempDir));
};
| 'use strict';
var execFileSync = require('child_process').execFileSync;
var sizeOf = require('image-size');
var mkdirp = require('mkdirp-promise');
var rimraf = require('rimraf-then');
var fs = require('fs');
var path = require('path');
function tileLevel(inPath, outPath, zoom, tileSize, pattern, quality) {
var dotExtension = pattern.replace(/.*(\.[^.]+)$/, '$1');
var patternedFilename = pattern.replace(/\{z\}/, '' + zoom)
.replace(/\{x\}/, '%[fx:page.x/' + tileSize + ']')
.replace(/\{y\}/, '%[fx:page.y/' + tileSize + ']')
.replace(/\.[^.]+$/, '');
var patternedFilenameWithoutTheFilename = '';
if (pattern.indexOf(path.sep) > 0) {
patternedFilenameWithoutTheFilename = pattern.replace(new RegExp(path.sep + '[^' + path.sep + ']*$'), '')
.replace(/\{z\}/, '' + zoom);
}
return mkdirp(outPath + path.sep + patternedFilenameWithoutTheFilename)
.then(() => {
var args = [inPath,
'-crop', tileSize + 'x' + tileSize,
'-set', 'filename:tile', patternedFilename,
'-quality', quality, '+repage', '+adjoin',
outPath + '/%[filename:tile]' + dotExtension];
execFileSync('convert', args);
});
}
function imageBiggerThanTile(path, tileSize) {
var size = sizeOf(path);
return size.height > tileSize || size.width > tileSize;
}
function tileRec(inPath, outPath, zoom, tileSize, tempDir, pattern, zoomToDisplay, invertZoom, quality) {
var inPathMpc = tempDir + '/temp_level_' + zoom + '.mpc';
var inPathCache = tempDir + '/temp_level_' + zoom + '.cache';
execFileSync('convert', [inPath, inPathMpc]);
return tileLevel(inPathMpc, outPath, zoomToDisplay, tileSize, pattern, quality)
.then(function () {
if (imageBiggerThanTile(inPath, tileSize)) {
var newZoom = zoom + 1;
var newZoomToDisplay = zoomToDisplay + 1;
if (!invertZoom) {
newZoomToDisplay = zoomToDisplay - 1;
}
var newInPath = tempDir + '/temp_level_' + zoom + '.png';
execFileSync('convert', [inPathMpc, '-resize', '50%', '-quality', quality, newInPath]);
fs.unlinkSync(inPathMpc);
fs.unlinkSync(inPathCache);
return tileRec(newInPath, outPath, newZoom, tileSize, tempDir, pattern, newZoomToDisplay, invertZoom, quality);
} else {
fs.unlinkSync(inPathMpc);
fs.unlinkSync(inPathCache);
}
});
}
module.exports.tile = function (inPath, outPath, pattern, options) {
options = options || {};
var tileSize = options.tileSize || 256;
var tmpDir = options.tmpDir || process.env.TMPDIR || '/tmp';
var tempDir = tmpDir + '/image-tiler_' + process.pid;
var zoom = 0;
var zoomToDisplay = 0;
var quality = options.quality || 100;
if (!options.invertZoom) {
var size = sizeOf(inPath);
var halvingsWidth = Math.ceil(Math.log2(Math.ceil(size.width / tileSize)));
var halvingsheight = Math.ceil(Math.log2(Math.ceil(size.height / tileSize)));
zoomToDisplay = Math.max(halvingsWidth, halvingsheight);
}
return mkdirp(tempDir)
.then(() => tileRec(inPath, outPath, zoom, tileSize, tempDir, pattern, zoomToDisplay, options.invertZoom, quality))
.then(() => rimraf(tempDir));
};
|
/*global jasmine*/
var fs = require('fs');
var execSync = require('child_process').execSync;
var rimraf = require('rimraf');
var expectImagesToBeTheSame = require('./expectImagesToBeTheSame.helper.js').expectImagesToBeTheSame;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 600000;
var tmpDir = process.env.TMPDIR || '/tmp';
var tempDir = tmpDir + '/imagetiler_spec_' + process.pid;
describe('image-tiler cli', function () {
beforeEach(function () {
fs.mkdirSync(tempDir);
});
describe('When used on an image smaller than the tile size', function () {
it('should output the same image', function (done) {
execSync('node bin/image-tiler spec/small.png ' + tempDir + ' small_test_result_{z}_{x}_{y}.png');
expectImagesToBeTheSame(tempDir + '/small_test_result_0_0_0.png', 'spec/expected/small-test.png')
.then(done)
.catch(done.fail);
});
});
afterEach(function () {
rimraf.sync(tempDir);
});
});
| /*global jasmine*/
var fs = require('fs');
var execFileSync = require('child_process').execFileSync;
var rimraf = require('rimraf');
var expectImagesToBeTheSame = require('./expectImagesToBeTheSame.helper.js').expectImagesToBeTheSame;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 600000;
var tmpDir = process.env.TMPDIR || '/tmp';
var tempDir = tmpDir + '/imagetiler_spec_' + process.pid;
describe('image-tiler cli', function () {
beforeEach(function () {
fs.mkdirSync(tempDir);
});
describe('When used on an image smaller than the tile size', function () {
it('should output the same image', function (done) {
execFileSync('node', ['bin/image-tiler', 'spec/small.png', tempDir, 'small_test_result_{z}_{x}_{y}.png']);
expectImagesToBeTheSame(tempDir + '/small_test_result_0_0_0.png', 'spec/expected/small-test.png')
.then(done)
.catch(done.fail);
});
});
afterEach(function () {
rimraf.sync(tempDir);
});
});
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2019 tribe29 GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.
import pytest # type: ignore[import]
import cmk.gui.htmllib as htmllib
from cmk.gui import escaping
def test_htmllib_integration(register_builtin_html):
assert escaping.escape_attribute("") == ""
assert escaping.escape_text("") == ""
@pytest.mark.parametrize("inp,out", [
("\">alert(1)", "">alert(1)"),
(None, ""),
(1, "1"),
(htmllib.HTML("\">alert(1)"), "\">alert(1)"),
(1.1, "1.1"),
("<", "<"),
("'", "'"),
])
def test_escape_attribute(inp, out):
assert escaping.escape_attribute(inp) == out
@pytest.mark.parametrize("inp,out", [
("">alert(1)", "\">alert(1)"),
("<", "<"),
])
def test_unescape_attribute(inp, out):
assert escaping.unescape_attributes(inp) == out
@pytest.mark.parametrize(
"inp,out",
[
("<script>alert(1)</script>", "<script>alert(1)</script>"),
("<h1>abc</h1>", None),
("<h2>abc</h2>", None),
("<b>abc</b>", None),
("<tt>abc</tt>", None),
("<i>abc</i>", None),
("<u>abc</u>", None),
("<br>", None),
("<nobr></nobr>", None),
("<pre></pre>", None),
("<sup></sup>", None),
("<p></p>", None),
("<li></li>", None),
("<ul></ul>", None),
("<ol></ol>", None),
("<a href=\"xyz\">abc</a>", None),
("<a href=\"xyz\" target=\"123\">abc</a>", None),
("blah<a href=\"link0\">aaa</a>blah<a href=\"link1\" target=\"ttt\">bbb</a>", None),
("\"I am not a link\" target=\"still not a link\"",
""I am not a link" target="still not a link""),
# The next test is perverse: it contains the string `target=` inside of an
# <a> tag (which must be unescaped) as well as outside (which must not).
("<a href=\"aaa\">bbb</a>\"not a link\" target=\"really\"<a href=\"ccc\" target=\"ttt\">ddd</a>",
"<a href=\"aaa\">bbb</a>"not a link" target="really"<a href=\"ccc\" target=\"ttt\">ddd</a>"
),
(
"<a href=\"xyz\">abc</a><script>alert(1)</script><a href=\"xyz\">abc</a>",
"<a href=\"xyz\">abc</a><script>alert(1)</script><a href=\"xyz\">abc</a>",
),
(" ", None),
])
def test_escape_text(inp, out):
if out is None:
out = inp
assert escaping.escape_text(inp) == out
| #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2019 tribe29 GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.
import pytest # type: ignore[import]
import cmk.gui.htmllib as htmllib
from cmk.gui import escaping
def test_htmllib_integration(register_builtin_html):
assert escaping.escape_attribute("") == ""
assert escaping.escape_text("") == ""
@pytest.mark.parametrize("inp,out", [
("\">alert(1)", "">alert(1)"),
(None, ""),
(1, "1"),
(htmllib.HTML("\">alert(1)"), "\">alert(1)"),
(1.1, "1.1"),
("<", "<"),
("'", "'"),
])
def test_escape_attribute(inp, out):
assert escaping.escape_attribute(inp) == out
@pytest.mark.parametrize("inp,out", [
("">alert(1)", "\">alert(1)"),
("<", "<"),
])
def test_unescape_attribute(inp, out):
assert escaping.unescape_attributes(inp) == out
@pytest.mark.parametrize(
"inp,out",
[
("<script>alert(1)</script>", "<script>alert(1)</script>"),
("<h1>abc</h1>", None),
("<h2>abc</h2>", None),
("<b>abc</b>", None),
("<tt>abc</tt>", None),
("<i>abc</i>", None),
("<u>abc</u>", None),
("<br>", None),
("<nobr></nobr>", None),
("<pre></pre>", None),
("<sup></sup>", None),
("<p></p>", None),
("<li></li>", None),
("<ul></ul>", None),
("<ol></ol>", None),
("<a href=\"xyz\">abc</a>", None),
("<a href=\"xyz\" target=\"123\">abc</a>", None),
# Links with target 1st and href 2nd will not be unescaped
("<a target=\"123\" href=\"xyz\">abc</a>",
"<a target="123" href="xyz">abc</a>"),
("blah<a href=\"link0\">aaa</a>blah<a href=\"link1\" target=\"ttt\">bbb</a>", None),
("\"I am not a link\" target=\"still not a link\"",
""I am not a link" target="still not a link""),
# The next test is perverse: it contains the string `target=` inside of an
# <a> tag (which must be unescaped) as well as outside (which must not).
("<a href=\"aaa\">bbb</a>\"not a link\" target=\"really\"<a href=\"ccc\" target=\"ttt\">ddd</a>",
"<a href=\"aaa\">bbb</a>"not a link" target="really"<a href=\"ccc\" target=\"ttt\">ddd</a>"
),
(
"<a href=\"xyz\">abc</a><script>alert(1)</script><a href=\"xyz\">abc</a>",
"<a href=\"xyz\">abc</a><script>alert(1)</script><a href=\"xyz\">abc</a>",
),
(" ", None),
# At the moment also javascript URLs are accepted. This will be refused in the next step
("<a href=\"javascript:alert(1)\">abc</a>", None),
])
def test_escape_text(inp, out):
if out is None:
out = inp
assert escaping.escape_text(inp) == out
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2019 tribe29 GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.
import pytest # type: ignore[import]
import cmk.gui.htmllib as htmllib
from cmk.gui import escaping
def test_htmllib_integration(register_builtin_html):
assert escaping.escape_attribute("") == ""
assert escaping.escape_text("") == ""
@pytest.mark.parametrize("inp,out", [
("\">alert(1)", "">alert(1)"),
(None, ""),
(1, "1"),
(htmllib.HTML("\">alert(1)"), "\">alert(1)"),
(1.1, "1.1"),
("<", "<"),
("'", "'"),
])
def test_escape_attribute(inp, out):
assert escaping.escape_attribute(inp) == out
@pytest.mark.parametrize("inp,out", [
("">alert(1)", "\">alert(1)"),
("<", "<"),
])
def test_unescape_attribute(inp, out):
assert escaping.unescape_attributes(inp) == out
@pytest.mark.parametrize(
"inp,out",
[
("<script>alert(1)</script>", "<script>alert(1)</script>"),
("<h1>abc</h1>", None),
("<h2>abc</h2>", None),
("<b>abc</b>", None),
("<tt>abc</tt>", None),
("<i>abc</i>", None),
("<u>abc</u>", None),
("<br>", None),
("<nobr></nobr>", None),
("<pre></pre>", None),
("<sup></sup>", None),
("<p></p>", None),
("<li></li>", None),
("<ul></ul>", None),
("<ol></ol>", None),
("<a href=\"xyz\">abc</a>", None),
("<a href=\"xyz\" target=\"123\">abc</a>", None),
# Links with target 1st and href 2nd will not be unescaped
("<a target=\"123\" href=\"xyz\">abc</a>",
"<a target="123" href="xyz">abc</a>"),
("blah<a href=\"link0\">aaa</a>blah<a href=\"link1\" target=\"ttt\">bbb</a>", None),
("\"I am not a link\" target=\"still not a link\"",
""I am not a link" target="still not a link""),
# The next test is perverse: it contains the string `target=` inside of an
# <a> tag (which must be unescaped) as well as outside (which must not).
("<a href=\"aaa\">bbb</a>\"not a link\" target=\"really\"<a href=\"ccc\" target=\"ttt\">ddd</a>",
"<a href=\"aaa\">bbb</a>"not a link" target="really"<a href=\"ccc\" target=\"ttt\">ddd</a>"
),
(
"<a href=\"xyz\">abc</a><script>alert(1)</script><a href=\"xyz\">abc</a>",
"<a href=\"xyz\">abc</a><script>alert(1)</script><a href=\"xyz\">abc</a>",
),
(" ", None),
# At the moment also javascript URLs are accepted. This will be refused in the next step
("<a href=\"javascript:alert(1)\">abc</a>", None),
])
def test_escape_text(inp, out):
if out is None:
out = inp
assert escaping.escape_text(inp) == out
| #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2019 tribe29 GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.
import pytest # type: ignore[import]
import cmk.gui.htmllib as htmllib
from cmk.gui import escaping
def test_htmllib_integration(register_builtin_html):
assert escaping.escape_attribute("") == ""
assert escaping.escape_text("") == ""
@pytest.mark.parametrize("inp,out", [
("\">alert(1)", "">alert(1)"),
(None, ""),
(1, "1"),
(htmllib.HTML("\">alert(1)"), "\">alert(1)"),
(1.1, "1.1"),
("<", "<"),
("'", "'"),
])
def test_escape_attribute(inp, out):
assert escaping.escape_attribute(inp) == out
@pytest.mark.parametrize("inp,out", [
("">alert(1)", "\">alert(1)"),
("<", "<"),
])
def test_unescape_attribute(inp, out):
assert escaping.unescape_attributes(inp) == out
@pytest.mark.parametrize(
"inp,out",
[
("<script>alert(1)</script>", "<script>alert(1)</script>"),
("<h1>abc</h1>", None),
("<h2>abc</h2>", None),
("<b>abc</b>", None),
("<tt>abc</tt>", None),
("<i>abc</i>", None),
("<u>abc</u>", None),
("<br>", None),
("<nobr></nobr>", None),
("<pre></pre>", None),
("<sup></sup>", None),
("<p></p>", None),
("<li></li>", None),
("<ul></ul>", None),
("<ol></ol>", None),
("<a href=\"xyz\">abc</a>", None),
("<a href=\"xyz\" target=\"123\">abc</a>", None),
# Links with target 1st and href 2nd will not be unescaped
("<a target=\"123\" href=\"xyz\">abc</a>",
"<a target="123" href="xyz">abc</a>"),
("blah<a href=\"link0\">aaa</a>blah<a href=\"link1\" target=\"ttt\">bbb</a>", None),
("\"I am not a link\" target=\"still not a link\"",
""I am not a link" target="still not a link""),
# The next test is perverse: it contains the string `target=` inside of an
# <a> tag (which must be unescaped) as well as outside (which must not).
("<a href=\"aaa\">bbb</a>\"not a link\" target=\"really\"<a href=\"ccc\" target=\"ttt\">ddd</a>",
"<a href=\"aaa\">bbb</a>"not a link" target="really"<a href=\"ccc\" target=\"ttt\">ddd</a>"
),
(
"<a href=\"xyz\">abc</a><script>alert(1)</script><a href=\"xyz\">abc</a>",
"<a href=\"xyz\">abc</a><script>alert(1)</script><a href=\"xyz\">abc</a>",
),
(" ", None),
# Only http/https are allowed as schemes
("<a href=\"http://checkmk.com/\">abc</a>", None),
("<a href=\"https://checkmk.com/\">abc</a>", None),
("<a href=\"HTTP://CHECKMK.COM/\">abc</a>", None),
("<a href=\"ftp://checkmk.com/\">abc</a>",
"<a href="ftp://checkmk.com/">abc</a>"),
("<a href=\"javascript:alert(1)\">abc</a>",
"<a href="javascript:alert(1)">abc</a>"),
])
def test_escape_text(inp, out):
if out is None:
out = inp
assert escaping.escape_text(inp) == out
|
{
"name": "graphql-playground-html",
"version": "1.6.19",
"homepage": "https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-html",
"description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
"contributors": [
"Tim Suchanek <tim@graph.cool>",
"Johannes Schickling <johannes@graph.cool>",
"Mohammad Rajabifard <mo.rajbi@gmail.com>"
],
"repository": "http://github.com/graphcool/graphql-playground.git",
"license": "MIT",
"main": "dist/index.js",
"files": [
"dist"
],
"scripts": {
"build": "rimraf dist && tsc",
"prepare": "npm run build"
},
"keywords": [
"graphql",
"graphiql",
"playground",
"graphcool"
],
"devDependencies": {
"@types/node": "12.12.34",
"rimraf": "3.0.2",
"typescript": "3.8.3"
},
"typings": "dist/index.d.ts",
"typescript": {
"definition": "dist/index.d.ts"
},
"dependencies": {}
}
| {
"name": "graphql-playground-html",
"version": "1.6.19",
"homepage": "https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-html",
"description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
"contributors": [
"Tim Suchanek <tim@graph.cool>",
"Johannes Schickling <johannes@graph.cool>",
"Mohammad Rajabifard <mo.rajbi@gmail.com>"
],
"repository": "http://github.com/graphcool/graphql-playground.git",
"license": "MIT",
"main": "dist/index.js",
"files": [
"dist"
],
"scripts": {
"build": "rimraf dist && tsc",
"prepare": "npm run build"
},
"keywords": [
"graphql",
"graphiql",
"playground",
"graphcool"
],
"devDependencies": {
"@types/node": "12.12.34",
"rimraf": "3.0.2",
"typescript": "3.8.3"
},
"typings": "dist/index.d.ts",
"typescript": {
"definition": "dist/index.d.ts"
},
"dependencies": {
"xss": "^1.0.6"
}
}
|
const express = require("express");
const { ApolloServer, gql } = require("apollo-server-express");
const expressPlayground = require("../../dist/index").default;
const typeDefs = gql`
type Query {
hello: String!
}
schema {
query: Query
}
`;
const resolvers = {
Query: {
hello: () => "world"
}
};
const PORT = 4000;
const server = new ApolloServer({ typeDefs, resolvers });
const app = express();
server.applyMiddleware({ app });
app.get("/playground", expressPlayground({ endpoint: "/graphql" }));
app.listen(PORT);
console.log(
`Serving the GraphQL Playground on http://localhost:${PORT}/playground`
);
| const express = require('express')
const { ApolloServer, gql } = require('apollo-server-express')
const expressPlayground = require('../../dist/index').default
const typeDefs = gql`
type Query {
hello: String!
}
schema {
query: Query
}
`
const resolvers = {
Query: {
hello: () => 'world',
},
}
const PORT = 4000
const server = new ApolloServer({ typeDefs, resolvers })
const app = express()
server.applyMiddleware({ app })
app.get(
'/playground',
expressPlayground({
endpoint: '/graphql/</script><script>alert(1)</script><script>',
}),
)
app.listen(PORT)
console.log(
`Serving the GraphQL Playground on http://localhost:${PORT}/playground`,
)
|
var contra = require('contra'),
path = require('path'),
fUtils = require('./files'),
cp = require('child_process');
var gitApp = 'git', gitExtra = { env: process.env };
var escapeQuotes = function (str) {
if (typeof str === 'string') {
return str.replace(/(["$`\\])/g, '\\$1');
} else {
return str;
}
};
module.exports.isRepositoryClean = function (callback) {
cp.exec(gitApp + ' ' + [ 'ls-files', '-m' ].join(' '), gitExtra, function (er, stdout, stderr) {
// makeCommit parly inspired and taken from NPM version module
var lines = stdout.trim().split('\n').filter(function (line) {
var file = path.basename(line.replace(/.{1,2}\s+/, ''));
return line.trim() && !line.match(/^\?\? /) && !fUtils.isPackageFile(line);
}).map(function (line) {
return line.trim()
});
if (lines.length) {
return callback(new Error('Git working directory not clean.\n'+lines.join('\n')));
}
return callback();
});
};
module.exports.checkout = function (callback) {
cp.exec(gitApp + ' checkout -- .', gitExtra, callback);
};
module.exports.commit = function (files, message, newVer, tagName, callback) {
message = message.replace('%s', newVer).replace('"', '').replace("'", '');
files = files.map(function (file) {
return '"' + escapeQuotes(file) + '"';
}).join(' ');
var functionSeries = [
function (done) {
cp.exec(gitApp + ' add ' + files, gitExtra, done);
},
function (done) {
cp.exec([gitApp, 'commit', '-m', '"' + message + '"'].join(' '), gitExtra, done);
},
function (done) {
cp.exec(
[
gitApp, 'tag', '-a', tagName, '-m', '"' + message + '"'
].join(' '),
gitExtra, done
);
}
];
contra.series(functionSeries, callback);
};
| var contra = require("contra"),
path = require("path"),
fUtils = require("./files"),
cp = require("child_process");
var gitApp = "git",
gitExtra = { env: process.env };
var escapeQuotes = function (str) {
if (typeof str === "string") {
return '"' + str.replace(/(["'$`\\])/g, "\\$1") + '"';
} else {
return str;
}
};
module.exports.isRepositoryClean = function (callback) {
cp.exec(gitApp + " " + ["ls-files", "-m"].join(" "), gitExtra, function (
er,
stdout,
stderr
) {
// makeCommit parly inspired and taken from NPM version module
var lines = stdout
.trim()
.split("\n")
.filter(function (line) {
var file = path.basename(line.replace(/.{1,2}\s+/, ""));
return (
line.trim() && !line.match(/^\?\? /) && !fUtils.isPackageFile(line)
);
})
.map(function (line) {
return line.trim();
});
if (lines.length) {
return callback(
new Error("Git working directory not clean.\n" + lines.join("\n"))
);
}
return callback();
});
};
module.exports.checkout = function (callback) {
cp.exec(gitApp + " checkout -- .", gitExtra, callback);
};
module.exports.commit = function (files, message, newVer, tagName, callback) {
message = escapeQuotes(message.replace("%s", newVer));
files = files.map(escapeQuotes).join(" ");
var functionSeries = [
function (done) {
cp.exec(gitApp + " add " + files, gitExtra, done);
},
function (done) {
cp.exec([gitApp, "commit", "-m", message].join(" "), gitExtra, done);
},
function (done) {
cp.exec(
[gitApp, "tag", "-a", tagName, "-m", message].join(" "),
gitExtra,
done
);
},
];
contra.series(functionSeries, callback);
};
|
/*! lazysizes - v5.2.0 */
!function(a,b){if(a){var c=function(){b(a.lazySizes),a.removeEventListener("lazyunveilread",c,!0)};b=b.bind(null,a,a.document),"object"==typeof module&&module.exports?b(require("lazysizes")):a.lazySizes?c():a.addEventListener("lazyunveilread",c,!0)}}("undefined"!=typeof window?window:0,function(a,b,c){"use strict";function d(c,d){var e="vimeoCallback"+j,f=b.createElement("script");c+="&callback="+e,j++,a[e]=function(b){f.parentNode.removeChild(f),delete a[e],d(b)},f.src=c,b.head.appendChild(f)}function e(a,b){d(p.replace(k,a),function(a){a&&a.thumbnail_url&&(b.style.backgroundImage="url("+a.thumbnail_url+")")}),b.addEventListener("click",f)}function f(a){var b=a.currentTarget,c=b.getAttribute("data-vimeo"),d=b.getAttribute("data-vimeoparams")||"";d&&!m.test(d)&&(d="&"+d),a.preventDefault(),b.innerHTML='<iframe src="'+q.replace(k,c)+d+'" frameborder="0" allowfullscreen="" width="640" height="390"></iframe>',b.removeEventListener("click",f)}function g(a,b){var d=b.getAttribute("data-thumb-size")||c.cfg.ytThumb||"hqdefault";b.style.backgroundImage="url("+n.replace(k,a).replace(l,d)+")",b.addEventListener("click",h)}function h(a){var b=a.currentTarget,c=b.getAttribute("data-youtube"),d=b.getAttribute("data-ytparams")||"";d&&!m.test(d)&&(d="&"+d),a.preventDefault(),b.innerHTML='<iframe src="'+o.replace(k,c)+d+'" frameborder="0" allowfullscreen="" width="640" height="390"></iframe>',b.removeEventListener("click",h)}if(b.getElementsByClassName){var i="https:"==location.protocol?"https:":"http:",j=Date.now(),k=/\{\{id}}/,l=/\{\{hqdefault}}/,m=/^&/,n=i+"//img.youtube.com/vi/{{id}}/{{hqdefault}}.jpg",o=i+"//www.youtube.com/embed/{{id}}?autoplay=1",p=i+"//vimeo.com/api/oembed.json?url=https%3A//vimeo.com/{{id}}",q=i+"//player.vimeo.com/video/{{id}}?autoplay=1";b.addEventListener("lazybeforeunveil",function(a){if(a.detail.instance==c){var b=a.target,d=b.getAttribute("data-youtube"),f=b.getAttribute("data-vimeo");d&&b&&g(d,b),f&&b&&e(f,b)}})}}); | /*! lazysizes - v5.2.0 */
!function(a,b){if(a){var c=function(){b(a.lazySizes),a.removeEventListener("lazyunveilread",c,!0)};b=b.bind(null,a,a.document),"object"==typeof module&&module.exports?b(require("lazysizes")):a.lazySizes?c():a.addEventListener("lazyunveilread",c,!0)}}("undefined"!=typeof window?window:0,function(a,b,c){"use strict";function d(c,d){var e="vimeoCallback"+j,f=b.createElement("script");c+="&callback="+e,j++,a[e]=function(b){f.parentNode.removeChild(f),delete a[e],d(b)},f.src=c,b.head.appendChild(f)}function e(a,b){d(q.replace(k,a),function(a){a&&a.thumbnail_url&&(b.style.backgroundImage="url("+a.thumbnail_url+")")}),b.addEventListener("click",f)}function f(a){var b=a.currentTarget,c=b.getAttribute("data-vimeo"),d=b.getAttribute("data-vimeoparams")||"";b.removeEventListener("click",f),c&&n.test(c)&&(!d||n.test(d))&&(d&&!m.test(d)&&(d="&"+d),a.preventDefault(),b.innerHTML='<iframe src="'+r.replace(k,c)+d+'" frameborder="0" allowfullscreen="" width="640" height="390"></iframe>')}function g(a,b){var d=b.getAttribute("data-thumb-size")||c.cfg.ytThumb||"hqdefault";b.style.backgroundImage="url("+o.replace(k,a).replace(l,d)+")",b.addEventListener("click",h)}function h(a){var b=a.currentTarget,c=b.getAttribute("data-youtube"),d=b.getAttribute("data-ytparams")||"";b.removeEventListener("click",h),c&&n.test(c)&&(!d||n.test(d))&&(d&&!m.test(d)&&(d="&"+d),a.preventDefault(),b.innerHTML='<iframe src="'+p.replace(k,c)+d+'" frameborder="0" allowfullscreen="" width="640" height="390"></iframe>')}if(b.getElementsByClassName){var i="https:"==location.protocol?"https:":"http:",j=Date.now(),k=/\{\{id}}/,l=/\{\{hqdefault}}/,m=/^&/,n=/^[a-z0-9-_&=]+$/i,o=i+"//img.youtube.com/vi/{{id}}/{{hqdefault}}.jpg",p=i+"//www.youtube.com/embed/{{id}}?autoplay=1",q=i+"//vimeo.com/api/oembed.json?url=https%3A//vimeo.com/{{id}}",r=i+"//player.vimeo.com/video/{{id}}?autoplay=1";b.addEventListener("lazybeforeunveil",function(a){if(a.detail.instance==c){var b=a.target,d=b.getAttribute("data-youtube"),f=b.getAttribute("data-vimeo");d&&b&&g(d,b),f&&b&&e(f,b)}})}}); |
{
"//": "Cut down example accept.json for GitHub to test filter logic",
"public": [],
"private":
[
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/repos/:name/:repo/contents/:path*/package.json",
"origin": "https://${GITHUB_TOKEN}@${GITHUB_API}"
}
]
}
| {
"//": "Cut down example accept.json for GitHub to test filter logic",
"public": [],
"private":
[
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/repos/:name/:repo/contents/:path*/package.json",
"origin": "https://${GITHUB_TOKEN}@${GITHUB_API}"
},
{
"//": "used to whitelist a folder",
"method": "GET",
"path": "/repos/:name/:repo/contents/:path*/docs/*",
"origin": "https://${GITHUB_TOKEN}@${GITHUB_API}"
}
]
}
|
{
"name": "grunt",
"description": "The JavaScript Task Runner",
"version": "1.4.1",
"author": "Grunt Development Team (https://gruntjs.com/development-team)",
"homepage": "https://gruntjs.com/",
"repository": "https://github.com/gruntjs/grunt.git",
"license": "MIT",
"engines": {
"node": ">=8"
},
"scripts": {
"test": "node bin/grunt test",
"test-tap": "node bin/grunt test:tap"
},
"main": "lib/grunt",
"bin": {
"grunt": "bin/grunt"
},
"keywords": [
"task",
"async",
"cli",
"minify",
"uglify",
"build",
"lodash",
"unit",
"test",
"qunit",
"nodeunit",
"server",
"init",
"scaffold",
"make",
"jake",
"tool"
],
"dependencies": {
"dateformat": "~3.0.3",
"eventemitter2": "~0.4.13",
"exit": "~0.1.2",
"findup-sync": "~0.3.0",
"glob": "~7.1.6",
"grunt-cli": "~1.4.2",
"grunt-known-options": "~2.0.0",
"grunt-legacy-log": "~3.0.0",
"grunt-legacy-util": "~2.0.1",
"iconv-lite": "~0.4.13",
"js-yaml": "~3.14.0",
"minimatch": "~3.0.4",
"mkdirp": "~1.0.4",
"nopt": "~3.0.6",
"rimraf": "~3.0.2"
},
"devDependencies": {
"difflet": "~1.0.1",
"eslint-config-grunt": "~1.0.1",
"grunt-contrib-nodeunit": "~3.0.0",
"grunt-contrib-watch": "~1.1.0",
"grunt-eslint": "~18.1.0",
"temporary": "~0.0.4",
"through2": "~4.0.2"
},
"files": [
"lib",
"bin"
]
}
| {
"name": "grunt",
"description": "The JavaScript Task Runner",
"version": "1.4.1",
"author": "Grunt Development Team (https://gruntjs.com/development-team)",
"homepage": "https://gruntjs.com/",
"repository": "https://github.com/gruntjs/grunt.git",
"license": "MIT",
"engines": {
"node": ">=8"
},
"scripts": {
"test": "node bin/grunt test",
"test-tap": "node bin/grunt test:tap"
},
"main": "lib/grunt",
"bin": {
"grunt": "bin/grunt"
},
"keywords": [
"task",
"async",
"cli",
"minify",
"uglify",
"build",
"lodash",
"unit",
"test",
"qunit",
"nodeunit",
"server",
"init",
"scaffold",
"make",
"jake",
"tool"
],
"dependencies": {
"dateformat": "~3.0.3",
"eventemitter2": "~0.4.13",
"exit": "~0.1.2",
"findup-sync": "~0.3.0",
"glob": "~7.1.6",
"grunt-cli": "~1.4.3",
"grunt-known-options": "~2.0.0",
"grunt-legacy-log": "~3.0.0",
"grunt-legacy-util": "~2.0.1",
"iconv-lite": "~0.4.13",
"js-yaml": "~3.14.0",
"minimatch": "~3.0.4",
"mkdirp": "~1.0.4",
"nopt": "~3.0.6",
"rimraf": "~3.0.2"
},
"devDependencies": {
"difflet": "~1.0.1",
"eslint-config-grunt": "~1.0.1",
"grunt-contrib-nodeunit": "~4.0.0",
"grunt-contrib-watch": "~1.1.0",
"grunt-eslint": "~18.1.0",
"temporary": "~0.0.4",
"through2": "~4.0.2"
},
"files": [
"lib",
"bin"
]
}
|
module.exports = function (packageName, { registry = '', timeout = null } = {}) {
try {
let version;
const config = {
stdio: ['pipe', 'pipe', 'ignore']
};
if (timeout) {
config.timeout = timeout;
}
if (registry) {
version = require('child_process').execSync(`npm view ${packageName} version --registry ${registry}`, config);
} else {
version = require('child_process').execSync(`npm view ${packageName} version`, config);
}
if (version) {
return version.toString().trim().replace(/^\n*/, '').replace(/\n*$/, '');
} else {
return null;
}
} catch(err) {
return null;
}
}
| module.exports = function (packageName, { registry = '', timeout = null } = {}) {
try {
if (/[`$&{}[;|]/g.test(packageName) || /[`$&{}[;|]/g.test(registry)) {
return null
}
let version;
const config = {
stdio: ['pipe', 'pipe', 'ignore']
};
if (timeout) {
config.timeout = timeout;
}
if (registry) {
version = require('child_process').execSync(`npm view ${packageName} version --registry ${registry}`, config);
} else {
version = require('child_process').execSync(`npm view ${packageName} version`, config);
}
if (version) {
return version.toString().trim().replace(/^\n*/, '').replace(/\n*$/, '');
} else {
return null;
}
} catch(err) {
return null;
}
}
|
{
"name": "fs-path",
"version": "0.0.24",
"main": "lib/index.js",
"author": {
"name": "pillys",
"email": "pillys@163.com",
"url": "http://www.qque.com"
},
"keywords": [
"fs-path",
"file",
"directory"
],
"repository": {
"url": "https://github.com/pillys/fs-path",
"type": "git"
},
"bugs": {
"url": "https://github.com/pillys/fs-path/issues"
},
"homepage": "https://github.com/pillys/fs-path",
"dependencies": {
"async": "~0.9.0"
},
"description": "file and directory op libs, find, findSync, mkdir, mkdirSync, copy, copySync, remove, removeSync, writeFile, writeFileSync",
"readmeFilename": "README.md",
"license": "MIT"
} | {
"name": "fs-path",
"version": "0.0.24",
"main": "lib/index.js",
"author": {
"name": "pillys",
"email": "pillys@163.com",
"url": "http://www.qque.com"
},
"keywords": [
"fs-path",
"file",
"directory"
],
"repository": {
"url": "https://github.com/pillys/fs-path",
"type": "git"
},
"bugs": {
"url": "https://github.com/pillys/fs-path/issues"
},
"homepage": "https://github.com/pillys/fs-path",
"dependencies": {
"async": "~0.9.0",
"shell-escape": "^0.2.0"
},
"description": "file and directory op libs, find, findSync, mkdir, mkdirSync, copy, copySync, remove, removeSync, writeFile, writeFileSync",
"readmeFilename": "README.md",
"license": "MIT"
}
|
$("#free_space").text(FREE_SPACE.filesizeformat());
var progressbar = $( "#progressbar" ),
progressLabel = $( ".progress-label" );
progressbar.progressbar({
value: 1,
change: function() {
progressLabel.text( progressbar.progressbar( "value" ) + "%" );
},
});
var fillTable = function(chart_data) {
var tableRows = [],
rowData, rowId;
for(i=0; i<chart_data.length; i++) {
rowData = chart_data[i];
rowId = typeof rowData.userId != 'undefined' ? rowData.userId : rowData.groupId;
tableRows.push('<tr><td class="link">' + rowData.label + '(id:'+ rowId +')</td>');
tableRows.push('<td class="link">' + rowData.data.filesizeformat() + '</td></tr>');
}
$('#drivespaceTable tbody').html(tableRows.join(""));
$('#drivespaceTable').show();
};
var plotJson = function(jsonUrl, options) {
// show 'loading...'
$("#status").html('loading...');
$("#progress").show();
$.getJSON(jsonUrl, function(data) {
// hide 'loading...'
$("#status").html('');
$("#progress").hide();
// save the data to use for chart click handling etc.
$("#placeholder").data('chart_data', data);
fillTable(data);
// bin all data > 11 users/groups
var total = 0,
chart_data = [],
MAX_SLICES = 10;
for(i=0; i<data.length; i++) {
var slice = data[i];
if(i === MAX_SLICES){
chart_data.push({label:'Others', data:slice.data});
} else if (i > MAX_SLICES) {
chart_data[MAX_SLICES].data = chart_data[MAX_SLICES].data + slice.data;
} else {
chart_data.push(slice);
}
total += slice.data;
}
$('#total').text(total.filesizeformat());
var usagePercent = 100 * total/(total + FREE_SPACE);
progressbar.progressbar( "value", parseInt(Math.round(usagePercent), 10));
$("#placeholder").css('width',700).css('height',300);
$.plot($("#placeholder"), chart_data,
{
series: {
pie: {
show: true,
radius: 1,
label: {
show: true,
radius: 0.9,
formatter: function(label, series){
return '<div class="pieLabel">'+Math.round(series.percent)+'%</div>';
},
background: { opacity: 0 }
}
}
},
legend: {
show: true
},
grid: {
hoverable: true,
clickable: true
},
});
if (options && options.success) {
options.success();
}
});
};
|
$("#free_space").text(FREE_SPACE.filesizeformat());
var progressbar = $( "#progressbar" ),
progressLabel = $( ".progress-label" );
progressbar.progressbar({
value: 1,
change: function() {
progressLabel.text( progressbar.progressbar( "value" ) + "%" );
},
});
var fillTable = function(chart_data) {
var tableRows = [],
rowData, rowId;
for(i=0; i<chart_data.length; i++) {
rowData = chart_data[i];
rowId = typeof rowData.userId != 'undefined' ? rowData.userId : rowData.groupId;
tableRows.push('<tr><td class="link">' + rowData.label.escapeHTML() + '(id:'+ rowId +')</td>');
tableRows.push('<td class="link">' + rowData.data.filesizeformat() + '</td></tr>');
}
$('#drivespaceTable tbody').html(tableRows.join(""));
$('#drivespaceTable').show();
};
var plotJson = function(jsonUrl, options) {
// show 'loading...'
$("#status").html('loading...');
$("#progress").show();
$.getJSON(jsonUrl, function(data) {
// hide 'loading...'
$("#status").html('');
$("#progress").hide();
// save the data to use for chart click handling etc.
$("#placeholder").data('chart_data', data);
fillTable(data);
// bin all data > 11 users/groups
var total = 0,
chart_data = [],
MAX_SLICES = 10;
for(i=0; i<data.length; i++) {
var slice = data[i];
slice.label = slice.label.escapeHTML();
if(i === MAX_SLICES){
chart_data.push({label:'Others', data:slice.data});
} else if (i > MAX_SLICES) {
chart_data[MAX_SLICES].data = chart_data[MAX_SLICES].data + slice.data;
} else {
chart_data.push(slice);
}
total += slice.data;
}
$('#total').text(total.filesizeformat());
var usagePercent = 100 * total/(total + FREE_SPACE);
progressbar.progressbar( "value", parseInt(Math.round(usagePercent), 10));
$("#placeholder").css('width',700).css('height',300);
$.plot($("#placeholder"), chart_data,
{
series: {
pie: {
show: true,
radius: 1,
label: {
show: true,
radius: 0.9,
formatter: function(label, series){
return '<div class="pieLabel">'+Math.round(series.percent)+'%</div>';
},
background: { opacity: 0 }
}
}
},
legend: {
show: true
},
grid: {
hoverable: true,
clickable: true
},
});
if (options && options.success) {
options.success();
}
});
};
|
/*
* Wire
* Copyright (C) 2020 Wire Swiss GmbH
*
* 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 3 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, see http://www.gnu.org/licenses/.
*
*/
importScripts('jimp.min.js');
/**
* @typedef {{buffer: ArrayBuffer, useProfileImageSize?: boolean}} Data
*/
self.addEventListener('message', (/** @type {MessageEvent<Data>} */ event) => {
const COMPRESSION = 80;
let MAX_SIZE = 1448;
let MAX_FILE_SIZE = 310 * 1024;
if (event.data.useProfileImageSize) {
MAX_SIZE = 280;
MAX_FILE_SIZE = 1024 * 1024;
}
Jimp.read(event.data.buffer).then(image => {
if (event.data.useProfileImageSize) {
image.cover(MAX_SIZE, MAX_SIZE);
} else if (image.bitmap.width > MAX_SIZE || image.bitmap.height > MAX_SIZE) {
image.scaleToFit(MAX_SIZE, MAX_SIZE);
}
if (image.bitmap.data.length > MAX_FILE_SIZE) {
image.quality(COMPRESSION);
}
return image.getBuffer(Jimp.AUTO, (_error, src) => {
self.postMessage(src);
return self.close();
});
});
});
| /*
* Wire
* Copyright (C) 2020 Wire Swiss GmbH
*
* 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 3 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, see http://www.gnu.org/licenses/.
*
*/
importScripts('jimp.min.js');
/**
* @typedef {{buffer: ArrayBuffer, useProfileImageSize?: boolean}} Data
*/
self.addEventListener('message', (/** @type {MessageEvent<Data>} */ event) => {
const COMPRESSION = 80;
let MAX_SIZE = 1448;
let MAX_FILE_SIZE = 310 * 1024;
if (event.data.useProfileImageSize) {
MAX_SIZE = 280;
MAX_FILE_SIZE = 1024 * 1024;
}
// Unfortunately, Jimp doesn't support MIME type "image/webp": https://github.com/oliver-moran/jimp/issues/144
Jimp.read(event.data.buffer).then(image => {
if (event.data.useProfileImageSize) {
image.cover(MAX_SIZE, MAX_SIZE);
} else if (image.bitmap.width > MAX_SIZE || image.bitmap.height > MAX_SIZE) {
image.scaleToFit(MAX_SIZE, MAX_SIZE);
}
if (image.bitmap.data.length > MAX_FILE_SIZE) {
image.quality(COMPRESSION);
}
return image.getBuffer(Jimp.AUTO, (_error, src) => {
self.postMessage(src);
return self.close();
});
});
});
|
!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var v=/(?:^|\s)command-line(?:\s|$)/,g="command-line-prompt",p="".startsWith?function(e,t){return e.startsWith(t)}:function(e,t){return 0===e.indexOf(t)},d="".endsWith?function(e,t){return e.endsWith(t)}:function(e,t){var n=e.length;return e.substring(n-t.length,n)===t};Prism.hooks.add("before-highlight",function(e){var t=N(e);if(!t.complete&&e.code){var n=e.element.parentElement;if(n&&/pre/i.test(n.nodeName)&&(v.test(n.className)||v.test(e.element.className))){var a=e.element.querySelector("."+g);a&&a.remove();var i=e.code.split("\n"),r=t.continuationLineIndicies=new Set,s=n.getAttribute("data-continuation-str");if(s&&1<i.length)for(var o=1;o<i.length;o++)i.hasOwnProperty(o-1)&&d(i[o-1],s)&&r.add(o);t.numberOfLines=i.length;var l=t.outputLines=[],m=n.getAttribute("data-output"),u=n.getAttribute("data-filter-output");if(null!==m)m.split(",").forEach(function(e){var t=e.split("-"),n=parseInt(t[0],10),a=2===t.length?parseInt(t[1],10):n;if(!isNaN(n)&&!isNaN(a)){n<1&&(n=1),a>i.length&&(a=i.length),a--;for(var r=--n;r<=a;r++)l[r]=i[r],i[r]=""}});else if(u)for(var c=0;c<i.length;c++)p(i[c],u)&&(l[c]=i[c].slice(u.length),i[c]="");e.code=i.join("\n")}else t.complete=!0}else t.complete=!0}),Prism.hooks.add("before-insert",function(e){var t=N(e);if(!t.complete){for(var n=e.highlightedCode.split("\n"),a=t.outputLines||[],r=0,i=n.length;r<i;r++)a.hasOwnProperty(r)?n[r]='<span class="token output">'+a[r]+"</span>":n[r]='<span class="token command">'+n[r]+"</span>";e.highlightedCode=n.join("\n")}}),Prism.hooks.add("complete",function(e){if(function(e){return"command-line"in(e.vars=e.vars||{})}(e)){var t=N(e);if(!t.complete){var n=e.element.parentElement;v.test(e.element.className)&&(e.element.className=e.element.className.replace(v," ")),v.test(n.className)||(n.className+=" command-line");var a,r="",i=t.numberOfLines||0,s=h("data-prompt","");if(""!==s)a='<span data-prompt="'+s+'"></span>';else a='<span data-user="'+h("data-user","user")+'" data-host="'+h("data-host","localhost")+'"></span>';for(var o=t.continuationLineIndicies||new Set,l='<span data-continuation-prompt="'+h("data-continuation-prompt",">")+'"></span>',m=0;m<i;m++)o.has(m)?r+=l:r+=a;var u=document.createElement("span");u.className=g,u.innerHTML=r;for(var c=t.outputLines||[],p=0,d=c.length;p<d;p++)if(c.hasOwnProperty(p)){var f=u.children[p];f.removeAttribute("data-user"),f.removeAttribute("data-host"),f.removeAttribute("data-prompt")}e.element.insertBefore(u,e.element.firstChild),t.complete=!0}}function h(e,t){return(n.getAttribute(e)||t).replace(/"/g,""")}})}function N(e){var t=e.vars=e.vars||{};return t["command-line"]=t["command-line"]||{}}}(); | !function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var v=/(?:^|\s)command-line(?:\s|$)/,g="command-line-prompt",p="".startsWith?function(e,t){return e.startsWith(t)}:function(e,t){return 0===e.indexOf(t)},d="".endsWith?function(e,t){return e.endsWith(t)}:function(e,t){var n=e.length;return e.substring(n-t.length,n)===t};Prism.hooks.add("before-highlight",function(e){var t=N(e);if(!t.complete&&e.code){var n=e.element.parentElement;if(n&&/pre/i.test(n.nodeName)&&(v.test(n.className)||v.test(e.element.className))){var a=e.element.querySelector("."+g);a&&a.remove();var i=e.code.split("\n"),r=t.continuationLineIndicies=new Set,s=n.getAttribute("data-continuation-str");if(s&&1<i.length)for(var o=1;o<i.length;o++)i.hasOwnProperty(o-1)&&d(i[o-1],s)&&r.add(o);t.numberOfLines=i.length;var l=t.outputLines=[],m=n.getAttribute("data-output"),u=n.getAttribute("data-filter-output");if(null!==m)m.split(",").forEach(function(e){var t=e.split("-"),n=parseInt(t[0],10),a=2===t.length?parseInt(t[1],10):n;if(!isNaN(n)&&!isNaN(a)){n<1&&(n=1),a>i.length&&(a=i.length),a--;for(var r=--n;r<=a;r++)l[r]=i[r],i[r]=""}});else if(u)for(var c=0;c<i.length;c++)p(i[c],u)&&(l[c]=i[c].slice(u.length),i[c]="");e.code=i.join("\n")}else t.complete=!0}else t.complete=!0}),Prism.hooks.add("before-insert",function(e){var t=N(e);if(!t.complete){for(var n=e.highlightedCode.split("\n"),a=t.outputLines||[],r=0,i=n.length;r<i;r++)a.hasOwnProperty(r)?n[r]='<span class="token output">'+Prism.util.encode(a[r])+"</span>":n[r]='<span class="token command">'+n[r]+"</span>";e.highlightedCode=n.join("\n")}}),Prism.hooks.add("complete",function(e){if(function(e){return"command-line"in(e.vars=e.vars||{})}(e)){var t=N(e);if(!t.complete){var n=e.element.parentElement;v.test(e.element.className)&&(e.element.className=e.element.className.replace(v," ")),v.test(n.className)||(n.className+=" command-line");var a,r="",i=t.numberOfLines||0,s=h("data-prompt","");if(""!==s)a='<span data-prompt="'+s+'"></span>';else a='<span data-user="'+h("data-user","user")+'" data-host="'+h("data-host","localhost")+'"></span>';for(var o=t.continuationLineIndicies||new Set,l='<span data-continuation-prompt="'+h("data-continuation-prompt",">")+'"></span>',m=0;m<i;m++)o.has(m)?r+=l:r+=a;var u=document.createElement("span");u.className=g,u.innerHTML=r;for(var c=t.outputLines||[],p=0,d=c.length;p<d;p++)if(c.hasOwnProperty(p)){var f=u.children[p];f.removeAttribute("data-user"),f.removeAttribute("data-host"),f.removeAttribute("data-prompt")}e.element.insertBefore(u,e.element.firstChild),t.complete=!0}}function h(e,t){return(n.getAttribute(e)||t).replace(/"/g,""")}})}function N(e){var t=e.vars=e.vars||{};return t["command-line"]=t["command-line"]||{}}}(); |
from .stringEnum import StringEnum
dryRun = False
errorLevel = ["fatal"]
printMode = "console"
quiet = True
asciiOnly = False
refStatus = StringEnum("current", "snapshot")
biblioDisplay = StringEnum("index", "inline")
specClass = None
testAnnotationURL = "https://test.csswg.org/harness/annotate.js"
def errorLevelAt(target):
levels = {
"nothing": 0,
"fatal": 1,
"link-error": 2,
"warning": 3,
"everything": 1000,
}
currentLevel = levels[errorLevel[0]]
targetLevel = levels[target]
return currentLevel >= targetLevel
def setErrorLevel(level=None):
if level is None:
level = "fatal"
errorLevel[0] = level
| from .stringEnum import StringEnum
dryRun = False
errorLevel = ["fatal"]
printMode = "console"
quiet = True
asciiOnly = False
refStatus = StringEnum("current", "snapshot")
biblioDisplay = StringEnum("index", "inline")
specClass = None
testAnnotationURL = "https://test.csswg.org/harness/annotate.js"
chroot = True
executeCode = False
def errorLevelAt(target):
levels = {
"nothing": 0,
"fatal": 1,
"link-error": 2,
"warning": 3,
"everything": 1000,
}
currentLevel = levels[errorLevel[0]]
targetLevel = levels[target]
return currentLevel >= targetLevel
def setErrorLevel(level=None):
if level is None:
level = "fatal"
errorLevel[0] = level
|
from . import config
from .h import * # noqa: F401
from .messages import * # noqa: F401
def load(doc):
code = config.retrieveBoilerplateFile(doc, "bs-extensions")
exec(code, globals())
| from . import config
from . import constants
from .h import * # noqa: F401
from .messages import * # noqa: F401
def load(doc):
code = config.retrieveBoilerplateFile(doc, "bs-extensions", allowLocal=constants.executeCode)
exec(code, globals())
|
from subprocess import PIPE, Popen
from ..h import *
from ..messages import *
def processTags(doc):
for el in findAll("[data-span-tag]", doc):
tag = el.get("data-span-tag")
if tag not in doc.md.inlineTagCommands:
die("Unknown inline tag '{0}' found:\n {1}", tag, outerHTML(el), el=el)
continue
command = doc.md.inlineTagCommands[tag]
with Popen(command, stdin=PIPE, stdout=PIPE, stderr=PIPE, shell=True) as p:
out, err = p.communicate(innerHTML(el).encode("utf-8"))
try:
out = out.decode("utf-8")
except UnicodeDecodeError as e:
die(
"When trying to process {0}, got invalid unicode in stdout:\n{1}",
outerHTML(el),
e,
el=el,
)
try:
err = err.decode("utf-8")
except UnicodeDecodeError as e:
die(
"When trying to process {0}, got invalid unicode in stderr:\n{1}",
outerHTML(el),
e,
el=el,
)
if p.returncode:
die(
"When trying to process {0}, got return code {1} and the following stderr:\n{2}",
outerHTML(el),
p.returncode,
err,
el=el,
)
continue
replaceContents(el, parseHTML(out))
| from subprocess import PIPE, Popen
from .. import constants
from ..h import *
from ..messages import *
def processTags(doc):
for el in findAll("[data-span-tag]", doc):
if not constants.executeCode:
die("Found an inline code tag, but arbitrary code execution isn't allowed. See the --allow-execute flag.")
return
tag = el.get("data-span-tag")
if tag not in doc.md.inlineTagCommands:
die("Unknown inline tag '{0}' found:\n {1}", tag, outerHTML(el), el=el)
continue
command = doc.md.inlineTagCommands[tag]
with Popen(command, stdin=PIPE, stdout=PIPE, stderr=PIPE, shell=True) as p:
out, err = p.communicate(innerHTML(el).encode("utf-8"))
try:
out = out.decode("utf-8")
except UnicodeDecodeError as e:
die(
"When trying to process {0}, got invalid unicode in stdout:\n{1}",
outerHTML(el),
e,
el=el,
)
try:
err = err.decode("utf-8")
except UnicodeDecodeError as e:
die(
"When trying to process {0}, got invalid unicode in stderr:\n{1}",
outerHTML(el),
e,
el=el,
)
if p.returncode:
die(
"When trying to process {0}, got return code {1} and the following stderr:\n{2}",
outerHTML(el),
p.returncode,
err,
el=el,
)
continue
replaceContents(el, parseHTML(out))
|
{
"js": [
"js/jquery.dataTables.js",
"js/jquery.dataTables.min.js"
],
"css": [],
"types": [
"types/types.d.ts"
],
"src-repo": "http://github.com/DataTables/DataTablesSrc",
"last-tag": "1.11.2",
"last-sync": "ea607c6e51e76d13efc341b5d41f5082a33b56e0"
} | {
"js": [
"js/jquery.dataTables.js",
"js/jquery.dataTables.min.js"
],
"css": [],
"types": [
"types/types.d.ts"
],
"src-repo": "http://github.com/DataTables/DataTablesSrc",
"last-tag": "1.11.2",
"last-sync": "e835ddc5b800c47f7e9e32a91cc522f8ca7ced5c"
} |
const ESCAPE = /[&"<]/g, CHARS = {
'"': '"',
'&': '&',
'<': '<',
};
import { gen } from './$utils';
export function esc(value) {
if (typeof value !== 'string') return value;
let last=ESCAPE.lastIndex=0, tmp=0, out='';
while (ESCAPE.test(value)) {
tmp = ESCAPE.lastIndex - 1;
out += value.substring(last, tmp) + CHARS[value[tmp]];
last = tmp + 1;
}
return out + value.substring(last);
}
export function compile(input, options={}) {
return new (options.async ? (async()=>{}).constructor : Function)(
'$$1', '$$2', '$$3', gen(input, options)
).bind(0, options.escape || esc, options.blocks);
}
export function transform(input, options={}) {
return (
options.format === 'cjs'
? 'var $$1=require("tempura").esc;module.exports='
: 'import{esc as $$1}from"tempura";export default '
) + (
options.async ? 'async ' : ''
) + 'function($$3,$$2){'+gen(input, options)+'}';
}
| const ESCAPE = /[&"<]/g, CHARS = {
'"': '"',
'&': '&',
'<': '<',
};
import { gen } from './$utils';
export function esc(value) {
value = (value == null) ? '' : '' + value;
let last=ESCAPE.lastIndex=0, tmp=0, out='';
while (ESCAPE.test(value)) {
tmp = ESCAPE.lastIndex - 1;
out += value.substring(last, tmp) + CHARS[value[tmp]];
last = tmp + 1;
}
return out + value.substring(last);
}
export function compile(input, options={}) {
return new (options.async ? (async()=>{}).constructor : Function)(
'$$1', '$$2', '$$3', gen(input, options)
).bind(0, options.escape || esc, options.blocks);
}
export function transform(input, options={}) {
return (
options.format === 'cjs'
? 'var $$1=require("tempura").esc;module.exports='
: 'import{esc as $$1}from"tempura";export default '
) + (
options.async ? 'async ' : ''
) + 'function($$3,$$2){'+gen(input, options)+'}';
}
|
None | /*jshint globalstrict:false, strict:false */
/* global getOptions, assertEqual, assertFalse, arango */
////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2010-2012 triagens GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
/// Copyright holder is ArangoDB Inc, Cologne, Germany
///
/// @author Jan Steemann
/// @author Copyright 2021, ArangoDB Inc, Cologne, Germany
////////////////////////////////////////////////////////////////////////////////
if (getOptions === true) {
return {
'foxx.allow-install-from-remote': 'true',
};
}
const jsunity = require('jsunity');
const errors = require('@arangodb').errors;
const db = require('internal').db;
const FoxxManager = require('@arangodb/foxx/manager');
function testSuite() {
const mount = "/test123";
return {
testInstallViaAardvark: function() {
const urls = [
"https://github.com/arangodb-foxx/demo-itzpapalotl/archive/refs/heads/master.zip",
];
urls.forEach((url) => {
try {
let res = arango.PUT(`/_admin/aardvark/foxxes/url?mount=${mount}`, { url });
assertFalse(res.error);
assertEqual("itzpapalotl", res.name);
} finally {
try {
FoxxManager.uninstall(mount);
} catch (err) {}
}
});
},
testInstallViaFoxxAPIOld: function() {
const urls = [
"https://github.com/arangodb-foxx/demo-itzpapalotl/archive/refs/heads/master.zip",
];
urls.forEach((url) => {
try {
let res = arango.POST("/_admin/foxx/install", { appInfo: url, mount });
assertFalse(res.error);
assertEqual("itzpapalotl", res.name);
} finally {
try {
FoxxManager.uninstall(mount);
} catch (err) {}
}
});
},
testInstallViaFoxxAPINew: function() {
const urls = [
"https://github.com/arangodb-foxx/demo-itzpapalotl/archive/refs/heads/master.zip",
];
urls.forEach((url) => {
try {
let res = arango.POST(`/_api/foxx?mount=${mount}`, { source: url });
assertFalse(res.error);
assertEqual("itzpapalotl", res.name);
} finally {
try {
FoxxManager.uninstall(mount);
} catch (err) {}
}
});
},
};
}
jsunity.run(testSuite);
return jsunity.done();
|
from django.core.exceptions import ValidationError
from shuup.utils.django_compat import force_text
# This file is part of Shuup.
#
# Copyright (c) 2012-2021, Shuup Commerce Inc. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
class Problem(Exception):
""" User-visible exception. """
message = property(lambda self: self.args[0] if self.args else None)
def __init__(self, message, title=None):
super(Problem, self).__init__(message)
self.title = title
self.links = []
def with_link(self, url, title):
"""
Append a link to this Problem and return itself.
This API is designed after `Exception.with_traceback()`,
so you can fluently chain this in a `raise` statement::
raise Problem("Oops").with_link("...", "...")
:param url: URL string.
:type url: str
:param title: Title text.
:type title: str
:return: This same Problem.
:rtype: shuup.utils.excs.Problem
"""
self.links.append({"url": url, "title": title})
return self
class ExceptionalResponse(Exception):
def __init__(self, response):
self.response = response
super(ExceptionalResponse, self).__init__(force_text(response))
def extract_messages(obj_list):
"""
Extract "messages" from a list of exceptions or other objects.
For ValidationErrors, `messages` are flattened into the output.
For Exceptions, `args[0]` is added into the output.
For other objects, `force_text` is called.
:param obj_list: List of exceptions etc.
:type obj_list: Iterable[object]
:rtype: Iterable[str]
"""
for obj in obj_list:
if isinstance(obj, ValidationError):
for msg in obj.messages:
yield force_text(msg)
continue
if isinstance(obj, Exception):
if len(obj.args):
yield force_text(obj.args[0])
continue
yield force_text(obj)
| from django.core.exceptions import ValidationError
from django.utils.html import escape
from shuup.utils.django_compat import force_text
# This file is part of Shuup.
#
# Copyright (c) 2012-2021, Shuup Commerce Inc. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
class Problem(Exception):
""" User-visible exception. """
message = property(lambda self: self.args[0] if self.args else None)
def __init__(self, message, title=None):
super(Problem, self).__init__(message)
self.title = title
self.links = []
def with_link(self, url, title):
"""
Append a link to this Problem and return itself.
This API is designed after `Exception.with_traceback()`,
so you can fluently chain this in a `raise` statement::
raise Problem("Oops").with_link("...", "...")
:param url: URL string.
:type url: str
:param title: Title text.
:type title: str
:return: This same Problem.
:rtype: shuup.utils.excs.Problem
"""
self.links.append({"url": url, "title": title})
return self
class ExceptionalResponse(Exception):
def __init__(self, response):
self.response = response
super(ExceptionalResponse, self).__init__(force_text(response))
def extract_messages(obj_list):
"""
Extract "messages" from a list of exceptions or other objects.
For ValidationErrors, `messages` are flattened into the output.
For Exceptions, `args[0]` is added into the output.
For other objects, `force_text` is called.
:param obj_list: List of exceptions etc.
:type obj_list: Iterable[object]
:rtype: Iterable[str]
"""
for obj in obj_list:
if isinstance(obj, ValidationError):
for msg in obj.messages:
yield escape(force_text(msg))
continue
if isinstance(obj, Exception):
if len(obj.args):
yield escape(force_text(obj.args[0]))
continue
yield escape(force_text(obj))
|
# -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2021, Shuup Commerce Inc. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from django.conf.urls import url
from shuup.xtheme.views.command import command_dispatch
from shuup.xtheme.views.editor import EditorView
from shuup.xtheme.views.extra import extra_view_dispatch
from shuup.xtheme.views.plugins import (
get_category_products_highlight,
get_product_cross_sell_highlight,
get_product_highlight,
get_prouduct_selections_highlight,
)
urlpatterns = [
url(r"^xtheme/editor/$", EditorView.as_view(), name="xtheme_editor"),
url(r"^xtheme/(?P<view>.+)/*$", extra_view_dispatch, name="xtheme_extra_view"),
url(r"^xtheme/$", command_dispatch, name="xtheme"),
url(
r"^xtheme-prod-hl/(?P<plugin_type>.*)/(?P<cutoff_days>\d+)/(?P<count>\d+)/(?P<cache_timeout>\d+)/$",
get_product_highlight,
name="xtheme-product-highlight",
),
url(
r"""
^xtheme-prod-cross-sell-hl/
(?P<product_id>.*)/(?P<relation_type>.*)/(?P<use_parents>\d+)/
(?P<count>\d+)/(?P<cache_timeout>\d+)/$
""".strip(),
get_product_cross_sell_highlight,
name="xtheme-product-cross-sells-highlight",
),
url(
r"^xtheme-cat-products-hl/(?P<category_id>\d+)/(?P<count>\d+)/(?P<cache_timeout>\d+)/$",
get_category_products_highlight,
name="xtheme-category-products-highlight",
),
url(
r"^xtheme-prod-selections-hl/(?P<product_ids>.*)/(?P<cache_timeout>\d+)/$",
get_prouduct_selections_highlight,
name="xtheme-product-selections-highlight",
),
]
| # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2021, Shuup Commerce Inc. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from django.conf.urls import url
from shuup.xtheme.views.command import command_dispatch
from shuup.xtheme.views.editor import EditorView
from shuup.xtheme.views.extra import extra_view_dispatch
from shuup.xtheme.views.plugins import (
get_category_products_highlight,
get_product_cross_sell_highlight,
get_product_highlight,
get_prouduct_selections_highlight,
)
urlpatterns = [
url(r"^xtheme/editor/$", EditorView.as_view(), name="xtheme_editor"),
url(r"^xtheme/(?P<view>.+)/?$", extra_view_dispatch, name="xtheme_extra_view"),
url(r"^xtheme/$", command_dispatch, name="xtheme"),
url(
r"^xtheme-prod-hl/(?P<plugin_type>.*)/(?P<cutoff_days>\d+)/(?P<count>\d+)/(?P<cache_timeout>\d+)/$",
get_product_highlight,
name="xtheme-product-highlight",
),
url(
r"""
^xtheme-prod-cross-sell-hl/
(?P<product_id>.*)/(?P<relation_type>.*)/(?P<use_parents>\d+)/
(?P<count>\d+)/(?P<cache_timeout>\d+)/$
""".strip(),
get_product_cross_sell_highlight,
name="xtheme-product-cross-sells-highlight",
),
url(
r"^xtheme-cat-products-hl/(?P<category_id>\d+)/(?P<count>\d+)/(?P<cache_timeout>\d+)/$",
get_category_products_highlight,
name="xtheme-category-products-highlight",
),
url(
r"^xtheme-prod-selections-hl/(?P<product_ids>.*)/(?P<cache_timeout>\d+)/$",
get_prouduct_selections_highlight,
name="xtheme-product-selections-highlight",
),
]
|
# -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2021, Shuup Commerce Inc. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from django.http.response import HttpResponseRedirect
from shuup.utils.excs import Problem
from shuup.xtheme.editing import set_edit_mode
def handle_command(request, command):
"""
Internal dispatch function.
:param request: A request
:type request: django.http.HttpRequest
:param command: Command string
:type command: str
:return: A response
:rtype: django.http.HttpResponse
"""
path = request.POST.get("path") or request.META.get("HTTP_REFERER") or "/"
if command == "edit_on" or command == "edit_off":
set_edit_mode(request, command.endswith("_on"))
return HttpResponseRedirect(path)
def command_dispatch(request):
"""
Xtheme command dispatch view.
:param request: A request
:type request: django.http.HttpRequest
:return: A response
:rtype: django.http.HttpResponse
"""
command = request.POST.get("command")
if command:
response = handle_command(request, command)
if response:
return response
raise Problem("Error! Unknown command: `%r`" % command)
| # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2021, Shuup Commerce Inc. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from django.http.response import HttpResponseRedirect
from django.utils.html import escape
from shuup.utils.excs import Problem
from shuup.xtheme.editing import set_edit_mode
def handle_command(request, command):
"""
Internal dispatch function.
:param request: A request
:type request: django.http.HttpRequest
:param command: Command string
:type command: str
:return: A response
:rtype: django.http.HttpResponse
"""
path = request.POST.get("path") or request.META.get("HTTP_REFERER") or "/"
if command == "edit_on" or command == "edit_off":
set_edit_mode(request, command.endswith("_on"))
return HttpResponseRedirect(path)
def command_dispatch(request):
"""
Xtheme command dispatch view.
:param request: A request
:type request: django.http.HttpRequest
:return: A response
:rtype: django.http.HttpResponse
"""
command = request.POST.get("command")
if command:
response = handle_command(request, command)
if response:
return response
raise Problem("Error! Unknown command: `%r`" % escape(command))
|
# -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2021, Shuup Commerce Inc. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from django.core.exceptions import ImproperlyConfigured
from django.core.signals import setting_changed
from django.http.response import HttpResponseNotFound
from shuup.xtheme._theme import get_current_theme
_VIEW_CACHE = {}
def clear_view_cache(**kwargs):
_VIEW_CACHE.clear()
setting_changed.connect(clear_view_cache, dispatch_uid="shuup.xtheme.views.extra.clear_view_cache")
def _get_view_by_name(theme, view_name):
view = theme.get_view(view_name)
if hasattr(view, "as_view"): # Handle CBVs
view = view.as_view()
if view and not callable(view):
raise ImproperlyConfigured("Error! View `%r` is not callable." % view)
return view
def get_view_by_name(theme, view_name):
if not theme:
return None
cache_key = (theme.identifier, view_name)
if cache_key not in _VIEW_CACHE:
view = _get_view_by_name(theme, view_name)
_VIEW_CACHE[cache_key] = view
else:
view = _VIEW_CACHE[cache_key]
return view
def extra_view_dispatch(request, view):
"""
Dispatch to an Xtheme extra view.
:param request: A request.
:type request: django.http.HttpRequest
:param view: View name.
:type view: str
:return: A response of some kind.
:rtype: django.http.HttpResponse
"""
theme = getattr(request, "theme", None) or get_current_theme(request.shop)
view_func = get_view_by_name(theme, view)
if not view_func:
msg = "Error! %s/%s: Not found." % (getattr(theme, "identifier", None), view)
return HttpResponseNotFound(msg)
return view_func(request)
| # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2021, Shuup Commerce Inc. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from django.core.exceptions import ImproperlyConfigured
from django.core.signals import setting_changed
from django.http.response import HttpResponseNotFound
from django.utils.html import escape
from shuup.xtheme._theme import get_current_theme
_VIEW_CACHE = {}
def clear_view_cache(**kwargs):
_VIEW_CACHE.clear()
setting_changed.connect(clear_view_cache, dispatch_uid="shuup.xtheme.views.extra.clear_view_cache")
def _get_view_by_name(theme, view_name):
view = theme.get_view(view_name)
if hasattr(view, "as_view"): # Handle CBVs
view = view.as_view()
if view and not callable(view):
raise ImproperlyConfigured("Error! View `%r` is not callable." % view)
return view
def get_view_by_name(theme, view_name):
if not theme:
return None
cache_key = (theme.identifier, view_name)
if cache_key not in _VIEW_CACHE:
view = _get_view_by_name(theme, view_name)
_VIEW_CACHE[cache_key] = view
else:
view = _VIEW_CACHE[cache_key]
return view
def extra_view_dispatch(request, view):
"""
Dispatch to an Xtheme extra view.
:param request: A request.
:type request: django.http.HttpRequest
:param view: View name.
:type view: str
:return: A response of some kind.
:rtype: django.http.HttpResponse
"""
theme = getattr(request, "theme", None) or get_current_theme(request.shop)
view_func = get_view_by_name(theme, view)
if not view_func:
msg = "Error! %s/%s: Not found." % (getattr(theme, "identifier", None), escape(view))
return HttpResponseNotFound(msg)
return view_func(request)
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web)
# Copyright (C) 2012-2019 OzzieIsaacs
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
try:
from gevent import monkey
monkey.patch_all()
except ImportError:
pass
import sys
import os
# Insert local directories into path
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'vendor'))
from cps import create_app
from cps import web_server
from cps.opds import opds
from cps.web import web
from cps.jinjia import jinjia
from cps.about import about
from cps.shelf import shelf
from cps.admin import admi
from cps.gdrive import gdrive
from cps.editbooks import editbook
from cps.remotelogin import remotelogin
from cps.search_metadata import meta
from cps.error_handler import init_errorhandler
try:
from cps.kobo import kobo, get_kobo_activated
from cps.kobo_auth import kobo_auth
kobo_available = get_kobo_activated()
except (ImportError, AttributeError): # Catch also error for not installed flask-WTF (missing csrf decorator)
kobo_available = False
try:
from cps.oauth_bb import oauth
oauth_available = True
except ImportError:
oauth_available = False
def main():
app = create_app()
init_errorhandler()
app.register_blueprint(web)
app.register_blueprint(opds)
app.register_blueprint(jinjia)
app.register_blueprint(about)
app.register_blueprint(shelf)
app.register_blueprint(admi)
app.register_blueprint(remotelogin)
app.register_blueprint(meta)
app.register_blueprint(gdrive)
app.register_blueprint(editbook)
if kobo_available:
app.register_blueprint(kobo)
app.register_blueprint(kobo_auth)
if oauth_available:
app.register_blueprint(oauth)
success = web_server.start()
sys.exit(0 if success else 1)
if __name__ == '__main__':
main()
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web)
# Copyright (C) 2012-2019 OzzieIsaacs
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
try:
from gevent import monkey
monkey.patch_all()
except ImportError:
pass
import sys
import os
# Insert local directories into path
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'vendor'))
from cps import create_app
from cps import web_server
from cps.opds import opds
from cps.web import web
from cps.jinjia import jinjia
from cps.about import about
from cps.shelf import shelf
from cps.admin import admi
from cps.gdrive import gdrive
from cps.editbooks import EditBook
from cps.remotelogin import remotelogin
from cps.search_metadata import meta
from cps.error_handler import init_errorhandler
try:
from cps.kobo import kobo, get_kobo_activated
from cps.kobo_auth import kobo_auth
kobo_available = get_kobo_activated()
except (ImportError, AttributeError): # Catch also error for not installed flask-WTF (missing csrf decorator)
kobo_available = False
try:
from cps.oauth_bb import oauth
oauth_available = True
except ImportError:
oauth_available = False
def main():
app = create_app()
init_errorhandler()
app.register_blueprint(web)
app.register_blueprint(opds)
app.register_blueprint(jinjia)
app.register_blueprint(about)
app.register_blueprint(shelf)
app.register_blueprint(admi)
app.register_blueprint(remotelogin)
app.register_blueprint(meta)
app.register_blueprint(gdrive)
app.register_blueprint(EditBook)
if kobo_available:
app.register_blueprint(kobo)
app.register_blueprint(kobo_auth)
if oauth_available:
app.register_blueprint(oauth)
success = web_server.start()
sys.exit(0 if success else 1)
if __name__ == '__main__':
main()
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web)
# Copyright (C) 2012-2019 OzzieIsaacs
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
try:
from gevent import monkey
monkey.patch_all()
except ImportError:
pass
import sys
import os
# Insert local directories into path
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'vendor'))
from cps import create_app
from cps import web_server
from cps.opds import opds
from cps.web import web
from cps.jinjia import jinjia
from cps.about import about
from cps.shelf import shelf
from cps.admin import admi
from cps.gdrive import gdrive
from cps.editbooks import editbook
from cps.remotelogin import remotelogin
from cps.search_metadata import meta
from cps.error_handler import init_errorhandler
try:
from cps.kobo import kobo, get_kobo_activated
from cps.kobo_auth import kobo_auth
kobo_available = get_kobo_activated()
except (ImportError, AttributeError): # Catch also error for not installed flask-WTF (missing csrf decorator)
kobo_available = False
try:
from cps.oauth_bb import oauth
oauth_available = True
except ImportError:
oauth_available = False
def main():
app = create_app()
init_errorhandler()
app.register_blueprint(web)
app.register_blueprint(opds)
app.register_blueprint(jinjia)
app.register_blueprint(about)
app.register_blueprint(shelf)
app.register_blueprint(admi)
app.register_blueprint(remotelogin)
app.register_blueprint(meta)
app.register_blueprint(gdrive)
app.register_blueprint(editbook)
if kobo_available:
app.register_blueprint(kobo)
app.register_blueprint(kobo_auth)
if oauth_available:
app.register_blueprint(oauth)
success = web_server.start()
sys.exit(0 if success else 1)
if __name__ == '__main__':
main()
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web)
# Copyright (C) 2012-2019 OzzieIsaacs
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
try:
from gevent import monkey
monkey.patch_all()
except ImportError:
pass
import sys
import os
# Insert local directories into path
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'vendor'))
from cps import create_app
from cps import web_server
from cps.opds import opds
from cps.web import web
from cps.jinjia import jinjia
from cps.about import about
from cps.shelf import shelf
from cps.admin import admi
from cps.gdrive import gdrive
from cps.editbooks import EditBook
from cps.remotelogin import remotelogin
from cps.search_metadata import meta
from cps.error_handler import init_errorhandler
try:
from cps.kobo import kobo, get_kobo_activated
from cps.kobo_auth import kobo_auth
kobo_available = get_kobo_activated()
except (ImportError, AttributeError): # Catch also error for not installed flask-WTF (missing csrf decorator)
kobo_available = False
try:
from cps.oauth_bb import oauth
oauth_available = True
except ImportError:
oauth_available = False
def main():
app = create_app()
init_errorhandler()
app.register_blueprint(web)
app.register_blueprint(opds)
app.register_blueprint(jinjia)
app.register_blueprint(about)
app.register_blueprint(shelf)
app.register_blueprint(admi)
app.register_blueprint(remotelogin)
app.register_blueprint(meta)
app.register_blueprint(gdrive)
app.register_blueprint(EditBook)
if kobo_available:
app.register_blueprint(kobo)
app.register_blueprint(kobo_auth)
if oauth_available:
app.register_blueprint(oauth)
success = web_server.start()
sys.exit(0 if success else 1)
if __name__ == '__main__':
main()
|
# -*- coding: utf-8 -*-
# This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web)
# Copyright (C) 2018-2019 OzzieIsaacs, cervinko, jkrehm, bodybybuddha, ok11,
# andy29485, idalin, Kyosfonica, wuqi, Kennyl, lemmsh,
# falgh1, grunjol, csitko, ytils, xybydy, trasba, vrabe,
# ruben-herold, marblepebble, JackED42, SiphonSquirrel,
# apetresc, nanu-c, mutschler
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
from math import ceil
# simple pagination for the feed
class Pagination(object):
def __init__(self, page, per_page, total_count):
self.page = int(page)
self.per_page = int(per_page)
self.total_count = int(total_count)
@property
def next_offset(self):
return int(self.page * self.per_page)
@property
def previous_offset(self):
return int((self.page - 2) * self.per_page)
@property
def last_offset(self):
last = int(self.total_count) - int(self.per_page)
if last < 0:
last = 0
return int(last)
@property
def pages(self):
return int(ceil(self.total_count / float(self.per_page)))
@property
def has_prev(self):
return self.page > 1
@property
def has_next(self):
return self.page < self.pages
# right_edge: last right_edges count of all pages are shown as number, means, if 10 pages are paginated -> 9,10 shwn
# left_edge: first left_edges count of all pages are shown as number -> 1,2 shwn
# left_current: left_current count below current page are shown as number, means if current page 5 -> 3,4 shwn
# left_current: right_current count above current page are shown as number, means if current page 5 -> 6,7 shwn
def iter_pages(self, left_edge=2, left_current=2,
right_current=4, right_edge=2):
last = 0
left_current = self.page - left_current - 1
right_current = self.page + right_current + 1
right_edge = self.pages - right_edge
for num in range(1, (self.pages + 1)):
if num <= left_edge or (left_current < num < right_current) or num > right_edge:
if last + 1 != num:
yield None
yield num
last = num
| # -*- coding: utf-8 -*-
# This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web)
# Copyright (C) 2018-2019 OzzieIsaacs, cervinko, jkrehm, bodybybuddha, ok11,
# andy29485, idalin, Kyosfonica, wuqi, Kennyl, lemmsh,
# falgh1, grunjol, csitko, ytils, xybydy, trasba, vrabe,
# ruben-herold, marblepebble, JackED42, SiphonSquirrel,
# apetresc, nanu-c, mutschler
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
from math import ceil
# simple pagination for the feed
class Pagination(object):
def __init__(self, page, per_page, total_count):
self.page = int(page)
self.per_page = int(per_page)
self.total_count = int(total_count)
@property
def next_offset(self):
return int(self.page * self.per_page)
@property
def previous_offset(self):
return int((self.page - 2) * self.per_page)
@property
def last_offset(self):
last = int(self.total_count) - int(self.per_page)
if last < 0:
last = 0
return int(last)
@property
def pages(self):
return int(ceil(self.total_count / float(self.per_page)))
@property
def has_prev(self):
return self.page > 1
@property
def has_next(self):
return self.page < self.pages
# right_edge: last right_edges count of all pages are shown as number, means, if 10 pages are paginated -> 9,10 shown
# left_edge: first left_edges count of all pages are shown as number -> 1,2 shown
# left_current: left_current count below current page are shown as number, means if current page 5 -> 3,4 shown
# left_current: right_current count above current page are shown as number, means if current page 5 -> 6,7 shown
def iter_pages(self, left_edge=2, left_current=2,
right_current=4, right_edge=2):
last = 0
left_current = self.page - left_current - 1
right_current = self.page + right_current + 1
right_edge = self.pages - right_edge
for num in range(1, (self.pages + 1)):
if num <= left_edge or (left_current < num < right_current) or num > right_edge:
if last + 1 != num:
yield None
yield num
last = num
|
# -*- coding: utf-8 -*-
# This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web)
# Copyright (C) 2018-2019 OzzieIsaacs, cervinko, jkrehm, bodybybuddha, ok11,
# andy29485, idalin, Kyosfonica, wuqi, Kennyl, lemmsh,
# falgh1, grunjol, csitko, ytils, xybydy, trasba, vrabe,
# ruben-herold, marblepebble, JackED42, SiphonSquirrel,
# apetresc, nanu-c, mutschler
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
from math import ceil
# simple pagination for the feed
class Pagination(object):
def __init__(self, page, per_page, total_count):
self.page = int(page)
self.per_page = int(per_page)
self.total_count = int(total_count)
@property
def next_offset(self):
return int(self.page * self.per_page)
@property
def previous_offset(self):
return int((self.page - 2) * self.per_page)
@property
def last_offset(self):
last = int(self.total_count) - int(self.per_page)
if last < 0:
last = 0
return int(last)
@property
def pages(self):
return int(ceil(self.total_count / float(self.per_page)))
@property
def has_prev(self):
return self.page > 1
@property
def has_next(self):
return self.page < self.pages
# right_edge: last right_edges count of all pages are shown as number, means, if 10 pages are paginated -> 9,10 shwn
# left_edge: first left_edges count of all pages are shown as number -> 1,2 shwn
# left_current: left_current count below current page are shown as number, means if current page 5 -> 3,4 shwn
# left_current: right_current count above current page are shown as number, means if current page 5 -> 6,7 shwn
def iter_pages(self, left_edge=2, left_current=2,
right_current=4, right_edge=2):
last = 0
left_current = self.page - left_current - 1
right_current = self.page + right_current + 1
right_edge = self.pages - right_edge
for num in range(1, (self.pages + 1)):
if num <= left_edge or (left_current < num < right_current) or num > right_edge:
if last + 1 != num:
yield None
yield num
last = num
| # -*- coding: utf-8 -*-
# This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web)
# Copyright (C) 2018-2019 OzzieIsaacs, cervinko, jkrehm, bodybybuddha, ok11,
# andy29485, idalin, Kyosfonica, wuqi, Kennyl, lemmsh,
# falgh1, grunjol, csitko, ytils, xybydy, trasba, vrabe,
# ruben-herold, marblepebble, JackED42, SiphonSquirrel,
# apetresc, nanu-c, mutschler
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
from math import ceil
# simple pagination for the feed
class Pagination(object):
def __init__(self, page, per_page, total_count):
self.page = int(page)
self.per_page = int(per_page)
self.total_count = int(total_count)
@property
def next_offset(self):
return int(self.page * self.per_page)
@property
def previous_offset(self):
return int((self.page - 2) * self.per_page)
@property
def last_offset(self):
last = int(self.total_count) - int(self.per_page)
if last < 0:
last = 0
return int(last)
@property
def pages(self):
return int(ceil(self.total_count / float(self.per_page)))
@property
def has_prev(self):
return self.page > 1
@property
def has_next(self):
return self.page < self.pages
# right_edge: last right_edges count of all pages are shown as number, means, if 10 pages are paginated -> 9,10 shown
# left_edge: first left_edges count of all pages are shown as number -> 1,2 shown
# left_current: left_current count below current page are shown as number, means if current page 5 -> 3,4 shown
# left_current: right_current count above current page are shown as number, means if current page 5 -> 6,7 shown
def iter_pages(self, left_edge=2, left_current=2,
right_current=4, right_edge=2):
last = 0
left_current = self.page - left_current - 1
right_current = self.page + right_current + 1
right_edge = self.pages - right_edge
for num in range(1, (self.pages + 1)):
if num <= left_edge or (left_current < num < right_current) or num > right_edge:
if last + 1 != num:
yield None
yield num
last = num
|
# -*- coding: utf-8 -*-
# This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web)
# Copyright (C) 2018-2020 OzzieIsaacs
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
import base64
import binascii
from sqlalchemy.sql.expression import func
from werkzeug.security import check_password_hash
from flask_login import login_required, login_user
from . import lm, ub, config, constants, services
try:
from functools import wraps
except ImportError:
pass # We're not using Python 3
def login_required_if_no_ano(func):
@wraps(func)
def decorated_view(*args, **kwargs):
if config.config_anonbrowse == 1:
return func(*args, **kwargs)
return login_required(func)(*args, **kwargs)
return decorated_view
def _fetch_user_by_name(username):
return ub.session.query(ub.User).filter(func.lower(ub.User.name) == username.lower()).first()
@lm.user_loader
def load_user(user_id):
return ub.session.query(ub.User).filter(ub.User.id == int(user_id)).first()
@lm.request_loader
def load_user_from_request(request):
if config.config_allow_reverse_proxy_header_login:
rp_header_name = config.config_reverse_proxy_login_header_name
if rp_header_name:
rp_header_username = request.headers.get(rp_header_name)
if rp_header_username:
user = _fetch_user_by_name(rp_header_username)
if user:
login_user(user)
return user
auth_header = request.headers.get("Authorization")
if auth_header:
user = load_user_from_auth_header(auth_header)
if user:
return user
return
def load_user_from_auth_header(header_val):
if header_val.startswith('Basic '):
header_val = header_val.replace('Basic ', '', 1)
basic_username = basic_password = '' # nosec
try:
header_val = base64.b64decode(header_val).decode('utf-8')
# Users with colon are invalid: rfc7617 page 4
basic_username = header_val.split(':', 1)[0]
basic_password = header_val.split(':', 1)[1]
except (TypeError, UnicodeDecodeError, binascii.Error):
pass
user = _fetch_user_by_name(basic_username)
if user and config.config_login_type == constants.LOGIN_LDAP and services.ldap:
if services.ldap.bind_user(str(user.password), basic_password):
return user
if user and check_password_hash(str(user.password), basic_password):
return user
return
| # -*- coding: utf-8 -*-
# This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web)
# Copyright (C) 2018-2020 OzzieIsaacs
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
import base64
import binascii
from functools import wraps
from sqlalchemy.sql.expression import func
from werkzeug.security import check_password_hash
from flask_login import login_required, login_user
from . import lm, ub, config, constants, services
def login_required_if_no_ano(func):
@wraps(func)
def decorated_view(*args, **kwargs):
if config.config_anonbrowse == 1:
return func(*args, **kwargs)
return login_required(func)(*args, **kwargs)
return decorated_view
def _fetch_user_by_name(username):
return ub.session.query(ub.User).filter(func.lower(ub.User.name) == username.lower()).first()
@lm.user_loader
def load_user(user_id):
return ub.session.query(ub.User).filter(ub.User.id == int(user_id)).first()
@lm.request_loader
def load_user_from_request(request):
if config.config_allow_reverse_proxy_header_login:
rp_header_name = config.config_reverse_proxy_login_header_name
if rp_header_name:
rp_header_username = request.headers.get(rp_header_name)
if rp_header_username:
user = _fetch_user_by_name(rp_header_username)
if user:
login_user(user)
return user
auth_header = request.headers.get("Authorization")
if auth_header:
user = load_user_from_auth_header(auth_header)
if user:
return user
return
def load_user_from_auth_header(header_val):
if header_val.startswith('Basic '):
header_val = header_val.replace('Basic ', '', 1)
basic_username = basic_password = '' # nosec
try:
header_val = base64.b64decode(header_val).decode('utf-8')
# Users with colon are invalid: rfc7617 page 4
basic_username = header_val.split(':', 1)[0]
basic_password = header_val.split(':', 1)[1]
except (TypeError, UnicodeDecodeError, binascii.Error):
pass
user = _fetch_user_by_name(basic_username)
if user and config.config_login_type == constants.LOGIN_LDAP and services.ldap:
if services.ldap.bind_user(str(user.password), basic_password):
return user
if user and check_password_hash(str(user.password), basic_password):
return user
return
|
# -*- coding: utf-8 -*-
# This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web)
# Copyright (C) 2018-2020 OzzieIsaacs
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
import base64
import binascii
from sqlalchemy.sql.expression import func
from werkzeug.security import check_password_hash
from flask_login import login_required, login_user
from . import lm, ub, config, constants, services
try:
from functools import wraps
except ImportError:
pass # We're not using Python 3
def login_required_if_no_ano(func):
@wraps(func)
def decorated_view(*args, **kwargs):
if config.config_anonbrowse == 1:
return func(*args, **kwargs)
return login_required(func)(*args, **kwargs)
return decorated_view
def _fetch_user_by_name(username):
return ub.session.query(ub.User).filter(func.lower(ub.User.name) == username.lower()).first()
@lm.user_loader
def load_user(user_id):
return ub.session.query(ub.User).filter(ub.User.id == int(user_id)).first()
@lm.request_loader
def load_user_from_request(request):
if config.config_allow_reverse_proxy_header_login:
rp_header_name = config.config_reverse_proxy_login_header_name
if rp_header_name:
rp_header_username = request.headers.get(rp_header_name)
if rp_header_username:
user = _fetch_user_by_name(rp_header_username)
if user:
login_user(user)
return user
auth_header = request.headers.get("Authorization")
if auth_header:
user = load_user_from_auth_header(auth_header)
if user:
return user
return
def load_user_from_auth_header(header_val):
if header_val.startswith('Basic '):
header_val = header_val.replace('Basic ', '', 1)
basic_username = basic_password = '' # nosec
try:
header_val = base64.b64decode(header_val).decode('utf-8')
# Users with colon are invalid: rfc7617 page 4
basic_username = header_val.split(':', 1)[0]
basic_password = header_val.split(':', 1)[1]
except (TypeError, UnicodeDecodeError, binascii.Error):
pass
user = _fetch_user_by_name(basic_username)
if user and config.config_login_type == constants.LOGIN_LDAP and services.ldap:
if services.ldap.bind_user(str(user.password), basic_password):
return user
if user and check_password_hash(str(user.password), basic_password):
return user
return
| # -*- coding: utf-8 -*-
# This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web)
# Copyright (C) 2018-2020 OzzieIsaacs
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
import base64
import binascii
from functools import wraps
from sqlalchemy.sql.expression import func
from werkzeug.security import check_password_hash
from flask_login import login_required, login_user
from . import lm, ub, config, constants, services
def login_required_if_no_ano(func):
@wraps(func)
def decorated_view(*args, **kwargs):
if config.config_anonbrowse == 1:
return func(*args, **kwargs)
return login_required(func)(*args, **kwargs)
return decorated_view
def _fetch_user_by_name(username):
return ub.session.query(ub.User).filter(func.lower(ub.User.name) == username.lower()).first()
@lm.user_loader
def load_user(user_id):
return ub.session.query(ub.User).filter(ub.User.id == int(user_id)).first()
@lm.request_loader
def load_user_from_request(request):
if config.config_allow_reverse_proxy_header_login:
rp_header_name = config.config_reverse_proxy_login_header_name
if rp_header_name:
rp_header_username = request.headers.get(rp_header_name)
if rp_header_username:
user = _fetch_user_by_name(rp_header_username)
if user:
login_user(user)
return user
auth_header = request.headers.get("Authorization")
if auth_header:
user = load_user_from_auth_header(auth_header)
if user:
return user
return
def load_user_from_auth_header(header_val):
if header_val.startswith('Basic '):
header_val = header_val.replace('Basic ', '', 1)
basic_username = basic_password = '' # nosec
try:
header_val = base64.b64decode(header_val).decode('utf-8')
# Users with colon are invalid: rfc7617 page 4
basic_username = header_val.split(':', 1)[0]
basic_password = header_val.split(':', 1)[1]
except (TypeError, UnicodeDecodeError, binascii.Error):
pass
user = _fetch_user_by_name(basic_username)
if user and config.config_login_type == constants.LOGIN_LDAP and services.ldap:
if services.ldap.bind_user(str(user.password), basic_password):
return user
if user and check_password_hash(str(user.password), basic_password):
return user
return
|
Vue.component("pagecopy-item",{props:["item"],methods:{toggleItem:function(e){e.isExpanded=!e.isExpanded}},template:'\n<li class="dd-item" :class="{ expanded: item.isExpanded || item.items.length === 0 }">\n <div class="sitemap-item expanded">\n <div class="link" :class="{ readonly: item.isCopy }">\n <a v-if="!item.isCopy" :href="piranha.baseUrl + \'manager/page/copyrelative/\' + item.id + \'/\' + piranha.pagelist.addPageId + \'/\' + piranha.pagelist.addAfter">\n {{ item.title }}\n </a>\n <a href="#" v-else>\n {{ item.title }}\n <span v-if="item.isCopy" class="badge badge-warning">{{ piranha.resources.texts.copy }}</span>\n </a>\n <div class="content-blocker"></div>\n </div>\n <div class="type d-none d-md-block">\n {{ item.typeName }}\n </div>\n </div>\n <ol class="dd-list" v-if="item.items.length > 0">\n <pagecopy-item v-for="child in item.items" v-bind:key="child.id" v-bind:item="child"></pagecopy-item>\n </ol>\n</li>\n'}),Vue.component("sitemap-item",{props:["item"],methods:{toggleItem:function(e){e.isExpanded=!e.isExpanded}},template:'\n<li class="dd-item" :class="{ expanded: item.isExpanded || item.items.length === 0 }" :data-id="item.id">\n <div class="sitemap-item" :class="{ dimmed: item.isUnpublished || item.isScheduled }">\n <div class="handle dd-handle"><i class="fas fa-ellipsis-v"></i></div>\n <div class="link">\n <span class="actions">\n <a v-if="item.items.length > 0 && item.isExpanded" v-on:click.prevent="toggleItem(item)" class="expand" href="#"><i class="fas fa-minus"></i></a>\n <a v-if="item.items.length > 0 && !item.isExpanded" v-on:click.prevent="toggleItem(item)" class="expand" href="#"><i class="fas fa-plus"></i></a>\n </span>\n <a v-if="piranha.permissions.pages.edit" :href="piranha.baseUrl + item.editUrl + item.id">\n <span v-html="item.title"></span>\n <span v-if="item.isRestricted" class="icon-restricted text-secondary small"><i class="fas fa-lock"></i></span>\n <span v-if="item.status" class="badge badge-info">{{ item.status }}</span>\n <span v-if="item.isScheduled" class="badge badge-info">{{ piranha.resources.texts.scheduled }}</span>\n <span v-if="item.isCopy" class="badge badge-warning">{{ piranha.resources.texts.copy }}</span>\n </a>\n <span v-else class="title">\n <span v-html="item.title"></span>\n <span v-if="item.isRestricted" class="icon-restricted text-secondary small"><i class="fas fa-lock"></i></span>\n <span v-if="item.status" class="badge badge-info">{{ item.status }}</span>\n <span v-if="item.isScheduled" class="badge badge-info">{{ piranha.resources.texts.scheduled }}</span>\n <span v-if="item.isCopy" class="badge badge-warning">{{ piranha.resources.texts.copy }}</span>\n </span>\n </div>\n <div class="type d-none d-md-block">{{ item.typeName }}</div>\n <div class="date d-none d-lg-block">{{ item.published }}</div>\n <div class="actions">\n <a v-if="piranha.permissions.pages.add" href="#" v-on:click.prevent="piranha.pagelist.add(item.siteId, item.id, true)"><i class="fas fa-angle-down"></i></a>\n <a v-if="piranha.permissions.pages.add" href="#" v-on:click.prevent="piranha.pagelist.add(item.siteId, item.id, false)"><i class="fas fa-angle-right"></i></a>\n <a v-if="piranha.permissions.pages.delete && item.items.length === 0" v-on:click.prevent="piranha.pagelist.remove(item.id)" class="danger" href="#"><i class="fas fa-trash"></i></a>\n </div>\n </div>\n <ol v-if="item.items.length > 0" class="dd-list">\n <sitemap-item v-for="child in item.items" v-bind:key="child.id" v-bind:item="child">\n </sitemap-item>\n </ol>\n</li>\n'}),piranha.pagelist=new Vue({el:"#pagelist",data:{loading:!0,updateBindings:!1,items:[],sites:[],pageTypes:[],addSiteId:null,addSiteTitle:null,addPageId:null,addAfter:!0},methods:{load:function(){var e=this;piranha.permissions.load(function(){fetch(piranha.baseUrl+"manager/api/page/list").then(function(e){return e.json()}).then(function(i){e.sites=i.sites,e.pageTypes=i.pageTypes,e.updateBindings=!0}).catch(function(e){console.log("error:",e)})})},remove:function(e){var i=this;piranha.alert.open({title:piranha.resources.texts.delete,body:piranha.resources.texts.deletePageConfirm,confirmCss:"btn-danger",confirmIcon:"fas fa-trash",confirmText:piranha.resources.texts.delete,onConfirm:function(){fetch(piranha.baseUrl+"manager/api/page/delete/"+e).then(function(e){return e.json()}).then(function(e){piranha.notifications.push(e),i.load()}).catch(function(e){console.log("error:",e)})}})},bind:function(){var e=this;$(".sitemap-container").each(function(i,s){$(s).nestable({maxDepth:100,group:i,callback:function(i,s){fetch(piranha.baseUrl+"manager/api/page/move",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:$(s).attr("data-id"),items:$(i).nestable("serialize")})}).then(function(e){return e.json()}).then(function(i){piranha.notifications.push(i.status),"success"===i.status.type&&($(".sitemap-container").nestable("destroy"),e.sites=[],Vue.nextTick(function(){e.sites=i.sites,Vue.nextTick(function(){e.bind()})}))}).catch(function(e){console.log("error:",e)})}})})},add:function(e,i,s){var a=this;a.addSiteId=e,a.addPageId=i,a.addAfter=s,a.sites.forEach(function(i){i.id===e&&(a.addSiteTitle=i.title)}),$("#pageAddModal").modal("show")},selectSite:function(e){var i=this;i.addSiteId=e,i.sites.forEach(function(s){s.id===e&&(i.addSiteTitle=s.title)})},collapse:function(){for(var e=0;e<this.sites.length;e++)for(var i=0;i<this.sites[e].pages.length;i++)this.changeVisibility(this.sites[e].pages[i],!1)},expand:function(){for(var e=0;e<this.sites.length;e++)for(var i=0;i<this.sites[e].pages.length;i++)this.changeVisibility(this.sites[e].pages[i],!0)},changeVisibility:function(e,i){e.isExpanded=i;for(var s=0;s<e.items.length;s++)this.changeVisibility(e.items[s],i)}},created:function(){},updated:function(){this.updateBindings&&(this.bind(),this.updateBindings=!1),this.loading=!1}}); | Vue.component("pagecopy-item",{props:["item"],methods:{toggleItem:function(e){e.isExpanded=!e.isExpanded}},template:'\n<li class="dd-item" :class="{ expanded: item.isExpanded || item.items.length === 0 }">\n <div class="sitemap-item expanded">\n <div class="link" :class="{ readonly: item.isCopy }">\n <a v-if="!item.isCopy" :href="piranha.baseUrl + \'manager/page/copyrelative/\' + item.id + \'/\' + piranha.pagelist.addPageId + \'/\' + piranha.pagelist.addAfter">\n {{ item.title }}\n </a>\n <a href="#" v-else>\n {{ item.title }}\n <span v-if="item.isCopy" class="badge badge-warning">{{ piranha.resources.texts.copy }}</span>\n </a>\n <div class="content-blocker"></div>\n </div>\n <div class="type d-none d-md-block">\n {{ item.typeName }}\n </div>\n </div>\n <ol class="dd-list" v-if="item.items.length > 0">\n <pagecopy-item v-for="child in item.items" v-bind:key="child.id" v-bind:item="child"></pagecopy-item>\n </ol>\n</li>\n'}),Vue.component("sitemap-item",{props:["item"],methods:{toggleItem:function(e){e.isExpanded=!e.isExpanded}},template:'\n<li class="dd-item" :class="{ expanded: item.isExpanded || item.items.length === 0 }" :data-id="item.id">\n <div class="sitemap-item" :class="{ dimmed: item.isUnpublished || item.isScheduled }">\n <div class="handle dd-handle"><i class="fas fa-ellipsis-v"></i></div>\n <div class="link">\n <span class="actions">\n <a v-if="item.items.length > 0 && item.isExpanded" v-on:click.prevent="toggleItem(item)" class="expand" href="#"><i class="fas fa-minus"></i></a>\n <a v-if="item.items.length > 0 && !item.isExpanded" v-on:click.prevent="toggleItem(item)" class="expand" href="#"><i class="fas fa-plus"></i></a>\n </span>\n <a v-if="piranha.permissions.pages.edit" :href="piranha.baseUrl + item.editUrl + item.id">\n <span>{{ item.title }}</span>\n <span v-if="item.isRestricted" class="icon-restricted text-secondary small"><i class="fas fa-lock"></i></span>\n <span v-if="item.status" class="badge badge-info">{{ item.status }}</span>\n <span v-if="item.isScheduled" class="badge badge-info">{{ piranha.resources.texts.scheduled }}</span>\n <span v-if="item.isCopy" class="badge badge-warning">{{ piranha.resources.texts.copy }}</span>\n </a>\n <span v-else class="title">\n <span>{{ item.title }}</span>\n <span v-if="item.isRestricted" class="icon-restricted text-secondary small"><i class="fas fa-lock"></i></span>\n <span v-if="item.status" class="badge badge-info">{{ item.status }}</span>\n <span v-if="item.isScheduled" class="badge badge-info">{{ piranha.resources.texts.scheduled }}</span>\n <span v-if="item.isCopy" class="badge badge-warning">{{ piranha.resources.texts.copy }}</span>\n </span>\n </div>\n <div class="type d-none d-md-block">{{ item.typeName }}</div>\n <div class="date d-none d-lg-block">{{ item.published }}</div>\n <div class="actions">\n <a v-if="piranha.permissions.pages.add" href="#" v-on:click.prevent="piranha.pagelist.add(item.siteId, item.id, true)"><i class="fas fa-angle-down"></i></a>\n <a v-if="piranha.permissions.pages.add" href="#" v-on:click.prevent="piranha.pagelist.add(item.siteId, item.id, false)"><i class="fas fa-angle-right"></i></a>\n <a v-if="piranha.permissions.pages.delete && item.items.length === 0" v-on:click.prevent="piranha.pagelist.remove(item.id)" class="danger" href="#"><i class="fas fa-trash"></i></a>\n </div>\n </div>\n <ol v-if="item.items.length > 0" class="dd-list">\n <sitemap-item v-for="child in item.items" v-bind:key="child.id" v-bind:item="child">\n </sitemap-item>\n </ol>\n</li>\n'}),piranha.pagelist=new Vue({el:"#pagelist",data:{loading:!0,updateBindings:!1,items:[],sites:[],pageTypes:[],addSiteId:null,addSiteTitle:null,addPageId:null,addAfter:!0},methods:{load:function(){var e=this;piranha.permissions.load(function(){fetch(piranha.baseUrl+"manager/api/page/list").then(function(e){return e.json()}).then(function(i){e.sites=i.sites,e.pageTypes=i.pageTypes,e.updateBindings=!0}).catch(function(e){console.log("error:",e)})})},remove:function(e){var i=this;piranha.alert.open({title:piranha.resources.texts.delete,body:piranha.resources.texts.deletePageConfirm,confirmCss:"btn-danger",confirmIcon:"fas fa-trash",confirmText:piranha.resources.texts.delete,onConfirm:function(){fetch(piranha.baseUrl+"manager/api/page/delete/"+e).then(function(e){return e.json()}).then(function(e){piranha.notifications.push(e),i.load()}).catch(function(e){console.log("error:",e)})}})},bind:function(){var e=this;$(".sitemap-container").each(function(i,s){$(s).nestable({maxDepth:100,group:i,callback:function(i,s){fetch(piranha.baseUrl+"manager/api/page/move",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:$(s).attr("data-id"),items:$(i).nestable("serialize")})}).then(function(e){return e.json()}).then(function(i){piranha.notifications.push(i.status),"success"===i.status.type&&($(".sitemap-container").nestable("destroy"),e.sites=[],Vue.nextTick(function(){e.sites=i.sites,Vue.nextTick(function(){e.bind()})}))}).catch(function(e){console.log("error:",e)})}})})},add:function(e,i,s){var a=this;a.addSiteId=e,a.addPageId=i,a.addAfter=s,a.sites.forEach(function(i){i.id===e&&(a.addSiteTitle=i.title)}),$("#pageAddModal").modal("show")},selectSite:function(e){var i=this;i.addSiteId=e,i.sites.forEach(function(s){s.id===e&&(i.addSiteTitle=s.title)})},collapse:function(){for(var e=0;e<this.sites.length;e++)for(var i=0;i<this.sites[e].pages.length;i++)this.changeVisibility(this.sites[e].pages[i],!1)},expand:function(){for(var e=0;e<this.sites.length;e++)for(var i=0;i<this.sites[e].pages.length;i++)this.changeVisibility(this.sites[e].pages[i],!0)},changeVisibility:function(e,i){e.isExpanded=i;for(var s=0;s<e.items.length;s++)this.changeVisibility(e.items[s],i)}},created:function(){},updated:function(){this.updateBindings&&(this.bind(),this.updateBindings=!1),this.loading=!1}}); |
notify_oldest_id = 0;
notify_latest_id = 0;
notify_update_timeout = 30000;
notify_update_timeout_adjust = 1.2; // factor to adjust between each timeout.
function notify_update() {
jsonWrapper(URL_NOTIFY_GET_NEW+notify_latest_id+'/', function (data) {
if (data.success) {
$('.notification-cnt').html(data.total_count);
if (data.objects.length> 0) {
$('.notifications-empty').hide();
}
if (data.total_count > 0) {
$('.notification-cnt').addClass('badge-important');
} else {
$('.notification-cnt').removeClass('badge-important');
}
for (var i=data.objects.length-1; i >=0 ; i--) {
n = data.objects[i];
notify_latest_id = n.pk>notify_latest_id ? n.pk:notify_latest_id;
notify_oldest_id = (n.pk<notify_oldest_id || notify_oldest_id==0) ? n.pk:notify_oldest_id;
if (n.occurrences > 1) {
element = $('<div><a href="'+URL_NOTIFY_GOTO+n.pk+'/"><div>'+n.message+'</div><div class="since">'+n.occurrences_msg+' - ' + n.since + '</div></a></div>')
} else {
element = $('<div><a href="'+URL_NOTIFY_GOTO+n.pk+'/"><div>'+n.message+'</div><div class="since">'+n.since+'</div></a></div>');
}
element.addClass('dropdown-item notification-item');
element.insertAfter('.notification-before-list');
}
}
});
}
function notify_mark_read() {
$('.notification-item').remove();
$('.notifications-empty').show();
url = URL_NOTIFY_MARK_READ+notify_latest_id+'/'+notify_oldest_id+'/';
notify_oldest_id = 0;
notify_latest_id = 0;
jsonWrapper(url, function (data) {
if (data.success) {
notify_update();
}
});
}
function update_timeout() {
setTimeout("notify_update()", notify_update_timeout);
setTimeout("update_timeout()", notify_update_timeout);
notify_update_timeout *= notify_update_timeout_adjust;
}
$(document).ready(function () {
update_timeout();
});
// Don't check immediately... some users just click through pages very quickly.
setTimeout("notify_update()", 2000);
| notify_oldest_id = 0;
notify_latest_id = 0;
notify_update_timeout = 30000;
notify_update_timeout_adjust = 1.2; // factor to adjust between each timeout.
function notify_update() {
jsonWrapper(URL_NOTIFY_GET_NEW+notify_latest_id+'/', function (data) {
if (data.success) {
$('.notification-cnt').html(data.total_count);
if (data.objects.length> 0) {
$('.notifications-empty').hide();
}
if (data.total_count > 0) {
$('.notification-cnt').addClass('badge-important');
} else {
$('.notification-cnt').removeClass('badge-important');
}
for (var i=data.objects.length-1; i >=0 ; i--) {
n = data.objects[i];
notify_latest_id = n.pk>notify_latest_id ? n.pk:notify_latest_id;
notify_oldest_id = (n.pk<notify_oldest_id || notify_oldest_id==0) ? n.pk:notify_oldest_id;
var element_outer_div = $("<div />");
var element_a = $("<a />", {href: URL_NOTIFY_GOTO + n.pk + "/"});
var element_message_div;
var element_since_div;
if (n.occurrences > 1) {
element_message_div = $("<div />", {text: n.message});
element_since_div = $("<div />", {text: n.occurrences_msg+' - ' + n.since, class: "since"});
} else {
element_message_div = $("<div />", {text: n.message});
element_since_div = $("<div />", {text: n.since, class: "since"});
}
element_a.append(element_message_div).append(element_since_div);
element = element_outer_div.append(element_a);
element.addClass('dropdown-item notification-item');
element.insertAfter('.notification-before-list');
}
}
});
}
function notify_mark_read() {
$('.notification-item').remove();
$('.notifications-empty').show();
url = URL_NOTIFY_MARK_READ+notify_latest_id+'/'+notify_oldest_id+'/';
notify_oldest_id = 0;
notify_latest_id = 0;
jsonWrapper(url, function (data) {
if (data.success) {
notify_update();
}
});
}
function update_timeout() {
setTimeout("notify_update()", notify_update_timeout);
setTimeout("update_timeout()", notify_update_timeout);
notify_update_timeout *= notify_update_timeout_adjust;
}
$(document).ready(function () {
update_timeout();
});
// Don't check immediately... some users just click through pages very quickly.
setTimeout("notify_update()", 2000);
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
function loadSessionsTable(sessions) {
$.each(sessions, function(index, session) {
$("#interactive-sessions .sessions-table-body").append(
"<tr>" +
tdWrap(uiLink("session/" + session.id, session.id)) +
tdWrap(appIdLink(session)) +
tdWrap(session.name) +
tdWrap(session.owner) +
tdWrap(session.proxyUser) +
tdWrap(session.kind) +
tdWrap(session.state) +
tdWrap(logLinks(session, "session")) +
"</tr>"
);
});
}
function loadBatchesTable(sessions) {
$.each(sessions, function(index, session) {
$("#batches .sessions-table-body").append(
"<tr>" +
tdWrap(session.id) +
tdWrap(appIdLink(session)) +
tdWrap(session.name) +
tdWrap(session.owner) +
tdWrap(session.proxyUser) +
tdWrap(session.state) +
tdWrap(logLinks(session, "batch")) +
"</tr>"
);
});
}
var numSessions = 0;
var numBatches = 0;
$(document).ready(function () {
var sessionsReq = $.getJSON(location.origin + prependBasePath("/sessions"), function(response) {
if (response && response.total > 0) {
$("#interactive-sessions").load(prependBasePath("/static/html/sessions-table.html .sessions-template"), function() {
loadSessionsTable(response.sessions);
$("#interactive-sessions-table").DataTable();
$('#interactive-sessions [data-toggle="tooltip"]').tooltip();
});
}
numSessions = response.total;
});
var batchesReq = $.getJSON(location.origin + prependBasePath("/batches"), function(response) {
if (response && response.total > 0) {
$("#batches").load(prependBasePath("/static/html/batches-table.html .sessions-template"), function() {
loadBatchesTable(response.sessions);
$("#batches-table").DataTable();
$('#batches [data-toggle="tooltip"]').tooltip();
});
}
numBatches = response.total;
});
$.when(sessionsReq, batchesReq).done(function () {
if (numSessions + numBatches == 0) {
$("#all-sessions").append('<h4>No Sessions or Batches have been created yet.</h4>');
}
});
}); | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
function escapeHtml(unescapedText) {
return $("<div>").text(unescapedText).html()
}
function loadSessionsTable(sessions) {
$.each(sessions, function(index, session) {
$("#interactive-sessions .sessions-table-body").append(
"<tr>" +
tdWrap(uiLink("session/" + session.id, session.id)) +
tdWrap(appIdLink(session)) +
tdWrap(escapeHtml(session.name)) +
tdWrap(session.owner) +
tdWrap(session.proxyUser) +
tdWrap(session.kind) +
tdWrap(session.state) +
tdWrap(logLinks(session, "session")) +
"</tr>"
);
});
}
function loadBatchesTable(sessions) {
$.each(sessions, function(index, session) {
$("#batches .sessions-table-body").append(
"<tr>" +
tdWrap(session.id) +
tdWrap(appIdLink(session)) +
tdWrap(escapeHtml(session.name)) +
tdWrap(session.owner) +
tdWrap(session.proxyUser) +
tdWrap(session.state) +
tdWrap(logLinks(session, "batch")) +
"</tr>"
);
});
}
var numSessions = 0;
var numBatches = 0;
$(document).ready(function () {
var sessionsReq = $.getJSON(location.origin + prependBasePath("/sessions"), function(response) {
if (response && response.total > 0) {
$("#interactive-sessions").load(prependBasePath("/static/html/sessions-table.html .sessions-template"), function() {
loadSessionsTable(response.sessions);
$("#interactive-sessions-table").DataTable();
$('#interactive-sessions [data-toggle="tooltip"]').tooltip();
});
}
numSessions = response.total;
});
var batchesReq = $.getJSON(location.origin + prependBasePath("/batches"), function(response) {
if (response && response.total > 0) {
$("#batches").load(prependBasePath("/static/html/batches-table.html .sessions-template"), function() {
loadBatchesTable(response.sessions);
$("#batches-table").DataTable();
$('#batches [data-toggle="tooltip"]').tooltip();
});
}
numBatches = response.total;
});
$.when(sessionsReq, batchesReq).done(function () {
if (numSessions + numBatches == 0) {
$("#all-sessions").append('<h4>No Sessions or Batches have been created yet.</h4>');
}
});
});
|
None | /.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/art export-ignore
/benchmarks export-ignore
/configdoc export-ignore
/configdoc/usage.xml -crlf
/docs export-ignore
/Doxyfile export-ignore
/extras export-ignore
/INSTALL* export-ignore
/maintenance export-ignore
/NEWS export-ignore
/package.php export-ignore
/plugins export-ignore
/phpdoc.ini export-ignore
/smoketests export-ignore
/test-* export-ignore
/tests export-ignore
/TODO export-ignore
/update-for-release export-ignore
/WHATSNEW export-ignore
/WYSIWYG export-ignore
|
None | /.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/art export-ignore
/benchmarks export-ignore
/configdoc export-ignore
/configdoc/usage.xml -crlf
/docs export-ignore
/Doxyfile export-ignore
/extras export-ignore
/INSTALL* export-ignore
/maintenance export-ignore
/NEWS export-ignore
/package.php export-ignore
/plugins export-ignore
/phpdoc.ini export-ignore
/smoketests export-ignore
/test-* export-ignore
/tests export-ignore
/TODO export-ignore
/update-for-release export-ignore
/WHATSNEW export-ignore
/WYSIWYG export-ignore
|
None | {
"name": "ezyang/htmlpurifier",
"description": "Standards compliant HTML filter written in PHP",
"type": "library",
"keywords": ["html"],
"homepage": "http://htmlpurifier.org/",
"license": "LGPL-2.1-or-later",
"authors": [
{
"name": "Edward Z. Yang",
"email": "admin@htmlpurifier.org",
"homepage": "http://ezyang.com"
}
],
"require": {
"php": ">=5.2"
},
"require-dev": {
"simpletest/simpletest": "dev-master#72de02a7b80c6bb8864ef9bf66d41d2f58f826bd"
},
"autoload": {
"psr-0": { "HTMLPurifier": "library/" },
"files": ["library/HTMLPurifier.composer.php"],
"exclude-from-classmap": [
"/library/HTMLPurifier/Language/"
]
}
}
|
None | {
"name": "ezyang/htmlpurifier",
"description": "Standards compliant HTML filter written in PHP",
"type": "library",
"keywords": ["html"],
"homepage": "http://htmlpurifier.org/",
"license": "LGPL-2.1-or-later",
"authors": [
{
"name": "Edward Z. Yang",
"email": "admin@htmlpurifier.org",
"homepage": "http://ezyang.com"
}
],
"require": {
"php": ">=5.2"
},
"require-dev": {
"simpletest/simpletest": "dev-master#72de02a7b80c6bb8864ef9bf66d41d2f58f826bd"
},
"autoload": {
"psr-0": { "HTMLPurifier": "library/" },
"files": ["library/HTMLPurifier.composer.php"],
"exclude-from-classmap": [
"/library/HTMLPurifier/Language/"
]
}
}
|
None | O:25:"HTMLPurifier_ConfigSchema":3:{s:8:"defaults";a:127:{s:19:"Attr.AllowedClasses";N;s:24:"Attr.AllowedFrameTargets";a:0:{}s:15:"Attr.AllowedRel";a:0:{}s:15:"Attr.AllowedRev";a:0:{}s:18:"Attr.ClassUseCDATA";N;s:20:"Attr.DefaultImageAlt";N;s:24:"Attr.DefaultInvalidImage";s:0:"";s:27:"Attr.DefaultInvalidImageAlt";s:13:"Invalid image";s:19:"Attr.DefaultTextDir";s:3:"ltr";s:13:"Attr.EnableID";b:0;s:21:"Attr.ForbiddenClasses";a:0:{}s:13:"Attr.ID.HTML5";N;s:16:"Attr.IDBlacklist";a:0:{}s:22:"Attr.IDBlacklistRegexp";N;s:13:"Attr.IDPrefix";s:0:"";s:18:"Attr.IDPrefixLocal";s:0:"";s:24:"AutoFormat.AutoParagraph";b:0;s:17:"AutoFormat.Custom";a:0:{}s:25:"AutoFormat.DisplayLinkURI";b:0;s:18:"AutoFormat.Linkify";b:0;s:33:"AutoFormat.PurifierLinkify.DocURL";s:3:"#%s";s:26:"AutoFormat.PurifierLinkify";b:0;s:32:"AutoFormat.RemoveEmpty.Predicate";a:4:{s:8:"colgroup";a:0:{}s:2:"th";a:0:{}s:2:"td";a:0:{}s:6:"iframe";a:1:{i:0;s:3:"src";}}s:44:"AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions";a:2:{s:2:"td";b:1;s:2:"th";b:1;}s:33:"AutoFormat.RemoveEmpty.RemoveNbsp";b:0;s:22:"AutoFormat.RemoveEmpty";b:0;s:39:"AutoFormat.RemoveSpansWithoutAttributes";b:0;s:19:"CSS.AllowDuplicates";b:0;s:18:"CSS.AllowImportant";b:0;s:15:"CSS.AllowTricky";b:0;s:16:"CSS.AllowedFonts";N;s:21:"CSS.AllowedProperties";N;s:17:"CSS.DefinitionRev";i:1;s:23:"CSS.ForbiddenProperties";a:0:{}s:16:"CSS.MaxImgLength";s:6:"1200px";s:15:"CSS.Proprietary";b:0;s:11:"CSS.Trusted";b:0;s:20:"Cache.DefinitionImpl";s:10:"Serializer";s:20:"Cache.SerializerPath";N;s:27:"Cache.SerializerPermissions";i:493;s:22:"Core.AggressivelyFixLt";b:1;s:29:"Core.AggressivelyRemoveScript";b:1;s:28:"Core.AllowHostnameUnderscore";b:0;s:23:"Core.AllowParseManyTags";b:0;s:18:"Core.CollectErrors";b:0;s:18:"Core.ColorKeywords";a:148:{s:9:"aliceblue";s:7:"#F0F8FF";s:12:"antiquewhite";s:7:"#FAEBD7";s:4:"aqua";s:7:"#00FFFF";s:10:"aquamarine";s:7:"#7FFFD4";s:5:"azure";s:7:"#F0FFFF";s:5:"beige";s:7:"#F5F5DC";s:6:"bisque";s:7:"#FFE4C4";s:5:"black";s:7:"#000000";s:14:"blanchedalmond";s:7:"#FFEBCD";s:4:"blue";s:7:"#0000FF";s:10:"blueviolet";s:7:"#8A2BE2";s:5:"brown";s:7:"#A52A2A";s:9:"burlywood";s:7:"#DEB887";s:9:"cadetblue";s:7:"#5F9EA0";s:10:"chartreuse";s:7:"#7FFF00";s:9:"chocolate";s:7:"#D2691E";s:5:"coral";s:7:"#FF7F50";s:14:"cornflowerblue";s:7:"#6495ED";s:8:"cornsilk";s:7:"#FFF8DC";s:7:"crimson";s:7:"#DC143C";s:4:"cyan";s:7:"#00FFFF";s:8:"darkblue";s:7:"#00008B";s:8:"darkcyan";s:7:"#008B8B";s:13:"darkgoldenrod";s:7:"#B8860B";s:8:"darkgray";s:7:"#A9A9A9";s:8:"darkgrey";s:7:"#A9A9A9";s:9:"darkgreen";s:7:"#006400";s:9:"darkkhaki";s:7:"#BDB76B";s:11:"darkmagenta";s:7:"#8B008B";s:14:"darkolivegreen";s:7:"#556B2F";s:10:"darkorange";s:7:"#FF8C00";s:10:"darkorchid";s:7:"#9932CC";s:7:"darkred";s:7:"#8B0000";s:10:"darksalmon";s:7:"#E9967A";s:12:"darkseagreen";s:7:"#8FBC8F";s:13:"darkslateblue";s:7:"#483D8B";s:13:"darkslategray";s:7:"#2F4F4F";s:13:"darkslategrey";s:7:"#2F4F4F";s:13:"darkturquoise";s:7:"#00CED1";s:10:"darkviolet";s:7:"#9400D3";s:8:"deeppink";s:7:"#FF1493";s:11:"deepskyblue";s:7:"#00BFFF";s:7:"dimgray";s:7:"#696969";s:7:"dimgrey";s:7:"#696969";s:10:"dodgerblue";s:7:"#1E90FF";s:9:"firebrick";s:7:"#B22222";s:11:"floralwhite";s:7:"#FFFAF0";s:11:"forestgreen";s:7:"#228B22";s:7:"fuchsia";s:7:"#FF00FF";s:9:"gainsboro";s:7:"#DCDCDC";s:10:"ghostwhite";s:7:"#F8F8FF";s:4:"gold";s:7:"#FFD700";s:9:"goldenrod";s:7:"#DAA520";s:4:"gray";s:7:"#808080";s:4:"grey";s:7:"#808080";s:5:"green";s:7:"#008000";s:11:"greenyellow";s:7:"#ADFF2F";s:8:"honeydew";s:7:"#F0FFF0";s:7:"hotpink";s:7:"#FF69B4";s:9:"indianred";s:7:"#CD5C5C";s:6:"indigo";s:7:"#4B0082";s:5:"ivory";s:7:"#FFFFF0";s:5:"khaki";s:7:"#F0E68C";s:8:"lavender";s:7:"#E6E6FA";s:13:"lavenderblush";s:7:"#FFF0F5";s:9:"lawngreen";s:7:"#7CFC00";s:12:"lemonchiffon";s:7:"#FFFACD";s:9:"lightblue";s:7:"#ADD8E6";s:10:"lightcoral";s:7:"#F08080";s:9:"lightcyan";s:7:"#E0FFFF";s:20:"lightgoldenrodyellow";s:7:"#FAFAD2";s:9:"lightgray";s:7:"#D3D3D3";s:9:"lightgrey";s:7:"#D3D3D3";s:10:"lightgreen";s:7:"#90EE90";s:9:"lightpink";s:7:"#FFB6C1";s:11:"lightsalmon";s:7:"#FFA07A";s:13:"lightseagreen";s:7:"#20B2AA";s:12:"lightskyblue";s:7:"#87CEFA";s:14:"lightslategray";s:7:"#778899";s:14:"lightslategrey";s:7:"#778899";s:14:"lightsteelblue";s:7:"#B0C4DE";s:11:"lightyellow";s:7:"#FFFFE0";s:4:"lime";s:7:"#00FF00";s:9:"limegreen";s:7:"#32CD32";s:5:"linen";s:7:"#FAF0E6";s:7:"magenta";s:7:"#FF00FF";s:6:"maroon";s:7:"#800000";s:16:"mediumaquamarine";s:7:"#66CDAA";s:10:"mediumblue";s:7:"#0000CD";s:12:"mediumorchid";s:7:"#BA55D3";s:12:"mediumpurple";s:7:"#9370DB";s:14:"mediumseagreen";s:7:"#3CB371";s:15:"mediumslateblue";s:7:"#7B68EE";s:17:"mediumspringgreen";s:7:"#00FA9A";s:15:"mediumturquoise";s:7:"#48D1CC";s:15:"mediumvioletred";s:7:"#C71585";s:12:"midnightblue";s:7:"#191970";s:9:"mintcream";s:7:"#F5FFFA";s:9:"mistyrose";s:7:"#FFE4E1";s:8:"moccasin";s:7:"#FFE4B5";s:11:"navajowhite";s:7:"#FFDEAD";s:4:"navy";s:7:"#000080";s:7:"oldlace";s:7:"#FDF5E6";s:5:"olive";s:7:"#808000";s:9:"olivedrab";s:7:"#6B8E23";s:6:"orange";s:7:"#FFA500";s:9:"orangered";s:7:"#FF4500";s:6:"orchid";s:7:"#DA70D6";s:13:"palegoldenrod";s:7:"#EEE8AA";s:9:"palegreen";s:7:"#98FB98";s:13:"paleturquoise";s:7:"#AFEEEE";s:13:"palevioletred";s:7:"#DB7093";s:10:"papayawhip";s:7:"#FFEFD5";s:9:"peachpuff";s:7:"#FFDAB9";s:4:"peru";s:7:"#CD853F";s:4:"pink";s:7:"#FFC0CB";s:4:"plum";s:7:"#DDA0DD";s:10:"powderblue";s:7:"#B0E0E6";s:6:"purple";s:7:"#800080";s:13:"rebeccapurple";s:7:"#663399";s:3:"red";s:7:"#FF0000";s:9:"rosybrown";s:7:"#BC8F8F";s:9:"royalblue";s:7:"#4169E1";s:11:"saddlebrown";s:7:"#8B4513";s:6:"salmon";s:7:"#FA8072";s:10:"sandybrown";s:7:"#F4A460";s:8:"seagreen";s:7:"#2E8B57";s:8:"seashell";s:7:"#FFF5EE";s:6:"sienna";s:7:"#A0522D";s:6:"silver";s:7:"#C0C0C0";s:7:"skyblue";s:7:"#87CEEB";s:9:"slateblue";s:7:"#6A5ACD";s:9:"slategray";s:7:"#708090";s:9:"slategrey";s:7:"#708090";s:4:"snow";s:7:"#FFFAFA";s:11:"springgreen";s:7:"#00FF7F";s:9:"steelblue";s:7:"#4682B4";s:3:"tan";s:7:"#D2B48C";s:4:"teal";s:7:"#008080";s:7:"thistle";s:7:"#D8BFD8";s:6:"tomato";s:7:"#FF6347";s:9:"turquoise";s:7:"#40E0D0";s:6:"violet";s:7:"#EE82EE";s:5:"wheat";s:7:"#F5DEB3";s:5:"white";s:7:"#FFFFFF";s:10:"whitesmoke";s:7:"#F5F5F5";s:6:"yellow";s:7:"#FFFF00";s:11:"yellowgreen";s:7:"#9ACD32";}s:30:"Core.ConvertDocumentToFragment";b:1;s:36:"Core.DirectLexLineNumberSyncInterval";i:0;s:20:"Core.DisableExcludes";b:0;s:15:"Core.EnableIDNA";b:0;s:13:"Core.Encoding";s:5:"utf-8";s:26:"Core.EscapeInvalidChildren";b:0;s:22:"Core.EscapeInvalidTags";b:0;s:29:"Core.EscapeNonASCIICharacters";b:0;s:19:"Core.HiddenElements";a:2:{s:6:"script";b:1;s:5:"style";b:1;}s:13:"Core.Language";s:2:"en";s:24:"Core.LegacyEntityDecoder";b:0;s:14:"Core.LexerImpl";N;s:24:"Core.MaintainLineNumbers";N;s:22:"Core.NormalizeNewlines";b:1;s:21:"Core.RemoveInvalidImg";b:1;s:33:"Core.RemoveProcessingInstructions";b:0;s:25:"Core.RemoveScriptContents";N;s:13:"Filter.Custom";a:0:{}s:34:"Filter.ExtractStyleBlocks.Escaping";b:1;s:31:"Filter.ExtractStyleBlocks.Scope";N;s:34:"Filter.ExtractStyleBlocks.TidyImpl";N;s:25:"Filter.ExtractStyleBlocks";b:0;s:14:"Filter.YouTube";b:0;s:12:"HTML.Allowed";N;s:22:"HTML.AllowedAttributes";N;s:20:"HTML.AllowedComments";a:0:{}s:26:"HTML.AllowedCommentsRegexp";N;s:20:"HTML.AllowedElements";N;s:19:"HTML.AllowedModules";N;s:23:"HTML.Attr.Name.UseCDATA";b:0;s:17:"HTML.BlockWrapper";s:1:"p";s:16:"HTML.CoreModules";a:7:{s:9:"Structure";b:1;s:4:"Text";b:1;s:9:"Hypertext";b:1;s:4:"List";b:1;s:22:"NonXMLCommonAttributes";b:1;s:19:"XMLCommonAttributes";b:1;s:16:"CommonAttributes";b:1;}s:18:"HTML.CustomDoctype";N;s:17:"HTML.DefinitionID";N;s:18:"HTML.DefinitionRev";i:1;s:12:"HTML.Doctype";N;s:25:"HTML.FlashAllowFullScreen";b:0;s:24:"HTML.ForbiddenAttributes";a:0:{}s:22:"HTML.ForbiddenElements";a:0:{}s:10:"HTML.Forms";b:0;s:17:"HTML.MaxImgLength";i:1200;s:13:"HTML.Nofollow";b:0;s:11:"HTML.Parent";s:3:"div";s:16:"HTML.Proprietary";b:0;s:14:"HTML.SafeEmbed";b:0;s:15:"HTML.SafeIframe";b:0;s:15:"HTML.SafeObject";b:0;s:18:"HTML.SafeScripting";a:0:{}s:11:"HTML.Strict";b:0;s:16:"HTML.TargetBlank";b:0;s:19:"HTML.TargetNoopener";b:1;s:21:"HTML.TargetNoreferrer";b:1;s:12:"HTML.TidyAdd";a:0:{}s:14:"HTML.TidyLevel";s:6:"medium";s:15:"HTML.TidyRemove";a:0:{}s:12:"HTML.Trusted";b:0;s:10:"HTML.XHTML";b:1;s:28:"Output.CommentScriptContents";b:1;s:19:"Output.FixInnerHTML";b:1;s:18:"Output.FlashCompat";b:0;s:14:"Output.Newline";N;s:15:"Output.SortAttr";b:0;s:17:"Output.TidyFormat";b:0;s:17:"Test.ForceNoIconv";b:0;s:18:"URI.AllowedSchemes";a:7:{s:4:"http";b:1;s:5:"https";b:1;s:6:"mailto";b:1;s:3:"ftp";b:1;s:4:"nntp";b:1;s:4:"news";b:1;s:3:"tel";b:1;}s:8:"URI.Base";N;s:17:"URI.DefaultScheme";s:4:"http";s:16:"URI.DefinitionID";N;s:17:"URI.DefinitionRev";i:1;s:11:"URI.Disable";b:0;s:19:"URI.DisableExternal";b:0;s:28:"URI.DisableExternalResources";b:0;s:20:"URI.DisableResources";b:0;s:8:"URI.Host";N;s:17:"URI.HostBlacklist";a:0:{}s:16:"URI.MakeAbsolute";b:0;s:9:"URI.Munge";N;s:18:"URI.MungeResources";b:0;s:18:"URI.MungeSecretKey";N;s:26:"URI.OverrideAllowedSchemes";b:1;s:20:"URI.SafeIframeRegexp";N;}s:12:"defaultPlist";O:25:"HTMLPurifier_PropertyList":3:{s:7:" |
None | O:25:"HTMLPurifier_ConfigSchema":3:{s:8:"defaults";a:127:{s:19:"Attr.AllowedClasses";N;s:24:"Attr.AllowedFrameTargets";a:0:{}s:15:"Attr.AllowedRel";a:0:{}s:15:"Attr.AllowedRev";a:0:{}s:18:"Attr.ClassUseCDATA";N;s:20:"Attr.DefaultImageAlt";N;s:24:"Attr.DefaultInvalidImage";s:0:"";s:27:"Attr.DefaultInvalidImageAlt";s:13:"Invalid image";s:19:"Attr.DefaultTextDir";s:3:"ltr";s:13:"Attr.EnableID";b:0;s:21:"Attr.ForbiddenClasses";a:0:{}s:13:"Attr.ID.HTML5";N;s:16:"Attr.IDBlacklist";a:0:{}s:22:"Attr.IDBlacklistRegexp";N;s:13:"Attr.IDPrefix";s:0:"";s:18:"Attr.IDPrefixLocal";s:0:"";s:24:"AutoFormat.AutoParagraph";b:0;s:17:"AutoFormat.Custom";a:0:{}s:25:"AutoFormat.DisplayLinkURI";b:0;s:18:"AutoFormat.Linkify";b:0;s:33:"AutoFormat.PurifierLinkify.DocURL";s:3:"#%s";s:26:"AutoFormat.PurifierLinkify";b:0;s:32:"AutoFormat.RemoveEmpty.Predicate";a:4:{s:8:"colgroup";a:0:{}s:2:"th";a:0:{}s:2:"td";a:0:{}s:6:"iframe";a:1:{i:0;s:3:"src";}}s:44:"AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions";a:2:{s:2:"td";b:1;s:2:"th";b:1;}s:33:"AutoFormat.RemoveEmpty.RemoveNbsp";b:0;s:22:"AutoFormat.RemoveEmpty";b:0;s:39:"AutoFormat.RemoveSpansWithoutAttributes";b:0;s:19:"CSS.AllowDuplicates";b:0;s:18:"CSS.AllowImportant";b:0;s:15:"CSS.AllowTricky";b:0;s:16:"CSS.AllowedFonts";N;s:21:"CSS.AllowedProperties";N;s:17:"CSS.DefinitionRev";i:1;s:23:"CSS.ForbiddenProperties";a:0:{}s:16:"CSS.MaxImgLength";s:6:"1200px";s:15:"CSS.Proprietary";b:0;s:11:"CSS.Trusted";b:0;s:20:"Cache.DefinitionImpl";s:10:"Serializer";s:20:"Cache.SerializerPath";N;s:27:"Cache.SerializerPermissions";i:493;s:22:"Core.AggressivelyFixLt";b:1;s:29:"Core.AggressivelyRemoveScript";b:1;s:28:"Core.AllowHostnameUnderscore";b:0;s:23:"Core.AllowParseManyTags";b:0;s:18:"Core.CollectErrors";b:0;s:18:"Core.ColorKeywords";a:148:{s:9:"aliceblue";s:7:"#F0F8FF";s:12:"antiquewhite";s:7:"#FAEBD7";s:4:"aqua";s:7:"#00FFFF";s:10:"aquamarine";s:7:"#7FFFD4";s:5:"azure";s:7:"#F0FFFF";s:5:"beige";s:7:"#F5F5DC";s:6:"bisque";s:7:"#FFE4C4";s:5:"black";s:7:"#000000";s:14:"blanchedalmond";s:7:"#FFEBCD";s:4:"blue";s:7:"#0000FF";s:10:"blueviolet";s:7:"#8A2BE2";s:5:"brown";s:7:"#A52A2A";s:9:"burlywood";s:7:"#DEB887";s:9:"cadetblue";s:7:"#5F9EA0";s:10:"chartreuse";s:7:"#7FFF00";s:9:"chocolate";s:7:"#D2691E";s:5:"coral";s:7:"#FF7F50";s:14:"cornflowerblue";s:7:"#6495ED";s:8:"cornsilk";s:7:"#FFF8DC";s:7:"crimson";s:7:"#DC143C";s:4:"cyan";s:7:"#00FFFF";s:8:"darkblue";s:7:"#00008B";s:8:"darkcyan";s:7:"#008B8B";s:13:"darkgoldenrod";s:7:"#B8860B";s:8:"darkgray";s:7:"#A9A9A9";s:8:"darkgrey";s:7:"#A9A9A9";s:9:"darkgreen";s:7:"#006400";s:9:"darkkhaki";s:7:"#BDB76B";s:11:"darkmagenta";s:7:"#8B008B";s:14:"darkolivegreen";s:7:"#556B2F";s:10:"darkorange";s:7:"#FF8C00";s:10:"darkorchid";s:7:"#9932CC";s:7:"darkred";s:7:"#8B0000";s:10:"darksalmon";s:7:"#E9967A";s:12:"darkseagreen";s:7:"#8FBC8F";s:13:"darkslateblue";s:7:"#483D8B";s:13:"darkslategray";s:7:"#2F4F4F";s:13:"darkslategrey";s:7:"#2F4F4F";s:13:"darkturquoise";s:7:"#00CED1";s:10:"darkviolet";s:7:"#9400D3";s:8:"deeppink";s:7:"#FF1493";s:11:"deepskyblue";s:7:"#00BFFF";s:7:"dimgray";s:7:"#696969";s:7:"dimgrey";s:7:"#696969";s:10:"dodgerblue";s:7:"#1E90FF";s:9:"firebrick";s:7:"#B22222";s:11:"floralwhite";s:7:"#FFFAF0";s:11:"forestgreen";s:7:"#228B22";s:7:"fuchsia";s:7:"#FF00FF";s:9:"gainsboro";s:7:"#DCDCDC";s:10:"ghostwhite";s:7:"#F8F8FF";s:4:"gold";s:7:"#FFD700";s:9:"goldenrod";s:7:"#DAA520";s:4:"gray";s:7:"#808080";s:4:"grey";s:7:"#808080";s:5:"green";s:7:"#008000";s:11:"greenyellow";s:7:"#ADFF2F";s:8:"honeydew";s:7:"#F0FFF0";s:7:"hotpink";s:7:"#FF69B4";s:9:"indianred";s:7:"#CD5C5C";s:6:"indigo";s:7:"#4B0082";s:5:"ivory";s:7:"#FFFFF0";s:5:"khaki";s:7:"#F0E68C";s:8:"lavender";s:7:"#E6E6FA";s:13:"lavenderblush";s:7:"#FFF0F5";s:9:"lawngreen";s:7:"#7CFC00";s:12:"lemonchiffon";s:7:"#FFFACD";s:9:"lightblue";s:7:"#ADD8E6";s:10:"lightcoral";s:7:"#F08080";s:9:"lightcyan";s:7:"#E0FFFF";s:20:"lightgoldenrodyellow";s:7:"#FAFAD2";s:9:"lightgray";s:7:"#D3D3D3";s:9:"lightgrey";s:7:"#D3D3D3";s:10:"lightgreen";s:7:"#90EE90";s:9:"lightpink";s:7:"#FFB6C1";s:11:"lightsalmon";s:7:"#FFA07A";s:13:"lightseagreen";s:7:"#20B2AA";s:12:"lightskyblue";s:7:"#87CEFA";s:14:"lightslategray";s:7:"#778899";s:14:"lightslategrey";s:7:"#778899";s:14:"lightsteelblue";s:7:"#B0C4DE";s:11:"lightyellow";s:7:"#FFFFE0";s:4:"lime";s:7:"#00FF00";s:9:"limegreen";s:7:"#32CD32";s:5:"linen";s:7:"#FAF0E6";s:7:"magenta";s:7:"#FF00FF";s:6:"maroon";s:7:"#800000";s:16:"mediumaquamarine";s:7:"#66CDAA";s:10:"mediumblue";s:7:"#0000CD";s:12:"mediumorchid";s:7:"#BA55D3";s:12:"mediumpurple";s:7:"#9370DB";s:14:"mediumseagreen";s:7:"#3CB371";s:15:"mediumslateblue";s:7:"#7B68EE";s:17:"mediumspringgreen";s:7:"#00FA9A";s:15:"mediumturquoise";s:7:"#48D1CC";s:15:"mediumvioletred";s:7:"#C71585";s:12:"midnightblue";s:7:"#191970";s:9:"mintcream";s:7:"#F5FFFA";s:9:"mistyrose";s:7:"#FFE4E1";s:8:"moccasin";s:7:"#FFE4B5";s:11:"navajowhite";s:7:"#FFDEAD";s:4:"navy";s:7:"#000080";s:7:"oldlace";s:7:"#FDF5E6";s:5:"olive";s:7:"#808000";s:9:"olivedrab";s:7:"#6B8E23";s:6:"orange";s:7:"#FFA500";s:9:"orangered";s:7:"#FF4500";s:6:"orchid";s:7:"#DA70D6";s:13:"palegoldenrod";s:7:"#EEE8AA";s:9:"palegreen";s:7:"#98FB98";s:13:"paleturquoise";s:7:"#AFEEEE";s:13:"palevioletred";s:7:"#DB7093";s:10:"papayawhip";s:7:"#FFEFD5";s:9:"peachpuff";s:7:"#FFDAB9";s:4:"peru";s:7:"#CD853F";s:4:"pink";s:7:"#FFC0CB";s:4:"plum";s:7:"#DDA0DD";s:10:"powderblue";s:7:"#B0E0E6";s:6:"purple";s:7:"#800080";s:13:"rebeccapurple";s:7:"#663399";s:3:"red";s:7:"#FF0000";s:9:"rosybrown";s:7:"#BC8F8F";s:9:"royalblue";s:7:"#4169E1";s:11:"saddlebrown";s:7:"#8B4513";s:6:"salmon";s:7:"#FA8072";s:10:"sandybrown";s:7:"#F4A460";s:8:"seagreen";s:7:"#2E8B57";s:8:"seashell";s:7:"#FFF5EE";s:6:"sienna";s:7:"#A0522D";s:6:"silver";s:7:"#C0C0C0";s:7:"skyblue";s:7:"#87CEEB";s:9:"slateblue";s:7:"#6A5ACD";s:9:"slategray";s:7:"#708090";s:9:"slategrey";s:7:"#708090";s:4:"snow";s:7:"#FFFAFA";s:11:"springgreen";s:7:"#00FF7F";s:9:"steelblue";s:7:"#4682B4";s:3:"tan";s:7:"#D2B48C";s:4:"teal";s:7:"#008080";s:7:"thistle";s:7:"#D8BFD8";s:6:"tomato";s:7:"#FF6347";s:9:"turquoise";s:7:"#40E0D0";s:6:"violet";s:7:"#EE82EE";s:5:"wheat";s:7:"#F5DEB3";s:5:"white";s:7:"#FFFFFF";s:10:"whitesmoke";s:7:"#F5F5F5";s:6:"yellow";s:7:"#FFFF00";s:11:"yellowgreen";s:7:"#9ACD32";}s:30:"Core.ConvertDocumentToFragment";b:1;s:36:"Core.DirectLexLineNumberSyncInterval";i:0;s:20:"Core.DisableExcludes";b:0;s:15:"Core.EnableIDNA";b:0;s:13:"Core.Encoding";s:5:"utf-8";s:26:"Core.EscapeInvalidChildren";b:0;s:22:"Core.EscapeInvalidTags";b:0;s:29:"Core.EscapeNonASCIICharacters";b:0;s:19:"Core.HiddenElements";a:2:{s:6:"script";b:1;s:5:"style";b:1;}s:13:"Core.Language";s:2:"en";s:24:"Core.LegacyEntityDecoder";b:0;s:14:"Core.LexerImpl";N;s:24:"Core.MaintainLineNumbers";N;s:22:"Core.NormalizeNewlines";b:1;s:21:"Core.RemoveInvalidImg";b:1;s:33:"Core.RemoveProcessingInstructions";b:0;s:25:"Core.RemoveScriptContents";N;s:13:"Filter.Custom";a:0:{}s:34:"Filter.ExtractStyleBlocks.Escaping";b:1;s:31:"Filter.ExtractStyleBlocks.Scope";N;s:34:"Filter.ExtractStyleBlocks.TidyImpl";N;s:25:"Filter.ExtractStyleBlocks";b:0;s:14:"Filter.YouTube";b:0;s:12:"HTML.Allowed";N;s:22:"HTML.AllowedAttributes";N;s:20:"HTML.AllowedComments";a:0:{}s:26:"HTML.AllowedCommentsRegexp";N;s:20:"HTML.AllowedElements";N;s:19:"HTML.AllowedModules";N;s:23:"HTML.Attr.Name.UseCDATA";b:0;s:17:"HTML.BlockWrapper";s:1:"p";s:16:"HTML.CoreModules";a:7:{s:9:"Structure";b:1;s:4:"Text";b:1;s:9:"Hypertext";b:1;s:4:"List";b:1;s:22:"NonXMLCommonAttributes";b:1;s:19:"XMLCommonAttributes";b:1;s:16:"CommonAttributes";b:1;}s:18:"HTML.CustomDoctype";N;s:17:"HTML.DefinitionID";N;s:18:"HTML.DefinitionRev";i:1;s:12:"HTML.Doctype";N;s:25:"HTML.FlashAllowFullScreen";b:0;s:24:"HTML.ForbiddenAttributes";a:0:{}s:22:"HTML.ForbiddenElements";a:0:{}s:10:"HTML.Forms";b:0;s:17:"HTML.MaxImgLength";i:1200;s:13:"HTML.Nofollow";b:0;s:11:"HTML.Parent";s:3:"div";s:16:"HTML.Proprietary";b:0;s:14:"HTML.SafeEmbed";b:0;s:15:"HTML.SafeIframe";b:0;s:15:"HTML.SafeObject";b:0;s:18:"HTML.SafeScripting";a:0:{}s:11:"HTML.Strict";b:0;s:16:"HTML.TargetBlank";b:0;s:19:"HTML.TargetNoopener";b:1;s:21:"HTML.TargetNoreferrer";b:1;s:12:"HTML.TidyAdd";a:0:{}s:14:"HTML.TidyLevel";s:6:"medium";s:15:"HTML.TidyRemove";a:0:{}s:12:"HTML.Trusted";b:0;s:10:"HTML.XHTML";b:1;s:28:"Output.CommentScriptContents";b:1;s:19:"Output.FixInnerHTML";b:1;s:18:"Output.FlashCompat";b:0;s:14:"Output.Newline";N;s:15:"Output.SortAttr";b:0;s:17:"Output.TidyFormat";b:0;s:17:"Test.ForceNoIconv";b:0;s:18:"URI.AllowedSchemes";a:7:{s:4:"http";b:1;s:5:"https";b:1;s:6:"mailto";b:1;s:3:"ftp";b:1;s:4:"nntp";b:1;s:4:"news";b:1;s:3:"tel";b:1;}s:8:"URI.Base";N;s:17:"URI.DefaultScheme";s:4:"http";s:16:"URI.DefinitionID";N;s:17:"URI.DefinitionRev";i:1;s:11:"URI.Disable";b:0;s:19:"URI.DisableExternal";b:0;s:28:"URI.DisableExternalResources";b:0;s:20:"URI.DisableResources";b:0;s:8:"URI.Host";N;s:17:"URI.HostBlacklist";a:0:{}s:16:"URI.MakeAbsolute";b:0;s:9:"URI.Munge";N;s:18:"URI.MungeResources";b:0;s:18:"URI.MungeSecretKey";N;s:26:"URI.OverrideAllowedSchemes";b:1;s:20:"URI.SafeIframeRegexp";N;}s:12:"defaultPlist";O:25:"HTMLPurifier_PropertyList":3:{s:7:" |
None | Attr.ClassUseCDATA
TYPE: bool/null
DEFAULT: null
VERSION: 4.0.0
--DESCRIPTION--
If null, class will auto-detect the doctype and, if matching XHTML 1.1 or
XHTML 2.0, will use the restrictive NMTOKENS specification of class. Otherwise,
it will use a relaxed CDATA definition. If true, the relaxed CDATA definition
is forced; if false, the NMTOKENS definition is forced. To get behavior
of HTML Purifier prior to 4.0.0, set this directive to false.
Some rational behind the auto-detection:
in previous versions of HTML Purifier, it was assumed that the form of
class was NMTOKENS, as specified by the XHTML Modularization (representing
XHTML 1.1 and XHTML 2.0). The DTDs for HTML 4.01 and XHTML 1.0, however
specify class as CDATA. HTML 5 effectively defines it as CDATA, but
with the additional constraint that each name should be unique (this is not
explicitly outlined in previous specifications).
--# vim: et sw=4 sts=4
|
None | Attr.ClassUseCDATA
TYPE: bool/null
DEFAULT: null
VERSION: 4.0.0
--DESCRIPTION--
If null, class will auto-detect the doctype and, if matching XHTML 1.1 or
XHTML 2.0, will use the restrictive NMTOKENS specification of class. Otherwise,
it will use a relaxed CDATA definition. If true, the relaxed CDATA definition
is forced; if false, the NMTOKENS definition is forced. To get behavior
of HTML Purifier prior to 4.0.0, set this directive to false.
Some rational behind the auto-detection:
in previous versions of HTML Purifier, it was assumed that the form of
class was NMTOKENS, as specified by the XHTML Modularization (representing
XHTML 1.1 and XHTML 2.0). The DTDs for HTML 4.01 and XHTML 1.0, however
specify class as CDATA. HTML 5 effectively defines it as CDATA, but
with the additional constraint that each name should be unique (this is not
explicitly outlined in previous specifications).
--# vim: et sw=4 sts=4
|
None | URI.Base
TYPE: string/null
VERSION: 2.1.0
DEFAULT: NULL
--DESCRIPTION--
<p>
The base URI is the URI of the document this purified HTML will be
inserted into. This information is important if HTML Purifier needs
to calculate absolute URIs from relative URIs, such as when %URI.MakeAbsolute
is on. You may use a non-absolute URI for this value, but behavior
may vary (%URI.MakeAbsolute deals nicely with both absolute and
relative paths, but forwards-compatibility is not guaranteed).
<strong>Warning:</strong> If set, the scheme on this URI
overrides the one specified by %URI.DefaultScheme.
</p>
--# vim: et sw=4 sts=4
|
None | URI.Base
TYPE: string/null
VERSION: 2.1.0
DEFAULT: NULL
--DESCRIPTION--
<p>
The base URI is the URI of the document this purified HTML will be
inserted into. This information is important if HTML Purifier needs
to calculate absolute URIs from relative URIs, such as when %URI.MakeAbsolute
is on. You may use a non-absolute URI for this value, but behavior
may vary (%URI.MakeAbsolute deals nicely with both absolute and
relative paths, but forwards-compatibility is not guaranteed).
<strong>Warning:</strong> If set, the scheme on this URI
overrides the one specified by %URI.DefaultScheme.
</p>
--# vim: et sw=4 sts=4
|
None | a:253:{s:4:"fnof";s:2:"ƒ";s:5:"Alpha";s:2:"Α";s:4:"Beta";s:2:"Β";s:5:"Gamma";s:2:"Γ";s:5:"Delta";s:2:"Δ";s:7:"Epsilon";s:2:"Ε";s:4:"Zeta";s:2:"Ζ";s:3:"Eta";s:2:"Η";s:5:"Theta";s:2:"Θ";s:4:"Iota";s:2:"Ι";s:5:"Kappa";s:2:"Κ";s:6:"Lambda";s:2:"Λ";s:2:"Mu";s:2:"Μ";s:2:"Nu";s:2:"Ν";s:2:"Xi";s:2:"Ξ";s:7:"Omicron";s:2:"Ο";s:2:"Pi";s:2:"Π";s:3:"Rho";s:2:"Ρ";s:5:"Sigma";s:2:"Σ";s:3:"Tau";s:2:"Τ";s:7:"Upsilon";s:2:"Υ";s:3:"Phi";s:2:"Φ";s:3:"Chi";s:2:"Χ";s:3:"Psi";s:2:"Ψ";s:5:"Omega";s:2:"Ω";s:5:"alpha";s:2:"α";s:4:"beta";s:2:"β";s:5:"gamma";s:2:"γ";s:5:"delta";s:2:"δ";s:7:"epsilon";s:2:"ε";s:4:"zeta";s:2:"ζ";s:3:"eta";s:2:"η";s:5:"theta";s:2:"θ";s:4:"iota";s:2:"ι";s:5:"kappa";s:2:"κ";s:6:"lambda";s:2:"λ";s:2:"mu";s:2:"μ";s:2:"nu";s:2:"ν";s:2:"xi";s:2:"ξ";s:7:"omicron";s:2:"ο";s:2:"pi";s:2:"π";s:3:"rho";s:2:"ρ";s:6:"sigmaf";s:2:"ς";s:5:"sigma";s:2:"σ";s:3:"tau";s:2:"τ";s:7:"upsilon";s:2:"υ";s:3:"phi";s:2:"φ";s:3:"chi";s:2:"χ";s:3:"psi";s:2:"ψ";s:5:"omega";s:2:"ω";s:8:"thetasym";s:2:"ϑ";s:5:"upsih";s:2:"ϒ";s:3:"piv";s:2:"ϖ";s:4:"bull";s:3:"•";s:6:"hellip";s:3:"…";s:5:"prime";s:3:"′";s:5:"Prime";s:3:"″";s:5:"oline";s:3:"‾";s:5:"frasl";s:3:"⁄";s:6:"weierp";s:3:"℘";s:5:"image";s:3:"ℑ";s:4:"real";s:3:"ℜ";s:5:"trade";s:3:"™";s:7:"alefsym";s:3:"ℵ";s:4:"larr";s:3:"←";s:4:"uarr";s:3:"↑";s:4:"rarr";s:3:"→";s:4:"darr";s:3:"↓";s:4:"harr";s:3:"↔";s:5:"crarr";s:3:"↵";s:4:"lArr";s:3:"⇐";s:4:"uArr";s:3:"⇑";s:4:"rArr";s:3:"⇒";s:4:"dArr";s:3:"⇓";s:4:"hArr";s:3:"⇔";s:6:"forall";s:3:"∀";s:4:"part";s:3:"∂";s:5:"exist";s:3:"∃";s:5:"empty";s:3:"∅";s:5:"nabla";s:3:"∇";s:4:"isin";s:3:"∈";s:5:"notin";s:3:"∉";s:2:"ni";s:3:"∋";s:4:"prod";s:3:"∏";s:3:"sum";s:3:"∑";s:5:"minus";s:3:"−";s:6:"lowast";s:3:"∗";s:5:"radic";s:3:"√";s:4:"prop";s:3:"∝";s:5:"infin";s:3:"∞";s:3:"ang";s:3:"∠";s:3:"and";s:3:"∧";s:2:"or";s:3:"∨";s:3:"cap";s:3:"∩";s:3:"cup";s:3:"∪";s:3:"int";s:3:"∫";s:6:"there4";s:3:"∴";s:3:"sim";s:3:"∼";s:4:"cong";s:3:"≅";s:5:"asymp";s:3:"≈";s:2:"ne";s:3:"≠";s:5:"equiv";s:3:"≡";s:2:"le";s:3:"≤";s:2:"ge";s:3:"≥";s:3:"sub";s:3:"⊂";s:3:"sup";s:3:"⊃";s:4:"nsub";s:3:"⊄";s:4:"sube";s:3:"⊆";s:4:"supe";s:3:"⊇";s:5:"oplus";s:3:"⊕";s:6:"otimes";s:3:"⊗";s:4:"perp";s:3:"⊥";s:4:"sdot";s:3:"⋅";s:5:"lceil";s:3:"⌈";s:5:"rceil";s:3:"⌉";s:6:"lfloor";s:3:"⌊";s:6:"rfloor";s:3:"⌋";s:4:"lang";s:3:"〈";s:4:"rang";s:3:"〉";s:3:"loz";s:3:"◊";s:6:"spades";s:3:"♠";s:5:"clubs";s:3:"♣";s:6:"hearts";s:3:"♥";s:5:"diams";s:3:"♦";s:4:"quot";s:1:""";s:3:"amp";s:1:"&";s:2:"lt";s:1:"<";s:2:"gt";s:1:">";s:4:"apos";s:1:"'";s:5:"OElig";s:2:"Œ";s:5:"oelig";s:2:"œ";s:6:"Scaron";s:2:"Š";s:6:"scaron";s:2:"š";s:4:"Yuml";s:2:"Ÿ";s:4:"circ";s:2:"ˆ";s:5:"tilde";s:2:"˜";s:4:"ensp";s:3:" ";s:4:"emsp";s:3:" ";s:6:"thinsp";s:3:" ";s:4:"zwnj";s:3:"";s:3:"zwj";s:3:"";s:3:"lrm";s:3:"";s:3:"rlm";s:3:"";s:5:"ndash";s:3:"–";s:5:"mdash";s:3:"—";s:5:"lsquo";s:3:"‘";s:5:"rsquo";s:3:"’";s:5:"sbquo";s:3:"‚";s:5:"ldquo";s:3:"“";s:5:"rdquo";s:3:"”";s:5:"bdquo";s:3:"„";s:6:"dagger";s:3:"†";s:6:"Dagger";s:3:"‡";s:6:"permil";s:3:"‰";s:6:"lsaquo";s:3:"‹";s:6:"rsaquo";s:3:"›";s:4:"euro";s:3:"€";s:4:"nbsp";s:2:" ";s:5:"iexcl";s:2:"¡";s:4:"cent";s:2:"¢";s:5:"pound";s:2:"£";s:6:"curren";s:2:"¤";s:3:"yen";s:2:"¥";s:6:"brvbar";s:2:"¦";s:4:"sect";s:2:"§";s:3:"uml";s:2:"¨";s:4:"copy";s:2:"©";s:4:"ordf";s:2:"ª";s:5:"laquo";s:2:"«";s:3:"not";s:2:"¬";s:3:"shy";s:2:"";s:3:"reg";s:2:"®";s:4:"macr";s:2:"¯";s:3:"deg";s:2:"°";s:6:"plusmn";s:2:"±";s:4:"sup2";s:2:"²";s:4:"sup3";s:2:"³";s:5:"acute";s:2:"´";s:5:"micro";s:2:"µ";s:4:"para";s:2:"¶";s:6:"middot";s:2:"·";s:5:"cedil";s:2:"¸";s:4:"sup1";s:2:"¹";s:4:"ordm";s:2:"º";s:5:"raquo";s:2:"»";s:6:"frac14";s:2:"¼";s:6:"frac12";s:2:"½";s:6:"frac34";s:2:"¾";s:6:"iquest";s:2:"¿";s:6:"Agrave";s:2:"À";s:6:"Aacute";s:2:"Á";s:5:"Acirc";s:2:"Â";s:6:"Atilde";s:2:"Ã";s:4:"Auml";s:2:"Ä";s:5:"Aring";s:2:"Å";s:5:"AElig";s:2:"Æ";s:6:"Ccedil";s:2:"Ç";s:6:"Egrave";s:2:"È";s:6:"Eacute";s:2:"É";s:5:"Ecirc";s:2:"Ê";s:4:"Euml";s:2:"Ë";s:6:"Igrave";s:2:"Ì";s:6:"Iacute";s:2:"Í";s:5:"Icirc";s:2:"Î";s:4:"Iuml";s:2:"Ï";s:3:"ETH";s:2:"Ð";s:6:"Ntilde";s:2:"Ñ";s:6:"Ograve";s:2:"Ò";s:6:"Oacute";s:2:"Ó";s:5:"Ocirc";s:2:"Ô";s:6:"Otilde";s:2:"Õ";s:4:"Ouml";s:2:"Ö";s:5:"times";s:2:"×";s:6:"Oslash";s:2:"Ø";s:6:"Ugrave";s:2:"Ù";s:6:"Uacute";s:2:"Ú";s:5:"Ucirc";s:2:"Û";s:4:"Uuml";s:2:"Ü";s:6:"Yacute";s:2:"Ý";s:5:"THORN";s:2:"Þ";s:5:"szlig";s:2:"ß";s:6:"agrave";s:2:"à";s:6:"aacute";s:2:"á";s:5:"acirc";s:2:"â";s:6:"atilde";s:2:"ã";s:4:"auml";s:2:"ä";s:5:"aring";s:2:"å";s:5:"aelig";s:2:"æ";s:6:"ccedil";s:2:"ç";s:6:"egrave";s:2:"è";s:6:"eacute";s:2:"é";s:5:"ecirc";s:2:"ê";s:4:"euml";s:2:"ë";s:6:"igrave";s:2:"ì";s:6:"iacute";s:2:"í";s:5:"icirc";s:2:"î";s:4:"iuml";s:2:"ï";s:3:"eth";s:2:"ð";s:6:"ntilde";s:2:"ñ";s:6:"ograve";s:2:"ò";s:6:"oacute";s:2:"ó";s:5:"ocirc";s:2:"ô";s:6:"otilde";s:2:"õ";s:4:"ouml";s:2:"ö";s:6:"divide";s:2:"÷";s:6:"oslash";s:2:"ø";s:6:"ugrave";s:2:"ù";s:6:"uacute";s:2:"ú";s:5:"ucirc";s:2:"û";s:4:"uuml";s:2:"ü";s:6:"yacute";s:2:"ý";s:5:"thorn";s:2:"þ";s:4:"yuml";s:2:"ÿ";} |
None | a:253:{s:4:"fnof";s:2:"ƒ";s:5:"Alpha";s:2:"Α";s:4:"Beta";s:2:"Β";s:5:"Gamma";s:2:"Γ";s:5:"Delta";s:2:"Δ";s:7:"Epsilon";s:2:"Ε";s:4:"Zeta";s:2:"Ζ";s:3:"Eta";s:2:"Η";s:5:"Theta";s:2:"Θ";s:4:"Iota";s:2:"Ι";s:5:"Kappa";s:2:"Κ";s:6:"Lambda";s:2:"Λ";s:2:"Mu";s:2:"Μ";s:2:"Nu";s:2:"Ν";s:2:"Xi";s:2:"Ξ";s:7:"Omicron";s:2:"Ο";s:2:"Pi";s:2:"Π";s:3:"Rho";s:2:"Ρ";s:5:"Sigma";s:2:"Σ";s:3:"Tau";s:2:"Τ";s:7:"Upsilon";s:2:"Υ";s:3:"Phi";s:2:"Φ";s:3:"Chi";s:2:"Χ";s:3:"Psi";s:2:"Ψ";s:5:"Omega";s:2:"Ω";s:5:"alpha";s:2:"α";s:4:"beta";s:2:"β";s:5:"gamma";s:2:"γ";s:5:"delta";s:2:"δ";s:7:"epsilon";s:2:"ε";s:4:"zeta";s:2:"ζ";s:3:"eta";s:2:"η";s:5:"theta";s:2:"θ";s:4:"iota";s:2:"ι";s:5:"kappa";s:2:"κ";s:6:"lambda";s:2:"λ";s:2:"mu";s:2:"μ";s:2:"nu";s:2:"ν";s:2:"xi";s:2:"ξ";s:7:"omicron";s:2:"ο";s:2:"pi";s:2:"π";s:3:"rho";s:2:"ρ";s:6:"sigmaf";s:2:"ς";s:5:"sigma";s:2:"σ";s:3:"tau";s:2:"τ";s:7:"upsilon";s:2:"υ";s:3:"phi";s:2:"φ";s:3:"chi";s:2:"χ";s:3:"psi";s:2:"ψ";s:5:"omega";s:2:"ω";s:8:"thetasym";s:2:"ϑ";s:5:"upsih";s:2:"ϒ";s:3:"piv";s:2:"ϖ";s:4:"bull";s:3:"•";s:6:"hellip";s:3:"…";s:5:"prime";s:3:"′";s:5:"Prime";s:3:"″";s:5:"oline";s:3:"‾";s:5:"frasl";s:3:"⁄";s:6:"weierp";s:3:"℘";s:5:"image";s:3:"ℑ";s:4:"real";s:3:"ℜ";s:5:"trade";s:3:"™";s:7:"alefsym";s:3:"ℵ";s:4:"larr";s:3:"←";s:4:"uarr";s:3:"↑";s:4:"rarr";s:3:"→";s:4:"darr";s:3:"↓";s:4:"harr";s:3:"↔";s:5:"crarr";s:3:"↵";s:4:"lArr";s:3:"⇐";s:4:"uArr";s:3:"⇑";s:4:"rArr";s:3:"⇒";s:4:"dArr";s:3:"⇓";s:4:"hArr";s:3:"⇔";s:6:"forall";s:3:"∀";s:4:"part";s:3:"∂";s:5:"exist";s:3:"∃";s:5:"empty";s:3:"∅";s:5:"nabla";s:3:"∇";s:4:"isin";s:3:"∈";s:5:"notin";s:3:"∉";s:2:"ni";s:3:"∋";s:4:"prod";s:3:"∏";s:3:"sum";s:3:"∑";s:5:"minus";s:3:"−";s:6:"lowast";s:3:"∗";s:5:"radic";s:3:"√";s:4:"prop";s:3:"∝";s:5:"infin";s:3:"∞";s:3:"ang";s:3:"∠";s:3:"and";s:3:"∧";s:2:"or";s:3:"∨";s:3:"cap";s:3:"∩";s:3:"cup";s:3:"∪";s:3:"int";s:3:"∫";s:6:"there4";s:3:"∴";s:3:"sim";s:3:"∼";s:4:"cong";s:3:"≅";s:5:"asymp";s:3:"≈";s:2:"ne";s:3:"≠";s:5:"equiv";s:3:"≡";s:2:"le";s:3:"≤";s:2:"ge";s:3:"≥";s:3:"sub";s:3:"⊂";s:3:"sup";s:3:"⊃";s:4:"nsub";s:3:"⊄";s:4:"sube";s:3:"⊆";s:4:"supe";s:3:"⊇";s:5:"oplus";s:3:"⊕";s:6:"otimes";s:3:"⊗";s:4:"perp";s:3:"⊥";s:4:"sdot";s:3:"⋅";s:5:"lceil";s:3:"⌈";s:5:"rceil";s:3:"⌉";s:6:"lfloor";s:3:"⌊";s:6:"rfloor";s:3:"⌋";s:4:"lang";s:3:"〈";s:4:"rang";s:3:"〉";s:3:"loz";s:3:"◊";s:6:"spades";s:3:"♠";s:5:"clubs";s:3:"♣";s:6:"hearts";s:3:"♥";s:5:"diams";s:3:"♦";s:4:"quot";s:1:""";s:3:"amp";s:1:"&";s:2:"lt";s:1:"<";s:2:"gt";s:1:">";s:4:"apos";s:1:"'";s:5:"OElig";s:2:"Œ";s:5:"oelig";s:2:"œ";s:6:"Scaron";s:2:"Š";s:6:"scaron";s:2:"š";s:4:"Yuml";s:2:"Ÿ";s:4:"circ";s:2:"ˆ";s:5:"tilde";s:2:"˜";s:4:"ensp";s:3:" ";s:4:"emsp";s:3:" ";s:6:"thinsp";s:3:" ";s:4:"zwnj";s:3:"";s:3:"zwj";s:3:"";s:3:"lrm";s:3:"";s:3:"rlm";s:3:"";s:5:"ndash";s:3:"–";s:5:"mdash";s:3:"—";s:5:"lsquo";s:3:"‘";s:5:"rsquo";s:3:"’";s:5:"sbquo";s:3:"‚";s:5:"ldquo";s:3:"“";s:5:"rdquo";s:3:"”";s:5:"bdquo";s:3:"„";s:6:"dagger";s:3:"†";s:6:"Dagger";s:3:"‡";s:6:"permil";s:3:"‰";s:6:"lsaquo";s:3:"‹";s:6:"rsaquo";s:3:"›";s:4:"euro";s:3:"€";s:4:"nbsp";s:2:" ";s:5:"iexcl";s:2:"¡";s:4:"cent";s:2:"¢";s:5:"pound";s:2:"£";s:6:"curren";s:2:"¤";s:3:"yen";s:2:"¥";s:6:"brvbar";s:2:"¦";s:4:"sect";s:2:"§";s:3:"uml";s:2:"¨";s:4:"copy";s:2:"©";s:4:"ordf";s:2:"ª";s:5:"laquo";s:2:"«";s:3:"not";s:2:"¬";s:3:"shy";s:2:"";s:3:"reg";s:2:"®";s:4:"macr";s:2:"¯";s:3:"deg";s:2:"°";s:6:"plusmn";s:2:"±";s:4:"sup2";s:2:"²";s:4:"sup3";s:2:"³";s:5:"acute";s:2:"´";s:5:"micro";s:2:"µ";s:4:"para";s:2:"¶";s:6:"middot";s:2:"·";s:5:"cedil";s:2:"¸";s:4:"sup1";s:2:"¹";s:4:"ordm";s:2:"º";s:5:"raquo";s:2:"»";s:6:"frac14";s:2:"¼";s:6:"frac12";s:2:"½";s:6:"frac34";s:2:"¾";s:6:"iquest";s:2:"¿";s:6:"Agrave";s:2:"À";s:6:"Aacute";s:2:"Á";s:5:"Acirc";s:2:"Â";s:6:"Atilde";s:2:"Ã";s:4:"Auml";s:2:"Ä";s:5:"Aring";s:2:"Å";s:5:"AElig";s:2:"Æ";s:6:"Ccedil";s:2:"Ç";s:6:"Egrave";s:2:"È";s:6:"Eacute";s:2:"É";s:5:"Ecirc";s:2:"Ê";s:4:"Euml";s:2:"Ë";s:6:"Igrave";s:2:"Ì";s:6:"Iacute";s:2:"Í";s:5:"Icirc";s:2:"Î";s:4:"Iuml";s:2:"Ï";s:3:"ETH";s:2:"Ð";s:6:"Ntilde";s:2:"Ñ";s:6:"Ograve";s:2:"Ò";s:6:"Oacute";s:2:"Ó";s:5:"Ocirc";s:2:"Ô";s:6:"Otilde";s:2:"Õ";s:4:"Ouml";s:2:"Ö";s:5:"times";s:2:"×";s:6:"Oslash";s:2:"Ø";s:6:"Ugrave";s:2:"Ù";s:6:"Uacute";s:2:"Ú";s:5:"Ucirc";s:2:"Û";s:4:"Uuml";s:2:"Ü";s:6:"Yacute";s:2:"Ý";s:5:"THORN";s:2:"Þ";s:5:"szlig";s:2:"ß";s:6:"agrave";s:2:"à";s:6:"aacute";s:2:"á";s:5:"acirc";s:2:"â";s:6:"atilde";s:2:"ã";s:4:"auml";s:2:"ä";s:5:"aring";s:2:"å";s:5:"aelig";s:2:"æ";s:6:"ccedil";s:2:"ç";s:6:"egrave";s:2:"è";s:6:"eacute";s:2:"é";s:5:"ecirc";s:2:"ê";s:4:"euml";s:2:"ë";s:6:"igrave";s:2:"ì";s:6:"iacute";s:2:"í";s:5:"icirc";s:2:"î";s:4:"iuml";s:2:"ï";s:3:"eth";s:2:"ð";s:6:"ntilde";s:2:"ñ";s:6:"ograve";s:2:"ò";s:6:"oacute";s:2:"ó";s:5:"ocirc";s:2:"ô";s:6:"otilde";s:2:"õ";s:4:"ouml";s:2:"ö";s:6:"divide";s:2:"÷";s:6:"oslash";s:2:"ø";s:6:"ugrave";s:2:"ù";s:6:"uacute";s:2:"ú";s:5:"ucirc";s:2:"û";s:4:"uuml";s:2:"ü";s:6:"yacute";s:2:"ý";s:5:"thorn";s:2:"þ";s:4:"yuml";s:2:"ÿ";} |
None | function toggleWriteability(id_of_patient, checked) {
document.getElementById(id_of_patient).disabled = checked;
}
// vim: et sw=4 sts=4
|
None | function toggleWriteability(id_of_patient, checked) {
document.getElementById(id_of_patient).disabled = checked;
}
// vim: et sw=4 sts=4
|
None | title: HTML Purifier Phorum Mod
desc: This module enables standards-compliant HTML filtering on Phorum. Please check migrate.bbcode.php before enabling this mod.
author: Edward Z. Yang
url: http://htmlpurifier.org/
version: 4.0.0
hook: format|phorum_htmlpurifier_format
hook: quote|phorum_htmlpurifier_quote
hook: posting_custom_action|phorum_htmlpurifier_posting
hook: common|phorum_htmlpurifier_common
hook: before_editor|phorum_htmlpurifier_before_editor
hook: tpl_editor_after_subject|phorum_htmlpurifier_editor_after_subject
# This module is meant to be a drop-in for bbcode, so make it run last.
priority: run module after *
priority: run hook format after *
vim: et sw=4 sts=4
|
None | title: HTML Purifier Phorum Mod
desc: This module enables standards-compliant HTML filtering on Phorum. Please check migrate.bbcode.php before enabling this mod.
author: Edward Z. Yang
url: http://htmlpurifier.org/
version: 4.0.0
hook: format|phorum_htmlpurifier_format
hook: quote|phorum_htmlpurifier_quote
hook: posting_custom_action|phorum_htmlpurifier_posting
hook: common|phorum_htmlpurifier_common
hook: before_editor|phorum_htmlpurifier_before_editor
hook: tpl_editor_after_subject|phorum_htmlpurifier_editor_after_subject
# This module is meant to be a drop-in for bbcode, so make it run last.
priority: run module after *
priority: run hook format after *
vim: et sw=4 sts=4
|
None |
center,
dir[compact='compact'],
isindex[prompt='Foo'],
menu[compact='compact'],
s,
u,
strike,
caption[align='bottom'],
div[align='center'],
dl[compact='compact'],
h1[align='right'],
h2[align='right'],
h3[align='right'],
h4[align='right'],
h5[align='right'],
h6[align='right'],
hr[align='right'],
hr[noshade='noshade'],
hr[width='50'],
hr[size='50'],
img[align='right'],
img[border='3'],
img[hspace='5'],
img[vspace='5'],
input[align='right'],
legend[align='center'],
li[type='A'],
li[value='5'],
ol[compact='compact'],
ol[start='3'],
ol[type='I'],
p[align='right'],
pre[width='50'],
table[align='right'],
table[bgcolor='#0000FF'],
tr[bgcolor='#0000FF'],
td[bgcolor='#0000FF'],
td[height='50'],
td[nowrap='nowrap'],
td[width='200'],
th[bgcolor='#0000FF'],
th[height='50'],
th[nowrap='nowrap'],
th[width='200'],
ul[compact='compact'],
ul[type='square'],
.insert-declarations-above
{background:#008000; color:#FFF; font-weight:bold;}
font {background:#BFB;}
u {border:1px solid #000;}
hr {height:1em;}
hr[size='50'] {height:50px;}
img[border='3'] {border: 3px solid #000;}
li[type='a'], li[value='5'] {color:#DDD;}
/* vim: et sw=4 sts=4 */
|
None |
center,
dir[compact='compact'],
isindex[prompt='Foo'],
menu[compact='compact'],
s,
u,
strike,
caption[align='bottom'],
div[align='center'],
dl[compact='compact'],
h1[align='right'],
h2[align='right'],
h3[align='right'],
h4[align='right'],
h5[align='right'],
h6[align='right'],
hr[align='right'],
hr[noshade='noshade'],
hr[width='50'],
hr[size='50'],
img[align='right'],
img[border='3'],
img[hspace='5'],
img[vspace='5'],
input[align='right'],
legend[align='center'],
li[type='A'],
li[value='5'],
ol[compact='compact'],
ol[start='3'],
ol[type='I'],
p[align='right'],
pre[width='50'],
table[align='right'],
table[bgcolor='#0000FF'],
tr[bgcolor='#0000FF'],
td[bgcolor='#0000FF'],
td[height='50'],
td[nowrap='nowrap'],
td[width='200'],
th[bgcolor='#0000FF'],
th[height='50'],
th[nowrap='nowrap'],
th[width='200'],
ul[compact='compact'],
ul[type='square'],
.insert-declarations-above
{background:#008000; color:#FFF; font-weight:bold;}
font {background:#BFB;}
u {border:1px solid #000;}
hr {height:1em;}
hr[size='50'] {height:50px;}
img[border='3'] {border: 3px solid #000;}
li[type='a'], li[value='5'] {color:#DDD;}
/* vim: et sw=4 sts=4 */
|
None | var alphabet = 'a!`=[]\\;\':"/<> &';
var out = document.getElementById('out');
var testContainer = document.getElementById('testContainer');
function print(s) {
out.value += s + "\n";
}
function testImage() {
return testContainer.firstChild;
}
function test(input) {
var count = 0;
var oldInput, newInput;
testContainer.innerHTML = "<img />";
testImage().setAttribute("alt", input);
print("------");
print("Test input: " + input);
do {
oldInput = testImage().getAttribute("alt");
var intermediate = testContainer.innerHTML;
print("Render: " + intermediate);
testContainer.innerHTML = intermediate;
if (testImage() == null) {
print("Image disappeared...");
break;
}
newInput = testImage().getAttribute("alt");
print("New value: " + newInput);
count++;
} while (count < 5 && newInput != oldInput);
if (count == 5) {
print("Failed to achieve fixpoint");
}
testContainer.innerHTML = "";
}
print("Go!");
test("`` ");
test("'' ");
for (var i = 0; i < alphabet.length; i++) {
for (var j = 0; j < alphabet.length; j++) {
test(alphabet.charAt(i) + alphabet.charAt(j));
}
}
// document.getElementById('out').textContent = alphabet;
|
None | var alphabet = 'a!`=[]\\;\':"/<> &';
var out = document.getElementById('out');
var testContainer = document.getElementById('testContainer');
function print(s) {
out.value += s + "\n";
}
function testImage() {
return testContainer.firstChild;
}
function test(input) {
var count = 0;
var oldInput, newInput;
testContainer.innerHTML = "<img />";
testImage().setAttribute("alt", input);
print("------");
print("Test input: " + input);
do {
oldInput = testImage().getAttribute("alt");
var intermediate = testContainer.innerHTML;
print("Render: " + intermediate);
testContainer.innerHTML = intermediate;
if (testImage() == null) {
print("Image disappeared...");
break;
}
newInput = testImage().getAttribute("alt");
print("New value: " + newInput);
count++;
} while (count < 5 && newInput != oldInput);
if (count == 5) {
print("Failed to achieve fixpoint");
}
testContainer.innerHTML = "";
}
print("Go!");
test("`` ");
test("'' ");
for (var i = 0; i < alphabet.length; i++) {
for (var j = 0; j < alphabet.length; j++) {
test(alphabet.charAt(i) + alphabet.charAt(j));
}
}
// document.getElementById('out').textContent = alphabet;
|
None | --SKIPIF--
return !function_exists('hash_hmac');
--INI--
URI.Munge = "/redirect?s=%s&t=%t&r=%r&n=%n&m=%m&p=%p"
URI.MungeSecretKey = "foo"
URI.MungeResources = true
--HTML--
<a href="http://example.com">Link</a>
<img src="http://example.com" style="background-image:url(http://example.com);" alt="example.com" />
--EXPECT--
<a href="/redirect?s=http%3A%2F%2Fexample.com&t=c763c4a30204eee8470a3292e0f0cd91a639654d039d45f1495a50207847e954&r=&n=a&m=href&p=">Link</a>
<img src="/redirect?s=http%3A%2F%2Fexample.com&t=c763c4a30204eee8470a3292e0f0cd91a639654d039d45f1495a50207847e954&r=1&n=img&m=src&p=" style="background-image:url("/redirect?s=http%3A%2F%2Fexample.com&t=c763c4a30204eee8470a3292e0f0cd91a639654d039d45f1495a50207847e954&r=1&n=img&m=style&p=background-image");" alt="example.com" />
--# vim: et sw=4 sts=4
|
None | --SKIPIF--
return !function_exists('hash_hmac');
--INI--
URI.Munge = "/redirect?s=%s&t=%t&r=%r&n=%n&m=%m&p=%p"
URI.MungeSecretKey = "foo"
URI.MungeResources = true
--HTML--
<a href="http://example.com">Link</a>
<img src="http://example.com" style="background-image:url(http://example.com);" alt="example.com" />
--EXPECT--
<a href="/redirect?s=http%3A%2F%2Fexample.com&t=c763c4a30204eee8470a3292e0f0cd91a639654d039d45f1495a50207847e954&r=&n=a&m=href&p=">Link</a>
<img src="/redirect?s=http%3A%2F%2Fexample.com&t=c763c4a30204eee8470a3292e0f0cd91a639654d039d45f1495a50207847e954&r=1&n=img&m=src&p=" style="background-image:url("/redirect?s=http%3A%2F%2Fexample.com&t=c763c4a30204eee8470a3292e0f0cd91a639654d039d45f1495a50207847e954&r=1&n=img&m=style&p=background-image");" alt="example.com" />
--# vim: et sw=4 sts=4
|
None | --INI--
HTML.SafeIframe = true
URI.SafeIframeRegexp = "%^http://maps.google.com/%"
--HTML--
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/?ie=UTF8&ll=37.0625,-95.677068&spn=24.455808,37.353516&z=4&output=embed"></iframe>
--EXPECT--
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/?ie=UTF8&ll=37.0625,-95.677068&spn=24.455808,37.353516&z=4&output=embed"></iframe>
--# vim: et sw=4 sts=4
|
None | --INI--
HTML.SafeIframe = true
URI.SafeIframeRegexp = "%^http://maps.google.com/%"
--HTML--
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/?ie=UTF8&ll=37.0625,-95.677068&spn=24.455808,37.353516&z=4&output=embed"></iframe>
--EXPECT--
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/?ie=UTF8&ll=37.0625,-95.677068&spn=24.455808,37.353516&z=4&output=embed"></iframe>
--# vim: et sw=4 sts=4
|
//
//
// Updates database dns record dynamically, showing its full domain path
App.Actions.DB.update_dns_record_hint = function(elm, hint) {
// clean hint
if (hint.trim() == '') {
$(elm).parent().find('.hint').html('');
}
// set domain name without rec in case of @ entries
if (hint == '@') {
hint = '';
}
// dont show pregix if domain name = rec value
if (hint == GLOBAL.DNS_REC_PREFIX + '.') {
hint = '';
}
// add dot at the end if needed
if (hint != '' && hint.slice(-1) != '.') {
hint += '.';
}
$(elm).parent().find('.hint').text(hint + GLOBAL.DNS_REC_PREFIX);
}
//
// listener that triggers dns record name hint updating
App.Listeners.DB.keypress_dns_rec_entry = function() {
var ref = $('input[name="v_rec"]');
var current_rec = ref.val();
if (current_rec.trim() != '') {
App.Actions.DB.update_dns_record_hint(ref, current_rec);
}
ref.bind('keypress input', function(evt) {
clearTimeout(window.frp_usr_tmt);
window.frp_usr_tmt = setTimeout(function() {
var elm = $(evt.target);
App.Actions.DB.update_dns_record_hint(elm, $(elm).val());
}, 100);
});
}
//
// Page entry point
// Trigger listeners
App.Listeners.DB.keypress_dns_rec_entry();
| //
//
// Updates database dns record dynamically, showing its full domain path
App.Actions.DB.update_dns_record_hint = function(elm, hint) {
// clean hint
if (hint.trim() == '') {
$(elm).parent().find('.hint').text('');
}
// set domain name without rec in case of @ entries
if (hint == '@') {
hint = '';
}
// dont show pregix if domain name = rec value
if (hint == GLOBAL.DNS_REC_PREFIX + '.') {
hint = '';
}
// add dot at the end if needed
if (hint != '' && hint.slice(-1) != '.') {
hint += '.';
}
$(elm).parent().find('.hint').text(hint + GLOBAL.DNS_REC_PREFIX);
}
//
// listener that triggers dns record name hint updating
App.Listeners.DB.keypress_dns_rec_entry = function() {
var ref = $('input[name="v_rec"]');
var current_rec = ref.val();
if (current_rec.trim() != '') {
App.Actions.DB.update_dns_record_hint(ref, current_rec);
}
ref.bind('keypress input', function(evt) {
clearTimeout(window.frp_usr_tmt);
window.frp_usr_tmt = setTimeout(function() {
var elm = $(evt.target);
App.Actions.DB.update_dns_record_hint(elm, $(elm).val());
}, 100);
});
}
//
// Page entry point
// Trigger listeners
App.Listeners.DB.keypress_dns_rec_entry();
|
//
//
// Updates database dns record dynamically, showing its full domain path
App.Actions.DB.update_dns_record_hint = function(elm, hint) {
// clean hint
if (hint.trim() == '') {
$(elm).parent().find('.hint').html('');
}
// set domain name without rec in case of @ entries
if (hint == '@') {
hint = '';
}
// dont show pregix if domain name = rec value
if (hint == GLOBAL.DNS_REC_PREFIX + '.') {
hint = '';
}
// add dot at the end if needed
if (hint != '' && hint.slice(-1) != '.') {
hint += '.';
}
$(elm).parent().find('.hint').text(hint + GLOBAL.DNS_REC_PREFIX);
}
//
// listener that triggers dns record name hint updating
App.Listeners.DB.keypress_dns_rec_entry = function() {
var ref = $('input[name="v_rec"]');
var current_rec = ref.val();
if (current_rec.trim() != '') {
App.Actions.DB.update_dns_record_hint(ref, current_rec);
}
ref.bind('keypress input', function(evt) {
clearTimeout(window.frp_usr_tmt);
window.frp_usr_tmt = setTimeout(function() {
var elm = $(evt.target);
App.Actions.DB.update_dns_record_hint(elm, $(elm).val());
}, 100);
});
}
//
// Page entry point
// Trigger listeners
App.Listeners.DB.keypress_dns_rec_entry();
| //
//
// Updates database dns record dynamically, showing its full domain path
App.Actions.DB.update_dns_record_hint = function(elm, hint) {
// clean hint
if (hint.trim() == '') {
$(elm).parent().find('.hint').text('');
}
// set domain name without rec in case of @ entries
if (hint == '@') {
hint = '';
}
// dont show pregix if domain name = rec value
if (hint == GLOBAL.DNS_REC_PREFIX + '.') {
hint = '';
}
// add dot at the end if needed
if (hint != '' && hint.slice(-1) != '.') {
hint += '.';
}
$(elm).parent().find('.hint').text(hint + GLOBAL.DNS_REC_PREFIX);
}
//
// listener that triggers dns record name hint updating
App.Listeners.DB.keypress_dns_rec_entry = function() {
var ref = $('input[name="v_rec"]');
var current_rec = ref.val();
if (current_rec.trim() != '') {
App.Actions.DB.update_dns_record_hint(ref, current_rec);
}
ref.bind('keypress input', function(evt) {
clearTimeout(window.frp_usr_tmt);
window.frp_usr_tmt = setTimeout(function() {
var elm = $(evt.target);
App.Actions.DB.update_dns_record_hint(elm, $(elm).val());
}, 100);
});
}
//
// Page entry point
// Trigger listeners
App.Listeners.DB.keypress_dns_rec_entry();
|
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("draft-js"),require("immutable")):"function"==typeof define&&define.amd?define(["react","draft-js","immutable"],t):"object"==typeof exports?exports.reactDraftWysiwyg=t(require("react"),require("draft-js"),require("immutable")):e.reactDraftWysiwyg=t(e.react,e["draft-js"],e.immutable)}(window,function(n,o,r){return c={},i.m=a=[function(e,t,n){e.exports=n(9)()},function(e,t){e.exports=n},function(e,t,n){var o;
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
!function(){"use strict";var a={}.hasOwnProperty;function c(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"==o||"number"==o)e.push(n);else if(Array.isArray(n)&&n.length){var r=c.apply(null,n);r&&e.push(r)}else if("object"==o)for(var i in n)a.call(n,i)&&n[i]&&e.push(i)}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):void 0===(o=function(){return c}.apply(t,[]))||(e.exports=o)}()},function(e,t){e.exports=o},function(e,t,n){function r(e){if(c[e])return c[e].exports;var t=c[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var o,i,a,c;window,e.exports=(o=n(3),i=n(5),c={},r.m=a=[function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t,n){e.exports=n(3)},function(e,t,n){"use strict";n.r(t);var b=n(0),i=n(1);function j(e){var t=e.getSelection(),n=e.getCurrentContent(),o=t.getStartKey(),r=t.getEndKey(),i=n.getBlockMap();return i.toSeq().skipUntil(function(e,t){return t===o}).takeUntil(function(e,t){return t===r}).concat([[r,i.get(r)]])}function u(e){return j(e).toList()}function l(e){if(e)return u(e).get(0)}function o(e){if(e){var n=l(e),t=e.getCurrentContent().getBlockMap().toSeq().toList(),o=0;if(t.forEach(function(e,t){e.get("key")===n.get("key")&&(o=t-1)}),-1<o)return t.get(o)}}function r(e){return e?e.getCurrentContent().getBlockMap().toList():new i.List}function a(e){var t=u(e);if(!t.some(function(e){return e.type!==t.get(0).type}))return t.get(0).type}function c(e){var t=b.RichUtils.tryToRemoveBlockStyle(e);return t?b.EditorState.push(e,t,"change-block-type"):e}function s(e){var t="",n=e.getSelection(),o=n.getAnchorOffset(),r=n.getFocusOffset(),i=u(e);if(0<i.size){if(n.getIsBackward()){var a=o;o=r,r=a}for(var c=0;c<i.size;c+=1){var l=0===c?o:0,s=c===i.size-1?r:i.get(c).getText().length;t+=i.get(c).getText().slice(l,s)}}return t}function p(e){var t=e.getCurrentContent(),n=e.getSelection(),o=b.Modifier.removeRange(t,n,"forward"),r=o.getSelectionAfter(),i=o.getBlockForKey(r.getStartKey());return o=b.Modifier.insertText(o,r,"\n",i.getInlineStyleAt(r.getStartOffset()),null),b.EditorState.push(e,o,"insert-fragment")}function d(e){var t=b.Modifier.splitBlock(e.getCurrentContent(),e.getSelection());return c(b.EditorState.push(e,t,"split-block"))}function m(e){var t=e.getCurrentContent().getBlockMap().toList(),n=e.getSelection().merge({anchorKey:t.first().get("key"),anchorOffset:0,focusKey:t.last().get("key"),focusOffset:t.last().getLength()}),o=b.Modifier.removeRange(e.getCurrentContent(),n,"forward");return b.EditorState.push(e,o,"remove-range")}function f(e,t){var n=b.Modifier.setBlockData(e.getCurrentContent(),e.getSelection(),t);return b.EditorState.push(e,n,"change-block-data")}function g(e){var o=new i.Map({}),t=u(e);if(t&&0<t.size)for(var n=function(e){var n=t.get(e).getData();if(!n||0===n.size)return o=o.clear(),"break";if(0===e)o=n;else if(o.forEach(function(e,t){n.get(t)&&n.get(t)===e||(o=o.delete(t))}),0===o.size)return o=o.clear(),"break"},r=0;r<t.size&&"break"!==n(r);r+=1);return o}var y=Object(i.Map)({code:{element:"pre"}}),h=b.DefaultDraftBlockRenderMap.merge(y);function M(e){if(e){var t=e.getType();return"unordered-list-item"===t||"ordered-list-item"===t}return!1}function N(e,t,n){var o,r=e.getSelection();o=r.getIsBackward()?r.getFocusKey():r.getAnchorKey();var i=e.getCurrentContent(),a=i.getBlockForKey(o),c=a.getType();if("unordered-list-item"!==c&&"ordered-list-item"!==c)return e;var l=i.getBlockBefore(o);if(!l)return e;if(l.getType()!==c)return e;var s=a.getDepth();if(1===t&&s===n)return e;var u,p,d,m,f,g,y,h=Math.min(l.getDepth()+1,n),M=(p=t,d=h,m=(u=e).getSelection(),f=u.getCurrentContent(),g=f.getBlockMap(),y=j(u).map(function(e){var t=e.getDepth()+p;return t=Math.max(0,Math.min(t,d)),e.set("depth",t)}),g=g.merge(y),f.merge({blockMap:g,selectionBefore:m,selectionAfter:m}));return b.EditorState.push(e,M,"adjust-depth")}function S(e,t){var n;return 13===(n=t).which&&(n.getModifierState("Shift")||n.getModifierState("Alt")||n.getModifierState("Control"))?e.getSelection().isCollapsed()?b.RichUtils.insertSoftNewline(e):p(e):function(e){var t=e.getSelection();if(t.isCollapsed()){var n=e.getCurrentContent(),o=t.getStartKey(),r=n.getBlockForKey(o);if(!M(r)&&"unstyled"!==r.getType()&&r.getLength()===t.getStartOffset())return d(e);if(M(r)&&0===r.getLength()){var i=r.getDepth();if(0===i)return c(e);if(0<i)return N(e,-1,i)}}}(e)}function E(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,o)}return n}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e){var t=e.getSelection();if(t.isCollapsed()){var n={},o=e.getCurrentInlineStyle().toList().toJS();if(o)return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){n[e]=0<=o.indexOf(e)}),n}var a=t.getStartOffset(),c=t.getEndOffset(),l=u(e);if(0<l.size){var r=function(){for(var n={BOLD:!0,ITALIC:!0,UNDERLINE:!0,STRIKETHROUGH:!0,CODE:!0,SUPERSCRIPT:!0,SUBSCRIPT:!0},o=0;o<l.size;o+=1){var e=0===o?a:0,t=o===l.size-1?c:l.get(o).getText().length;e===t&&0===e?(e=1,t=2):e===t&&--e;for(var r=function(e){var t=l.get(o).getInlineStyleAt(e);["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){n[e]=n[e]&&t.get(e)===e})},i=e;i<t;i+=1)r(i)}return{v:n}}();if("object"===L(r))return r.v}return{}}function D(e){var t,n=e.getSelection(),o=n.getStartOffset(),r=n.getEndOffset();o===r&&0===o?r=1:o===r&&--o;for(var i=l(e),a=o;a<r;a+=1){var c=i.getEntityAt(a);if(!c){t=void 0;break}if(a===o)t=c;else if(t!==c){t=void 0;break}}return t}function v(e,t){var n,o=l(e);return o.findEntityRanges(function(e){return e.get("entity")===t},function(e,t){n={start:e,end:t,text:o.get("text").slice(e,t)}}),n}function w(e,t,n){I[e]["".concat(e.toLowerCase(),"-").concat(n)]=C({},"".concat(t),n)}function x(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?E(Object(n),!0).forEach(function(e){C(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},I.color,{},I.bgcolor,{},I.fontSize,{},I.fontFamily,{CODE:I.CODE,SUPERSCRIPT:I.SUPERSCRIPT,SUBSCRIPT:I.SUBSCRIPT})}var I={color:{},bgcolor:{},fontSize:{},fontFamily:{},CODE:{fontFamily:"monospace",wordWrap:"break-word",background:"#f1f1f1",borderRadius:3,padding:"1px 3px"},SUPERSCRIPT:{fontSize:11,position:"relative",top:-8,display:"inline-flex"},SUBSCRIPT:{fontSize:11,position:"relative",bottom:-8,display:"inline-flex"}};function O(e,t,n){var o=e.getSelection(),r=Object.keys(I[t]).reduce(function(e,t){return b.Modifier.removeInlineStyle(e,o,t)},e.getCurrentContent()),i=b.EditorState.push(e,r,"changeinline-style"),a=e.getCurrentInlineStyle();if(o.isCollapsed()&&(i=a.reduce(function(e,t){return b.RichUtils.toggleInlineStyle(e,t)},i)),"SUPERSCRIPT"===t||"SUBSCRIPT"==t)a.has(n)||(i=b.RichUtils.toggleInlineStyle(i,n));else{var c="bgcolor"===t?"backgroundColor":t;a.has("".concat(c,"-").concat(n))||(i=b.RichUtils.toggleInlineStyle(i,"".concat(t.toLowerCase(),"-").concat(n)),w(t,c,n))}return i}function A(e){e&&e.getCurrentContent().getBlockMap().map(function(e){return e.get("characterList")}).toList().flatten().forEach(function(e){e&&0===e.indexOf("color-")?w("color","color",e.substr(6)):e&&0===e.indexOf("bgcolor-")?w("bgcolor","backgroundColor",e.substr(8)):e&&0===e.indexOf("fontsize-")?w("fontSize","fontSize",+e.substr(9)):e&&0===e.indexOf("fontfamily-")&&w("fontFamily","fontFamily",e.substr(11))})}function T(e,t,n){var o=e.getInlineStyleAt(n).toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(o&&0<o.size)return o.get(0)}function z(o,s){if(o&&s&&0<s.length){var e=function(){var e=o.getSelection(),i={};if(e.isCollapsed())return s.forEach(function(e){i[e]=function(e,t){var n=e.getCurrentInlineStyle().toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(n&&0<n.size)return n.get(0)}(o,e)}),{v:i};var a=e.getStartOffset(),c=e.getEndOffset(),l=u(o);if(0<l.size){for(var t=function(n){var e=0===n?a:0,t=n===l.size-1?c:l.get(n).getText().length;e===t&&0===e?(e=1,t=2):e===t&&--e;for(var o=function(t){t===e?s.forEach(function(e){i[e]=T(l.get(n),e,t)}):s.forEach(function(e){i[e]&&i[e]!==T(l.get(n),e,t)&&(i[e]=void 0)})},r=e;r<t;r+=1)o(r)},n=0;n<l.size;n+=1)t(n);return{v:i}}}();if("object"===L(e))return e.v}return{}}function _(t){var e=t.getCurrentInlineStyle(),n=t.getCurrentContent();return e.forEach(function(e){n=b.Modifier.removeInlineStyle(n,t.getSelection(),e)}),b.EditorState.push(t,n,"change-inline-style")}n.d(t,"isListBlock",function(){return M}),n.d(t,"changeDepth",function(){return N}),n.d(t,"handleNewLine",function(){return S}),n.d(t,"getEntityRange",function(){return v}),n.d(t,"getCustomStyleMap",function(){return x}),n.d(t,"toggleCustomInlineStyle",function(){return O}),n.d(t,"getSelectionEntity",function(){return D}),n.d(t,"extractInlineStyle",function(){return A}),n.d(t,"removeAllInlineStyles",function(){return _}),n.d(t,"getSelectionInlineStyle",function(){return k}),n.d(t,"getSelectionCustomInlineStyle",function(){return z}),n.d(t,"getSelectedBlocksMap",function(){return j}),n.d(t,"getSelectedBlocksList",function(){return u}),n.d(t,"getSelectedBlock",function(){return l}),n.d(t,"getBlockBeforeSelectedBlock",function(){return o}),n.d(t,"getAllBlocks",function(){return r}),n.d(t,"getSelectedBlocksType",function(){return a}),n.d(t,"removeSelectedBlocksStyle",function(){return c}),n.d(t,"getSelectionText",function(){return s}),n.d(t,"addLineBreakRemovingSelection",function(){return p}),n.d(t,"insertNewUnstyledBlock",function(){return d}),n.d(t,"clearEditorContent",function(){return m}),n.d(t,"setBlockData",function(){return f}),n.d(t,"getSelectedBlocksMetadata",function(){return g}),n.d(t,"blockRenderMap",function(){return h})}],r.c=c,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2))},function(e,t){e.exports=r},function(e,t,n){function r(e){if(c[e])return c[e].exports;var t=c[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var o,i,a,c;window,e.exports=(o=n(5),i=n(3),c={},r.m=a=[function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t,n){e.exports=n(3)},function(e,t,n){"use strict";n.r(t);var j=n(1),s=n(0),N=function(e,t,n){var o,r=e.textContent;return""===r.trim()?{chunk:(o=n,{text:" ",inlines:[new s.OrderedSet],entities:[o],blocks:[]})}:{chunk:{text:r,inlines:Array(r.length).fill(t),entities:Array(r.length).fill(n),blocks:[]}}},S=function(){return{text:"\n",inlines:[new s.OrderedSet],entities:new Array(1),blocks:[]}},E=function(){return{text:"",inlines:[],entities:[],blocks:[]}},C=function(e,t){return{text:"",inlines:[],entities:[],blocks:[{type:e,depth:0,data:t||new s.Map({})}]}},L=function(e,t,n){return{text:"\r",inlines:[],entities:[],blocks:[{type:e,depth:Math.max(0,Math.min(4,t)),data:n||new s.Map({})}]}},k=function(e){return{text:"\r ",inlines:[new s.OrderedSet],entities:[e],blocks:[{type:"atomic",depth:0,data:new s.Map({})}]}},D=function(e,t){return{text:e.text+t.text,inlines:e.inlines.concat(t.inlines),entities:e.entities.concat(t.entities),blocks:e.blocks.concat(t.blocks)}},v=new s.Map({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},"unordered-list-item":{element:"li",wrapper:"ul"},"ordered-list-item":{element:"li",wrapper:"ol"},blockquote:{element:"blockquote"},code:{element:"pre"},atomic:{element:"figure"},unstyled:{element:"p",aliasedElements:["div"]}}),w={code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",strong:"BOLD",ins:"UNDERLINE",sub:"SUBSCRIPT",sup:"SUPERSCRIPT"};function x(e){return e.style.textAlign?new s.Map({"text-align":e.style.textAlign}):e.style.marginLeft?new s.Map({"margin-left":e.style.marginLeft}):void 0}var I=function(e){var t=void 0;if(e instanceof HTMLAnchorElement){var n={};t=e.dataset&&void 0!==e.dataset.mention?(n.url=e.href,n.text=e.innerHTML,n.value=e.dataset.value,j.Entity.__create("MENTION","IMMUTABLE",n)):(n.url=e.getAttribute&&e.getAttribute("href")||e.href,n.title=e.innerHTML,n.targetOption=e.target,j.Entity.__create("LINK","MUTABLE",n))}return t};n.d(t,"default",function(){return o});var u=" ",p=new RegExp(" ","g"),O=!0;function o(e,t){var n,o,r,i=(n=t,o=e.trim().replace(p,u),(r=function(e){var t,n=null;return document.implementation&&document.implementation.createHTMLDocument&&((t=document.implementation.createHTMLDocument("foo")).documentElement.innerHTML=e,n=t.getElementsByTagName("body")[0]),n}(o))?(O=!0,{chunk:function e(t,n,o,r,i,a){var c=t.nodeName.toLowerCase();if(a){var l=a(c,t);if(l){var s=j.Entity.__create(l.type,l.mutability,l.data||{});return{chunk:k(s)}}}if("#text"===c&&"\n"!==t.textContent)return N(t,n,i);if("br"===c)return{chunk:S()};if("img"===c&&t instanceof HTMLImageElement){var u={};u.src=t.getAttribute&&t.getAttribute("src")||t.src,u.alt=t.alt,u.height=t.style.height,u.width=t.style.width,t.style.float&&(u.alignment=t.style.float);var p=j.Entity.__create("IMAGE","MUTABLE",u);return{chunk:k(p)}}if("video"===c&&t instanceof HTMLVideoElement){var d={};d.src=t.getAttribute&&t.getAttribute("src")||t.src,d.alt=t.alt,d.height=t.style.height,d.width=t.style.width,t.style.float&&(d.alignment=t.style.float);var m=j.Entity.__create("VIDEO","MUTABLE",d);return{chunk:k(m)}}if("iframe"===c&&t instanceof HTMLIFrameElement){var f={};f.src=t.getAttribute&&t.getAttribute("src")||t.src,f.height=t.height,f.width=t.width;var g=j.Entity.__create("EMBEDDED_LINK","MUTABLE",f);return{chunk:k(g)}}var y,h=function(t,n){var e=v.filter(function(e){return e.element===t&&(!e.wrapper||e.wrapper===n)||e.wrapper===t||e.aliasedElements&&-1<e.aliasedElements.indexOf(t)}).keySeq().toSet().toArray();if(1===e.length)return e[0]}(c,r);h&&("ul"===c||"ol"===c?(r=c,o+=1):("unordered-list-item"!==h&&"ordered-list-item"!==h&&(r="",o=-1),O?(y=C(h,x(t)),O=!1):y=L(h,o,x(t)))),y=y||E(),n=function(e,t,n){var o,r=w[e];if(r)o=n.add(r).toOrderedSet();else if(t instanceof HTMLElement){var l=t;o=(o=n).withMutations(function(e){var t=l.style.color,n=l.style.backgroundColor,o=l.style.fontSize,r=l.style.fontFamily.replace(/^"|"$/g,""),i=l.style.fontWeight,a=l.style.textDecoration,c=l.style.fontStyle;t&&e.add("color-".concat(t.replace(/ /g,""))),n&&e.add("bgcolor-".concat(n.replace(/ /g,""))),o&&e.add("fontsize-".concat(o.replace(/px$/g,""))),r&&e.add("fontfamily-".concat(r)),"bold"===i&&e.add(w.strong),"underline"===a&&e.add(w.ins),"italic"===c&&e.add(w.em)}).toOrderedSet()}return o}(c,t,n);for(var M=t.firstChild;M;){var b=e(M,n,o,r,I(M)||i,a).chunk;y=D(y,b),M=M.nextSibling}return{chunk:y}}(r,new s.OrderedSet,-1,"",void 0,n).chunk}):null);if(i){var a=i.chunk,c=new s.OrderedMap({});a.entities&&a.entities.forEach(function(e){e&&(c=c.set(e,j.Entity.__get(e)))});var l=0;return{contentBlocks:a.text.split("\r").map(function(e,t){var n=l+e.length,o=a&&a.inlines.slice(l,n),r=a&&a.entities.slice(l,n),i=new s.List(o.map(function(e,t){var n={style:e,entity:null};return r[t]&&(n.entity=r[t]),j.CharacterMetadata.create(n)}));return l=n,new j.ContentBlock({key:Object(j.genKey)(),type:a&&a.blocks[t]&&a.blocks[t].type||"unstyled",depth:a&&a.blocks[t]&&a.blocks[t].depth,data:a&&a.blocks[t]&&a.blocks[t].data||new s.Map({}),text:e,characterList:i})}),entityMap:c}}return null}}],r.c=c,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2))},function(e,t,l){"use strict";function o(n){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(e){n[e]=t[e]})}),n}function s(e){return Object.prototype.toString.call(e)}function u(e){return"[object Function]"===s(e)}function p(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var r={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};var i={"http:":{validate:function(e,t,n){var o=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(o)?o.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var o=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(o)?3<=t&&":"===e[t-3]?0:3<=t&&"/"===e[t-3]?0:o.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var o=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(o)?o.match(n.re.mailto)[0].length:0}}},d="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",a="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function m(){return function(e,t){t.normalize(e)}}function c(r){var t=r.re=l(21)(r.__opts__),e=r.__tlds__.slice();function n(e){return e.replace("%TLDS%",t.src_tlds)}r.onCompile(),r.__tlds_replaced__||e.push(d),e.push(t.src_xn),t.src_tlds=e.join("|"),t.email_fuzzy=RegExp(n(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(n(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(n(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(n(t.tpl_host_fuzzy_test),"i");var i=[];function a(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}r.__compiled__={},Object.keys(r.__schemas__).forEach(function(e){var t=r.__schemas__[e];if(null!==t){var o,n={validate:null,link:null};if(r.__compiled__[e]=n,"[object Object]"===s(t))return"[object RegExp]"===s(t.validate)?n.validate=(o=t.validate,function(e,t){var n=e.slice(t);return o.test(n)?n.match(o)[0].length:0}):u(t.validate)?n.validate=t.validate:a(e,t),void(u(t.normalize)?n.normalize=t.normalize:t.normalize?a(e,t):n.normalize=m());if("[object String]"!==s(t))a(e,t);else i.push(e)}}),i.forEach(function(e){r.__compiled__[r.__schemas__[e]]&&(r.__compiled__[e].validate=r.__compiled__[r.__schemas__[e]].validate,r.__compiled__[e].normalize=r.__compiled__[r.__schemas__[e]].normalize)}),r.__compiled__[""]={validate:null,normalize:m()};var o,c=Object.keys(r.__compiled__).filter(function(e){return 0<e.length&&r.__compiled__[e]}).map(p).join("|");r.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+c+")","i"),r.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+c+")","ig"),r.re.pretest=RegExp("("+r.re.schema_test.source+")|("+r.re.host_fuzzy_test.source+")|@","i"),(o=r).__index__=-1,o.__text_cache__=""}function f(e,t){var n=e.__index__,o=e.__last_index__,r=e.__text_cache__.slice(n,o);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=o+t,this.raw=r,this.text=r,this.url=r}function g(e,t){var n=new f(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function y(e,t){if(!(this instanceof y))return new y(e,t);var n;t||(n=e,Object.keys(n||{}).reduce(function(e,t){return e||r.hasOwnProperty(t)},!1)&&(t=e,e={})),this.__opts__=o({},r,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=o({},i,e),this.__compiled__={},this.__tlds__=a,this.__tlds_replaced__=!1,this.re={},c(this)}y.prototype.add=function(e,t){return this.__schemas__[e]=t,c(this),this},y.prototype.set=function(e){return this.__opts__=o(this.__opts__,e),this},y.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,o,r,i,a,c,l;if(this.re.schema_test.test(e))for((c=this.re.schema_search).lastIndex=0;null!==(t=c.exec(e));)if(r=this.testSchemaAt(e,t[2],c.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+r;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&0<=(l=e.search(this.re.host_fuzzy_test))&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(i=n.index+n[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&0<=e.indexOf("@")&&null!==(o=e.match(this.re.email_fuzzy))&&(i=o.index+o[1].length,a=o.index+o[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=a)),0<=this.__index__},y.prototype.pretest=function(e){return this.re.pretest.test(e)},y.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},y.prototype.match=function(e){var t=0,n=[];0<=this.__index__&&this.__text_cache__===e&&(n.push(g(this,t)),t=this.__last_index__);for(var o=t?e.slice(t):e;this.test(o);)n.push(g(this,t)),o=o.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},y.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse():(this.__tlds__=e.slice(),this.__tlds_replaced__=!0),c(this),this},y.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},y.prototype.onCompile=function(){},e.exports=y},function(e,t,n){e.exports=n(40)},function(e,t,n){"use strict";var c=n(10);function o(){}function r(){}r.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,r,i){if(i!==c){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}var n={array:e.isRequired=e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:o};return n.PropTypes=n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,o){"use strict";e.exports=function(e){var t={};t.src_Any=o(22).source,t.src_Cc=o(23).source,t.src_Z=o(24).source,t.src_P=o(25).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var n="[><|]";return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,4}[a-zA-Z0-9%/]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/},function(e,t){e.exports=/[!-#%-\*,-/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E44\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD807[\uDC41-\uDC45\uDC70\uDC71]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var m=n(1),S=n.n(m),o=n(0),f=n.n(o),E=n(3),C=n(4),r=n(2),L=n.n(r);function i(){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.callBacks=[],this.suggestionCallback=void 0,this.editorFlag=!1,this.suggestionFlag=!1,this.closeAllModals=function(t){n.callBacks.forEach(function(e){e(t)})},this.init=function(e){var t=document.getElementById(e);t&&t.addEventListener("click",function(){n.editorFlag=!0}),document&&(document.addEventListener("click",function(){n.editorFlag?n.editorFlag=!1:(n.closeAllModals(),n.suggestionCallback&&n.suggestionCallback())}),document.addEventListener("keydown",function(e){"Escape"===e.key&&n.closeAllModals()}))},this.onEditorClick=function(){n.closeModals(),!n.suggestionFlag&&n.suggestionCallback?n.suggestionCallback():n.suggestionFlag=!1},this.closeModals=function(e){n.closeAllModals(e)},this.registerCallBack=function(e){n.callBacks.push(e)},this.deregisterCallBack=function(t){n.callBacks=n.callBacks.filter(function(e){return e!==t})},this.setSuggestionCallback=function(e){n.suggestionCallback=e},this.removeSuggestionCallback=function(){n.suggestionCallback=void 0},this.onSuggestionClick=function(){n.suggestionFlag=!0}}function c(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),this.inputFocused=!1,this.editorMouseDown=!1,this.onEditorMouseDown=function(){t.editorFocused=!0},this.onInputMouseDown=function(){t.inputFocused=!0},this.isEditorBlur=function(e){return"INPUT"!==e.target.tagName&&"LABEL"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName||t.editorFocused?!("INPUT"===e.target.tagName&&"LABEL"===e.target.tagName&&"TEXTAREA"===e.target.tagName||t.inputFocused)&&!(t.editorFocused=!1):!(t.inputFocused=!1)},this.isEditorFocused=function(){return!t.inputFocused||(t.inputFocused=!1)},this.isToolbarFocused=function(){return!t.editorFocused||(t.editorFocused=!1)},this.isInputFocused=function(){return t.inputFocused}}var a,l=[],k={onKeyDown:function(t){l.forEach(function(e){e(t)})},registerCallBack:function(e){l.push(e)},deregisterCallBack:function(t){l=l.filter(function(e){return e!==t})}},g=function(){a=!0},y=function(){a=!1},s=function(){return a};function D(e){var t=e.getData()&&e.getData().get("text-align");return t?"rdw-".concat(t,"-aligned-block"):""}function u(e,t){if(e)for(var n in e)!{}.hasOwnProperty.call(e,n)||t(n,e[n])}function p(e,t){var n=!1;if(e)for(var o in e)if({}.hasOwnProperty.call(e,o)&&t===o){n=!0;break}return n}function d(e){e.stopPropagation()}function h(e){return e[e.options[0]].icon}function M(e,o){if(e&&void 0===o)return e;var r={};return u(e,function(e,t){var n;n=t,"[object Object]"===Object.prototype.toString.call(n)?r[e]=M(t,o[e]):r[e]=void 0!==o[e]?o[e]:t}),r}var b=n(6),j=n.n(b),N=n(5);n(11);function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function I(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var T=function(){function i(){var e,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(r=I(this,(e=O(i)).call.apply(e,[this].concat(n)))).onClick=function(){var e=r.props,t=e.disabled,n=e.onClick,o=e.value;t||n(o)},r}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&A(e,t)}(i,m["Component"]),e=i,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,o=t.className,r=t.activeClassName,i=t.active,a=t.disabled,c=t.title;return S.a.createElement("div",{className:L()("rdw-option-wrapper",o,(w(e={},"rdw-option-active ".concat(r),i),w(e,"rdw-option-disabled",a),e)),onClick:this.onClick,"aria-selected":i,title:c},n)}}])&&x(e.prototype,t),n&&x(e,n),i}();T.propTypes={onClick:f.a.func.isRequired,children:f.a.any,value:f.a.string,className:f.a.string,activeClassName:f.a.string,active:f.a.bool,disabled:f.a.bool,title:f.a.string},T.defaultProps={activeClassName:""};n(12);function z(e){return(z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function P(e,t){return!t||"object"!==z(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function U(e){return(U=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Y(e,t){return(Y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var F=function(){function i(){var e,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(o=P(this,(e=U(i)).call.apply(e,[this].concat(n)))).state={highlighted:-1},o.onChange=function(e){var t=o.props.onChange;t&&t(e),o.toggleExpansion()},o.setHighlighted=function(e){o.setState({highlighted:e})},o.toggleExpansion=function(){var e=o.props,t=e.doExpand,n=e.doCollapse;e.expanded?n():t()},o}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Y(e,t)}(i,m["Component"]),e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.expanded;e.expanded&&!t&&this.setState({highlighted:-1})}},{key:"render",value:function(){var n=this,e=this.props,t=e.expanded,o=e.children,r=e.className,i=e.optionWrapperClassName,a=e.ariaLabel,c=e.onExpandEvent,l=e.title,s=this.state.highlighted,u=o.slice(1,o.length);return S.a.createElement("div",{className:L()("rdw-dropdown-wrapper",r),"aria-expanded":t,"aria-label":a||"rdw-dropdown"},S.a.createElement("a",{className:"rdw-dropdown-selectedtext",onClick:c,title:l},o[0],S.a.createElement("div",{className:L()({"rdw-dropdown-carettoclose":t,"rdw-dropdown-carettoopen":!t})})),t?S.a.createElement("ul",{className:L()("rdw-dropdown-optionwrapper",i),onClick:d},S.a.Children.map(u,function(e,t){return e&&S.a.cloneElement(e,{onSelect:n.onChange,highlighted:s===t,setHighlighted:n.setHighlighted,index:t})})):void 0)}}])&&_(e.prototype,t),n&&_(e,n),i}();F.propTypes={children:f.a.any,onChange:f.a.func,className:f.a.string,expanded:f.a.bool,doExpand:f.a.func,doCollapse:f.a.func,onExpandEvent:f.a.func,optionWrapperClassName:f.a.string,ariaLabel:f.a.string,title:f.a.string};n(13);function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function B(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function H(e,t){return!t||"object"!==R(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Z(e){return(Z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function W(e,t){return(W=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var G=function(){function r(){var e,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(i=H(this,(e=Z(r)).call.apply(e,[this].concat(n)))).onClick=function(e){var t=i.props,n=t.onSelect,o=t.onClick,r=t.value;t.disabled||(n&&n(r),o&&(e.stopPropagation(),o(r)))},i.setHighlighted=function(){var e=i.props;(0,e.setHighlighted)(e.index)},i.resetHighlighted=function(){(0,i.props.setHighlighted)(-1)},i}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&W(e,t)}(r,m["Component"]),e=r,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,o=t.active,r=t.disabled,i=t.highlighted,a=t.className,c=t.activeClassName,l=t.disabledClassName,s=t.highlightedClassName,u=t.title;return S.a.createElement("li",{className:L()("rdw-dropdownoption-default",a,(B(e={},"rdw-dropdownoption-active ".concat(c),o),B(e,"rdw-dropdownoption-highlighted ".concat(s),i),B(e,"rdw-dropdownoption-disabled ".concat(l),r),e)),onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick,title:u},n)}}])&&Q(e.prototype,t),n&&Q(e,n),r}();G.propTypes={children:f.a.any,value:f.a.any,onClick:f.a.func,onSelect:f.a.func,setHighlighted:f.a.func,index:f.a.number,disabled:f.a.bool,active:f.a.bool,highlighted:f.a.bool,className:f.a.string,activeClassName:f.a.string,disabledClassName:f.a.string,highlightedClassName:f.a.string,title:f.a.string},G.defaultProps={activeClassName:"",disabledClassName:"",highlightedClassName:""};n(14);function J(e){return(J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function V(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function q(e,t){return!t||"object"!==J(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function X(e,t){return(X=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var $=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),q(this,K(e).apply(this,arguments))}var t,n,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&X(e,t)}(e,m["Component"]),t=e,(n=[{key:"renderInFlatList",value:function(){var e=this.props,n=e.config,o=e.currentState,r=e.onChange,i=e.translations;return S.a.createElement("div",{className:L()("rdw-inline-wrapper",n.className),"aria-label":"rdw-inline-control"},n.options.map(function(e,t){return S.a.createElement(T,{key:t,value:e,onClick:r,className:L()(n[e].className),active:!0===o[e]||"MONOSPACE"===e&&o.CODE,title:n[e].title||i["components.controls.inline.".concat(e)]},S.a.createElement("img",{alt:"",src:n[e].icon}))}))}},{key:"renderInDropDown",value:function(){var e=this.props,n=e.config,t=e.expanded,o=e.doExpand,r=e.onExpandEvent,i=e.doCollapse,a=e.currentState,c=e.onChange,l=e.translations,s=n.className,u=n.dropdownClassName,p=n.title;return S.a.createElement(F,{className:L()("rdw-inline-dropdown",s),optionWrapperClassName:L()(u),onChange:c,expanded:t,doExpand:o,doCollapse:i,onExpandEvent:r,"aria-label":"rdw-inline-control",title:p},S.a.createElement("img",{src:h(n),alt:""}),n.options.map(function(e,t){return S.a.createElement(G,{key:t,value:e,className:L()("rdw-inline-dropdownoption",n[e].className),active:!0===a[e]||"MONOSPACE"===e&&a.CODE,title:n[e].title||l["components.controls.inline.".concat(e)]},S.a.createElement("img",{src:n[e].icon,alt:""}))}))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&V(t.prototype,n),o&&V(t,o),e}();function ee(e){return(ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function te(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ne(e,t){return!t||"object"!==ee(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function oe(e){return(oe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function re(e,t){return(re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}$.propTypes={expanded:f.a.bool,doExpand:f.a.func,doCollapse:f.a.func,onExpandEvent:f.a.func,config:f.a.object,onChange:f.a.func,currentState:f.a.object,translations:f.a.object};var ie=function(){function r(e){var l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(l=ne(this,oe(r).call(this,e))).onExpandEvent=function(){l.signalExpanded=!l.state.expanded},l.expandCollapse=function(){l.setState({expanded:l.signalExpanded}),l.signalExpanded=!1},l.toggleInlineStyle=function(e){var t="monospace"===e?"CODE":e.toUpperCase(),n=l.props,o=n.editorState,r=n.onChange,i=E.RichUtils.toggleInlineStyle(o,t);if("subscript"===e||"superscript"===e){var a="subscript"===e?"SUPERSCRIPT":"SUBSCRIPT",c=E.Modifier.removeInlineStyle(i.getCurrentContent(),i.getSelection(),a);i=E.EditorState.push(i,c,"change-inline-style")}i&&r(i)},l.changeKeys=function(e){if(e){var n={};return u(e,function(e,t){n["CODE"===e?"monospace":e.toLowerCase()]=t}),n}},l.doExpand=function(){l.setState({expanded:!0})},l.doCollapse=function(){l.setState({expanded:!1})};var t=l.props,n=t.editorState,o=t.modalHandler;return l.state={currentStyles:n?l.changeKeys(Object(C.getSelectionInlineStyle)(n)):{}},o.registerCallBack(l.expandCollapse),l}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&re(e,t)}(r,m["Component"]),e=r,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentStyles:this.changeKeys(Object(C.getSelectionInlineStyle)(t))})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,o=this.state,r=o.expanded,i=o.currentStyles,a=t.component||$;return S.a.createElement(a,{config:t,translations:n,currentState:i,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle})}}])&&te(e.prototype,t),n&&te(e,n),r}();ie.propTypes={onChange:f.a.func.isRequired,editorState:f.a.object.isRequired,modalHandler:f.a.object,config:f.a.object,translations:f.a.object};n(15);function ae(e){return(ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ce(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function le(e,t){return!t||"object"!==ae(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function se(e){return(se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ue(e,t){return(ue=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var pe=function(){function n(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(t=le(this,se(n).call(this,e))).getBlockTypes=function(e){return[{label:"Normal",displayName:e["components.controls.blocktype.normal"]},{label:"H1",displayName:e["components.controls.blocktype.h1"]},{label:"H2",displayName:e["components.controls.blocktype.h2"]},{label:"H3",displayName:e["components.controls.blocktype.h3"]},{label:"H4",displayName:e["components.controls.blocktype.h4"]},{label:"H5",displayName:e["components.controls.blocktype.h5"]},{label:"H6",displayName:e["components.controls.blocktype.h6"]},{label:"Blockquote",displayName:e["components.controls.blocktype.blockquote"]},{label:"Code",displayName:e["components.controls.blocktype.code"]}]},t.state={blockTypes:t.getBlockTypes(e.translations)},t}var e,t,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ue(e,t)}(n,m["Component"]),e=n,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.translations;t!==e.translations&&this.setState({blockTypes:this.getBlockTypes(t)})}},{key:"renderFlat",value:function(e){var t=this.props,n=t.config.className,o=t.onChange,r=t.currentState.blockType;return S.a.createElement("div",{className:L()("rdw-inline-wrapper",n)},e.map(function(e,t){return S.a.createElement(T,{key:t,value:e.label,active:r===e.label,onClick:o},e.displayName)}))}},{key:"renderInDropdown",value:function(e){var t=this.props,n=t.config,o=n.className,r=n.dropdownClassName,i=n.title,a=t.currentState.blockType,c=t.expanded,l=t.doExpand,s=t.onExpandEvent,u=t.doCollapse,p=t.onChange,d=t.translations,m=this.state.blockTypes.filter(function(e){return e.label===a}),f=m&&m[0]&&m[0].displayName;return S.a.createElement("div",{className:"rdw-block-wrapper","aria-label":"rdw-block-control"},S.a.createElement(F,{className:L()("rdw-block-dropdown",o),optionWrapperClassName:L()(r),onChange:p,expanded:c,doExpand:l,doCollapse:u,onExpandEvent:s,title:i||d["components.controls.blocktype.blocktype"]},S.a.createElement("span",null,f||d["components.controls.blocktype.blocktype"]),e.map(function(e,t){return S.a.createElement(G,{active:a===e.label,value:e.label,key:t},e.displayName)})))}},{key:"render",value:function(){var n=this.props.config,e=n.inDropdown,t=this.state.blockTypes.filter(function(e){var t=e.label;return-1<n.options.indexOf(t)});return e?this.renderInDropdown(t):this.renderFlat(t)}}])&&ce(e.prototype,t),o&&ce(e,o),n}();pe.propTypes={expanded:f.a.bool,onExpandEvent:f.a.func,doExpand:f.a.func,doCollapse:f.a.func,onChange:f.a.func,config:f.a.object,currentState:f.a.object,translations:f.a.object};var de=pe;function me(e){return(me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ge(e,t){return!t||"object"!==me(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function ye(e){return(ye=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function he(e,t){return(he=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Me=function(){function o(e){var a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(a=ge(this,ye(o).call(this,e))).onExpandEvent=function(){a.signalExpanded=!a.state.expanded},a.expandCollapse=function(){a.setState({expanded:a.signalExpanded}),a.signalExpanded=!1},a.blocksTypes=[{label:"Normal",style:"unstyled"},{label:"H1",style:"header-one"},{label:"H2",style:"header-two"},{label:"H3",style:"header-three"},{label:"H4",style:"header-four"},{label:"H5",style:"header-five"},{label:"H6",style:"header-six"},{label:"Blockquote",style:"blockquote"},{label:"Code",style:"code"}],a.doExpand=function(){a.setState({expanded:!0})},a.doCollapse=function(){a.setState({expanded:!1})},a.toggleBlockType=function(t){var e=a.blocksTypes.find(function(e){return e.label===t}).style,n=a.props,o=n.editorState,r=n.onChange,i=E.RichUtils.toggleBlockType(o,e);i&&r(i)};var t=e.editorState,n=e.modalHandler;return a.state={expanded:!1,currentBlockType:t?Object(C.getSelectedBlocksType)(t):"unstyled"},n.registerCallBack(a.expandCollapse),a}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&he(e,t)}(o,m["Component"]),e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlockType:Object(C.getSelectedBlocksType)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,o=this.state,r=o.expanded,i=o.currentBlockType,a=t.component||de,c=this.blocksTypes.find(function(e){return e.style===i});return S.a.createElement(a,{config:t,translations:n,currentState:{blockType:c&&c.label},onChange:this.toggleBlockType,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&fe(e.prototype,t),n&&fe(e,n),o}();Me.propTypes={onChange:f.a.func.isRequired,editorState:f.a.object,modalHandler:f.a.object,config:f.a.object,translations:f.a.object};var be=Me;n(16);function je(e){return(je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ne(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Se(e,t){return!t||"object"!==je(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Ee(e){return(Ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ce(e,t){return(Ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Le=function(){function i(){var e,t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=Se(this,(e=Ee(i)).call.apply(e,[this].concat(o)))).state={defaultFontSize:void 0},t}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ce(e,t)}(i,m["Component"]),e=i,(t=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");if(e&&0<e.length){var t=window.getComputedStyle(e[0]).getPropertyValue("font-size");t=t.substring(0,t.length-2),this.setState({defaultFontSize:t})}}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,o=t.className,r=t.dropdownClassName,i=t.options,a=t.title,c=e.onChange,l=e.expanded,s=e.doCollapse,u=e.onExpandEvent,p=e.doExpand,d=e.translations,m=this.props.currentState.fontSize,f=this.state.defaultFontSize;return f=Number(f),m=m||i&&0<=i.indexOf(f)&&f,S.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},S.a.createElement(F,{className:L()("rdw-fontsize-dropdown",o),optionWrapperClassName:L()(r),onChange:c,expanded:l,doExpand:p,doCollapse:s,onExpandEvent:u,title:a||d["components.controls.fontsize.fontsize"]},m?S.a.createElement("span",null,m):S.a.createElement("img",{src:n,alt:""}),i.map(function(e,t){return S.a.createElement(G,{className:"rdw-fontsize-option",active:m===e,value:e,key:t},e)})))}}])&&Ne(e.prototype,t),n&&Ne(e,n),i}();function ke(e){return(ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function De(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ve(e,t){return!t||"object"!==ke(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function we(e){return(we=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xe(e,t){return(xe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Le.propTypes={expanded:f.a.bool,onExpandEvent:f.a.func,doExpand:f.a.func,doCollapse:f.a.func,onChange:f.a.func,config:f.a.object,currentState:f.a.object,translations:f.a.object};var Ie=function(){function o(e){var i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(i=ve(this,we(o).call(this,e))).onExpandEvent=function(){i.signalExpanded=!i.state.expanded},i.expandCollapse=function(){i.setState({expanded:i.signalExpanded}),i.signalExpanded=!1},i.doExpand=function(){i.setState({expanded:!0})},i.doCollapse=function(){i.setState({expanded:!1})},i.toggleFontSize=function(e){var t=i.props,n=t.editorState,o=t.onChange,r=Object(C.toggleCustomInlineStyle)(n,"fontSize",e);r&&o(r)};var t=e.editorState,n=e.modalHandler;return i.state={expanded:void 0,currentFontSize:t?Object(C.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE:void 0},n.registerCallBack(i.expandCollapse),i}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xe(e,t)}(o,m["Component"]),e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontSize:Object(C.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,o=this.state,r=o.expanded,i=o.currentFontSize,a=t.component||Le,c=i&&Number(i.substring(9));return S.a.createElement(a,{config:t,translations:n,currentState:{fontSize:c},onChange:this.toggleFontSize,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&De(e.prototype,t),n&&De(e,n),o}();Ie.propTypes={onChange:f.a.func.isRequired,editorState:f.a.object,modalHandler:f.a.object,config:f.a.object,translations:f.a.object};n(17);function Oe(e){return(Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ae(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Te(e,t){return!t||"object"!==Oe(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function ze(e){return(ze=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _e(e,t){return(_e=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Pe=function(){function i(){var e,t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=Te(this,(e=ze(i)).call.apply(e,[this].concat(o)))).state={defaultFontFamily:void 0},t}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_e(e,t)}(i,m["Component"]),e=i,(t=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");if(e&&0<e.length){var t=window.getComputedStyle(e[0]).getPropertyValue("font-family");this.setState({defaultFontFamily:t})}}},{key:"render",value:function(){var t=this.state.defaultFontFamily,e=this.props,n=e.config,o=n.className,r=n.dropdownClassName,i=n.options,a=n.title,c=e.translations,l=e.onChange,s=e.expanded,u=e.doCollapse,p=e.onExpandEvent,d=e.doExpand,m=this.props.currentState.fontFamily;return m=m||i&&t&&i.some(function(e){return e.toLowerCase()===t.toLowerCase()})&&t,S.a.createElement("div",{className:"rdw-fontfamily-wrapper","aria-label":"rdw-font-family-control"},S.a.createElement(F,{className:L()("rdw-fontfamily-dropdown",o),optionWrapperClassName:L()("rdw-fontfamily-optionwrapper",r),onChange:l,expanded:s,doExpand:d,doCollapse:u,onExpandEvent:p,title:a||c["components.controls.fontfamily.fontfamily"]},S.a.createElement("span",{className:"rdw-fontfamily-placeholder"},m||c["components.controls.fontfamily.fontfamily"]),i.map(function(e,t){return S.a.createElement(G,{active:m===e,value:e,key:t},e)})))}}])&&Ae(e.prototype,t),n&&Ae(e,n),i}();Pe.propTypes={expanded:f.a.bool,onExpandEvent:f.a.func,doExpand:f.a.func,doCollapse:f.a.func,onChange:f.a.func,config:f.a.object,currentState:f.a.object,translations:f.a.object};var Ue=Pe;function Ye(e){return(Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Fe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Re(e,t){return!t||"object"!==Ye(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Be(e){return(Be=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Qe(e,t){return(Qe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var He=function(){function o(e){var i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(i=Re(this,Be(o).call(this,e))).onExpandEvent=function(){i.signalExpanded=!i.state.expanded},i.expandCollapse=function(){i.setState({expanded:i.signalExpanded}),i.signalExpanded=!1},i.doExpand=function(){i.setState({expanded:!0})},i.doCollapse=function(){i.setState({expanded:!1})},i.toggleFontFamily=function(e){var t=i.props,n=t.editorState,o=t.onChange,r=Object(C.toggleCustomInlineStyle)(n,"fontFamily",e);r&&o(r)};var t=e.editorState,n=e.modalHandler;return i.state={expanded:void 0,currentFontFamily:t?Object(C.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY:void 0},n.registerCallBack(i.expandCollapse),i}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qe(e,t)}(o,m["Component"]),e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontFamily:Object(C.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,o=this.state,r=o.expanded,i=o.currentFontFamily,a=t.component||Ue,c=i&&i.substring(11);return S.a.createElement(a,{translations:n,config:t,currentState:{fontFamily:c},onChange:this.toggleFontFamily,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Fe(e.prototype,t),n&&Fe(e,n),o}();He.propTypes={onChange:f.a.func.isRequired,editorState:f.a.object,modalHandler:f.a.object,config:f.a.object,translations:f.a.object};n(18);function Ze(e){return(Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function We(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ge(e,t){return!t||"object"!==Ze(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Je(e){return(Je=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ve(e,t){return(Ve=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var qe=function(){function i(){var e,t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=Ge(this,(e=Je(i)).call.apply(e,[this].concat(o)))).options=["unordered","ordered","indent","outdent"],t.toggleBlockType=function(e){(0,t.props.onChange)(e)},t.indent=function(){(0,t.props.onChange)("indent")},t.outdent=function(){(0,t.props.onChange)("outdent")},t}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ve(e,t)}(i,m["Component"]),e=i,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState.listType,o=e.translations,r=e.indentDisabled,i=e.outdentDisabled,a=t.options,c=t.unordered,l=t.ordered,s=t.indent,u=t.outdent,p=t.className;return S.a.createElement("div",{className:L()("rdw-list-wrapper",p),"aria-label":"rdw-list-control"},0<=a.indexOf("unordered")&&S.a.createElement(T,{value:"unordered",onClick:this.toggleBlockType,className:L()(c.className),active:"unordered"===n,title:c.title||o["components.controls.list.unordered"]},S.a.createElement("img",{src:c.icon,alt:""})),0<=a.indexOf("ordered")&&S.a.createElement(T,{value:"ordered",onClick:this.toggleBlockType,className:L()(l.className),active:"ordered"===n,title:l.title||o["components.controls.list.ordered"]},S.a.createElement("img",{src:l.icon,alt:""})),0<=a.indexOf("indent")&&S.a.createElement(T,{onClick:this.indent,disabled:r,className:L()(s.className),title:s.title||o["components.controls.list.indent"]},S.a.createElement("img",{src:s.icon,alt:""})),0<=a.indexOf("outdent")&&S.a.createElement(T,{onClick:this.outdent,disabled:i,className:L()(u.className),title:u.title||o["components.controls.list.outdent"]},S.a.createElement("img",{src:u.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var n=this,e=this.props,o=e.config,t=e.expanded,r=e.doCollapse,i=e.doExpand,a=e.onExpandEvent,c=e.onChange,l=e.currentState.listType,s=e.translations,u=o.options,p=o.className,d=o.dropdownClassName,m=o.title;return S.a.createElement(F,{className:L()("rdw-list-dropdown",p),optionWrapperClassName:L()(d),onChange:c,expanded:t,doExpand:i,doCollapse:r,onExpandEvent:a,"aria-label":"rdw-list-control",title:m||s["components.controls.list.list"]},S.a.createElement("img",{src:h(o),alt:""}),this.options.filter(function(e){return 0<=u.indexOf(e)}).map(function(e,t){return S.a.createElement(G,{key:t,value:e,disabled:n.props["".concat(e,"Disabled")],className:L()("rdw-list-dropdownOption",o[e].className),active:l===e,title:o[e].title||s["components.controls.list.".concat(e)]},S.a.createElement("img",{src:o[e].icon,alt:""}))}))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&We(e.prototype,t),n&&We(e,n),i}();function Ke(e){return(Ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function $e(e,t){return!t||"object"!==Ke(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function et(e){return(et=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tt(e,t){return(tt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}qe.propTypes={expanded:f.a.bool,doExpand:f.a.func,doCollapse:f.a.func,onExpandEvent:f.a.func,config:f.a.object,onChange:f.a.func,currentState:f.a.object,translations:f.a.object,indentDisabled:f.a.bool,outdentDisabled:f.a.bool};var nt=function(){function r(e){var i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(i=$e(this,et(r).call(this,e))).onExpandEvent=function(){i.signalExpanded=!i.state.expanded},i.onChange=function(e){"unordered"===e?i.toggleBlockType("unordered-list-item"):"ordered"===e?i.toggleBlockType("ordered-list-item"):"indent"===e?i.adjustDepth(1):i.adjustDepth(-1)},i.expandCollapse=function(){i.setState({expanded:i.signalExpanded}),i.signalExpanded=!1},i.doExpand=function(){i.setState({expanded:!0})},i.doCollapse=function(){i.setState({expanded:!1})},i.toggleBlockType=function(e){var t=i.props,n=t.onChange,o=t.editorState,r=E.RichUtils.toggleBlockType(o,e);r&&n(r)},i.adjustDepth=function(e){var t=i.props,n=t.onChange,o=t.editorState,r=Object(C.changeDepth)(o,e,4);r&&n(r)},i.isIndentDisabled=function(){var e=i.props.editorState,t=i.state.currentBlock,n=Object(C.getBlockBeforeSelectedBlock)(e);return!n||!Object(C.isListBlock)(t)||n.get("type")!==t.get("type")||n.get("depth")<t.get("depth")},i.isOutdentDisabled=function(){var e=i.state.currentBlock;return!e||!Object(C.isListBlock)(e)||e.get("depth")<=0};var t=i.props,n=t.editorState,o=t.modalHandler;return i.state={expanded:!1,currentBlock:n?Object(C.getSelectedBlock)(n):void 0},o.registerCallBack(i.expandCollapse),i}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tt(e,t)}(r,m["Component"]),e=r,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlock:Object(C.getSelectedBlock)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e,t=this.props,n=t.config,o=t.translations,r=this.state,i=r.expanded,a=r.currentBlock,c=n.component||qe;"unordered-list-item"===a.get("type")?e="unordered":"ordered-list-item"===a.get("type")&&(e="ordered");var l=this.isIndentDisabled(),s=this.isOutdentDisabled();return S.a.createElement(c,{config:n,translations:o,currentState:{listType:e},expanded:i,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange,indentDisabled:l,outdentDisabled:s})}}])&&Xe(e.prototype,t),n&&Xe(e,n),r}();nt.propTypes={onChange:f.a.func.isRequired,editorState:f.a.object.isRequired,modalHandler:f.a.object,config:f.a.object,translations:f.a.object};n(19);function ot(e){return(ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function it(e,t){return!t||"object"!==ot(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function at(e){return(at=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ct(e,t){return(ct=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var lt=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),it(this,at(e).apply(this,arguments))}var t,n,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ct(e,t)}(e,m["Component"]),t=e,(n=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,o=t.left,r=t.center,i=t.right,a=t.justify,c=t.className,l=e.onChange,s=e.currentState.textAlignment,u=e.translations;return S.a.createElement("div",{className:L()("rdw-text-align-wrapper",c),"aria-label":"rdw-textalign-control"},0<=n.indexOf("left")&&S.a.createElement(T,{value:"left",className:L()(o.className),active:"left"===s,onClick:l,title:o.title||u["components.controls.textalign.left"]},S.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("center")&&S.a.createElement(T,{value:"center",className:L()(r.className),active:"center"===s,onClick:l,title:r.title||u["components.controls.textalign.center"]},S.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("right")&&S.a.createElement(T,{value:"right",className:L()(i.className),active:"right"===s,onClick:l,title:i.title||u["components.controls.textalign.right"]},S.a.createElement("img",{src:i.icon,alt:""})),0<=n.indexOf("justify")&&S.a.createElement(T,{value:"justify",className:L()(a.className),active:"justify"===s,onClick:l,title:a.title||u["components.controls.textalign.justify"]},S.a.createElement("img",{src:a.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,o=e.doExpand,r=e.onExpandEvent,i=e.doCollapse,a=e.currentState.textAlignment,c=e.onChange,l=e.translations,s=t.options,u=t.left,p=t.center,d=t.right,m=t.justify,f=t.className,g=t.dropdownClassName,y=t.title;return S.a.createElement(F,{className:L()("rdw-text-align-dropdown",f),optionWrapperClassName:L()(g),onChange:c,expanded:n,doExpand:o,doCollapse:i,onExpandEvent:r,"aria-label":"rdw-textalign-control",title:y||l["components.controls.textalign.textalign"]},S.a.createElement("img",{src:a&&t[a]&&t[a].icon||h(t),alt:""}),0<=s.indexOf("left")&&S.a.createElement(G,{value:"left",active:"left"===a,className:L()("rdw-text-align-dropdownOption",u.className),title:u.title||l["components.controls.textalign.left"]},S.a.createElement("img",{src:u.icon,alt:""})),0<=s.indexOf("center")&&S.a.createElement(G,{value:"center",active:"center"===a,className:L()("rdw-text-align-dropdownOption",p.className),title:p.title||l["components.controls.textalign.center"]},S.a.createElement("img",{src:p.icon,alt:""})),0<=s.indexOf("right")&&S.a.createElement(G,{value:"right",active:"right"===a,className:L()("rdw-text-align-dropdownOption",d.className),title:d.title||l["components.controls.textalign.right"]},S.a.createElement("img",{src:d.icon,alt:""})),0<=s.indexOf("justify")&&S.a.createElement(G,{value:"justify",active:"justify"===a,className:L()("rdw-text-align-dropdownOption",m.className),title:m.title||l["components.controls.textalign.justify"]},S.a.createElement("img",{src:m.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&rt(t.prototype,n),o&&rt(t,o),e}();function st(e){return(st="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ut(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function pt(e,t){return!t||"object"!==st(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function dt(e){return(dt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mt(e,t){return(mt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}lt.propTypes={expanded:f.a.bool,doExpand:f.a.func,doCollapse:f.a.func,onExpandEvent:f.a.func,config:f.a.object,onChange:f.a.func,currentState:f.a.object,translations:f.a.object};var ft=function(){function n(e){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=pt(this,dt(n).call(this,e))).onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})},r.addBlockAlignmentData=function(e){var t=r.props,n=t.editorState,o=t.onChange;o(r.state.currentTextAlignment!==e?Object(C.setBlockData)(n,{"text-align":e}):Object(C.setBlockData)(n,{"text-align":void 0}))};var t=r.props.modalHandler;return r.state={currentTextAlignment:void 0},t.registerCallBack(r.expandCollapse),r}var e,t,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mt(e,t)}(n,m["Component"]),e=n,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t!==e.editorState&&this.setState({currentTextAlignment:Object(C.getSelectedBlocksMetadata)(t).get("text-align")})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,o=this.state,r=o.expanded,i=o.currentTextAlignment,a=t.component||lt;return S.a.createElement(a,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:i},onChange:this.addBlockAlignmentData})}}])&&ut(e.prototype,t),o&&ut(e,o),n}();ft.propTypes={editorState:f.a.object.isRequired,onChange:f.a.func.isRequired,modalHandler:f.a.object,config:f.a.object,translations:f.a.object};n(20);function gt(e){return(gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ht(e,t){return!t||"object"!==gt(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Mt(e){return(Mt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function bt(e,t){return(bt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var jt=function(){function r(){var e,u;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(u=ht(this,(e=Mt(r)).call.apply(e,[this].concat(n)))).state={currentStyle:"color"},u.onChange=function(e){(0,u.props.onChange)(u.state.currentStyle,e)},u.setCurrentStyleColor=function(){u.setState({currentStyle:"color"})},u.setCurrentStyleBgcolor=function(){u.setState({currentStyle:"bgcolor"})},u.renderModal=function(){var e=u.props,t=e.config,n=t.popupClassName,o=t.colors,r=e.currentState,i=r.color,a=r.bgColor,c=e.translations,l=u.state.currentStyle,s="color"===l?i:a;return S.a.createElement("div",{className:L()("rdw-colorpicker-modal",n),onClick:d},S.a.createElement("span",{className:"rdw-colorpicker-modal-header"},S.a.createElement("span",{className:L()("rdw-colorpicker-modal-style-label",{"rdw-colorpicker-modal-style-label-active":"color"===l}),onClick:u.setCurrentStyleColor},c["components.controls.colorpicker.text"]),S.a.createElement("span",{className:L()("rdw-colorpicker-modal-style-label",{"rdw-colorpicker-modal-style-label-active":"bgcolor"===l}),onClick:u.setCurrentStyleBgcolor},c["components.controls.colorpicker.background"])),S.a.createElement("span",{className:"rdw-colorpicker-modal-options"},o.map(function(e,t){return S.a.createElement(T,{value:e,key:t,className:"rdw-colorpicker-option",activeClassName:"rdw-colorpicker-option-active",active:s===e,onClick:u.onChange},S.a.createElement("span",{style:{backgroundColor:e},className:"rdw-colorpicker-cube"}))})))},u}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bt(e,t)}(r,m["Component"]),e=r,(t=[{key:"componentDidUpdate",value:function(e){this.props.expanded&&!e.expanded&&this.setState({currentStyle:"color"})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,o=t.className,r=t.title,i=e.expanded,a=e.onExpandEvent,c=e.translations;return S.a.createElement("div",{className:"rdw-colorpicker-wrapper","aria-haspopup":"true","aria-expanded":i,"aria-label":"rdw-color-picker",title:r||c["components.controls.colorpicker.colorpicker"]},S.a.createElement(T,{onClick:a,className:L()(o)},S.a.createElement("img",{src:n,alt:""})),i?this.renderModal():void 0)}}])&&yt(e.prototype,t),n&&yt(e,n),r}();jt.propTypes={expanded:f.a.bool,onExpandEvent:f.a.func,onChange:f.a.func,config:f.a.object,currentState:f.a.object,translations:f.a.object};var Nt=jt;function St(e){return(St="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Et(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ct(e,t){return!t||"object"!==St(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Lt(e){return(Lt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function kt(e,t){return(kt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Dt=function(){function r(e){var a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(a=Ct(this,Lt(r).call(this,e))).state={expanded:!1,currentColor:void 0,currentBgColor:void 0},a.onExpandEvent=function(){a.signalExpanded=!a.state.expanded},a.expandCollapse=function(){a.setState({expanded:a.signalExpanded}),a.signalExpanded=!1},a.doExpand=function(){a.setState({expanded:!0})},a.doCollapse=function(){a.setState({expanded:!1})},a.toggleColor=function(e,t){var n=a.props,o=n.editorState,r=n.onChange,i=Object(C.toggleCustomInlineStyle)(o,e,t);i&&r(i),a.doCollapse()};var t=e.editorState,n=e.modalHandler,o={expanded:!1,currentColor:void 0,currentBgColor:void 0};return t&&(o.currentColor=Object(C.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR,o.currentBgColor=Object(C.getSelectionCustomInlineStyle)(t,["BGCOLOR"]).BGCOLOR),a.state=o,n.registerCallBack(a.expandCollapse),a}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&kt(e,t)}(r,m["Component"]),e=r,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentColor:Object(C.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR,currentBgColor:Object(C.getSelectionCustomInlineStyle)(t,["BGCOLOR"]).BGCOLOR})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,o=this.state,r=o.currentColor,i=o.currentBgColor,a=o.expanded,c=t.component||Nt,l=r&&r.substring(6),s=i&&i.substring(8);return S.a.createElement(c,{config:t,translations:n,onChange:this.toggleColor,expanded:a,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{color:l,bgColor:s}})}}])&&Et(e.prototype,t),n&&Et(e,n),r}();Dt.propTypes={onChange:f.a.func.isRequired,editorState:f.a.object.isRequired,modalHandler:f.a.object,config:f.a.object,translations:f.a.object};var vt=Dt,wt=n(7),xt=n.n(wt);n(26);function It(e){return(It="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ot(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function At(e,t){return!t||"object"!==It(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Tt(e){return(Tt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function zt(e,t){return(zt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _t=function(){function r(){var e,a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(a=At(this,(e=Tt(r)).call.apply(e,[this].concat(n)))).state={showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:a.props.config.defaultTargetOption},a.removeLink=function(){(0,a.props.onChange)("unlink")},a.addLink=function(){var e=a.props.onChange,t=a.state;e("link",t.linkTitle,t.linkTarget,t.linkTargetOption)},a.updateValue=function(e){var t,n,o;a.setState((t={},n="".concat(e.target.name),o=e.target.value,n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t))},a.updateTargetOption=function(e){a.setState({linkTargetOption:e.target.checked?"_blank":"_self"})},a.hideModal=function(){a.setState({showModal:!1})},a.signalExpandShowModal=function(){var e=a.props,t=e.onExpandEvent,n=e.currentState,o=n.link,r=n.selectionText,i=a.state.linkTargetOption;t(),a.setState({showModal:!0,linkTarget:o&&o.target||"",linkTargetOption:o&&o.targetOption||i,linkTitle:o&&o.title||r})},a.forceExpandAndShowModal=function(){var e=a.props,t=e.doExpand,n=e.currentState,o=n.link,r=n.selectionText,i=a.state.linkTargetOption;t(),a.setState({showModal:!0,linkTarget:o&&o.target,linkTargetOption:o&&o.targetOption||i,linkTitle:o&&o.title||r})},a}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zt(e,t)}(r,m["Component"]),e=r,(t=[{key:"componentDidUpdate",value:function(e){e.expanded&&!this.props.expanded&&this.setState({showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:this.props.config.defaultTargetOption})}},{key:"renderAddLinkModal",value:function(){var e=this.props,t=e.config.popupClassName,n=e.doCollapse,o=e.translations,r=this.state,i=r.linkTitle,a=r.linkTarget,c=r.linkTargetOption;return S.a.createElement("div",{className:L()("rdw-link-modal",t),onClick:d},S.a.createElement("label",{className:"rdw-link-modal-label",htmlFor:"linkTitle"},o["components.controls.link.linkTitle"]),S.a.createElement("input",{id:"linkTitle",className:"rdw-link-modal-input",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTitle",value:i}),S.a.createElement("label",{className:"rdw-link-modal-label",htmlFor:"linkTarget"},o["components.controls.link.linkTarget"]),S.a.createElement("input",{id:"linkTarget",className:"rdw-link-modal-input",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTarget",value:a}),S.a.createElement("label",{className:"rdw-link-modal-target-option",htmlFor:"openLinkInNewWindow"},S.a.createElement("input",{id:"openLinkInNewWindow",type:"checkbox",defaultChecked:"_blank"===c,value:"_blank",onChange:this.updateTargetOption}),S.a.createElement("span",null,o["components.controls.link.linkTargetOption"])),S.a.createElement("span",{className:"rdw-link-modal-buttonsection"},S.a.createElement("button",{className:"rdw-link-modal-btn",onClick:this.addLink,disabled:!a||!i},o["generic.add"]),S.a.createElement("button",{className:"rdw-link-modal-btn",onClick:n},o["generic.cancel"])))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,o=t.link,r=t.unlink,i=t.className,a=e.currentState,c=e.expanded,l=e.translations,s=this.state.showModal;return S.a.createElement("div",{className:L()("rdw-link-wrapper",i),"aria-label":"rdw-link-control"},0<=n.indexOf("link")&&S.a.createElement(T,{value:"unordered-list-item",className:L()(o.className),onClick:this.signalExpandShowModal,"aria-haspopup":"true","aria-expanded":s,title:o.title||l["components.controls.link.link"]},S.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("unlink")&&S.a.createElement(T,{disabled:!a.link,value:"ordered-list-item",className:L()(r.className),onClick:this.removeLink,title:r.title||l["components.controls.link.unlink"]},S.a.createElement("img",{src:r.icon,alt:""})),c&&s?this.renderAddLinkModal():void 0)}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.expanded,n=e.onExpandEvent,o=e.doCollapse,r=e.doExpand,i=e.onChange,a=e.config,c=e.currentState,l=e.translations,s=a.options,u=a.link,p=a.unlink,d=a.className,m=a.dropdownClassName,f=a.title,g=this.state.showModal;return S.a.createElement("div",{className:"rdw-link-wrapper","aria-haspopup":"true","aria-label":"rdw-link-control","aria-expanded":t,title:f},S.a.createElement(F,{className:L()("rdw-link-dropdown",d),optionWrapperClassName:L()(m),onChange:i,expanded:t&&!g,doExpand:r,doCollapse:o,onExpandEvent:n},S.a.createElement("img",{src:h(a),alt:""}),0<=s.indexOf("link")&&S.a.createElement(G,{onClick:this.forceExpandAndShowModal,className:L()("rdw-link-dropdownoption",u.className),title:u.title||l["components.controls.link.link"]},S.a.createElement("img",{src:u.icon,alt:""})),0<=s.indexOf("unlink")&&S.a.createElement(G,{onClick:this.removeLink,disabled:!c.link,className:L()("rdw-link-dropdownoption",p.className),title:p.title||l["components.controls.link.unlink"]},S.a.createElement("img",{src:p.icon,alt:""}))),t&&g?this.renderAddLinkModal():void 0)}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Ot(e.prototype,t),n&&Ot(e,n),r}();_t.propTypes={expanded:f.a.bool,doExpand:f.a.func,doCollapse:f.a.func,onExpandEvent:f.a.func,config:f.a.object,onChange:f.a.func,currentState:f.a.object,translations:f.a.object};var Pt=_t;function Ut(e){return(Ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Yt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ft(e,t){return!t||"object"!==Ut(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Rt(e){return(Rt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Bt(e,t){return(Bt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,o)}return n}function Ht(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zt(e){var t=Wt.match(e.target);return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Qt(Object(n),!0).forEach(function(e){Ht(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},e,{target:t&&t[0]&&t[0].url||e.target})}var Wt=xt()(),Gt=function(){function r(e){var d;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(d=Ft(this,Rt(r).call(this,e))).onExpandEvent=function(){d.signalExpanded=!d.state.expanded},d.onChange=function(e,t,n,o){var r=d.props.config.linkCallback;if("link"===e){var i=(r||Zt)({title:t,target:n,targetOption:o});d.addLink(i.title,i.target,i.targetOption)}else d.removeLink()},d.getCurrentValues=function(){var e=d.props.editorState,t=d.state.currentEntity,n=e.getCurrentContent(),o={};if(t&&"LINK"===n.getEntity(t).get("type")){o.link={};var r=t&&Object(C.getEntityRange)(e,t);o.link.target=t&&n.getEntity(t).get("data").url,o.link.targetOption=t&&n.getEntity(t).get("data").targetOption,o.link.title=r&&r.text}return o.selectionText=Object(C.getSelectionText)(e),o},d.doExpand=function(){d.setState({expanded:!0})},d.expandCollapse=function(){d.setState({expanded:d.signalExpanded}),d.signalExpanded=!1},d.doCollapse=function(){d.setState({expanded:!1})},d.removeLink=function(){var e=d.props,t=e.editorState,n=e.onChange,o=d.state.currentEntity,r=t.getSelection();if(o){var i=Object(C.getEntityRange)(t,o);r=r.getIsBackward()?r.merge({anchorOffset:i.end,focusOffset:i.start}):r.merge({anchorOffset:i.start,focusOffset:i.end}),n(E.RichUtils.toggleLink(t,r,null))}},d.addLink=function(e,t,n){var o=d.props,r=o.editorState,i=o.onChange,a=d.state.currentEntity,c=r.getSelection();if(a){var l=Object(C.getEntityRange)(r,a);c=c.getIsBackward()?c.merge({anchorOffset:l.end,focusOffset:l.start}):c.merge({anchorOffset:l.start,focusOffset:l.end})}var s=r.getCurrentContent().createEntity("LINK","MUTABLE",{url:t,targetOption:n}).getLastCreatedEntityKey(),u=E.Modifier.replaceText(r.getCurrentContent(),c,"".concat(e),r.getCurrentInlineStyle(),s),p=E.EditorState.push(r,u,"insert-characters");c=p.getSelection().merge({anchorOffset:c.get("anchorOffset")+e.length,focusOffset:c.get("anchorOffset")+e.length}),p=E.EditorState.acceptSelection(p,c),u=E.Modifier.insertText(p.getCurrentContent(),c," ",p.getCurrentInlineStyle(),void 0),i(E.EditorState.push(p,u,"insert-characters")),d.doCollapse()};var t=d.props,n=t.editorState,o=t.modalHandler;return d.state={expanded:!1,link:void 0,selectionText:void 0,currentEntity:n?Object(C.getSelectionEntity)(n):void 0},o.registerCallBack(d.expandCollapse),d}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Bt(e,t)}(r,m["Component"]),e=r,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentEntity:Object(C.getSelectionEntity)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,o=this.state.expanded,r=this.getCurrentValues(),i=r.link,a=r.selectionText,c=t.component||Pt;return S.a.createElement(c,{config:t,translations:n,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:i,selectionText:a},onChange:this.onChange})}}])&&Yt(e.prototype,t),n&&Yt(e,n),r}();Gt.propTypes={editorState:f.a.object.isRequired,onChange:f.a.func.isRequired,modalHandler:f.a.object,config:f.a.object,translations:f.a.object};var Jt=Gt;n(27);function Vt(e){return(Vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Kt(e,t){return!t||"object"!==Vt(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Xt(e){return(Xt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $t(e,t){return($t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var en=function(){function i(){var e,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(r=Kt(this,(e=Xt(i)).call.apply(e,[this].concat(n)))).state={embeddedLink:"",height:r.props.config.defaultSize.height,width:r.props.config.defaultSize.width},r.onChange=function(){var e=r.props.onChange,t=r.state;e(t.embeddedLink,t.height,t.width)},r.updateValue=function(e){var t,n,o;r.setState((t={},n="".concat(e.target.name),o=e.target.value,n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t))},r}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$t(e,t)}(i,m["Component"]),e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.expanded,o=t.config;if(!n&&e.expanded){var r=o.defaultSize,i=r.height,a=r.width;this.setState({embeddedLink:"",height:i,width:a})}}},{key:"rendeEmbeddedLinkModal",value:function(){var e=this.state,t=e.embeddedLink,n=e.height,o=e.width,r=this.props,i=r.config.popupClassName,a=r.doCollapse,c=r.translations;return S.a.createElement("div",{className:L()("rdw-embedded-modal",i),onClick:d},S.a.createElement("div",{className:"rdw-embedded-modal-header"},S.a.createElement("span",{className:"rdw-embedded-modal-header-option"},c["components.controls.embedded.embeddedlink"],S.a.createElement("span",{className:"rdw-embedded-modal-header-label"}))),S.a.createElement("div",{className:"rdw-embedded-modal-link-section"},S.a.createElement("span",{className:"rdw-embedded-modal-link-input-wrapper"},S.a.createElement("input",{className:"rdw-embedded-modal-link-input",placeholder:c["components.controls.embedded.enterlink"],onChange:this.updateValue,onBlur:this.updateValue,value:t,name:"embeddedLink"}),S.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),S.a.createElement("div",{className:"rdw-embedded-modal-size"},S.a.createElement("span",null,S.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:n,name:"height",className:"rdw-embedded-modal-size-input",placeholder:"Height"}),S.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),S.a.createElement("span",null,S.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:o,name:"width",className:"rdw-embedded-modal-size-input",placeholder:"Width"}),S.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")))),S.a.createElement("span",{className:"rdw-embedded-modal-btn-section"},S.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:this.onChange,disabled:!t||!n||!o},c["generic.add"]),S.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:a},c["generic.cancel"])))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,o=t.className,r=t.title,i=e.expanded,a=e.onExpandEvent,c=e.translations;return S.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":i,"aria-label":"rdw-embedded-control"},S.a.createElement(T,{className:L()(o),value:"unordered-list-item",onClick:a,title:r||c["components.controls.embedded.embedded"]},S.a.createElement("img",{src:n,alt:""})),i?this.rendeEmbeddedLinkModal():void 0)}}])&&qt(e.prototype,t),n&&qt(e,n),i}();en.propTypes={expanded:f.a.bool,onExpandEvent:f.a.func,onChange:f.a.func,config:f.a.object,translations:f.a.object,doCollapse:f.a.func};var tn=en;function nn(e){return(nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function on(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function rn(e,t){return!t||"object"!==nn(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function an(e){return(an=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function cn(e,t){return(cn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ln=function(){function r(){var e,s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(s=rn(this,(e=an(r)).call.apply(e,[this].concat(n)))).state={expanded:!1},s.onExpandEvent=function(){s.signalExpanded=!s.state.expanded},s.expandCollapse=function(){s.setState({expanded:s.signalExpanded}),s.signalExpanded=!1},s.doExpand=function(){s.setState({expanded:!0})},s.doCollapse=function(){s.setState({expanded:!1})},s.addEmbeddedLink=function(e,t,n){var o=s.props,r=o.editorState,i=o.onChange,a=o.config.embedCallback,c=a?a(e):e,l=r.getCurrentContent().createEntity("EMBEDDED_LINK","MUTABLE",{src:c,height:t,width:n}).getLastCreatedEntityKey();i(E.AtomicBlockUtils.insertAtomicBlock(r,l," ")),s.doCollapse()},s}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cn(e,t)}(r,m["Component"]),e=r,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,o=this.state.expanded,r=t.component||tn;return S.a.createElement(r,{config:t,translations:n,onChange:this.addEmbeddedLink,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&on(e.prototype,t),n&&on(e,n),r}();ln.propTypes={editorState:f.a.object.isRequired,onChange:f.a.func.isRequired,modalHandler:f.a.object,config:f.a.object,translations:f.a.object};var sn=ln;n(28);function un(e){return(un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function dn(e,t){return!t||"object"!==un(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function mn(e){return(mn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function fn(e,t){return(fn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var gn=function(){function i(){var e,t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=dn(this,(e=mn(i)).call.apply(e,[this].concat(o)))).onChange=function(e){(0,t.props.onChange)(e.target.innerHTML)},t}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fn(e,t)}(i,m["Component"]),e=i,(t=[{key:"renderEmojiModal",value:function(){var n=this,e=this.props.config,t=e.popupClassName,o=e.emojis;return S.a.createElement("div",{className:L()("rdw-emoji-modal",t),onClick:d},o.map(function(e,t){return S.a.createElement("span",{key:t,className:"rdw-emoji-icon",alt:"",onClick:n.onChange},e)}))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,o=t.className,r=t.title,i=e.expanded,a=e.onExpandEvent,c=e.translations;return S.a.createElement("div",{className:"rdw-emoji-wrapper","aria-haspopup":"true","aria-label":"rdw-emoji-control","aria-expanded":i,title:r||c["components.controls.emoji.emoji"]},S.a.createElement(T,{className:L()(o),value:"unordered-list-item",onClick:a},S.a.createElement("img",{src:n,alt:""})),i?this.renderEmojiModal():void 0)}}])&&pn(e.prototype,t),n&&pn(e,n),i}();gn.propTypes={expanded:f.a.bool,onExpandEvent:f.a.func,onChange:f.a.func,config:f.a.object,translations:f.a.object};var yn=gn;function hn(e){return(hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function bn(e,t){return!t||"object"!==hn(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function jn(e){return(jn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Nn(e,t){return(Nn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Sn=function(){function r(){var e,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(i=bn(this,(e=jn(r)).call.apply(e,[this].concat(n)))).state={expanded:!1},i.onExpandEvent=function(){i.signalExpanded=!i.state.expanded},i.expandCollapse=function(){i.setState({expanded:i.signalExpanded}),i.signalExpanded=!1},i.doExpand=function(){i.setState({expanded:!0})},i.doCollapse=function(){i.setState({expanded:!1})},i.addEmoji=function(e){var t=i.props,n=t.editorState,o=t.onChange,r=E.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());o(E.EditorState.push(n,r,"insert-characters")),i.doCollapse()},i}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nn(e,t)}(r,m["Component"]),e=r,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,o=this.state.expanded,r=t.component||yn;return S.a.createElement(r,{config:t,translations:n,onChange:this.addEmoji,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&Mn(e.prototype,t),n&&Mn(e,n),r}();Sn.propTypes={editorState:f.a.object.isRequired,onChange:f.a.func.isRequired,modalHandler:f.a.object,config:f.a.object,translations:f.a.object};function En(){return S.a.createElement("div",{className:"rdw-spinner"},S.a.createElement("div",{className:"rdw-bounce1"}),S.a.createElement("div",{className:"rdw-bounce2"}),S.a.createElement("div",{className:"rdw-bounce3"}))}n(29),n(30);function Cn(e){return(Cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ln(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function kn(e,t){return!t||"object"!==Cn(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Dn(e){return(Dn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function vn(e,t){return(vn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var wn=function(){function r(){var e,c;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(c=kn(this,(e=Dn(r)).call.apply(e,[this].concat(n)))).state={imgSrc:"",dragEnter:!1,uploadHighlighted:c.props.config.uploadEnabled&&!!c.props.config.uploadCallback,showImageLoading:!1,height:c.props.config.defaultSize.height,width:c.props.config.defaultSize.width,alt:""},c.onDragEnter=function(e){c.stopPropagation(e),c.setState({dragEnter:!0})},c.onImageDrop=function(e){var t,n;e.preventDefault(),e.stopPropagation(),c.setState({dragEnter:!1}),n=e.dataTransfer.items?(t=e.dataTransfer.items,!0):(t=e.dataTransfer.files,!1);for(var o=0;o<t.length;o+=1)if((!n||"file"===t[o].kind)&&t[o].type.match("^image/")){var r=n?t[o].getAsFile():t[o];c.uploadImage(r)}},c.showImageUploadOption=function(){c.setState({uploadHighlighted:!0})},c.addImageFromState=function(){var e=c.state,t=e.imgSrc,n=e.alt,o=c.state,r=o.height,i=o.width,a=c.props.onChange;isNaN(r)||(r+="px"),isNaN(i)||(i+="px"),a(t,r,i,n)},c.showImageURLOption=function(){c.setState({uploadHighlighted:!1})},c.toggleShowImageLoading=function(){var e=!c.state.showImageLoading;c.setState({showImageLoading:e})},c.updateValue=function(e){var t,n,o;c.setState((t={},n="".concat(e.target.name),o=e.target.value,n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t))},c.selectImage=function(e){e.target.files&&0<e.target.files.length&&c.uploadImage(e.target.files[0])},c.uploadImage=function(e){c.toggleShowImageLoading(),(0,c.props.config.uploadCallback)(e).then(function(e){var t=e.data;c.setState({showImageLoading:!1,dragEnter:!1,imgSrc:t.link||t.url}),c.fileUpload=!1}).catch(function(){c.setState({showImageLoading:!1,dragEnter:!1})})},c.fileUploadClick=function(e){c.fileUpload=!0,e.stopPropagation()},c.stopPropagation=function(e){c.fileUpload?c.fileUpload=!1:(e.preventDefault(),e.stopPropagation())},c}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vn(e,t)}(r,m["Component"]),e=r,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.config;e.expanded&&!this.props.expanded?this.setState({imgSrc:"",dragEnter:!1,uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback,showImageLoading:!1,height:t.defaultSize.height,width:t.defaultSize.width,alt:""}):t.uploadCallback===e.config.uploadCallback&&t.uploadEnabled===e.config.uploadEnabled||this.setState({uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback})}},{key:"renderAddImageModal",value:function(){var e=this.state,t=e.imgSrc,n=e.uploadHighlighted,o=e.showImageLoading,r=e.dragEnter,i=e.height,a=e.width,c=e.alt,l=this.props,s=l.config,u=s.popupClassName,p=s.uploadCallback,d=s.uploadEnabled,m=s.urlEnabled,f=s.previewImage,g=s.inputAccept,y=s.alt,h=l.doCollapse,M=l.translations;return S.a.createElement("div",{className:L()("rdw-image-modal",u),onClick:this.stopPropagation},S.a.createElement("div",{className:"rdw-image-modal-header"},d&&p&&S.a.createElement("span",{onClick:this.showImageUploadOption,className:"rdw-image-modal-header-option"},M["components.controls.image.fileUpload"],S.a.createElement("span",{className:L()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":n})})),m&&S.a.createElement("span",{onClick:this.showImageURLOption,className:"rdw-image-modal-header-option"},M["components.controls.image.byURL"],S.a.createElement("span",{className:L()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":!n})}))),n?S.a.createElement("div",{onClick:this.fileUploadClick},S.a.createElement("div",{onDragEnter:this.onDragEnter,onDragOver:this.stopPropagation,onDrop:this.onImageDrop,className:L()("rdw-image-modal-upload-option",{"rdw-image-modal-upload-option-highlighted":r})},S.a.createElement("label",{htmlFor:"file",className:"rdw-image-modal-upload-option-label"},f&&t?S.a.createElement("img",{src:t,alt:t,className:"rdw-image-modal-upload-option-image-preview"}):t||M["components.controls.image.dropFileText"])),S.a.createElement("input",{type:"file",id:"file",accept:g,onChange:this.selectImage,className:"rdw-image-modal-upload-option-input"})):S.a.createElement("div",{className:"rdw-image-modal-url-section"},S.a.createElement("input",{className:"rdw-image-modal-url-input",placeholder:M["components.controls.image.enterlink"],name:"imgSrc",onChange:this.updateValue,onBlur:this.updateValue,value:t}),S.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),y.present&&S.a.createElement("div",{className:"rdw-image-modal-size"},S.a.createElement("span",{className:"rdw-image-modal-alt-lbl"},"Alt Text"),S.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:c,name:"alt",className:"rdw-image-modal-alt-input",placeholder:"alt"}),S.a.createElement("span",{className:"rdw-image-mandatory-sign"},y.mandatory&&"*")),S.a.createElement("div",{className:"rdw-image-modal-size"},"↕ ",S.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:i,name:"height",className:"rdw-image-modal-size-input",placeholder:"Height"}),S.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")," ↔ ",S.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:a,name:"width",className:"rdw-image-modal-size-input",placeholder:"Width"}),S.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),S.a.createElement("span",{className:"rdw-image-modal-btn-section"},S.a.createElement("button",{className:"rdw-image-modal-btn",onClick:this.addImageFromState,disabled:!t||!i||!a||y.mandatory&&!c},M["generic.add"]),S.a.createElement("button",{className:"rdw-image-modal-btn",onClick:h},M["generic.cancel"])),o?S.a.createElement("div",{className:"rdw-image-modal-spinner"},S.a.createElement(En,null)):void 0)}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,o=t.className,r=t.title,i=e.expanded,a=e.onExpandEvent,c=e.translations;return S.a.createElement("div",{className:"rdw-image-wrapper","aria-haspopup":"true","aria-expanded":i,"aria-label":"rdw-image-control"},S.a.createElement(T,{className:L()(o),value:"unordered-list-item",onClick:a,title:r||c["components.controls.image.image"]},S.a.createElement("img",{src:n,alt:""})),i?this.renderAddImageModal():void 0)}}])&&Ln(e.prototype,t),n&&Ln(e,n),r}();wn.propTypes={expanded:f.a.bool,onExpandEvent:f.a.func,doCollapse:f.a.func,onChange:f.a.func,config:f.a.object,translations:f.a.object};var xn=wn;function In(e){return(In="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function On(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function An(e,t){return!t||"object"!==In(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Tn(e){return(Tn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function zn(e,t){return(zn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _n=function(){function n(e){var s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(s=An(this,Tn(n).call(this,e))).onExpandEvent=function(){s.signalExpanded=!s.state.expanded},s.doExpand=function(){s.setState({expanded:!0})},s.doCollapse=function(){s.setState({expanded:!1})},s.expandCollapse=function(){s.setState({expanded:s.signalExpanded}),s.signalExpanded=!1},s.addImage=function(e,t,n,o){var r=s.props,i=r.editorState,a=r.onChange,c={src:e,height:t,width:n};r.config.alt.present&&(c.alt=o);var l=i.getCurrentContent().createEntity("IMAGE","MUTABLE",c).getLastCreatedEntityKey();a(E.AtomicBlockUtils.insertAtomicBlock(i,l," ")),s.doCollapse()};var t=s.props.modalHandler;return s.state={expanded:!1},t.registerCallBack(s.expandCollapse),s}var e,t,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zn(e,t)}(n,m["Component"]),e=n,(t=[{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,o=this.state.expanded,r=t.component||xn;return S.a.createElement(r,{config:t,translations:n,onChange:this.addImage,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&On(e.prototype,t),o&&On(e,o),n}();_n.propTypes={editorState:f.a.object.isRequired,onChange:f.a.func.isRequired,modalHandler:f.a.object,config:f.a.object,translations:f.a.object};function Pn(e){var t=e.config,n=e.onChange,o=e.translations,r=t.icon,i=t.className,a=t.title;return S.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},S.a.createElement(T,{className:L()(i),onClick:n,title:a||o["components.controls.remove.remove"]},S.a.createElement("img",{src:r,alt:""})))}var Un=_n;n(31);Pn.propTypes={onChange:f.a.func,config:f.a.object,translations:f.a.object};var Yn=Pn;function Fn(e){return(Fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Rn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Bn(e,t){return!t||"object"!==Fn(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Qn(e){return(Qn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Hn(e,t){return(Hn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Zn=function(){function i(){var e,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];return(n=Bn(this,(e=Qn(i)).call.apply(e,[this].concat(o)))).state={expanded:!1},n.onExpandEvent=function(){n.signalExpanded=!n.state.expanded},n.expandCollapse=function(){n.setState({expanded:n.signalExpanded}),n.signalExpanded=!1},n.removeInlineStyles=function(){var e=n.props,t=e.editorState;(0,e.onChange)(n.removeAllInlineStyles(t))},n.removeAllInlineStyles=function(n){var o=n.getCurrentContent();return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","MONOSPACE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){o=E.Modifier.removeInlineStyle(o,n.getSelection(),e)}),u(Object(C.getSelectionCustomInlineStyle)(n,["FONTSIZE","FONTFAMILY","COLOR","BGCOLOR"]),function(e,t){t&&(o=E.Modifier.removeInlineStyle(o,n.getSelection(),t))}),E.EditorState.push(n,o,"change-inline-style")},n.doExpand=function(){n.setState({expanded:!0})},n.doCollapse=function(){n.setState({expanded:!1})},n}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Hn(e,t)}(i,m["Component"]),e=i,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,o=this.state.expanded,r=t.component||Yn;return S.a.createElement(r,{config:t,translations:n,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&Rn(e.prototype,t),n&&Rn(e,n),i}();Zn.propTypes={onChange:f.a.func.isRequired,editorState:f.a.object.isRequired,config:f.a.object,translations:f.a.object,modalHandler:f.a.object};n(32);function Wn(e){return(Wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Jn(e,t){return!t||"object"!==Wn(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Vn(e){return(Vn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qn(e,t){return(qn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Kn=function(){function i(){var e,t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=Jn(this,(e=Vn(i)).call.apply(e,[this].concat(o)))).onChange=function(e){(0,t.props.onChange)(e)},t}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qn(e,t)}(i,m["Component"]),e=i,(t=[{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,o=e.doExpand,r=e.onExpandEvent,i=e.doCollapse,a=e.currentState,c=a.undoDisabled,l=a.redoDisabled,s=e.translations,u=t.options,p=t.undo,d=t.redo,m=t.className,f=t.dropdownClassName,g=t.title;return S.a.createElement(F,{className:L()("rdw-history-dropdown",m),optionWrapperClassName:L()(f),expanded:n,doExpand:o,doCollapse:i,onExpandEvent:r,"aria-label":"rdw-history-control",title:g||s["components.controls.history.history"]},S.a.createElement("img",{src:h(t),alt:""}),0<=u.indexOf("undo")&&S.a.createElement(G,{value:"undo",onClick:this.onChange,disabled:c,className:L()("rdw-history-dropdownoption",p.className),title:p.title||s["components.controls.history.undo"]},S.a.createElement("img",{src:p.icon,alt:""})),0<=u.indexOf("redo")&&S.a.createElement(G,{value:"redo",onClick:this.onChange,disabled:l,className:L()("rdw-history-dropdownoption",d.className),title:d.title||s["components.controls.history.redo"]},S.a.createElement("img",{src:d.icon,alt:""})))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,o=t.undo,r=t.redo,i=t.className,a=e.currentState,c=a.undoDisabled,l=a.redoDisabled,s=e.translations;return S.a.createElement("div",{className:L()("rdw-history-wrapper",i),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&S.a.createElement(T,{value:"undo",onClick:this.onChange,className:L()(o.className),disabled:c,title:o.title||s["components.controls.history.undo"]},S.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("redo")&&S.a.createElement(T,{value:"redo",onClick:this.onChange,className:L()(r.className),disabled:l,title:r.title||s["components.controls.history.redo"]},S.a.createElement("img",{src:r.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Gn(e.prototype,t),n&&Gn(e,n),i}();function Xn(e){return(Xn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function eo(e,t){return!t||"object"!==Xn(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function to(e){return(to=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function no(e,t){return(no=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Kn.propTypes={expanded:f.a.bool,doExpand:f.a.func,doCollapse:f.a.func,onExpandEvent:f.a.func,config:f.a.object,onChange:f.a.func,currentState:f.a.object,translations:f.a.object};var oo=function(){function r(e){var i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(i=eo(this,to(r).call(this,e))).onExpandEvent=function(){i.signalExpanded=!i.state.expanded},i.onChange=function(e){var t=i.props,n=t.editorState,o=t.onChange,r=E.EditorState[e](n);r&&o(r)},i.doExpand=function(){i.setState({expanded:!0})},i.doCollapse=function(){i.setState({expanded:!1})};var t={expanded:!(i.expandCollapse=function(){i.setState({expanded:i.signalExpanded}),i.signalExpanded=!1}),undoDisabled:!1,redoDisabled:!1},n=e.editorState,o=e.modalHandler;return n&&(t.undoDisabled=0===n.getUndoStack().size,t.redoDisabled=0===n.getRedoStack().size),i.state=t,o.registerCallBack(i.expandCollapse),i}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&no(e,t)}(r,m["Component"]),e=r,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&e.editorState!==t&&this.setState({undoDisabled:0===t.getUndoStack().size,redoDisabled:0===t.getRedoStack().size})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,o=this.state,r=o.undoDisabled,i=o.redoDisabled,a=o.expanded,c=t.component||Kn;return S.a.createElement(c,{config:t,translations:n,currentState:{undoDisabled:r,redoDisabled:i},expanded:a,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange})}}])&&$n(e.prototype,t),n&&$n(e,n),r}();oo.propTypes={onChange:f.a.func.isRequired,editorState:f.a.object,modalHandler:f.a.object,config:f.a.object,translations:f.a.object};var ro={inline:ie,blockType:be,fontSize:Ie,fontFamily:He,list:nt,textAlign:ft,colorPicker:vt,link:Jt,embedded:sn,emoji:Sn,image:Un,remove:Zn,history:oo};n(33);function io(e){return(io="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ao(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function co(e,t){return!t||"object"!==io(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function lo(e){return(lo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function so(e,t){return(so=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function uo(e,t,n){e.findEntityRanges(function(e){var t=e.getEntity();return null!==t&&"LINK"===n.getEntity(t).getType()},t)}function po(e){var t,n,c=e.showOpenOptionOnHover;return n=t=function(){function i(){var e,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(r=co(this,(e=lo(i)).call.apply(e,[this].concat(n)))).state={showPopOver:!1},r.openLink=function(){var e=r.props,t=e.entityKey,n=e.contentState.getEntity(t).getData().url,o=window.open(n,"blank");o&&o.focus()},r.toggleShowPopOver=function(){var e=!r.state.showPopOver;r.setState({showPopOver:e})},r}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&so(e,t)}(i,m["Component"]),e=i,(t=[{key:"render",value:function(){var e=this.props,t=e.children,n=e.entityKey,o=e.contentState.getEntity(n).getData(),r=o.url,i=o.targetOption,a=this.state.showPopOver;return S.a.createElement("span",{className:"rdw-link-decorator-wrapper",onMouseEnter:this.toggleShowPopOver,onMouseLeave:this.toggleShowPopOver},S.a.createElement("a",{href:r,target:i},t),a&&c?S.a.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuMDcyIDBIOC45MTVhLjkyNS45MjUgMCAwIDAgMCAxLjg0OWgyLjkyNUw2Ljk2MSA2LjcyN2EuOTE4LjkxOCAwIDAgMC0uMjcuNjU0YzAgLjI0Ny4wOTUuNDguMjcuNjU0YS45MTguOTE4IDAgMCAwIC42NTQuMjcuOTE4LjkxOCAwIDAgMCAuNjUzLS4yN2w0Ljg4LTQuODh2Mi45MjZhLjkyNS45MjUgMCAwIDAgMS44NDggMFYuOTI0QS45MjUuOTI1IDAgMCAwIDE0LjA3MiAweiIvPjxwYXRoIGQ9Ik0xMC42MjMgMTMuNDExSDEuNTg1VjQuMzcyaDYuNzk4bDEuNTg0LTEuNTg0SC43OTJBLjc5Mi43OTIgMCAwIDAgMCAzLjU4djEwLjYyNGMwIC40MzcuMzU1Ljc5Mi43OTIuNzkyaDEwLjYyNGEuNzkyLjc5MiAwIDAgMCAuNzkyLS43OTJWNS4wMjlsLTEuNTg1IDEuNTg0djYuNzk4eiIvPjwvZz48L3N2Zz4=",alt:"",onClick:this.openLink,className:"rdw-link-decorator-icon"}):void 0)}}])&&ao(e.prototype,t),n&&ao(e,n),i}(),t.propTypes={entityKey:f.a.string.isRequired,children:f.a.array,contentState:f.a.object},n}n(34);function mo(e){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,mo),this.getMentionComponent=function(){function e(e){var t=e.entityKey,n=e.children,o=e.contentState.getEntity(t).getData(),r=o.url,i=o.value;return S.a.createElement("a",{href:r||i,className:L()("rdw-mention-link",a)},n)}var a=t.className;return e.propTypes={entityKey:f.a.number,children:f.a.array,contentState:f.a.object},e},this.getMentionDecorator=function(){return{strategy:t.findMentionEntities,component:t.getMentionComponent()}},this.className=e}mo.prototype.findMentionEntities=function(e,t,n){e.findEntityRanges(function(e){var t=e.getEntity();return null!==t&&"MENTION"===n.getEntity(t).getType()},t)};var fo=mo;n(35);function go(e){return(go="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ho(e,t){return!t||"object"!==go(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Mo(e){return(Mo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function bo(e,t){return(bo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function jo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var No=function e(t){var p=this;jo(this,e),this.findSuggestionEntities=function(e,t){if(p.config.getEditorState()){var n=p.config,o=n.separator,r=n.trigger,i=n.getSuggestions,a=(0,n.getEditorState)().getSelection();if(a.get("anchorKey")===e.get("key")&&a.get("anchorKey")===a.get("focusKey")){var c=e.getText(),l=(c=c.substr(0,a.get("focusOffset")===c.length-1?c.length:a.get("focusOffset")+1)).lastIndexOf(o+r),s=o+r;if((void 0===l||l<0)&&c[0]===r&&(l=0,s=r),0<=l){var u=c.substr(l+s.length,c.length);i().some(function(e){return!!e.value&&(p.config.caseSensitive?0<=e.value.indexOf(u):0<=e.value.toLowerCase().indexOf(u&&u.toLowerCase()))})&&t(0===l?0:l+1,c.length)}}}},this.getSuggestionComponent=function(){var e,t,c=this.config;return t=e=function(){function r(){var e,a;jo(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(a=ho(this,(e=Mo(r)).call.apply(e,[this].concat(n)))).state={style:{left:15},activeOption:-1,showSuggestions:!0},a.onEditorKeyDown=function(e){var t=a.state.activeOption,n={};"ArrowDown"===e.key?(e.preventDefault(),t===a.filteredSuggestions.length-1?n.activeOption=0:n.activeOption=t+1):"ArrowUp"===e.key?n.activeOption=t<=0?a.filteredSuggestions.length-1:t-1:"Escape"===e.key?(n.showSuggestions=!1,y()):"Enter"===e.key&&a.addMention(),a.setState(n)},a.onOptionMouseEnter=function(e){var t=e.target.getAttribute("data-index");a.setState({activeOption:t})},a.onOptionMouseLeave=function(){a.setState({activeOption:-1})},a.setSuggestionReference=function(e){a.suggestion=e},a.setDropdownReference=function(e){a.dropdown=e},a.closeSuggestionDropdown=function(){a.setState({showSuggestions:!1})},a.filteredSuggestions=[],a.filterSuggestions=function(e){var t=e.children[0].props.text.substr(1),n=c.getSuggestions();a.filteredSuggestions=n&&n.filter(function(e){return!t||0===t.length||(c.caseSensitive?0<=e.value.indexOf(t):0<=e.value.toLowerCase().indexOf(t&&t.toLowerCase()))})},a.addMention=function(){var e=a.state.activeOption,t=c.getEditorState(),n=c.onChange,o=c.separator,r=c.trigger,i=a.filteredSuggestions[e];i&&function(e,t,n,o,r){var i=r.value,a=r.url,c=e.getCurrentContent().createEntity("MENTION","IMMUTABLE",{text:"".concat(o).concat(i),value:i,url:a}).getLastCreatedEntityKey(),l=Object(C.getSelectedBlock)(e).getText(),s=e.getSelection().focusOffset,u=(l.lastIndexOf(n+o,s)||0)+1,p=!1;l.length===u+1&&(s=l.length)," "===l[s]&&(p=!0);var d=e.getSelection().merge({anchorOffset:u,focusOffset:s}),m=E.EditorState.acceptSelection(e,d),f=E.Modifier.replaceText(m.getCurrentContent(),d,"".concat(o).concat(i),m.getCurrentInlineStyle(),c);m=E.EditorState.push(m,f,"insert-characters"),p||(d=m.getSelection().merge({anchorOffset:u+i.length+o.length,focusOffset:u+i.length+o.length}),m=E.EditorState.acceptSelection(m,d),f=E.Modifier.insertText(m.getCurrentContent(),d," ",m.getCurrentInlineStyle(),void 0)),t(E.EditorState.push(m,f,"insert-characters"))}(t,n,o,r,i)},a}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bo(e,t)}(r,m["Component"]),e=r,(t=[{key:"componentDidMount",value:function(){var e,t,n,o=c.getWrapperRef().getBoundingClientRect(),r=this.suggestion.getBoundingClientRect(),i=this.dropdown.getBoundingClientRect();o.width<r.left-o.left+i.width?t=15:e=15,o.bottom<i.bottom&&(n=0),this.setState({style:{left:e,right:t,bottom:n}}),k.registerCallBack(this.onEditorKeyDown),g(),c.modalHandler.setSuggestionCallback(this.closeSuggestionDropdown),this.filterSuggestions(this.props)}},{key:"componentDidUpdate",value:function(e){this.props.children!==e.children&&(this.filterSuggestions(e),this.setState({showSuggestions:!0}))}},{key:"componentWillUnmount",value:function(){k.deregisterCallBack(this.onEditorKeyDown),y(),c.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var n=this,e=this.props.children,t=this.state,o=t.activeOption,r=t.showSuggestions,i=c.dropdownClassName,a=c.optionClassName;return S.a.createElement("span",{className:"rdw-suggestion-wrapper",ref:this.setSuggestionReference,onClick:c.modalHandler.onSuggestionClick,"aria-haspopup":"true","aria-label":"rdw-suggestion-popup"},S.a.createElement("span",null,e),r&&S.a.createElement("span",{className:L()("rdw-suggestion-dropdown",i),contentEditable:"false",suppressContentEditableWarning:!0,style:this.state.style,ref:this.setDropdownReference},this.filteredSuggestions.map(function(e,t){return S.a.createElement("span",{key:t,spellCheck:!1,onClick:n.addMention,"data-index":t,onMouseEnter:n.onOptionMouseEnter,onMouseLeave:n.onOptionMouseLeave,className:L()("rdw-suggestion-option",a,{"rdw-suggestion-option-active":t===o})},e.text)})))}}])&&yo(e.prototype,t),n&&yo(e,n),r}(),e.propTypes={children:f.a.array},t}.bind(this),this.getSuggestionDecorator=function(){return{strategy:p.findSuggestionEntities,component:p.getSuggestionComponent()}};var n=t.separator,o=t.trigger,r=t.getSuggestions,i=t.onChange,a=t.getEditorState,c=t.getWrapperRef,l=t.caseSensitive,s=t.dropdownClassName,u=t.optionClassName,d=t.modalHandler;this.config={separator:n,trigger:o,getSuggestions:r,onChange:i,getEditorState:a,getWrapperRef:c,caseSensitive:l,dropdownClassName:s,optionClassName:u,modalHandler:d}},So=function(e){return[new fo(e.mentionClassName).getMentionDecorator(),new No(e).getSuggestionDecorator()]};n(36);function Eo(e){var c=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Eo),this.getHashtagComponent=function(){function e(e){var t=e.children,n=t[0].props.text;return S.a.createElement("a",{href:n,className:L()("rdw-hashtag-link",o)},t)}var o=c.className;return e.propTypes={children:f.a.object},e},this.findHashtagEntities=function(e,t){for(var n=e.getText(),o=0,r=0;0<n.length&&0<=o;)if(n[0]===c.hashCharacter?(r=o=0,n=n.substr(c.hashCharacter.length)):0<=(o=n.indexOf(c.separator+c.hashCharacter))&&(n=n.substr(o+(c.separator+c.hashCharacter).length),r+=o+c.separator.length),0<=o){var i=0<=n.indexOf(c.separator)?n.indexOf(c.separator):n.length,a=n.substr(0,i);a&&0<a.length&&(t(r,r+a.length+c.hashCharacter.length),r+=c.hashCharacter.length)}},this.getHashtagDecorator=function(){return{strategy:c.findHashtagEntities,component:c.getHashtagComponent()}},this.className=e.className,this.hashCharacter=e.hashCharacter||"#",this.separator=e.separator||" "}function Co(e){var t=e.block,n=e.contentState.getEntity(t.getEntityAt(0)).getData(),o=n.src,r=n.height,i=n.width;return S.a.createElement("iframe",{height:r,width:i,src:o,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}var Lo=function(e){return new Eo(e).getHashtagDecorator()};Co.propTypes={block:f.a.object,contentState:f.a.object};var ko=Co;n(37);function Do(e){return(Do="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function wo(e,t){return!t||"object"!==Do(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function xo(e){return(xo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Io(e,t){return(Io=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Oo=function(d){var e,t;return t=e=function(){function r(){var e,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(i=wo(this,(e=xo(r)).call.apply(e,[this].concat(n)))).state={hovered:!1},i.setEntityAlignmentLeft=function(){i.setEntityAlignment("left")},i.setEntityAlignmentRight=function(){i.setEntityAlignment("right")},i.setEntityAlignmentCenter=function(){i.setEntityAlignment("none")},i.setEntityAlignment=function(e){var t=i.props,n=t.block,o=t.contentState,r=n.getEntityAt(0);o.mergeEntityData(r,{alignment:e}),d.onChange(E.EditorState.push(d.getEditorState(),o,"change-block-data")),i.setState({dummy:!0})},i.toggleHovered=function(){var e=!i.state.hovered;i.setState({hovered:e})},i}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Io(e,t)}(r,m["Component"]),e=r,(t=[{key:"renderAlignmentOptions",value:function(e){return S.a.createElement("div",{className:L()("rdw-image-alignment-options-popup",{"rdw-image-alignment-options-popup-right":"right"===e})},S.a.createElement(T,{onClick:this.setEntityAlignmentLeft,className:"rdw-image-alignment-option"},"L"),S.a.createElement(T,{onClick:this.setEntityAlignmentCenter,className:"rdw-image-alignment-option"},"C"),S.a.createElement(T,{onClick:this.setEntityAlignmentRight,className:"rdw-image-alignment-option"},"R"))}},{key:"render",value:function(){var e=this.props,t=e.block,n=e.contentState,o=this.state.hovered,r=d.isReadOnly,i=d.isImageAlignmentEnabled,a=n.getEntity(t.getEntityAt(0)).getData(),c=a.src,l=a.alignment,s=a.height,u=a.width,p=a.alt;return S.a.createElement("span",{onMouseEnter:this.toggleHovered,onMouseLeave:this.toggleHovered,className:L()("rdw-image-alignment",{"rdw-image-left":"left"===l,"rdw-image-right":"right"===l,"rdw-image-center":!l||"none"===l})},S.a.createElement("span",{className:"rdw-image-imagewrapper"},S.a.createElement("img",{src:c,alt:p,style:{height:s,width:u}}),!r()&&o&&i()?this.renderAlignmentOptions(l):void 0))}}])&&vo(e.prototype,t),n&&vo(e,n),r}(),e.propTypes={block:f.a.object,contentState:f.a.object},t},Ao=function(o,r){return function(e){if("function"==typeof r){var t=r(e,o,o.getEditorState);if(t)return t}if("atomic"===e.getType()){var n=o.getEditorState().getCurrentContent().getEntity(e.getEntityAt(0));if(n&&"IMAGE"===n.type)return{component:Oo(o),editable:!1};if(n&&"EMBEDDED_LINK"===n.type)return{component:ko,editable:!1}}}},To={options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","embedded","emoji","image","remove","history"],inline:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["bold","italic","underline","strikethrough","monospace","superscript","subscript"],bold:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuMjM2IDBjMS42NTIgMCAyLjk0LjI5OCAzLjg2Ni44OTMuOTI1LjU5NSAxLjM4OCAxLjQ4NSAxLjM4OCAyLjY2OSAwIC42MDEtLjE3MyAxLjEzOS0uNTE2IDEuNjEtLjM0My40NzQtLjg0NC44My0xLjQ5OSAxLjA2OC44NDMuMTY3IDEuNDc0LjUyMyAxLjg5NSAxLjA3MS40MTkuNTUuNjMgMS4xODMuNjMgMS45MDMgMCAxLjI0NS0uNDQ0IDIuMTg3LTEuMzMgMi44MjUtLjg4Ni42NDEtMi4xNDQuOTYxLTMuNzY5Ljk2MUgwdi0yLjE2N2gxLjQ5NFYyLjE2N0gwVjBoNi4yMzZ6TTQuMzA4IDUuNDQ2aDIuMDI0Yy43NTIgMCAxLjMzLS4xNDMgMS43MzQtLjQzLjQwNS0uMjg1LjYwOC0uNzAxLjYwOC0xLjI1IDAtLjYtLjIwNC0xLjA0NC0uNjEyLTEuMzMtLjQwOC0uMjg2LTEuMDE2LS40MjctMS44MjYtLjQyN0g0LjMwOHYzLjQzN3ptMCAxLjgwNFYxMWgyLjU5M2MuNzQ3IDAgMS4zMTQtLjE1MiAxLjcwNy0uNDUyLjM5LS4zLjU4OC0uNzQ1LjU4OC0xLjMzNCAwLS42MzYtLjE2OC0xLjEyNC0uNS0xLjQ2LS4zMzYtLjMzNS0uODY0LS41MDQtMS41ODItLjUwNEg0LjMwOHoiIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==",className:void 0,title:void 0},italic:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTcgM1YyaDR2MUg5Ljc1M2wtMyAxMEg4djFINHYtMWgxLjI0N2wzLTEwSDd6Ii8+PC9zdmc+",className:void 0,title:void 0},underline:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTYuMDQ1IDJ2Ljk5Mkw0Ljc4NSAzdjUuMTcyYzAgLjg1OS4yNDMgMS41MTIuNzI3IDEuOTU3czEuMTI0LjY2OCAxLjkxOC42NjhjLjgzNiAwIDEuNTA5LS4yMjEgMi4wMTktLjY2NC41MTEtLjQ0Mi43NjYtMS4wOTYuNzY2LTEuOTYxVjNsLTEuMjYtLjAwOFYySDEzdi45OTJMMTEuNzM5IDN2NS4xNzJjMCAxLjIzNC0uMzk4IDIuMTgxLTEuMTk1IDIuODQtLjc5Ny42NTktMS44MzUuOTg4LTMuMTE0Ljk4OC0xLjI0MiAwLTIuMjQ4LS4zMjktMy4wMTctLjk4OC0uNzY5LS42NTktMS4xNTItMS42MDUtMS4xNTItMi44NFYzTDIgMi45OTJWMmg0LjA0NXpNMiAxM2gxMXYxSDJ6Ii8+PC9zdmc+",className:void 0,title:void 0},strikethrough:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNC4wNCA1Ljk1NGg2LjIxNWE3LjQxMiA3LjQxMiAwIDAgMC0uNzk1LS40MzggMTEuOTA3IDExLjkwNyAwIDAgMC0xLjQ0Ny0uNTU3Yy0xLjE4OC0uMzQ4LTEuOTY2LS43MTEtMi4zMzQtMS4wODgtLjM2OC0uMzc3LS41NTItLjc3LS41NTItMS4xODEgMC0uNDk1LjE4Ny0uOTA2LjU2LTEuMjMyLjM4LS4zMzEuODg3LS40OTcgMS41MjMtLjQ5Ny42OCAwIDEuMjY2LjI1NSAxLjc1Ny43NjcuMjk1LjMxNS41ODIuODkxLjg2MSAxLjczbC4xMTcuMDE2LjcwMy4wNS4xLS4wMjRjLjAyOC0uMTUyLjA0Mi0uMjc5LjA0Mi0uMzggMC0uMzM3LS4wMzktLjg1Mi0uMTE3LTEuNTQ0YTkuMzc0IDkuMzc0IDAgMCAwLS4xNzYtLjk5NUM5Ljg4LjM3OSA5LjM4NS4yNDQgOS4wMTcuMTc2IDguMzY1LjA3IDcuODk5LjAxNiA3LjYyLjAxNmMtMS40NSAwLTIuNTQ1LjM1Ny0zLjI4NyAxLjA3MS0uNzQ3LjcyLTEuMTIgMS41ODktMS4xMiAyLjYwNyAwIC41MTEuMTMzIDEuMDQuNCAxLjU4Ni4xMjkuMjUzLjI3LjQ3OC40MjcuNjc0ek04LjI4IDguMTE0Yy41NzUuMjM2Ljk1Ny40MzYgMS4xNDcuNTk5LjQ1MS40MS42NzcuODUyLjY3NyAxLjMyNCAwIC4zODMtLjEzLjc0NS0uMzkzIDEuMDg4LS4yNS4zMzgtLjU5LjU4LTEuMDIuNzI2YTMuNDE2IDMuNDE2IDAgMCAxLTEuMTYzLjIyOGMtLjQwNyAwLS43NzUtLjA2Mi0xLjEwNC0uMTg2YTIuNjk2IDIuNjk2IDAgMCAxLS44NzgtLjQ4IDMuMTMzIDMuMTMzIDAgMCAxLS42Ny0uNzk0IDEuNTI3IDEuNTI3IDAgMCAxLS4xMDQtLjIyNyA1Ny41MjMgNTcuNTIzIDAgMCAwLS4xODgtLjQ3MyAyMS4zNzEgMjEuMzcxIDAgMCAwLS4yNTEtLjU5OWwtLjg1My4wMTd2LjM3MWwtLjAxNy4zMTNhOS45MiA5LjkyIDAgMCAwIDAgLjU3M2MuMDExLjI3LjAxNy43MDkuMDE3IDEuMzE2di4xMWMwIC4wNzkuMDIyLjE0LjA2Ny4xODUuMDgzLjA2OC4yODQuMTQ3LjYwMi4yMzdsMS4xNy4zMzdjLjQ1Mi4xMy45OTYuMTk0IDEuNjMyLjE5NC42ODYgMCAxLjI1Mi0uMDU5IDEuNjk4LS4xNzdhNC42OTQgNC42OTQgMCAwIDAgMS4yOC0uNTU3Yy40MDEtLjI1OS43MDUtLjQ4Ni45MTEtLjY4My4yNjgtLjI3Ni40NjYtLjU2OC41OTQtLjg3OGE0Ljc0IDQuNzQgMCAwIDAgLjM0My0xLjc4OGMwLS4yOTgtLjAyLS41NTctLjA1OC0uNzc2SDguMjgxek0xNC45MTQgNi41N2EuMjYuMjYgMCAwIDAtLjE5My0uMDc2SC4yNjhhLjI2LjI2IDAgMCAwLS4xOTMuMDc2LjI2NC4yNjQgMCAwIDAtLjA3NS4xOTR2LjU0YzAgLjA3OS4wMjUuMTQzLjA3NS4xOTRhLjI2LjI2IDAgMCAwIC4xOTMuMDc2SDE0LjcyYS4yNi4yNiAwIDAgMCAuMTkzLS4wNzYuMjY0LjI2NCAwIDAgMCAuMDc1LS4xOTR2LS41NGEuMjY0LjI2NCAwIDAgMC0uMDc1LS4xOTR6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},monospace:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzQ0NCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMS4wMjEgMi45MDZjLjE4NiAxLjIxOS4zNzIgMS41LjM3MiAyLjcxOUMxLjM5MyA2LjM3NSAwIDcuMDMxIDAgNy4wMzF2LjkzOHMxLjM5My42NTYgMS4zOTMgMS40MDZjMCAxLjIxOS0uMTg2IDEuNS0uMzcyIDIuNzE5Qy43NDMgMTQuMDYzIDEuNzY0IDE1IDIuNjkzIDE1aDEuOTV2LTEuODc1cy0xLjY3Mi4xODgtMS42NzItLjkzOGMwLS44NDMuMTg2LS44NDMuMzcyLTIuNzE4LjA5My0uODQ0LS40NjQtMS41LTEuMDIyLTEuOTY5LjU1OC0uNDY5IDEuMTE1LTEuMDMxIDEuMDIyLTEuODc1QzMuMDY0IDMuNzUgMi45NyAzLjc1IDIuOTcgMi45MDZjMC0xLjEyNSAxLjY3Mi0xLjAzMSAxLjY3Mi0xLjAzMVYwaC0xLjk1QzEuNjcgMCAuNzQzLjkzOCAxLjAyIDIuOTA2ek0xMS45NzkgMi45MDZjLS4xODYgMS4yMTktLjM3MiAxLjUtLjM3MiAyLjcxOSAwIC43NSAxLjM5MyAxLjQwNiAxLjM5MyAxLjQwNnYuOTM4cy0xLjM5My42NTYtMS4zOTMgMS40MDZjMCAxLjIxOS4xODYgMS41LjM3MiAyLjcxOS4yNzggMS45NjktLjc0MyAyLjkwNi0xLjY3MiAyLjkwNmgtMS45NXYtMS44NzVzMS42NzIuMTg4IDEuNjcyLS45MzhjMC0uODQzLS4xODYtLjg0My0uMzcyLTIuNzE4LS4wOTMtLjg0NC40NjQtMS41IDEuMDIyLTEuOTY5LS41NTgtLjQ2OS0xLjExNS0xLjAzMS0xLjAyMi0xLjg3NS4xODYtMS44NzUuMzcyLTEuODc1LjM3Mi0yLjcxOSAwLTEuMTI1LTEuNjcyLTEuMDMxLTEuNjcyLTEuMDMxVjBoMS45NWMxLjAyMiAwIDEuOTUuOTM4IDEuNjcyIDIuOTA2eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},superscript:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcuMzA1IDEwLjE2NUwxMS44NjUgMTVIOS4wNTdsLTMuMTkyLTMuNTM2TDIuNzQ2IDE1SDBsNC41MjMtNC44MzVMLjIxOCA1LjYwM2gyLjc3TDUuOTg2IDguOTEgOS4wMSA1LjYwM2gyLjY0OWwtNC4zNTQgNC41NjJ6bTYuMjM0LTMuMjY5bDEuODc5LTEuMzA2Yy42NC0uNDE2IDEuMDYyLS44MDEgMS4yNjQtMS4xNTcuMjAxLS4zNTYuMzAyLS43MzguMzAyLTEuMTQ4IDAtLjY2OS0uMjM3LTEuMjEtLjcxLTEuNjItLjQ3NC0uNDExLTEuMDk3LS42MTctMS44NjgtLjYxNy0uNzQ0IDAtMS4zNC4yMDgtMS43ODUuNjI0LS40NDcuNDE2LS42NyAxLjA0My0uNjcgMS44ODFoMS40MzZjMC0uNS4wOTQtLjg0Ni4yODEtMS4wMzguMTg4LS4xOTEuNDQ1LS4yODcuNzcyLS4yODdzLjU4NS4wOTcuNzc3LjI5MmMuMTkuMTk1LjI4Ni40MzcuMjg2LjcyNiAwIC4yOS0uMDg5LjU1LS4yNjYuNzg1cy0uNjcuNjI4LTEuNDc5IDEuMTg0Yy0uNjkxLjQ3Ny0xLjYyNy45MjctMS45MDggMS4zNWwuMDE0IDEuNTY5SDE3VjYuODk2aC0zLjQ2MXoiLz48L3N2Zz4=",className:void 0,title:void 0},subscript:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExLjg2NiAxMS42NDZIOS4wNkw1Ljg2NyA3Ljk0MmwtMy4xMjEgMy43MDRIMGw0LjUyNC01LjA2NEwuMjE4IDEuODA0aDIuNzdsMyAzLjQ2NCAzLjAyMy0zLjQ2NGgyLjY1TDcuMzA2IDYuNTgybDQuNTYgNS4wNjR6bTEuNzI1IDIuMDU4bDEuODI3LTEuMzY4Yy42NC0uNDM1IDEuMDYyLS44NCAxLjI2NC0xLjIxMi4yMDItLjM3Mi4zMDItLjc3My4zMDItMS4yMDIgMC0uNy0uMjM3LTEuMjY2LS43MS0xLjY5Ni0uNDc0LS40MzEtMS4wOTctLjY0Ni0xLjg2OS0uNjQ2LS43NDQgMC0xLjM0LjIxOC0xLjc4NS42NTMtLjQ0Ni40MzYtLjY3IDEuMDkyLS42NyAxLjk3aDEuNDM2YzAtLjUyNC4wOTQtLjg4Ni4yODEtMS4wODcuMTg4LS4yLjQ0NS0uMzAxLjc3Mi0uMzAxcy41ODYuMTAyLjc3Ny4zMDZjLjE5LjIwNC4yODYuNDU4LjI4Ni43NiAwIC4zMDMtLjA4OC41NzctLjI2Ni44MjItLjE3Ny4yNDUtLjY3LjY1OC0xLjQ3OCAxLjI0LS42OTIuNS0xLjYyOC45NzEtMS45MSAxLjQxM0wxMS44NjQgMTVIMTd2LTEuMjk2aC0zLjQxeiIvPjwvc3ZnPg==",className:void 0,title:void 0}},blockType:{inDropdown:!0,options:["Normal","H1","H2","H3","H4","H5","H6","Blockquote","Code"],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},fontSize:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuOTIxIDMuMTE5YS40MjcuNDI3IDAgMCAwIC4zMzUuMTY0aC45N2EuNDI2LjQyNiAwIDAgMCAuMzA0LS4xMy40NDEuNDQxIDAgMCAwIC4xMjUtLjMxbC4wMDItMi40MWEuNDM0LjQzNCAwIDAgMC0uNDMtLjQzMkguNDNBLjQzNC40MzQgMCAwIDAgMCAuNDR2Mi40MDZjMCAuMjQyLjE5Mi40MzguNDMuNDM4aC45N2MuMTMgMCAuMjU0LS4wNi4zMzUtLjE2NWwuNzMtLjkzSDUuNTR2MTEuMzZjMCAuMjQxLjE5Mi40MzcuNDMuNDM3aDEuNzE3Yy4yMzcgMCAuNDMtLjE5Ni40My0uNDM3VjIuMTg4aDMuMDdsLjczNC45MzF6TTEzLjg5OCAxMS4yNjNhLjQyNS40MjUgMCAwIDAtLjQ4Mi0uMTQ2bC0uNTQ3LjE5NFY5LjYxN2EuNDQyLjQ0MiAwIDAgMC0uMTI2LS4zMS40MjYuNDI2IDAgMCAwLS4zMDQtLjEyN2gtLjQyOWEuNDM0LjQzNCAwIDAgMC0uNDMuNDM3djEuNjk0bC0uNTQ3LS4xOTRhLjQyNS40MjUgMCAwIDAtLjQ4MS4xNDYuNDQ0LjQ0NCAwIDAgMC0uMDE2LjUxMmwxLjMzMiAyLjAxN2EuNDI3LjQyNyAwIDAgMCAuNzEzIDBsMS4zMzMtMi4wMTdhLjQ0NC40NDQgMCAwIDAtLjAxNi0uNTEyeiIvPjwvZz48L3N2Zz4=",options:[8,9,10,11,12,14,16,18,24,30,36,48,60,72,96],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},fontFamily:{options:["Arial","Georgia","Impact","Tahoma","Times New Roman","Verdana"],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},list:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["unordered","ordered","indent","outdent"],unordered:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMS43MiAzLjQyN2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3LjAxIDEuNzIuMDFDLjc3LjAwOCAwIC43NzUgMCAxLjcxNWMwIC45NC43NzQgMS43MTEgMS43MiAxLjcxMXptMC0yLjYyNWMuNTEgMCAuOTIyLjQxMi45MjIuOTE0YS45Mi45MiAwIDAgMS0xLjg0MiAwIC45Mi45MiAwIDAgMSAuOTItLjkxNHpNMS43MiA4LjcwM2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3IDUuMjg3IDEuNzIgNS4yODdDLjc3IDUuMjg3IDAgNi4wNTIgMCA2Ljk5NXMuNzc0IDEuNzA4IDEuNzIgMS43MDh6bTAtMi42MjJjLjUxIDAgLjkyMi40MTIuOTIyLjkxNGEuOTIuOTIgMCAwIDEtMS44NDIgMGMwLS41MDUuNDE1LS45MTQuOTItLjkxNHpNMS43MiAxMy45ODJjLjk1MSAwIDEuNzIyLS43NjggMS43MjItMS43MDggMC0uOTQzLS43NzQtMS43MDgtMS43MjEtMS43MDgtLjk0NyAwLTEuNzIxLjc2OC0xLjcyMSAxLjcwOHMuNzc0IDEuNzA4IDEuNzIgMS43MDh6bTAtMi42MjVjLjUxIDAgLjkyMi40MTIuOTIyLjkxNGEuOTIuOTIgMCAxIDEtMS44NDIgMCAuOTIuOTIgMCAwIDEgLjkyLS45MTR6TTUuNzQ0IDIuMTE1aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOTlINS43NDRhLjQuNCAwIDAgMC0uNDAyLjM5OS40LjQgMCAwIDAgLjQwMi4zOTl6TTUuNzQ0IDcuMzk0aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOThINS43NDRhLjQuNCAwIDAgMC0uNDAyLjM5OC40LjQgMCAwIDAgLjQwMi4zOTl6TTUuNzQ0IDEyLjY3aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOTlINS43NDRhLjQuNCAwIDAgMC0uNDAyLjQuNC40IDAgMCAwIC40MDIuMzk4eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},ordered:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNC4yMDIgMS40NjZoOC4xNWMuMzM4IDAgLjYxMi0uMzIyLjYxMi0uNzIgMC0uMzk3LS4yNzQtLjcyLS42MTItLjcyaC04LjE1Yy0uMzM4IDAtLjYxMS4zMjMtLjYxMS43MiAwIC4zOTguMjczLjcyLjYxLjcyek0xMi4zNTIgNS43ODNoLTguMTVjLS4zMzggMC0uNjExLjMyMi0uNjExLjcyIDAgLjM5Ny4yNzMuNzIuNjEuNzJoOC4xNTFjLjMzOCAwIC42MTItLjMyMy42MTItLjcyIDAtLjM5OC0uMjc0LS43Mi0uNjEyLS43MnpNMTIuMzUyIDExLjU0aC04LjE1Yy0uMzM4IDAtLjYxMS4zMjItLjYxMS43MiAwIC4zOTYuMjczLjcxOS42MS43MTloOC4xNTFjLjMzOCAwIC42MTItLjMyMy42MTItLjcyIDAtLjM5Ny0uMjc0LS43Mi0uNjEyLS43MnpNLjc2NyAxLjI0OXYxLjgwMmMwIC4xOTUuMTM2LjM0My4zMTUuMzQzLjE3NiAwIC4zMTUtLjE1LjMxNS0uMzQzVi4zNTZjMC0uMTktLjEzMy0uMzM5LS4zMDItLjMzOS0uMTQ4IDAtLjIyMy4xMTgtLjI0Ny4xNTZhLjIyOC4yMjggMCAwIDAtLjAwMy4wMDVMLjU3OS42MjFhLjQ3NC40NzQgMCAwIDAtLjA5OC4yNzNjMCAuMTk0LjEyOC4zNTEuMjg2LjM1NXpNLjM1MiA4LjE5SDEuNTVjLjE1NyAwIC4yODUtLjE2Mi4yODUtLjM2MiAwLS4xOTgtLjEyOC0uMzU5LS4yODUtLjM1OUguNjh2LS4wMDZjMC0uMTA3LjIxLS4yODEuMzc4LS40MjIuMzM2LS4yNzguNzUzLS42MjUuNzUzLTEuMjI2IDAtLjU3LS4zNzYtMS0uODc0LTEtLjQ3NyAwLS44MzYuMzg1LS44MzYuODk3IDAgLjI5Ny4xNjQuNDAyLjMwNS40MDIuMiAwIC4zMjEtLjE3Ni4zMjEtLjM0NiAwLS4xMDYuMDIzLS4yMjguMjA0LS4yMjguMjQzIDAgLjI1LjI1NC4yNS4yODMgMCAuMjI4LS4yNTIuNDQyLS40OTUuNjQ5LS4zMDEuMjU1LS42NDIuNTQ0LS42NDIuOTkydi4zODRjMCAuMjA1LjE1OS4zNDMuMzA4LjM0M3pNMS43NyAxMC41NDNjMC0uNTkyLS4yOTYtLjkzMS0uODE0LS45MzEtLjY4IDAtLjg1OS41Ny0uODU5Ljg3MiAwIC4zNTEuMjIyLjM5LjMxOC4zOS4xODUgMCAuMzEtLjE0OC4zMS0uMzY2IDAtLjA4NC4wMjYtLjE4MS4yMjQtLjE4MS4xNDIgMCAuMi4wMjQuMi4yNjcgMCAuMjM3LS4wNDMuMjYzLS4yMTMuMjYzLS4xNjQgMC0uMjg4LjE1Mi0uMjg4LjM1NCAwIC4yLjEyNS4zNS4yOTEuMzUuMjI1IDAgLjI3LjEwOC4yNy4yODN2LjA3NWMwIC4yOTQtLjA5Ny4zNS0uMjc3LjM1LS4yNDggMC0uMjY3LS4xNS0uMjY3LS4xOTcgMC0uMTc0LS4wOTgtLjM1LS4zMTctLjM1LS4xOTIgMC0uMzA3LjE0MS0uMzA3LjM3OCAwIC40My4zMTMuODg4Ljg5NS44ODguNTY0IDAgLjkwMS0uNC45MDEtMS4wN3YtLjA3NGMwLS4yNzQtLjA3NC0uNTAyLS4yMTQtLjY2Ni4wOTYtLjE2My4xNDgtLjM4LjE0OC0uNjM1eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},indent:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNS43MTYgMy4yMTFIMTd2MS4xOTdINS43MTZ6TTAgLjAyaDE3djEuMTk3SDB6TTAgMTIuNzgzaDE3djEuMTk3SDB6TTUuNzE2IDkuNTkzSDE3djEuMTk3SDUuNzE2ek01LjcxNiA2LjQwMkgxN3YxLjE5N0g1LjcxNnpNLjE4NyA5LjQ5MUwyLjUyIDcgLjE4NyA0LjUwOXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},outdent:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNS4zOTYgMy4xOTNoMTAuNTczVjQuMzlINS4zOTZ6TS4wMzkuMDAzaDE1LjkzVjEuMkguMDM5ek0uMDM5IDEyLjc2NmgxNS45M3YxLjE5N0guMDM5ek01LjM5NiA5LjU3NWgxMC41NzN2MS4xOTdINS4zOTZ6TTUuMzk2IDYuMzg0aDEwLjU3M3YxLjE5N0g1LjM5NnpNMi4xODcgNC40OTFMMCA2Ljk4M2wyLjE4NyAyLjQ5MXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},title:void 0},textAlign:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["left","center","right","justify"],left:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNOC40OTMgMTQuODg3SC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDguMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4IDEwLjE2MkguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1M2gxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUzek04LjQ5MyA1LjQzNUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1Mmg4LjE2N2EuMzI2LjMyNiAwIDAgMSAwIC42NTJ6TTE0LjYxOC43MDlILjMyNmEuMzI2LjMyNiAwIDAgMSAwLS42NTJoMTQuMjkyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},center:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuNTU2IDE0Ljg4N0gzLjM4OGEuMzI2LjMyNiAwIDAgMSAwLS42NTJoOC4xNjdhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42MTggMTAuMTYySC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUzaDE0LjI5MmEuMzI2LjMyNiAwIDAgMSAwIC42NTN6TTExLjU1NiA1LjQzNUgzLjM4OGEuMzI2LjMyNiAwIDAgMSAwLS42NTJoOC4xNjdhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42MTguNzA5SC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDE0LjI5MmEuMzI2LjMyNiAwIDAgMSAwIC42NTJ6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},right:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNjE4IDE0Ljg4N0g2LjQ1YS4zMjYuMzI2IDAgMCAxIDAtLjY1Mmg4LjE2N2EuMzI2LjMyNiAwIDAgMSAwIC42NTJ6TTE0LjYxOCAxMC4xNjJILjMyNmEuMzI2LjMyNiAwIDAgMSAwLS42NTNoMTQuMjkyYS4zMjYuMzI2IDAgMCAxIDAgLjY1M3pNMTQuNjE4IDUuNDM1SDYuNDVhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDguMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4LjcwOUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1MmgxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUyeiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},justify:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNjIgMTQuODg4SC4zMjVhLjMyNi4zMjYgMCAwIDEgMC0uNjUySDE0LjYyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjIgMTAuMTYySC4zMjVhLjMyNi4zMjYgMCAwIDEgMC0uNjUySDE0LjYyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjIgNS40MzZILjMyNWEuMzI2LjMyNiAwIDAgMSAwLS42NTJIMTQuNjJhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42Mi43MUguMzI1YS4zMjYuMzI2IDAgMCAxIDAtLjY1M0gxNC42MmEuMzI2LjMyNiAwIDAgMSAwIC42NTN6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},title:void 0},colorPicker:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNDA2LjU4NWExLjk5OCAxLjk5OCAwIDAgMC0yLjgyNSAwbC0uNTQuNTRhLjc0MS43NDEgMCAxIDAtMS4wNDggMS4wNDhsLjE3NS4xNzUtNS44MjYgNS44MjUtMi4wMjIgMi4wMjNhLjkxLjkxIDAgMCAwLS4yNjYuNjAybC0uMDA1LjEwOHYuMDAybC0uMDgxIDEuODI5YS4zMDIuMzAyIDAgMCAwIC4zMDIuMzE2aC4wMTNsLjk3LS4wNDQuNTkyLS4wMjYuMjY4LS4wMTJjLjI5Ny0uMDEzLjU3OS0uMTM3Ljc5LS4zNDdsNy43Ny03Ljc3LjE0Ni4xNDRhLjc0Ljc0IDAgMCAwIDEuMDQ4IDBjLjI5LS4yOS4yOS0uNzU5IDAtMS4wNDhsLjU0LS41NGMuNzgtLjc4Ljc4LTIuMDQ0IDAtMi44MjV6TTguNzk1IDcuMzMzbC0yLjczLjUxNSA0LjQ1Mi00LjQ1MiAxLjEwOCAxLjEwNy0yLjgzIDIuODN6TTIuMDggMTMuNjczYy0xLjE0OCAwLTIuMDguMjk1LTIuMDguNjYgMCAuMzYzLjkzMi42NTggMi4wOC42NTggMS4xNSAwIDIuMDgtLjI5NCAyLjA4LS42NTkgMC0uMzY0LS45My0uNjU5LTIuMDgtLjY1OXoiLz48L2c+PC9zdmc+",className:void 0,component:void 0,popupClassName:void 0,colors:["rgb(97,189,109)","rgb(26,188,156)","rgb(84,172,210)","rgb(44,130,201)","rgb(147,101,184)","rgb(71,85,119)","rgb(204,204,204)","rgb(65,168,95)","rgb(0,168,133)","rgb(61,142,185)","rgb(41,105,176)","rgb(85,57,130)","rgb(40,50,78)","rgb(0,0,0)","rgb(247,218,100)","rgb(251,160,38)","rgb(235,107,86)","rgb(226,80,65)","rgb(163,143,132)","rgb(239,239,239)","rgb(255,255,255)","rgb(250,197,28)","rgb(243,121,52)","rgb(209,72,65)","rgb(184,49,47)","rgb(124,112,107)","rgb(209,213,216)"],title:void 0},link:{inDropdown:!1,className:void 0,component:void 0,popupClassName:void 0,dropdownClassName:void 0,showOpenOptionOnHover:!0,defaultTargetOption:"_self",options:["link","unlink"],link:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEzLjk2Ny45NUEzLjIyNiAzLjIyNiAwIDAgMCAxMS42Ny4wMDJjLS44NyAwLTEuNjg2LjMzNy0yLjI5Ny45NDhMNy4xMDUgMy4yMThBMy4yNDcgMy4yNDcgMCAwIDAgNi4yNCA2LjI0YTMuMjI1IDMuMjI1IDAgMCAwLTMuMDIyLjg2NUwuOTUgOS4zNzNhMy4yNTMgMy4yNTMgMCAwIDAgMCA0LjU5NCAzLjIyNiAzLjIyNiAwIDAgMCAyLjI5Ny45NDhjLjg3IDAgMS42ODYtLjMzNiAyLjI5OC0uOTQ4TDcuODEyIDExLjdhMy4yNDcgMy4yNDcgMCAwIDAgLjg2NS0zLjAyMyAzLjIyNSAzLjIyNSAwIDAgMCAzLjAyMi0uODY1bDIuMjY4LTIuMjY3YTMuMjUyIDMuMjUyIDAgMCAwIDAtNC41OTV6TTcuMTA1IDEwLjk5M0w0LjgzNyAxMy4yNmEyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LjY1NSAyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LS42NTUgMi4yNTIgMi4yNTIgMCAwIDEgMC0zLjE4bDIuMjY4LTIuMjY4YTIuMjMyIDIuMjMyIDAgMCAxIDEuNTktLjY1NWMuNDMgMCAuODQxLjEyIDEuMTk1LjM0M0w0Ljc3MiA5LjQzOGEuNS41IDAgMSAwIC43MDcuNzA3bDEuOTM5LTEuOTM4Yy41NDUuODY4LjQ0MiAyLjAzLS4zMTMgMi43ODV6bTYuMTU1LTYuMTU1bC0yLjI2OCAyLjI2N2EyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LjY1NWMtLjQzMSAwLS44NDEtLjEyLTEuMTk1LS4zNDNsMS45MzgtMS45MzhhLjUuNSAwIDEgMC0uNzA3LS43MDdMNy40OTkgNi43MWEyLjI1MiAyLjI1MiAwIDAgMSAuMzEzLTIuNzg1bDIuMjY3LTIuMjY4YTIuMjMzIDIuMjMzIDAgMCAxIDEuNTktLjY1NSAyLjIzMyAyLjIzMyAwIDAgMSAyLjI0NiAyLjI0NWMwIC42MDMtLjIzMiAxLjE2OC0uNjU1IDEuNTl6IiBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",className:void 0,title:void 0},unlink:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTMuOTU2IDEuMDM3YTMuNTUgMy41NSAwIDAgMC01LjAxNCAwTDYuNDM2IDMuNTQ0YS41NDUuNTQ1IDAgMSAwIC43Ny43N2wyLjUwOC0yLjUwNmEyLjQzOCAyLjQzOCAwIDAgMSAxLjczNS0uNzE1Yy42NTggMCAxLjI3NS4yNTQgMS43MzYuNzE1LjQ2LjQ2MS43MTUgMS4wNzguNzE1IDEuNzM2IDAgLjY1OC0uMjU0IDEuMjc0LS43MTUgMS43MzVMOS45MDcgOC41NThhMi40NTggMi40NTggMCAwIDEtMy40NzIgMCAuNTQ1LjU0NSAwIDEgMC0uNzcxLjc3MSAzLjUzNCAzLjUzNCAwIDAgMCAyLjUwNyAxLjAzN2MuOTA4IDAgMS44MTYtLjM0NiAyLjUwNy0xLjAzN2wzLjI3OC0zLjI3OGEzLjUyIDMuNTIgMCAwIDAgMS4wMzUtMi41MDdjMC0uOTUtLjM2Ny0xLjg0LTEuMDM1LTIuNTA3eiIvPjxwYXRoIGQ9Ik03LjQgMTEuMDY1bC0yLjEyMiAyLjEyYTIuNDM3IDIuNDM3IDAgMCAxLTEuNzM1LjcxNiAyLjQzNyAyLjQzNyAwIDAgMS0xLjczNi0uNzE1IDIuNDU3IDIuNDU3IDAgMCAxIDAtMy40NzFsMy4wODYtMy4wODZhMi40MzggMi40MzggMCAwIDEgMS43MzUtLjcxNWMuNjU4IDAgMS4yNzUuMjU0IDEuNzM2LjcxNWEuNTQ1LjU0NSAwIDEgMCAuNzcxLS43NzEgMy41NSAzLjU1IDAgMCAwLTUuMDE0IDBMMS4wMzYgOC45NDRBMy41MiAzLjUyIDAgMCAwIDAgMTEuNDVjMCAuOTUuMzY3IDEuODQgMS4wMzUgMi41MDdhMy41MiAzLjUyIDAgMCAwIDIuNTA2IDEuMDM1Yy45NSAwIDEuODQtLjM2OCAyLjUwNy0xLjAzNWwyLjEyMi0yLjEyMWEuNTQ1LjU0NSAwIDAgMC0uNzcxLS43NzF6TTkuMjc0IDEyLjAwMmEuNTQ2LjU0NiAwIDAgMC0uNTQ2LjU0NXYxLjYzN2EuNTQ2LjU0NiAwIDAgMCAxLjA5MSAwdi0xLjYzN2EuNTQ1LjU0NSAwIDAgMC0uNTQ1LS41NDV6TTExLjIzIDExLjYxNmEuNTQ1LjU0NSAwIDEgMC0uNzcyLjc3MmwxLjE1NyAxLjE1NmEuNTQzLjU0MyAwIDAgMCAuNzcxIDAgLjU0NS41NDUgMCAwIDAgMC0uNzdsLTEuMTU2LTEuMTU4ek0xMi41MzcgOS44MkgxMC45YS41NDYuNTQ2IDAgMCAwIDAgMS4wOTFoMS42MzdhLjU0Ni41NDYgMCAwIDAgMC0xLjA5ek00LjkxIDMuNTQ3YS41NDYuNTQ2IDAgMCAwIC41NDUtLjU0NVYxLjM2NmEuNTQ2LjU0NiAwIDAgMC0xLjA5IDB2MS42MzZjMCAuMzAxLjI0NC41NDUuNTQ1LjU0NXpNMi44ODggMy45MzNhLjU0My41NDMgMCAwIDAgLjc3MSAwIC41NDUuNTQ1IDAgMCAwIDAtLjc3MUwyLjUwMiAyLjAwNWEuNTQ1LjU0NSAwIDEgMC0uNzcxLjc3bDEuMTU3IDEuMTU4ek0xLjYyOCA1LjczaDEuNjM2YS41NDYuNTQ2IDAgMCAwIDAtMS4wOTJIMS42MjhhLjU0Ni41NDYgMCAwIDAgMCAxLjA5MXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},linkCallback:void 0},emoji:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHZpZXdCb3g9IjE1LjcyOSAyMi4wODIgMTcgMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTI5LjcwOCAyNS4xMDRjLTMuMDIxLTMuMDIyLTcuOTM3LTMuMDIyLTEwLjk1OCAwLTMuMDIxIDMuMDItMy4wMiA3LjkzNiAwIDEwLjk1OCAzLjAyMSAzLjAyIDcuOTM3IDMuMDIgMTAuOTU4LS4wMDEgMy4wMi0zLjAyMSAzLjAyLTcuOTM2IDAtMTAuOTU3em0tLjg0NSAxMC4xMTJhNi41NiA2LjU2IDAgMCAxLTkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAtOS4yNjcgNi41NiA2LjU2IDAgMCAxIDkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAgOS4yNjd6bS03LjUyNC02LjczYS45MDYuOTA2IDAgMSAxIDEuODExIDAgLjkwNi45MDYgMCAwIDEtMS44MTEgMHptNC4xMDYgMGEuOTA2LjkwNiAwIDEgMSAxLjgxMiAwIC45MDYuOTA2IDAgMCAxLTEuODEyIDB6bTIuMTQxIDMuNzA4Yy0uNTYxIDEuMjk4LTEuODc1IDIuMTM3LTMuMzQ4IDIuMTM3LTEuNTA1IDAtMi44MjctLjg0My0zLjM2OS0yLjE0N2EuNDM4LjQzOCAwIDAgMSAuODEtLjMzNmMuNDA1Ljk3NiAxLjQxIDEuNjA3IDIuNTU5IDEuNjA3IDEuMTIzIDAgMi4xMjEtLjYzMSAyLjU0NC0xLjYwOGEuNDM4LjQzOCAwIDAgMSAuODA0LjM0N3oiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,emojis:["😀","😁","😂","😃","😉","😋","😎","😍","😗","🤗","🤔","😣","😫","😴","😌","🤓","😛","😜","😠","😇","😷","😈","👻","😺","😸","😹","😻","😼","😽","🙀","🙈","🙉","🙊","👼","👮","🕵","💂","👳","🎅","👸","👰","👲","🙍","🙇","🚶","🏃","💃","⛷","🏂","🏌","🏄","🚣","🏊","⛹","🏋","🚴","👫","💪","👈","👉","👆","🖕","👇","🖖","🤘","🖐","👌","👍","👎","✊","👊","👏","🙌","🙏","🐵","🐶","🐇","🐥","🐸","🐌","🐛","🐜","🐝","🍉","🍄","🍔","🍤","🍨","🍪","🎂","🍰","🍾","🍷","🍸","🍺","🌍","🚑","⏰","🌙","🌝","🌞","⭐","🌟","🌠","🌨","🌩","⛄","🔥","🎄","🎈","🎉","🎊","🎁","🎗","🏀","🏈","🎲","🔇","🔈","📣","🔔","🎵","🎷","💰","🖊","📅","✅","❎","💯"],title:void 0},embedded:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNzA4IDYuNjE1YS40MzYuNDM2IDAgMCAwLS41NDMuMjkxbC0xLjgzIDYuMDQ1YS40MzYuNDM2IDAgMCAwIC44MzMuMjUyTDcgNy4xNmEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHpNOC45MzEgNi42MTVhLjQzNi40MzYgMCAwIDAtLjU0My4yOTFsLTEuODMgNi4wNDVhLjQzNi40MzYgMCAwIDAgLjgzNC4yNTJsMS44My02LjA0NGEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHoiLz48cGF0aCBkPSJNMTYuNTY0IDBILjQzNkEuNDM2LjQzNiAwIDAgMCAwIC40MzZ2MTYuMTI4YzAgLjI0LjE5NS40MzYuNDM2LjQzNmgxNi4xMjhjLjI0IDAgLjQzNi0uMTk1LjQzNi0uNDM2Vi40MzZBLjQzNi40MzYgMCAwIDAgMTYuNTY0IDB6TTMuNDg3Ljg3MmgxMC4wMjZ2MS43NDNIMy40ODdWLjg3MnptLTIuNjE1IDBoMS43NDN2MS43NDNILjg3MlYuODcyem0xNS4yNTYgMTUuMjU2SC44NzJWMy40ODhoMTUuMjU2djEyLjY0em0wLTEzLjUxM2gtMS43NDNWLjg3MmgxLjc0M3YxLjc0M3oiLz48Y2lyY2xlIGN4PSI5My44NjciIGN5PSIyNDUuMDY0IiByPSIxMy4xMjgiIHRyYW5zZm9ybT0ibWF0cml4KC4wMzMyIDAgMCAuMDMzMiAwIDApIi8+PGNpcmNsZSBjeD0iOTMuODY3IiBjeT0iMzYwLjU5MiIgcj0iMTMuMTI4IiB0cmFuc2Zvcm09Im1hdHJpeCguMDMzMiAwIDAgLjAzMzIgMCAwKSIvPjxwYXRoIGQ9Ik0xNC4yNTQgMTIuNjQxSDEwLjJhLjQzNi40MzYgMCAwIDAgMCAuODcyaDQuMDU0YS40MzYuNDM2IDAgMCAwIDAtLjg3MnoiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,embedCallback:void 0,defaultSize:{height:"auto",width:"auto"},title:void 0},image:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNzQxIDBILjI2Qy4xMTYgMCAwIC4xMzYgMCAuMzA0djEzLjM5MmMwIC4xNjguMTE2LjMwNC4yNTkuMzA0SDE0Ljc0Yy4xNDMgMCAuMjU5LS4xMzYuMjU5LS4zMDRWLjMwNEMxNSAuMTM2IDE0Ljg4NCAwIDE0Ljc0MSAwem0tLjI1OCAxMy4zOTFILjUxN1YuNjFoMTMuOTY2VjEzLjM5eiIvPjxwYXRoIGQ9Ik00LjEzOCA2LjczOGMuNzk0IDAgMS40NC0uNzYgMS40NC0xLjY5NXMtLjY0Ni0xLjY5NS0xLjQ0LTEuNjk1Yy0uNzk0IDAtMS40NC43Ni0xLjQ0IDEuNjk1IDAgLjkzNC42NDYgMS42OTUgMS40NCAxLjY5NXptMC0yLjc4MWMuNTA5IDAgLjkyMy40ODcuOTIzIDEuMDg2IDAgLjU5OC0uNDE0IDEuMDg2LS45MjMgMS4wODYtLjUwOSAwLS45MjMtLjQ4Ny0uOTIzLTEuMDg2IDAtLjU5OS40MTQtMS4wODYuOTIzLTEuMDg2ek0xLjgxIDEyLjE3NGMuMDYgMCAuMTIyLS4wMjUuMTcxLS4wNzZMNi4yIDcuNzI4bDIuNjY0IDMuMTM0YS4yMzIuMjMyIDAgMCAwIC4zNjYgMCAuMzQzLjM0MyAwIDAgMCAwLS40M0w3Ljk4NyA4Ljk2OWwyLjM3NC0zLjA2IDIuOTEyIDMuMTQyYy4xMDYuMTEzLjI3LjEwNS4zNjYtLjAyYS4zNDMuMzQzIDAgMCAwLS4wMTYtLjQzbC0zLjEwNC0zLjM0N2EuMjQ0LjI0NCAwIDAgMC0uMTg2LS4wOC4yNDUuMjQ1IDAgMCAwLS4xOC4xTDcuNjIyIDguNTM3IDYuMzk0IDcuMDk0YS4yMzIuMjMyIDAgMCAwLS4zNTQtLjAxM2wtNC40IDQuNTZhLjM0My4zNDMgMCAwIDAtLjAyNC40My4yNDMuMjQzIDAgMCAwIC4xOTQuMTAzeiIvPjwvZz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,urlEnabled:!0,uploadEnabled:!0,previewImage:!1,alignmentEnabled:!0,uploadCallback:void 0,inputAccept:"image/gif,image/jpeg,image/jpg,image/png,image/svg",alt:{present:!1,mandatory:!1},defaultSize:{height:"auto",width:"auto"},title:void 0},remove:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNSIgaGVpZ2h0PSIxNSIgdmlld0JveD0iMCAwIDE2IDE2Ij48cGF0aCBkPSJNOC4xIDE0bDYuNC03LjJjLjYtLjcuNi0xLjgtLjEtMi41bC0yLjctMi43Yy0uMy0uNC0uOC0uNi0xLjMtLjZIOC42Yy0uNSAwLTEgLjItMS40LjZMLjUgOS4yYy0uNi43LS42IDEuOS4xIDIuNWwyLjcgMi43Yy4zLjQuOC42IDEuMy42SDE2di0xSDguMXptLTEuMy0uMXMwLS4xIDAgMGwtMi43LTIuN2MtLjQtLjQtLjQtLjkgMC0xLjNMNy41IDZoLTFsLTMgMy4zYy0uNi43LS42IDEuNy4xIDIuNEw1LjkgMTRINC42Yy0uMiAwLS40LS4xLS42LS4yTDEuMiAxMWMtLjMtLjMtLjMtLjggMC0xLjFMNC43IDZoMS44TDEwIDJoMUw3LjUgNmwzLjEgMy43LTMuNSA0Yy0uMS4xLS4yLjEtLjMuMnoiLz48L3N2Zz4=",className:void 0,component:void 0,title:void 0},history:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["undo","redo"],undo:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcgMTQuODc1YzIuNjcyIDAgNC44NDYtMi4xNDUgNC44NDYtNC43ODEgMC0yLjYzNy0yLjE3NC00Ljc4MS00Ljg0Ni00Ljc4MVY4LjVMMS42MTUgNC4yNSA3IDB2My4xODhjMy44NiAwIDcgMy4wOTggNyA2LjkwNlMxMC44NiAxNyA3IDE3cy03LTMuMDk4LTctNi45MDZoMi4xNTRjMCAyLjYzNiAyLjE3NCA0Ljc4MSA0Ljg0NiA0Ljc4MXoiIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==",className:void 0,title:void 0},redo:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNTA0IDEzLjk3N2E0LjQ5NyA0LjQ5NyAwIDAgMS00LjQ5Mi00LjQ5MiA0LjQ5NyA0LjQ5NyAwIDAgMSA0LjQ5Mi00LjQ5M3YyLjk5NWw0Ljk5LTMuOTkzTDYuNTA0IDB2Mi45OTVhNi40OTYgNi40OTYgMCAwIDAtNi40ODggNi40OWMwIDMuNTc4IDIuOTEgNi40OSA2LjQ4OCA2LjQ5YTYuNDk2IDYuNDk2IDAgMCAwIDYuNDg3LTYuNDloLTEuOTk2YTQuNDk3IDQuNDk3IDAgMCAxLTQuNDkxIDQuNDkyeiIgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+",className:void 0,title:void 0},title:void 0}},zo={en:{"generic.add":"Add","generic.cancel":"Cancel","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Block Type","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Color Picker","components.controls.colorpicker.text":"Text","components.controls.colorpicker.background":"Highlight","components.controls.embedded.embedded":"Embedded","components.controls.embedded.embeddedlink":"Embedded Link","components.controls.embedded.enterlink":"Enter link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Font","components.controls.fontsize.fontsize":"Font Size","components.controls.history.history":"History","components.controls.history.undo":"Undo","components.controls.history.redo":"Redo","components.controls.image.image":"Image","components.controls.image.fileUpload":"File Upload","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop the file or click to upload","components.controls.inline.bold":"Bold","components.controls.inline.italic":"Italic","components.controls.inline.underline":"Underline","components.controls.inline.strikethrough":"Strikethrough","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Superscript","components.controls.inline.subscript":"Subscript","components.controls.link.linkTitle":"Link Title","components.controls.link.linkTarget":"Link Target","components.controls.link.linkTargetOption":"Open link in new window","components.controls.link.link":"Link","components.controls.link.unlink":"Unlink","components.controls.list.list":"List","components.controls.list.unordered":"Unordered","components.controls.list.ordered":"Ordered","components.controls.list.indent":"Indent","components.controls.list.outdent":"Outdent","components.controls.remove.remove":"Remove","components.controls.textalign.textalign":"Text Align","components.controls.textalign.left":"Left","components.controls.textalign.center":"Center","components.controls.textalign.right":"Right","components.controls.textalign.justify":"Justify"},fr:{"generic.add":"Ok","generic.cancel":"Annuler","components.controls.blocktype.h1":"Titre 1","components.controls.blocktype.h2":"Titre 2","components.controls.blocktype.h3":"Titre 3","components.controls.blocktype.h4":"Titre 4","components.controls.blocktype.h5":"Titre 5","components.controls.blocktype.h6":"Titre 6","components.controls.blocktype.blockquote":"Citation","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Type bloc","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Palette de couleur","components.controls.colorpicker.text":"Texte","components.controls.colorpicker.background":"Fond","components.controls.embedded.embedded":"Embedded","components.controls.embedded.embeddedlink":"Lien iFrame","components.controls.embedded.enterlink":"Entrer le lien","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Police","components.controls.fontsize.fontsize":"Taille de police","components.controls.history.history":"Historique","components.controls.history.undo":"Précédent","components.controls.history.redo":"Suivant","components.controls.image.image":"Image","components.controls.image.fileUpload":"Téléchargement","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Glisser une image ou cliquer pour télécharger","components.controls.inline.bold":"Gras","components.controls.inline.italic":"Italique","components.controls.inline.underline":"Souligner","components.controls.inline.strikethrough":"Barrer","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Exposant","components.controls.inline.subscript":"Indice","components.controls.link.linkTitle":"Titre du lien","components.controls.link.linkTarget":"Cible du lien","components.controls.link.linkTargetOption":"Ouvrir le lien dans une nouvelle fenêtre","components.controls.link.link":"Lier","components.controls.link.unlink":"Délier","components.controls.list.list":"Liste","components.controls.list.unordered":"Désordonnée","components.controls.list.ordered":"Ordonnée","components.controls.list.indent":"Augmenter le retrait","components.controls.list.outdent":"Diminuer le retrait","components.controls.remove.remove":"Supprimer","components.controls.textalign.textalign":"Alignement du texte","components.controls.textalign.left":"Gauche","components.controls.textalign.center":"Centre","components.controls.textalign.right":"Droite","components.controls.textalign.justify":"Justifier"},zh:{"generic.add":"添加","generic.cancel":"取消","components.controls.blocktype.h1":"标题1","components.controls.blocktype.h2":"标题2","components.controls.blocktype.h3":"标题3","components.controls.blocktype.h4":"标题4","components.controls.blocktype.h5":"标题5","components.controls.blocktype.h6":"标题6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"源码","components.controls.blocktype.blocktype":"样式","components.controls.blocktype.normal":"正文","components.controls.colorpicker.colorpicker":"选色器","components.controls.colorpicker.text":"文字","components.controls.colorpicker.background":"背景","components.controls.embedded.embedded":"内嵌","components.controls.embedded.embeddedlink":"内嵌网页","components.controls.embedded.enterlink":"输入网页地址","components.controls.emoji.emoji":"表情符号","components.controls.fontfamily.fontfamily":"字体","components.controls.fontsize.fontsize":"字号","components.controls.history.history":"历史","components.controls.history.undo":"撤销","components.controls.history.redo":"恢复","components.controls.image.image":"图片","components.controls.image.fileUpload":"来自文件","components.controls.image.byURL":"在线图片","components.controls.image.dropFileText":"点击或者拖拽文件上传","components.controls.inline.bold":"粗体","components.controls.inline.italic":"斜体","components.controls.inline.underline":"下划线","components.controls.inline.strikethrough":"删除线","components.controls.inline.monospace":"等宽字体","components.controls.inline.superscript":"上标","components.controls.inline.subscript":"下标","components.controls.link.linkTitle":"超链接","components.controls.link.linkTarget":"输入链接地址","components.controls.link.linkTargetOption":"在新窗口中打开链接","components.controls.link.link":"链接","components.controls.link.unlink":"删除链接","components.controls.list.list":"列表","components.controls.list.unordered":"项目符号","components.controls.list.ordered":"编号","components.controls.list.indent":"增加缩进量","components.controls.list.outdent":"减少缩进量","components.controls.remove.remove":"清除格式","components.controls.textalign.textalign":"文本对齐","components.controls.textalign.left":"文本左对齐","components.controls.textalign.center":"居中","components.controls.textalign.right":"文本右对齐","components.controls.textalign.justify":"两端对齐"},ru:{"generic.add":"Добавить","generic.cancel":"Отменить","components.controls.blocktype.h1":"Заголовок 1","components.controls.blocktype.h2":"Заголовок 2","components.controls.blocktype.h3":"Заголовок 3","components.controls.blocktype.h4":"Заголовок 4","components.controls.blocktype.h5":"Заголовок 5","components.controls.blocktype.h6":"Заголовок 6","components.controls.blocktype.blockquote":"Цитата","components.controls.blocktype.code":"Код","components.controls.blocktype.blocktype":"Форматирование","components.controls.blocktype.normal":"Обычный","components.controls.colorpicker.colorpicker":"Выбор цвета","components.controls.colorpicker.text":"Текст","components.controls.colorpicker.background":"Фон","components.controls.embedded.embedded":"Встраивание","components.controls.embedded.embeddedlink":"Ссылка в iFrame","components.controls.embedded.enterlink":"Вставьте ссылку","components.controls.emoji.emoji":"Эмодзи","components.controls.fontfamily.fontfamily":"Шрифт","components.controls.fontsize.fontsize":"Размер шрифта","components.controls.history.history":"История","components.controls.history.undo":"Отменить","components.controls.history.redo":"Вернуть","components.controls.image.image":"Изображение","components.controls.image.fileUpload":"Файлы","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Переместите в эту область файлы или кликните для загрузки","components.controls.inline.bold":"Жирный","components.controls.inline.italic":"Курсив","components.controls.inline.underline":"Подчеркивание","components.controls.inline.strikethrough":"Зачеркивание","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Верхний индекс","components.controls.inline.subscript":"Нижний индекс","components.controls.link.linkTitle":"Текст","components.controls.link.linkTarget":"Адрес ссылки","components.controls.link.linkTargetOption":"Открывать в новом окне","components.controls.link.link":"Ссылка","components.controls.link.unlink":"Убрать ссылку","components.controls.list.list":"Список","components.controls.list.unordered":"Неупорядоченный","components.controls.list.ordered":"Упорядоченный","components.controls.list.indent":"Отступ","components.controls.list.outdent":"Выступ","components.controls.remove.remove":"Удалить","components.controls.textalign.textalign":"Выравнивание текста","components.controls.textalign.left":"Слева","components.controls.textalign.center":"По центру","components.controls.textalign.right":"Справа","components.controls.textalign.justify":"Выравнить"},pt:{"generic.add":"Ok","generic.cancel":"Cancelar","components.controls.blocktype.h1":"Título 1","components.controls.blocktype.h2":"Título 2","components.controls.blocktype.h3":"Título 3","components.controls.blocktype.h4":"Título 4","components.controls.blocktype.h5":"Título 5","components.controls.blocktype.h6":"Título 6","components.controls.blocktype.blockquote":"Citação","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Estilo","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Paleta de cores","components.controls.colorpicker.text":"Texto","components.controls.colorpicker.background":"Fundo","components.controls.embedded.embedded":"Embarcado","components.controls.embedded.embeddedlink":"Link embarcado","components.controls.embedded.enterlink":"Coloque o link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fonte","components.controls.fontsize.fontsize":"Tamanho da Fonte","components.controls.history.history":"Histórico","components.controls.history.undo":"Desfazer","components.controls.history.redo":"Refazer","components.controls.image.image":"Imagem","components.controls.image.fileUpload":"Carregar arquivo","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Arraste uma imagem aqui ou clique para carregar","components.controls.inline.bold":"Negrito","components.controls.inline.italic":"Itálico","components.controls.inline.underline":"Sublinhado","components.controls.inline.strikethrough":"Strikethrough","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Sobrescrito","components.controls.inline.subscript":"Subscrito","components.controls.link.linkTitle":"Título do link","components.controls.link.linkTarget":"Alvo do link","components.controls.link.linkTargetOption":"Abrir link em outra janela","components.controls.link.link":"Adicionar Link","components.controls.link.unlink":"Remover link","components.controls.list.list":"Lista","components.controls.list.unordered":"Sem ordenção","components.controls.list.ordered":"Ordenada","components.controls.list.indent":"Aumentar recuo","components.controls.list.outdent":"Diminuir recuo","components.controls.remove.remove":"Remover","components.controls.textalign.textalign":"Alinhamento do texto","components.controls.textalign.left":"À Esquerda","components.controls.textalign.center":"Centralizado","components.controls.textalign.right":"À Direita","components.controls.textalign.justify":"Justificado"},ko:{"generic.add":"입력","generic.cancel":"취소","components.controls.blocktype.h1":"제목1","components.controls.blocktype.h2":"제목2","components.controls.blocktype.h3":"제목3","components.controls.blocktype.h4":"제목4","components.controls.blocktype.h5":"제목5","components.controls.blocktype.h6":"제목6","components.controls.blocktype.blockquote":"인용","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"블록","components.controls.blocktype.normal":"표준","components.controls.colorpicker.colorpicker":"색상 선택","components.controls.colorpicker.text":"글꼴색","components.controls.colorpicker.background":"배경색","components.controls.embedded.embedded":"임베드","components.controls.embedded.embeddedlink":"임베드 링크","components.controls.embedded.enterlink":"주소를 입력하세요","components.controls.emoji.emoji":"이모지","components.controls.fontfamily.fontfamily":"글꼴","components.controls.fontsize.fontsize":"글꼴 크기","components.controls.history.history":"히스토리","components.controls.history.undo":"실행 취소","components.controls.history.redo":"다시 실행","components.controls.image.image":"이미지","components.controls.image.fileUpload":"파일 업로드","components.controls.image.byURL":"주소","components.controls.image.dropFileText":"클릭하거나 파일을 드롭하여 업로드하세요","components.controls.inline.bold":"굵게","components.controls.inline.italic":"기울임꼴","components.controls.inline.underline":"밑줄","components.controls.inline.strikethrough":"취소선","components.controls.inline.monospace":"고정 너비","components.controls.inline.superscript":"위 첨자","components.controls.inline.subscript":"아래 첨자","components.controls.link.linkTitle":"링크 제목","components.controls.link.linkTarget":"링크 타겟","components.controls.link.linkTargetOption":"새창으로 열기","components.controls.link.link":"링크","components.controls.link.unlink":"링크 제거","components.controls.list.list":"리스트","components.controls.list.unordered":"일반 리스트","components.controls.list.ordered":"순서 리스트","components.controls.list.indent":"들여쓰기","components.controls.list.outdent":"내어쓰기","components.controls.remove.remove":"삭제","components.controls.textalign.textalign":"텍스트 정렬","components.controls.textalign.left":"왼쪽","components.controls.textalign.center":"중앙","components.controls.textalign.right":"오른쪽","components.controls.textalign.justify":"양쪽"},it:{"generic.add":"Aggiungi","generic.cancel":"Annulla","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Citazione","components.controls.blocktype.code":"Codice","components.controls.blocktype.blocktype":"Stili","components.controls.blocktype.normal":"Normale","components.controls.colorpicker.colorpicker":"Colore testo","components.controls.colorpicker.text":"Testo","components.controls.colorpicker.background":"Evidenziazione","components.controls.embedded.embedded":"Incorpora","components.controls.embedded.embeddedlink":"Incorpora link","components.controls.embedded.enterlink":"Inserisci link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Carattere","components.controls.fontsize.fontsize":"Dimensione carattere","components.controls.history.history":"Modifiche","components.controls.history.undo":"Annulla","components.controls.history.redo":"Ripristina","components.controls.image.image":"Immagine","components.controls.image.fileUpload":"Carica immagine","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Trascina il file o clicca per caricare","components.controls.inline.bold":"Grassetto","components.controls.inline.italic":"Corsivo","components.controls.inline.underline":"Sottolineato","components.controls.inline.strikethrough":"Barrato","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Apice","components.controls.inline.subscript":"Pedice","components.controls.link.linkTitle":"Testo","components.controls.link.linkTarget":"Link","components.controls.link.linkTargetOption":"Apri link in una nuova finestra","components.controls.link.link":"Inserisci link","components.controls.link.unlink":"Rimuovi link","components.controls.list.list":"Lista","components.controls.list.unordered":"Elenco puntato","components.controls.list.ordered":"Elenco numerato","components.controls.list.indent":"Indent","components.controls.list.outdent":"Outdent","components.controls.remove.remove":"Rimuovi formattazione","components.controls.textalign.textalign":"Allineamento del testo","components.controls.textalign.left":"Allinea a sinistra","components.controls.textalign.center":"Allinea al centro","components.controls.textalign.right":"Allinea a destra","components.controls.textalign.justify":"Giustifica"},nl:{"generic.add":"Toevoegen","generic.cancel":"Annuleren","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Blocktype","components.controls.blocktype.normal":"Normaal","components.controls.colorpicker.colorpicker":"Kleurkiezer","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Achtergrond","components.controls.embedded.embedded":"Ingevoegd","components.controls.embedded.embeddedlink":"Ingevoegde link","components.controls.embedded.enterlink":"Voeg link toe","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Lettertype","components.controls.fontsize.fontsize":"Lettergrootte","components.controls.history.history":"Geschiedenis","components.controls.history.undo":"Ongedaan maken","components.controls.history.redo":"Opnieuw","components.controls.image.image":"Afbeelding","components.controls.image.fileUpload":"Bestand uploaden","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop het bestand hier of klik om te uploaden","components.controls.inline.bold":"Dikgedrukt","components.controls.inline.italic":"Schuingedrukt","components.controls.inline.underline":"Onderstrepen","components.controls.inline.strikethrough":"Doorstrepen","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Superscript","components.controls.inline.subscript":"Subscript","components.controls.link.linkTitle":"Linktitel","components.controls.link.linkTarget":"Link bestemming","components.controls.link.linkTargetOption":"Open link in een nieuw venster","components.controls.link.link":"Link","components.controls.link.unlink":"Unlink","components.controls.list.list":"Lijst","components.controls.list.unordered":"Ongeordend","components.controls.list.ordered":"Geordend","components.controls.list.indent":"Inspringen","components.controls.list.outdent":"Inspringen verkleinen","components.controls.remove.remove":"Verwijderen","components.controls.textalign.textalign":"Tekst uitlijnen","components.controls.textalign.left":"Links","components.controls.textalign.center":"Gecentreerd","components.controls.textalign.right":"Rechts","components.controls.textalign.justify":"Uitgelijnd"},de:{"generic.add":"Hinzufügen","generic.cancel":"Abbrechen","components.controls.blocktype.h1":"Überschrift 1","components.controls.blocktype.h2":"Überschrift 2","components.controls.blocktype.h3":"Überschrift 3","components.controls.blocktype.h4":"Überschrift 4","components.controls.blocktype.h5":"Überschrift 5","components.controls.blocktype.h6":"Überschrift 6","components.controls.blocktype.blockquote":"Zitat","components.controls.blocktype.code":"Quellcode","components.controls.blocktype.blocktype":"Blocktyp","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Farbauswahl","components.controls.colorpicker.text":"Text","components.controls.colorpicker.background":"Hintergrund","components.controls.embedded.embedded":"Eingebettet","components.controls.embedded.embeddedlink":"Eingebetteter Link","components.controls.embedded.enterlink":"Link eingeben","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Schriftart","components.controls.fontsize.fontsize":"Schriftgröße","components.controls.history.history":"Historie","components.controls.history.undo":"Zurücknehmen","components.controls.history.redo":"Wiederholen","components.controls.image.image":"Bild","components.controls.image.fileUpload":"Datei-Upload","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Dateien ziehen und ablegen, oder klicken zum Hochladen","components.controls.inline.bold":"Fett","components.controls.inline.italic":"Kursiv","components.controls.inline.underline":"Unterstreichen","components.controls.inline.strikethrough":"Durchstreichen","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Hochgestellt","components.controls.inline.subscript":"Tiefgestellt","components.controls.link.linkTitle":"Link-Titel","components.controls.link.linkTarget":"Link-Ziel","components.controls.link.linkTargetOption":"Link in neuem Fenster öffnen","components.controls.link.link":"Link","components.controls.link.unlink":"Aufheben","components.controls.list.list":"Liste","components.controls.list.unordered":"Aufzählung","components.controls.list.ordered":"Nummerierte Liste","components.controls.list.indent":"Einzug vergrößern","components.controls.list.outdent":"Einzug reduzieren","components.controls.remove.remove":"Entfernen","components.controls.textalign.textalign":"Textausrichtung","components.controls.textalign.left":"Linksbündig","components.controls.textalign.center":"Zentrieren","components.controls.textalign.right":"Rechtsbündig","components.controls.textalign.justify":"Blocksatz"},da:{"generic.add":"Tilføj","generic.cancel":"Annuller","components.controls.blocktype.h1":"Overskrift 1","components.controls.blocktype.h2":"Overskrift 2","components.controls.blocktype.h3":"Overskrift 3","components.controls.blocktype.h4":"Overskrift 4","components.controls.blocktype.h5":"Overskrift 5","components.controls.blocktype.h6":"Overskrift 6","components.controls.blocktype.blockquote":"Blokcitat","components.controls.blocktype.code":"Kode","components.controls.blocktype.blocktype":"Blok Type","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Farver","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Baggrund","components.controls.embedded.embedded":"Indlejre","components.controls.embedded.embeddedlink":"Indlejre Link","components.controls.embedded.enterlink":"Indtast link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fonttype","components.controls.fontsize.fontsize":"Fontstørrelser","components.controls.history.history":"Historie","components.controls.history.undo":"Fortryd","components.controls.history.redo":"Gendan","components.controls.image.image":"Billede","components.controls.image.fileUpload":"Filoverførsel","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop filen eller klik for at uploade","components.controls.inline.bold":"Fed","components.controls.inline.italic":"Kursiv","components.controls.inline.underline":"Understrege","components.controls.inline.strikethrough":"Gennemstreget","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Hævet","components.controls.inline.subscript":"Sænket","components.controls.link.linkTitle":"Link Titel","components.controls.link.linkTarget":"Link Mål","components.controls.link.linkTargetOption":"Åbn link i nyt vindue","components.controls.link.link":"Link","components.controls.link.unlink":"Fjern link","components.controls.list.list":"Liste","components.controls.list.unordered":"Uordnet","components.controls.list.ordered":"Ordnet","components.controls.list.indent":"Indrykning","components.controls.list.outdent":"Udrykning","components.controls.remove.remove":"Fjern","components.controls.textalign.textalign":"Tekstjustering","components.controls.textalign.left":"Venstre","components.controls.textalign.center":"Center","components.controls.textalign.right":"Højre","components.controls.textalign.justify":"Margener"},zh_tw:{"generic.add":"新增","generic.cancel":"取消","components.controls.blocktype.h1":"標題1","components.controls.blocktype.h2":"標題2","components.controls.blocktype.h3":"標題3","components.controls.blocktype.h4":"標題4","components.controls.blocktype.h5":"標題5","components.controls.blocktype.h6":"標題6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"程式碼","components.controls.blocktype.blocktype":"樣式","components.controls.blocktype.normal":"正文","components.controls.colorpicker.colorpicker":"選色器","components.controls.colorpicker.text":"文字","components.controls.colorpicker.background":"背景","components.controls.embedded.embedded":"內嵌","components.controls.embedded.embeddedlink":"內嵌網頁","components.controls.embedded.enterlink":"輸入網頁地址","components.controls.emoji.emoji":"表情符號","components.controls.fontfamily.fontfamily":"字體","components.controls.fontsize.fontsize":"字體大小","components.controls.history.history":"歷史紀錄","components.controls.history.undo":"復原","components.controls.history.redo":"重做","components.controls.image.image":"圖片","components.controls.image.fileUpload":"檔案上傳","components.controls.image.byURL":"網址","components.controls.image.dropFileText":"點擊或拖曳檔案上傳","components.controls.inline.bold":"粗體","components.controls.inline.italic":"斜體","components.controls.inline.underline":"底線","components.controls.inline.strikethrough":"刪除線","components.controls.inline.monospace":"等寬字體","components.controls.inline.superscript":"上標","components.controls.inline.subscript":"下標","components.controls.link.linkTitle":"超連結","components.controls.link.linkTarget":"輸入連結位址","components.controls.link.linkTargetOption":"在新視窗打開連結","components.controls.link.link":"連結","components.controls.link.unlink":"刪除連結","components.controls.list.list":"列表","components.controls.list.unordered":"項目符號","components.controls.list.ordered":"編號","components.controls.list.indent":"增加縮排","components.controls.list.outdent":"減少縮排","components.controls.remove.remove":"清除格式","components.controls.textalign.textalign":"文字對齊","components.controls.textalign.left":"文字向左對齊","components.controls.textalign.center":"文字置中","components.controls.textalign.right":"文字向右對齊","components.controls.textalign.justify":"兩端對齊"},pl:{"generic.add":"Dodaj","generic.cancel":"Anuluj","components.controls.blocktype.h1":"Nagłówek 1","components.controls.blocktype.h2":"Nagłówek 2","components.controls.blocktype.h3":"Nagłówek 3","components.controls.blocktype.h4":"Nagłówek 4","components.controls.blocktype.h5":"Nagłówek 5","components.controls.blocktype.h6":"Nagłówek 6","components.controls.blocktype.blockquote":"Cytat","components.controls.blocktype.code":"Kod","components.controls.blocktype.blocktype":"Format","components.controls.blocktype.normal":"Normalny","components.controls.colorpicker.colorpicker":"Kolor","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Tło","components.controls.embedded.embedded":"Osadź","components.controls.embedded.embeddedlink":"Osadź odnośnik","components.controls.embedded.enterlink":"Wprowadź odnośnik","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Krój czcionki","components.controls.fontsize.fontsize":"Rozmiar czcionki","components.controls.history.history":"Historia","components.controls.history.undo":"Cofnij","components.controls.history.redo":"Ponów","components.controls.image.image":"Obrazek","components.controls.image.fileUpload":"Prześlij plik","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Upuść plik lub kliknij, aby przesłać","components.controls.inline.bold":"Pogrubienie","components.controls.inline.italic":"Kursywa","components.controls.inline.underline":"Podkreślenie","components.controls.inline.strikethrough":"Przekreślenie","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Indeks górny","components.controls.inline.subscript":"Indeks dolny","components.controls.link.linkTitle":"Tytuł odnośnika","components.controls.link.linkTarget":"Adres odnośnika","components.controls.link.linkTargetOption":"Otwórz odnośnik w nowej karcie","components.controls.link.link":"Wstaw odnośnik","components.controls.link.unlink":"Usuń odnośnik","components.controls.list.list":"Lista","components.controls.list.unordered":"Lista nieuporządkowana","components.controls.list.ordered":"Lista uporządkowana","components.controls.list.indent":"Zwiększ wcięcie","components.controls.list.outdent":"Zmniejsz wcięcie","components.controls.remove.remove":"Usuń","components.controls.textalign.textalign":"Wyrównaj tekst","components.controls.textalign.left":"Do lewej","components.controls.textalign.center":"Do środka","components.controls.textalign.right":"Do prawej","components.controls.textalign.justify":"Wyjustuj"},es:{"generic.add":"Añadir","generic.cancel":"Cancelar","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Código","components.controls.blocktype.blocktype":"Tipo de bloque","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Seleccionar color","components.controls.colorpicker.text":"Texto","components.controls.colorpicker.background":"Subrayado","components.controls.embedded.embedded":"Adjuntar","components.controls.embedded.embeddedlink":"Adjuntar Link","components.controls.embedded.enterlink":"Introducir link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fuente","components.controls.fontsize.fontsize":"Tamaño de fuente","components.controls.history.history":"Histórico","components.controls.history.undo":"Deshacer","components.controls.history.redo":"Rehacer","components.controls.image.image":"Imagen","components.controls.image.fileUpload":"Subir archivo","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Arrastra el archivo o haz click para subirlo","components.controls.inline.bold":"Negrita","components.controls.inline.italic":"Cursiva","components.controls.inline.underline":"Subrayado","components.controls.inline.strikethrough":"Tachado","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Sobreíndice","components.controls.inline.subscript":"Subíndice","components.controls.link.linkTitle":"Título del enlace","components.controls.link.linkTarget":"Objetivo del enlace","components.controls.link.linkTargetOption":"Abrir en nueva ventana","components.controls.link.link":"Enlazar","components.controls.link.unlink":"Desenlazar","components.controls.list.list":"Lista","components.controls.list.unordered":"Desordenada","components.controls.list.ordered":"Ordenada","components.controls.list.indent":"Indentada","components.controls.list.outdent":"Dentada","components.controls.remove.remove":"Eliminar","components.controls.textalign.textalign":"Alineación del texto","components.controls.textalign.left":"Izquierda","components.controls.textalign.center":"Centrado","components.controls.textalign.right":"Derecha","components.controls.textalign.justify":"Justificado"},ja:{"generic.add":"追加","generic.cancel":"キャンセル","components.controls.blocktype.h1":"見出し1","components.controls.blocktype.h2":"見出し2","components.controls.blocktype.h3":"見出し3","components.controls.blocktype.h4":"見出し4","components.controls.blocktype.h5":"見出し5","components.controls.blocktype.h6":"見出し6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"コード","components.controls.blocktype.blocktype":"スタイル","components.controls.blocktype.normal":"標準テキスト","components.controls.colorpicker.colorpicker":"テキストの色","components.controls.colorpicker.text":"テキスト","components.controls.colorpicker.background":"ハイライト","components.controls.embedded.embedded":"埋め込み","components.controls.embedded.embeddedlink":"埋め込みリンク","components.controls.embedded.enterlink":"リンクを入力してください","components.controls.emoji.emoji":"絵文字","components.controls.fontfamily.fontfamily":"フォント","components.controls.fontsize.fontsize":"フォントサイズ","components.controls.history.history":"履歴","components.controls.history.undo":"元に戻す","components.controls.history.redo":"やり直し","components.controls.image.image":"画像","components.controls.image.fileUpload":"ファイルをアップロード","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"ここに画像をドラッグするか、クリックしてください","components.controls.inline.bold":"太字","components.controls.inline.italic":"斜体","components.controls.inline.underline":"下線","components.controls.inline.strikethrough":"取り消し線","components.controls.inline.monospace":"等幅フォント","components.controls.inline.superscript":"上付き文字","components.controls.inline.subscript":"下付き文字","components.controls.link.linkTitle":"リンクタイトル","components.controls.link.linkTarget":"リンク対象","components.controls.link.linkTargetOption":"新しいウィンドウで開く","components.controls.link.link":"リンク","components.controls.link.unlink":"リンクを解除","components.controls.list.list":"リスト","components.controls.list.unordered":"箇条書き","components.controls.list.ordered":"番号付き","components.controls.list.indent":"インデント増","components.controls.list.outdent":"インデント減","components.controls.remove.remove":"書式をクリア","components.controls.textalign.textalign":"整列","components.controls.textalign.left":"左揃え","components.controls.textalign.center":"中央揃え","components.controls.textalign.right":"右揃え","components.controls.textalign.justify":"両端揃え"}};n(38),n(39);function _o(e){return(_o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Po(){return(Po=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function Uo(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,o)}return n}function Yo(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Uo(Object(n),!0).forEach(function(e){Fo(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Uo(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Fo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ro(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function Bo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Qo(e,t){return!t||"object"!==_o(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Ho(e){return(Ho=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Zo(e,t){return(Zo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Wo=function(){function r(e){var a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(a=Qo(this,Ho(r).call(this,e))).onEditorBlur=function(){a.setState({editorFocused:!1})},a.onEditorFocus=function(e){var t=a.props.onFocus;a.setState({editorFocused:!0});var n=a.focusHandler.isEditorFocused();t&&n&&t(e)},a.onEditorMouseDown=function(){a.focusHandler.onEditorMouseDown()},a.keyBindingFn=function(e){if("Tab"!==e.key)return"ArrowUp"!==e.key&&"ArrowDown"!==e.key||s()&&e.preventDefault(),Object(E.getDefaultKeyBinding)(e);var t=a.props.onTab;if(!t||!t(e)){var n=Object(C.changeDepth)(a.state.editorState,e.shiftKey?-1:1,4);n&&n!==a.state.editorState&&(a.onChange(n),e.preventDefault())}return null},a.onToolbarFocus=function(e){var t=a.props.onFocus;t&&a.focusHandler.isToolbarFocused()&&t(e)},a.onWrapperBlur=function(e){var t=a.props.onBlur;t&&a.focusHandler.isEditorBlur(e)&&t(e,a.getEditorState())},a.onChange=function(e){var t=a.props,n=t.readOnly,o=t.onEditorStateChange;n||"atomic"===Object(C.getSelectedBlocksType)(e)&&e.getSelection().isCollapsed||(o&&o(e,a.props.wrapperId),p(a.props,"editorState")?a.afterChange(e):a.setState({editorState:e},a.afterChange(e)))},a.setWrapperReference=function(e){a.wrapper=e},a.setEditorReference=function(e){a.props.editorRef&&a.props.editorRef(e),a.editor=e},a.getCompositeDecorator=function(e){var t=[].concat(Ro(a.props.customDecorators),[{strategy:uo,component:po({showOpenOptionOnHover:e.link.showOpenOptionOnHover})}]);return a.props.mention&&t.push.apply(t,Ro(So(Yo({},a.props.mention,{onChange:a.onChange,getEditorState:a.getEditorState,getSuggestions:a.getSuggestions,getWrapperRef:a.getWrapperRef,modalHandler:a.modalHandler})))),a.props.hashtag&&t.push(Lo(a.props.hashtag)),new E.CompositeDecorator(t)},a.getWrapperRef=function(){return a.wrapper},a.getEditorState=function(){return a.state?a.state.editorState:null},a.getSuggestions=function(){return a.props.mention&&a.props.mention.suggestions},a.afterChange=function(o){setTimeout(function(){var e=a.props,t=e.onChange,n=e.onContentStateChange;t&&t(Object(E.convertToRaw)(o.getCurrentContent())),n&&n(Object(E.convertToRaw)(o.getCurrentContent()))})},a.isReadOnly=function(){return a.props.readOnly},a.isImageAlignmentEnabled=function(){return a.state.toolbar.image.alignmentEnabled},a.createEditorState=function(e){var t;if(p(a.props,"editorState"))a.props.editorState&&(t=E.EditorState.set(a.props.editorState,{decorator:e}));else if(p(a.props,"defaultEditorState"))a.props.defaultEditorState&&(t=E.EditorState.set(a.props.defaultEditorState,{decorator:e}));else if(p(a.props,"contentState")){if(a.props.contentState){var n=Object(E.convertFromRaw)(a.props.contentState);t=E.EditorState.createWithContent(n,e),t=E.EditorState.moveSelectionToEnd(t)}}else if(p(a.props,"defaultContentState")||p(a.props,"initialContentState")){var o=a.props.defaultContentState||a.props.initialContentState;o&&(o=Object(E.convertFromRaw)(o),t=E.EditorState.createWithContent(o,e),t=E.EditorState.moveSelectionToEnd(t))}return t=t||E.EditorState.createEmpty(e)},a.filterEditorProps=function(e){return t=e,n=["onChange","onEditorStateChange","onContentStateChange","initialContentState","defaultContentState","contentState","editorState","defaultEditorState","locale","localization","toolbarOnFocus","toolbar","toolbarCustomButtons","toolbarClassName","editorClassName","toolbarHidden","wrapperClassName","toolbarStyle","editorStyle","wrapperStyle","uploadCallback","onFocus","onBlur","onTab","mention","hashtag","ariaLabel","customBlockRenderFunc","customDecorators","handlePastedText","customStyleMap"],o=Object.keys(t).filter(function(e){return n.indexOf(e)<0}),r={},o&&0<o.length&&o.forEach(function(e){r[e]=t[e]}),r;var t,n,o,r},a.getStyleMap=function(e){return Yo({},Object(C.getCustomStyleMap)(),{},e.customStyleMap)},a.changeEditorState=function(e){var t=Object(E.convertFromRaw)(e),n=a.state.editorState;return n=E.EditorState.push(n,t,"insert-characters"),n=E.EditorState.moveSelectionToEnd(n)},a.focusEditor=function(){setTimeout(function(){a.editor.focus()})},a.handleKeyCommand=function(e){var t=a.state,n=t.editorState,o=t.toolbar.inline;if(o&&0<=o.options.indexOf(e)){var r=E.RichUtils.handleKeyCommand(n,e);if(r)return a.onChange(r),!0}return!1},a.handleReturn=function(e){if(s())return!0;var t=a.state.editorState,n=Object(C.handleNewLine)(t,e);return!!n&&(a.onChange(n),!0)},a.handlePastedTextFn=function(e,t){var n=a.state.editorState,o=a.props,r=o.handlePastedText,i=o.stripPastedStyles;return r?r(e,t,n,a.onChange):!i&&function(e,t,n,o){var r=Object(C.getSelectedBlock)(n);if(r&&"code"===r.type){var i=E.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());return o(E.EditorState.push(n,i,"insert-characters")),!0}if(t){var a=j()(t),c=n.getCurrentContent();return a.entityMap.forEach(function(e,t){c=c.mergeEntityData(t,e)}),c=E.Modifier.replaceWithFragment(c,n.getSelection(),new N.List(a.contentBlocks)),o(E.EditorState.push(n,c,"insert-characters")),!0}return!1}(e,t,n,a.onChange)},a.preventDefault=function(e){"INPUT"===e.target.tagName||"LABEL"===e.target.tagName||"TEXTAREA"===e.target.tagName?a.focusHandler.onInputMouseDown():e.preventDefault()};var t=M(To,e.toolbar),n=e.wrapperId?e.wrapperId:Math.floor(1e4*Math.random());a.wrapperId="rdw-wrapper-".concat(n),a.modalHandler=new i,a.focusHandler=new c,a.blockRendererFn=Ao({isReadOnly:a.isReadOnly,isImageAlignmentEnabled:a.isImageAlignmentEnabled,getEditorState:a.getEditorState,onChange:a.onChange},e.customBlockRenderFunc),a.editorProps=a.filterEditorProps(e),a.customStyleMap=a.getStyleMap(e),a.compositeDecorator=a.getCompositeDecorator(t);var o=a.createEditorState(a.compositeDecorator);return Object(C.extractInlineStyle)(o),a.state={editorState:o,editorFocused:!1,toolbar:t},a}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Zo(e,t)}(r,m["Component"]),e=r,(t=[{key:"componentDidMount",value:function(){this.modalHandler.init(this.wrapperId)}},{key:"componentDidUpdate",value:function(e){if(e!==this.props){var t={},n=this.props,o=n.editorState,r=n.contentState;if(!this.state.toolbar){var i=M(To,i);t.toolbar=i}if(p(this.props,"editorState")&&o!==e.editorState)t.editorState=o?E.EditorState.set(o,{decorator:this.compositeDecorator}):E.EditorState.createEmpty(this.compositeDecorator);else if(p(this.props,"contentState")&&r!==e.contentState)if(r){var a=this.changeEditorState(r);a&&(t.editorState=a)}else t.editorState=E.EditorState.createEmpty(this.compositeDecorator);e.editorState===o&&e.contentState===r||Object(C.extractInlineStyle)(t.editorState),Object.keys(t).length&&this.setState(t),this.editorProps=this.filterEditorProps(this.props),this.customStyleMap=this.getStyleMap(this.props)}}},{key:"render",value:function(){var e=this.state,t=e.editorState,n=e.editorFocused,r=e.toolbar,o=this.props,i=o.locale,a=o.localization,c=a.locale,l=a.translations,s=o.toolbarCustomButtons,u=o.toolbarOnFocus,p=o.toolbarClassName,d=o.toolbarHidden,m=o.editorClassName,f=o.wrapperClassName,g=o.toolbarStyle,y=o.editorStyle,h=o.wrapperStyle,M=o.uploadCallback,b=o.ariaLabel,j={modalHandler:this.modalHandler,editorState:t,onChange:this.onChange,translations:Yo({},zo[i||c],{},l)},N=n||this.focusHandler.isInputFocused()||!u;return S.a.createElement("div",{id:this.wrapperId,className:L()(f,"rdw-editor-wrapper"),style:h,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur,"aria-label":"rdw-wrapper"},!d&&S.a.createElement("div",{className:L()("rdw-editor-toolbar",p),style:Yo({visibility:N?"visible":"hidden"},g),onMouseDown:this.preventDefault,"aria-label":"rdw-toolbar","aria-hidden":(!n&&u).toString(),onFocus:this.onToolbarFocus},r.options.map(function(e,t){var n=ro[e],o=r[e];return"image"===e&&M&&(o.uploadCallback=M),S.a.createElement(n,Po({key:t},j,{config:o}))}),s&&s.map(function(e,t){return S.a.cloneElement(e,Yo({key:t},j))})),S.a.createElement("div",{ref:this.setWrapperReference,className:L()(m,"rdw-editor-main"),style:y,onClick:this.focusEditor,onFocus:this.onEditorFocus,onBlur:this.onEditorBlur,onKeyDown:k.onKeyDown,onMouseDown:this.onEditorMouseDown},S.a.createElement(E.Editor,Po({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:t,onChange:this.onChange,blockStyleFn:D,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,handlePastedText:this.handlePastedTextFn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,ariaLabel:b||"rdw-editor",blockRenderMap:C.blockRenderMap},this.editorProps))))}}])&&Bo(e.prototype,t),n&&Bo(e,n),r}();Wo.propTypes={onChange:f.a.func,onEditorStateChange:f.a.func,onContentStateChange:f.a.func,initialContentState:f.a.object,defaultContentState:f.a.object,contentState:f.a.object,editorState:f.a.object,defaultEditorState:f.a.object,toolbarOnFocus:f.a.bool,spellCheck:f.a.bool,stripPastedStyles:f.a.bool,toolbar:f.a.object,toolbarCustomButtons:f.a.array,toolbarClassName:f.a.string,toolbarHidden:f.a.bool,locale:f.a.string,localization:f.a.object,editorClassName:f.a.string,wrapperClassName:f.a.string,toolbarStyle:f.a.object,editorStyle:f.a.object,wrapperStyle:f.a.object,uploadCallback:f.a.func,onFocus:f.a.func,onBlur:f.a.func,onTab:f.a.func,mention:f.a.object,hashtag:f.a.object,textAlignment:f.a.string,readOnly:f.a.bool,tabIndex:f.a.number,placeholder:f.a.string,ariaLabel:f.a.string,ariaOwneeID:f.a.string,ariaActiveDescendantID:f.a.string,ariaAutoComplete:f.a.string,ariaDescribedBy:f.a.string,ariaExpanded:f.a.string,ariaHasPopup:f.a.string,customBlockRenderFunc:f.a.func,wrapperId:f.a.number,customDecorators:f.a.array,editorRef:f.a.func,handlePastedText:f.a.func},Wo.defaultProps={toolbarOnFocus:!1,toolbarHidden:!1,stripPastedStyles:!1,localization:{locale:"en",translations:{}},customDecorators:[]};var Go=Wo;n.d(t,"Editor",function(){return Go})}],i.c=c,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=8);function i(e){if(c[e])return c[e].exports;var t=c[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}var a,c}); | !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("draft-js"),require("immutable")):"function"==typeof define&&define.amd?define(["react","draft-js","immutable"],t):"object"==typeof exports?exports.reactDraftWysiwyg=t(require("react"),require("draft-js"),require("immutable")):e.reactDraftWysiwyg=t(e.react,e["draft-js"],e.immutable)}(window,function(n,o,r){return c={},i.m=a=[function(e,t,n){e.exports=n(9)()},function(e,t){e.exports=n},function(e,t,n){var o;
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
!function(){"use strict";var a={}.hasOwnProperty;function c(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"==o||"number"==o)e.push(n);else if(Array.isArray(n)&&n.length){var r=c.apply(null,n);r&&e.push(r)}else if("object"==o)for(var i in n)a.call(n,i)&&n[i]&&e.push(i)}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):void 0===(o=function(){return c}.apply(t,[]))||(e.exports=o)}()},function(e,t){e.exports=o},function(e,t,n){function r(e){if(c[e])return c[e].exports;var t=c[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var o,i,a,c;window,e.exports=(o=n(3),i=n(5),c={},r.m=a=[function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t,n){e.exports=n(3)},function(e,t,n){"use strict";n.r(t);var b=n(0),i=n(1);function j(e){var t=e.getSelection(),n=e.getCurrentContent(),o=t.getStartKey(),r=t.getEndKey(),i=n.getBlockMap();return i.toSeq().skipUntil(function(e,t){return t===o}).takeUntil(function(e,t){return t===r}).concat([[r,i.get(r)]])}function u(e){return j(e).toList()}function l(e){if(e)return u(e).get(0)}function o(e){if(e){var n=l(e),t=e.getCurrentContent().getBlockMap().toSeq().toList(),o=0;if(t.forEach(function(e,t){e.get("key")===n.get("key")&&(o=t-1)}),-1<o)return t.get(o)}}function r(e){return e?e.getCurrentContent().getBlockMap().toList():new i.List}function a(e){var t=u(e);if(!t.some(function(e){return e.type!==t.get(0).type}))return t.get(0).type}function c(e){var t=b.RichUtils.tryToRemoveBlockStyle(e);return t?b.EditorState.push(e,t,"change-block-type"):e}function s(e){var t="",n=e.getSelection(),o=n.getAnchorOffset(),r=n.getFocusOffset(),i=u(e);if(0<i.size){if(n.getIsBackward()){var a=o;o=r,r=a}for(var c=0;c<i.size;c+=1){var l=0===c?o:0,s=c===i.size-1?r:i.get(c).getText().length;t+=i.get(c).getText().slice(l,s)}}return t}function p(e){var t=e.getCurrentContent(),n=e.getSelection(),o=b.Modifier.removeRange(t,n,"forward"),r=o.getSelectionAfter(),i=o.getBlockForKey(r.getStartKey());return o=b.Modifier.insertText(o,r,"\n",i.getInlineStyleAt(r.getStartOffset()),null),b.EditorState.push(e,o,"insert-fragment")}function d(e){var t=b.Modifier.splitBlock(e.getCurrentContent(),e.getSelection());return c(b.EditorState.push(e,t,"split-block"))}function m(e){var t=e.getCurrentContent().getBlockMap().toList(),n=e.getSelection().merge({anchorKey:t.first().get("key"),anchorOffset:0,focusKey:t.last().get("key"),focusOffset:t.last().getLength()}),o=b.Modifier.removeRange(e.getCurrentContent(),n,"forward");return b.EditorState.push(e,o,"remove-range")}function f(e,t){var n=b.Modifier.setBlockData(e.getCurrentContent(),e.getSelection(),t);return b.EditorState.push(e,n,"change-block-data")}function g(e){var o=new i.Map({}),t=u(e);if(t&&0<t.size)for(var n=function(e){var n=t.get(e).getData();if(!n||0===n.size)return o=o.clear(),"break";if(0===e)o=n;else if(o.forEach(function(e,t){n.get(t)&&n.get(t)===e||(o=o.delete(t))}),0===o.size)return o=o.clear(),"break"},r=0;r<t.size&&"break"!==n(r);r+=1);return o}var y=Object(i.Map)({code:{element:"pre"}}),h=b.DefaultDraftBlockRenderMap.merge(y);function M(e){if(e){var t=e.getType();return"unordered-list-item"===t||"ordered-list-item"===t}return!1}function N(e,t,n){var o,r=e.getSelection();o=r.getIsBackward()?r.getFocusKey():r.getAnchorKey();var i=e.getCurrentContent(),a=i.getBlockForKey(o),c=a.getType();if("unordered-list-item"!==c&&"ordered-list-item"!==c)return e;var l=i.getBlockBefore(o);if(!l)return e;if(l.getType()!==c)return e;var s=a.getDepth();if(1===t&&s===n)return e;var u,p,d,m,f,g,y,h=Math.min(l.getDepth()+1,n),M=(p=t,d=h,m=(u=e).getSelection(),f=u.getCurrentContent(),g=f.getBlockMap(),y=j(u).map(function(e){var t=e.getDepth()+p;return t=Math.max(0,Math.min(t,d)),e.set("depth",t)}),g=g.merge(y),f.merge({blockMap:g,selectionBefore:m,selectionAfter:m}));return b.EditorState.push(e,M,"adjust-depth")}function S(e,t){var n;return 13===(n=t).which&&(n.getModifierState("Shift")||n.getModifierState("Alt")||n.getModifierState("Control"))?e.getSelection().isCollapsed()?b.RichUtils.insertSoftNewline(e):p(e):function(e){var t=e.getSelection();if(t.isCollapsed()){var n=e.getCurrentContent(),o=t.getStartKey(),r=n.getBlockForKey(o);if(!M(r)&&"unstyled"!==r.getType()&&r.getLength()===t.getStartOffset())return d(e);if(M(r)&&0===r.getLength()){var i=r.getDepth();if(0===i)return c(e);if(0<i)return N(e,-1,i)}}}(e)}function E(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,o)}return n}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e){var t=e.getSelection();if(t.isCollapsed()){var n={},o=e.getCurrentInlineStyle().toList().toJS();if(o)return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){n[e]=0<=o.indexOf(e)}),n}var a=t.getStartOffset(),c=t.getEndOffset(),l=u(e);if(0<l.size){var r=function(){for(var n={BOLD:!0,ITALIC:!0,UNDERLINE:!0,STRIKETHROUGH:!0,CODE:!0,SUPERSCRIPT:!0,SUBSCRIPT:!0},o=0;o<l.size;o+=1){var e=0===o?a:0,t=o===l.size-1?c:l.get(o).getText().length;e===t&&0===e?(e=1,t=2):e===t&&--e;for(var r=function(e){var t=l.get(o).getInlineStyleAt(e);["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){n[e]=n[e]&&t.get(e)===e})},i=e;i<t;i+=1)r(i)}return{v:n}}();if("object"===L(r))return r.v}return{}}function D(e){var t,n=e.getSelection(),o=n.getStartOffset(),r=n.getEndOffset();o===r&&0===o?r=1:o===r&&--o;for(var i=l(e),a=o;a<r;a+=1){var c=i.getEntityAt(a);if(!c){t=void 0;break}if(a===o)t=c;else if(t!==c){t=void 0;break}}return t}function v(e,t){var n,o=l(e);return o.findEntityRanges(function(e){return e.get("entity")===t},function(e,t){n={start:e,end:t,text:o.get("text").slice(e,t)}}),n}function w(e,t,n){I[e]["".concat(e.toLowerCase(),"-").concat(n)]=C({},"".concat(t),n)}function x(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?E(Object(n),!0).forEach(function(e){C(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},I.color,{},I.bgcolor,{},I.fontSize,{},I.fontFamily,{CODE:I.CODE,SUPERSCRIPT:I.SUPERSCRIPT,SUBSCRIPT:I.SUBSCRIPT})}var I={color:{},bgcolor:{},fontSize:{},fontFamily:{},CODE:{fontFamily:"monospace",wordWrap:"break-word",background:"#f1f1f1",borderRadius:3,padding:"1px 3px"},SUPERSCRIPT:{fontSize:11,position:"relative",top:-8,display:"inline-flex"},SUBSCRIPT:{fontSize:11,position:"relative",bottom:-8,display:"inline-flex"}};function O(e,t,n){var o=e.getSelection(),r=Object.keys(I[t]).reduce(function(e,t){return b.Modifier.removeInlineStyle(e,o,t)},e.getCurrentContent()),i=b.EditorState.push(e,r,"changeinline-style"),a=e.getCurrentInlineStyle();if(o.isCollapsed()&&(i=a.reduce(function(e,t){return b.RichUtils.toggleInlineStyle(e,t)},i)),"SUPERSCRIPT"===t||"SUBSCRIPT"==t)a.has(n)||(i=b.RichUtils.toggleInlineStyle(i,n));else{var c="bgcolor"===t?"backgroundColor":t;a.has("".concat(c,"-").concat(n))||(i=b.RichUtils.toggleInlineStyle(i,"".concat(t.toLowerCase(),"-").concat(n)),w(t,c,n))}return i}function A(e){e&&e.getCurrentContent().getBlockMap().map(function(e){return e.get("characterList")}).toList().flatten().forEach(function(e){e&&0===e.indexOf("color-")?w("color","color",e.substr(6)):e&&0===e.indexOf("bgcolor-")?w("bgcolor","backgroundColor",e.substr(8)):e&&0===e.indexOf("fontsize-")?w("fontSize","fontSize",+e.substr(9)):e&&0===e.indexOf("fontfamily-")&&w("fontFamily","fontFamily",e.substr(11))})}function T(e,t,n){var o=e.getInlineStyleAt(n).toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(o&&0<o.size)return o.get(0)}function z(o,s){if(o&&s&&0<s.length){var e=function(){var e=o.getSelection(),i={};if(e.isCollapsed())return s.forEach(function(e){i[e]=function(e,t){var n=e.getCurrentInlineStyle().toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(n&&0<n.size)return n.get(0)}(o,e)}),{v:i};var a=e.getStartOffset(),c=e.getEndOffset(),l=u(o);if(0<l.size){for(var t=function(n){var e=0===n?a:0,t=n===l.size-1?c:l.get(n).getText().length;e===t&&0===e?(e=1,t=2):e===t&&--e;for(var o=function(t){t===e?s.forEach(function(e){i[e]=T(l.get(n),e,t)}):s.forEach(function(e){i[e]&&i[e]!==T(l.get(n),e,t)&&(i[e]=void 0)})},r=e;r<t;r+=1)o(r)},n=0;n<l.size;n+=1)t(n);return{v:i}}}();if("object"===L(e))return e.v}return{}}function _(t){var e=t.getCurrentInlineStyle(),n=t.getCurrentContent();return e.forEach(function(e){n=b.Modifier.removeInlineStyle(n,t.getSelection(),e)}),b.EditorState.push(t,n,"change-inline-style")}n.d(t,"isListBlock",function(){return M}),n.d(t,"changeDepth",function(){return N}),n.d(t,"handleNewLine",function(){return S}),n.d(t,"getEntityRange",function(){return v}),n.d(t,"getCustomStyleMap",function(){return x}),n.d(t,"toggleCustomInlineStyle",function(){return O}),n.d(t,"getSelectionEntity",function(){return D}),n.d(t,"extractInlineStyle",function(){return A}),n.d(t,"removeAllInlineStyles",function(){return _}),n.d(t,"getSelectionInlineStyle",function(){return k}),n.d(t,"getSelectionCustomInlineStyle",function(){return z}),n.d(t,"getSelectedBlocksMap",function(){return j}),n.d(t,"getSelectedBlocksList",function(){return u}),n.d(t,"getSelectedBlock",function(){return l}),n.d(t,"getBlockBeforeSelectedBlock",function(){return o}),n.d(t,"getAllBlocks",function(){return r}),n.d(t,"getSelectedBlocksType",function(){return a}),n.d(t,"removeSelectedBlocksStyle",function(){return c}),n.d(t,"getSelectionText",function(){return s}),n.d(t,"addLineBreakRemovingSelection",function(){return p}),n.d(t,"insertNewUnstyledBlock",function(){return d}),n.d(t,"clearEditorContent",function(){return m}),n.d(t,"setBlockData",function(){return f}),n.d(t,"getSelectedBlocksMetadata",function(){return g}),n.d(t,"blockRenderMap",function(){return h})}],r.c=c,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2))},function(e,t){e.exports=r},function(e,t,n){function r(e){if(c[e])return c[e].exports;var t=c[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var o,i,a,c;window,e.exports=(o=n(5),i=n(3),c={},r.m=a=[function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t,n){e.exports=n(3)},function(e,t,n){"use strict";n.r(t);var j=n(1),s=n(0),N=function(e,t,n){var o,r=e.textContent;return""===r.trim()?{chunk:(o=n,{text:" ",inlines:[new s.OrderedSet],entities:[o],blocks:[]})}:{chunk:{text:r,inlines:Array(r.length).fill(t),entities:Array(r.length).fill(n),blocks:[]}}},S=function(){return{text:"\n",inlines:[new s.OrderedSet],entities:new Array(1),blocks:[]}},E=function(){return{text:"",inlines:[],entities:[],blocks:[]}},C=function(e,t){return{text:"",inlines:[],entities:[],blocks:[{type:e,depth:0,data:t||new s.Map({})}]}},L=function(e,t,n){return{text:"\r",inlines:[],entities:[],blocks:[{type:e,depth:Math.max(0,Math.min(4,t)),data:n||new s.Map({})}]}},k=function(e){return{text:"\r ",inlines:[new s.OrderedSet],entities:[e],blocks:[{type:"atomic",depth:0,data:new s.Map({})}]}},D=function(e,t){return{text:e.text+t.text,inlines:e.inlines.concat(t.inlines),entities:e.entities.concat(t.entities),blocks:e.blocks.concat(t.blocks)}},v=new s.Map({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},"unordered-list-item":{element:"li",wrapper:"ul"},"ordered-list-item":{element:"li",wrapper:"ol"},blockquote:{element:"blockquote"},code:{element:"pre"},atomic:{element:"figure"},unstyled:{element:"p",aliasedElements:["div"]}}),w={code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",strong:"BOLD",ins:"UNDERLINE",sub:"SUBSCRIPT",sup:"SUPERSCRIPT"};function x(e){return e.style.textAlign?new s.Map({"text-align":e.style.textAlign}):e.style.marginLeft?new s.Map({"margin-left":e.style.marginLeft}):void 0}var I=function(e){var t=void 0;if(e instanceof HTMLAnchorElement){var n={};t=e.dataset&&void 0!==e.dataset.mention?(n.url=e.href,n.text=e.innerHTML,n.value=e.dataset.value,j.Entity.__create("MENTION","IMMUTABLE",n)):(n.url=e.getAttribute&&e.getAttribute("href")||e.href,n.title=e.innerHTML,n.targetOption=e.target,j.Entity.__create("LINK","MUTABLE",n))}return t};n.d(t,"default",function(){return o});var u=" ",p=new RegExp(" ","g"),O=!0;function o(e,t){var n,o,r,i=(n=t,o=e.trim().replace(p,u),(r=function(e){var t,n=null;return document.implementation&&document.implementation.createHTMLDocument&&((t=document.implementation.createHTMLDocument("foo")).documentElement.innerHTML=e,n=t.getElementsByTagName("body")[0]),n}(o))?(O=!0,{chunk:function e(t,n,o,r,i,a){var c=t.nodeName.toLowerCase();if(a){var l=a(c,t);if(l){var s=j.Entity.__create(l.type,l.mutability,l.data||{});return{chunk:k(s)}}}if("#text"===c&&"\n"!==t.textContent)return N(t,n,i);if("br"===c)return{chunk:S()};if("img"===c&&t instanceof HTMLImageElement){var u={};u.src=t.getAttribute&&t.getAttribute("src")||t.src,u.alt=t.alt,u.height=t.style.height,u.width=t.style.width,t.style.float&&(u.alignment=t.style.float);var p=j.Entity.__create("IMAGE","MUTABLE",u);return{chunk:k(p)}}if("video"===c&&t instanceof HTMLVideoElement){var d={};d.src=t.getAttribute&&t.getAttribute("src")||t.src,d.alt=t.alt,d.height=t.style.height,d.width=t.style.width,t.style.float&&(d.alignment=t.style.float);var m=j.Entity.__create("VIDEO","MUTABLE",d);return{chunk:k(m)}}if("iframe"===c&&t instanceof HTMLIFrameElement){var f={};f.src=t.getAttribute&&t.getAttribute("src")||t.src,f.height=t.height,f.width=t.width;var g=j.Entity.__create("EMBEDDED_LINK","MUTABLE",f);return{chunk:k(g)}}var y,h=function(t,n){var e=v.filter(function(e){return e.element===t&&(!e.wrapper||e.wrapper===n)||e.wrapper===t||e.aliasedElements&&-1<e.aliasedElements.indexOf(t)}).keySeq().toSet().toArray();if(1===e.length)return e[0]}(c,r);h&&("ul"===c||"ol"===c?(r=c,o+=1):("unordered-list-item"!==h&&"ordered-list-item"!==h&&(r="",o=-1),O?(y=C(h,x(t)),O=!1):y=L(h,o,x(t)))),y=y||E(),n=function(e,t,n){var o,r=w[e];if(r)o=n.add(r).toOrderedSet();else if(t instanceof HTMLElement){var l=t;o=(o=n).withMutations(function(e){var t=l.style.color,n=l.style.backgroundColor,o=l.style.fontSize,r=l.style.fontFamily.replace(/^"|"$/g,""),i=l.style.fontWeight,a=l.style.textDecoration,c=l.style.fontStyle;t&&e.add("color-".concat(t.replace(/ /g,""))),n&&e.add("bgcolor-".concat(n.replace(/ /g,""))),o&&e.add("fontsize-".concat(o.replace(/px$/g,""))),r&&e.add("fontfamily-".concat(r)),"bold"===i&&e.add(w.strong),"underline"===a&&e.add(w.ins),"italic"===c&&e.add(w.em)}).toOrderedSet()}return o}(c,t,n);for(var M=t.firstChild;M;){var b=e(M,n,o,r,I(M)||i,a).chunk;y=D(y,b),M=M.nextSibling}return{chunk:y}}(r,new s.OrderedSet,-1,"",void 0,n).chunk}):null);if(i){var a=i.chunk,c=new s.OrderedMap({});a.entities&&a.entities.forEach(function(e){e&&(c=c.set(e,j.Entity.__get(e)))});var l=0;return{contentBlocks:a.text.split("\r").map(function(e,t){var n=l+e.length,o=a&&a.inlines.slice(l,n),r=a&&a.entities.slice(l,n),i=new s.List(o.map(function(e,t){var n={style:e,entity:null};return r[t]&&(n.entity=r[t]),j.CharacterMetadata.create(n)}));return l=n,new j.ContentBlock({key:Object(j.genKey)(),type:a&&a.blocks[t]&&a.blocks[t].type||"unstyled",depth:a&&a.blocks[t]&&a.blocks[t].depth,data:a&&a.blocks[t]&&a.blocks[t].data||new s.Map({}),text:e,characterList:i})}),entityMap:c}}return null}}],r.c=c,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2))},function(e,t,l){"use strict";function o(n){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(e){n[e]=t[e]})}),n}function s(e){return Object.prototype.toString.call(e)}function u(e){return"[object Function]"===s(e)}function p(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var r={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};var i={"http:":{validate:function(e,t,n){var o=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(o)?o.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var o=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(o)?3<=t&&":"===e[t-3]?0:3<=t&&"/"===e[t-3]?0:o.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var o=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(o)?o.match(n.re.mailto)[0].length:0}}},d="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",a="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function m(){return function(e,t){t.normalize(e)}}function c(r){var t=r.re=l(21)(r.__opts__),e=r.__tlds__.slice();function n(e){return e.replace("%TLDS%",t.src_tlds)}r.onCompile(),r.__tlds_replaced__||e.push(d),e.push(t.src_xn),t.src_tlds=e.join("|"),t.email_fuzzy=RegExp(n(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(n(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(n(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(n(t.tpl_host_fuzzy_test),"i");var i=[];function a(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}r.__compiled__={},Object.keys(r.__schemas__).forEach(function(e){var t=r.__schemas__[e];if(null!==t){var o,n={validate:null,link:null};if(r.__compiled__[e]=n,"[object Object]"===s(t))return"[object RegExp]"===s(t.validate)?n.validate=(o=t.validate,function(e,t){var n=e.slice(t);return o.test(n)?n.match(o)[0].length:0}):u(t.validate)?n.validate=t.validate:a(e,t),void(u(t.normalize)?n.normalize=t.normalize:t.normalize?a(e,t):n.normalize=m());if("[object String]"!==s(t))a(e,t);else i.push(e)}}),i.forEach(function(e){r.__compiled__[r.__schemas__[e]]&&(r.__compiled__[e].validate=r.__compiled__[r.__schemas__[e]].validate,r.__compiled__[e].normalize=r.__compiled__[r.__schemas__[e]].normalize)}),r.__compiled__[""]={validate:null,normalize:m()};var o,c=Object.keys(r.__compiled__).filter(function(e){return 0<e.length&&r.__compiled__[e]}).map(p).join("|");r.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+c+")","i"),r.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+c+")","ig"),r.re.pretest=RegExp("("+r.re.schema_test.source+")|("+r.re.host_fuzzy_test.source+")|@","i"),(o=r).__index__=-1,o.__text_cache__=""}function f(e,t){var n=e.__index__,o=e.__last_index__,r=e.__text_cache__.slice(n,o);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=o+t,this.raw=r,this.text=r,this.url=r}function g(e,t){var n=new f(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function y(e,t){if(!(this instanceof y))return new y(e,t);var n;t||(n=e,Object.keys(n||{}).reduce(function(e,t){return e||r.hasOwnProperty(t)},!1)&&(t=e,e={})),this.__opts__=o({},r,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=o({},i,e),this.__compiled__={},this.__tlds__=a,this.__tlds_replaced__=!1,this.re={},c(this)}y.prototype.add=function(e,t){return this.__schemas__[e]=t,c(this),this},y.prototype.set=function(e){return this.__opts__=o(this.__opts__,e),this},y.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,o,r,i,a,c,l;if(this.re.schema_test.test(e))for((c=this.re.schema_search).lastIndex=0;null!==(t=c.exec(e));)if(r=this.testSchemaAt(e,t[2],c.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+r;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&0<=(l=e.search(this.re.host_fuzzy_test))&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(i=n.index+n[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&0<=e.indexOf("@")&&null!==(o=e.match(this.re.email_fuzzy))&&(i=o.index+o[1].length,a=o.index+o[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=a)),0<=this.__index__},y.prototype.pretest=function(e){return this.re.pretest.test(e)},y.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},y.prototype.match=function(e){var t=0,n=[];0<=this.__index__&&this.__text_cache__===e&&(n.push(g(this,t)),t=this.__last_index__);for(var o=t?e.slice(t):e;this.test(o);)n.push(g(this,t)),o=o.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},y.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse():(this.__tlds__=e.slice(),this.__tlds_replaced__=!0),c(this),this},y.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},y.prototype.onCompile=function(){},e.exports=y},function(e,t,n){e.exports=n(40)},function(e,t,n){"use strict";var c=n(10);function o(){}function r(){}r.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,r,i){if(i!==c){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}var n={array:e.isRequired=e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:o};return n.PropTypes=n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,o){"use strict";e.exports=function(e){var t={};t.src_Any=o(22).source,t.src_Cc=o(23).source,t.src_Z=o(24).source,t.src_P=o(25).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var n="[><|]";return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,4}[a-zA-Z0-9%/]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/},function(e,t){e.exports=/[!-#%-\*,-/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E44\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD807[\uDC41-\uDC45\uDC70\uDC71]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var m=n(1),S=n.n(m),o=n(0),f=n.n(o),E=n(3),C=n(4),r=n(2),L=n.n(r);function i(){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.callBacks=[],this.suggestionCallback=void 0,this.editorFlag=!1,this.suggestionFlag=!1,this.closeAllModals=function(t){n.callBacks.forEach(function(e){e(t)})},this.init=function(e){var t=document.getElementById(e);t&&t.addEventListener("click",function(){n.editorFlag=!0}),document&&(document.addEventListener("click",function(){n.editorFlag?n.editorFlag=!1:(n.closeAllModals(),n.suggestionCallback&&n.suggestionCallback())}),document.addEventListener("keydown",function(e){"Escape"===e.key&&n.closeAllModals()}))},this.onEditorClick=function(){n.closeModals(),!n.suggestionFlag&&n.suggestionCallback?n.suggestionCallback():n.suggestionFlag=!1},this.closeModals=function(e){n.closeAllModals(e)},this.registerCallBack=function(e){n.callBacks.push(e)},this.deregisterCallBack=function(t){n.callBacks=n.callBacks.filter(function(e){return e!==t})},this.setSuggestionCallback=function(e){n.suggestionCallback=e},this.removeSuggestionCallback=function(){n.suggestionCallback=void 0},this.onSuggestionClick=function(){n.suggestionFlag=!0}}function c(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),this.inputFocused=!1,this.editorMouseDown=!1,this.onEditorMouseDown=function(){t.editorFocused=!0},this.onInputMouseDown=function(){t.inputFocused=!0},this.isEditorBlur=function(e){return"INPUT"!==e.target.tagName&&"LABEL"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName||t.editorFocused?!("INPUT"===e.target.tagName&&"LABEL"===e.target.tagName&&"TEXTAREA"===e.target.tagName||t.inputFocused)&&!(t.editorFocused=!1):!(t.inputFocused=!1)},this.isEditorFocused=function(){return!t.inputFocused||(t.inputFocused=!1)},this.isToolbarFocused=function(){return!t.editorFocused||(t.editorFocused=!1)},this.isInputFocused=function(){return t.inputFocused}}var a,l=[],k={onKeyDown:function(t){l.forEach(function(e){e(t)})},registerCallBack:function(e){l.push(e)},deregisterCallBack:function(t){l=l.filter(function(e){return e!==t})}},g=function(){a=!0},y=function(){a=!1},s=function(){return a};function D(e){var t=e.getData()&&e.getData().get("text-align");return t?"rdw-".concat(t,"-aligned-block"):""}function u(e,t){if(e)for(var n in e)!{}.hasOwnProperty.call(e,n)||t(n,e[n])}function p(e,t){var n=!1;if(e)for(var o in e)if({}.hasOwnProperty.call(e,o)&&t===o){n=!0;break}return n}function d(e){e.stopPropagation()}function h(e){return e[e.options[0]].icon}function M(e,o){if(e&&void 0===o)return e;var r={};return u(e,function(e,t){var n;n=t,"[object Object]"===Object.prototype.toString.call(n)?r[e]=M(t,o[e]):r[e]=void 0!==o[e]?o[e]:t}),r}var b=n(6),j=n.n(b),N=n(5);n(11);function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function I(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var T=function(){function i(){var e,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(r=I(this,(e=O(i)).call.apply(e,[this].concat(n)))).onClick=function(){var e=r.props,t=e.disabled,n=e.onClick,o=e.value;t||n(o)},r}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&A(e,t)}(i,m["Component"]),e=i,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,o=t.className,r=t.activeClassName,i=t.active,a=t.disabled,c=t.title;return S.a.createElement("div",{className:L()("rdw-option-wrapper",o,(w(e={},"rdw-option-active ".concat(r),i),w(e,"rdw-option-disabled",a),e)),onClick:this.onClick,"aria-selected":i,title:c},n)}}])&&x(e.prototype,t),n&&x(e,n),i}();T.propTypes={onClick:f.a.func.isRequired,children:f.a.any,value:f.a.string,className:f.a.string,activeClassName:f.a.string,active:f.a.bool,disabled:f.a.bool,title:f.a.string},T.defaultProps={activeClassName:""};n(12);function z(e){return(z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function P(e,t){return!t||"object"!==z(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function U(e){return(U=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Y(e,t){return(Y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var F=function(){function i(){var e,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(o=P(this,(e=U(i)).call.apply(e,[this].concat(n)))).state={highlighted:-1},o.onChange=function(e){var t=o.props.onChange;t&&t(e),o.toggleExpansion()},o.setHighlighted=function(e){o.setState({highlighted:e})},o.toggleExpansion=function(){var e=o.props,t=e.doExpand,n=e.doCollapse;e.expanded?n():t()},o}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Y(e,t)}(i,m["Component"]),e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.expanded;e.expanded&&!t&&this.setState({highlighted:-1})}},{key:"render",value:function(){var n=this,e=this.props,t=e.expanded,o=e.children,r=e.className,i=e.optionWrapperClassName,a=e.ariaLabel,c=e.onExpandEvent,l=e.title,s=this.state.highlighted,u=o.slice(1,o.length);return S.a.createElement("div",{className:L()("rdw-dropdown-wrapper",r),"aria-expanded":t,"aria-label":a||"rdw-dropdown"},S.a.createElement("a",{className:"rdw-dropdown-selectedtext",onClick:c,title:l},o[0],S.a.createElement("div",{className:L()({"rdw-dropdown-carettoclose":t,"rdw-dropdown-carettoopen":!t})})),t?S.a.createElement("ul",{className:L()("rdw-dropdown-optionwrapper",i),onClick:d},S.a.Children.map(u,function(e,t){return e&&S.a.cloneElement(e,{onSelect:n.onChange,highlighted:s===t,setHighlighted:n.setHighlighted,index:t})})):void 0)}}])&&_(e.prototype,t),n&&_(e,n),i}();F.propTypes={children:f.a.any,onChange:f.a.func,className:f.a.string,expanded:f.a.bool,doExpand:f.a.func,doCollapse:f.a.func,onExpandEvent:f.a.func,optionWrapperClassName:f.a.string,ariaLabel:f.a.string,title:f.a.string};n(13);function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function B(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function H(e,t){return!t||"object"!==R(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Z(e){return(Z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function W(e,t){return(W=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var G=function(){function r(){var e,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(i=H(this,(e=Z(r)).call.apply(e,[this].concat(n)))).onClick=function(e){var t=i.props,n=t.onSelect,o=t.onClick,r=t.value;t.disabled||(n&&n(r),o&&(e.stopPropagation(),o(r)))},i.setHighlighted=function(){var e=i.props;(0,e.setHighlighted)(e.index)},i.resetHighlighted=function(){(0,i.props.setHighlighted)(-1)},i}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&W(e,t)}(r,m["Component"]),e=r,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,o=t.active,r=t.disabled,i=t.highlighted,a=t.className,c=t.activeClassName,l=t.disabledClassName,s=t.highlightedClassName,u=t.title;return S.a.createElement("li",{className:L()("rdw-dropdownoption-default",a,(B(e={},"rdw-dropdownoption-active ".concat(c),o),B(e,"rdw-dropdownoption-highlighted ".concat(s),i),B(e,"rdw-dropdownoption-disabled ".concat(l),r),e)),onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick,title:u},n)}}])&&Q(e.prototype,t),n&&Q(e,n),r}();G.propTypes={children:f.a.any,value:f.a.any,onClick:f.a.func,onSelect:f.a.func,setHighlighted:f.a.func,index:f.a.number,disabled:f.a.bool,active:f.a.bool,highlighted:f.a.bool,className:f.a.string,activeClassName:f.a.string,disabledClassName:f.a.string,highlightedClassName:f.a.string,title:f.a.string},G.defaultProps={activeClassName:"",disabledClassName:"",highlightedClassName:""};n(14);function J(e){return(J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function V(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function q(e,t){return!t||"object"!==J(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function X(e,t){return(X=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var $=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),q(this,K(e).apply(this,arguments))}var t,n,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&X(e,t)}(e,m["Component"]),t=e,(n=[{key:"renderInFlatList",value:function(){var e=this.props,n=e.config,o=e.currentState,r=e.onChange,i=e.translations;return S.a.createElement("div",{className:L()("rdw-inline-wrapper",n.className),"aria-label":"rdw-inline-control"},n.options.map(function(e,t){return S.a.createElement(T,{key:t,value:e,onClick:r,className:L()(n[e].className),active:!0===o[e]||"MONOSPACE"===e&&o.CODE,title:n[e].title||i["components.controls.inline.".concat(e)]},S.a.createElement("img",{alt:"",src:n[e].icon}))}))}},{key:"renderInDropDown",value:function(){var e=this.props,n=e.config,t=e.expanded,o=e.doExpand,r=e.onExpandEvent,i=e.doCollapse,a=e.currentState,c=e.onChange,l=e.translations,s=n.className,u=n.dropdownClassName,p=n.title;return S.a.createElement(F,{className:L()("rdw-inline-dropdown",s),optionWrapperClassName:L()(u),onChange:c,expanded:t,doExpand:o,doCollapse:i,onExpandEvent:r,"aria-label":"rdw-inline-control",title:p},S.a.createElement("img",{src:h(n),alt:""}),n.options.map(function(e,t){return S.a.createElement(G,{key:t,value:e,className:L()("rdw-inline-dropdownoption",n[e].className),active:!0===a[e]||"MONOSPACE"===e&&a.CODE,title:n[e].title||l["components.controls.inline.".concat(e)]},S.a.createElement("img",{src:n[e].icon,alt:""}))}))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&V(t.prototype,n),o&&V(t,o),e}();function ee(e){return(ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function te(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ne(e,t){return!t||"object"!==ee(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function oe(e){return(oe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function re(e,t){return(re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}$.propTypes={expanded:f.a.bool,doExpand:f.a.func,doCollapse:f.a.func,onExpandEvent:f.a.func,config:f.a.object,onChange:f.a.func,currentState:f.a.object,translations:f.a.object};var ie=function(){function r(e){var l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(l=ne(this,oe(r).call(this,e))).onExpandEvent=function(){l.signalExpanded=!l.state.expanded},l.expandCollapse=function(){l.setState({expanded:l.signalExpanded}),l.signalExpanded=!1},l.toggleInlineStyle=function(e){var t="monospace"===e?"CODE":e.toUpperCase(),n=l.props,o=n.editorState,r=n.onChange,i=E.RichUtils.toggleInlineStyle(o,t);if("subscript"===e||"superscript"===e){var a="subscript"===e?"SUPERSCRIPT":"SUBSCRIPT",c=E.Modifier.removeInlineStyle(i.getCurrentContent(),i.getSelection(),a);i=E.EditorState.push(i,c,"change-inline-style")}i&&r(i)},l.changeKeys=function(e){if(e){var n={};return u(e,function(e,t){n["CODE"===e?"monospace":e.toLowerCase()]=t}),n}},l.doExpand=function(){l.setState({expanded:!0})},l.doCollapse=function(){l.setState({expanded:!1})};var t=l.props,n=t.editorState,o=t.modalHandler;return l.state={currentStyles:n?l.changeKeys(Object(C.getSelectionInlineStyle)(n)):{}},o.registerCallBack(l.expandCollapse),l}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&re(e,t)}(r,m["Component"]),e=r,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentStyles:this.changeKeys(Object(C.getSelectionInlineStyle)(t))})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,o=this.state,r=o.expanded,i=o.currentStyles,a=t.component||$;return S.a.createElement(a,{config:t,translations:n,currentState:i,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle})}}])&&te(e.prototype,t),n&&te(e,n),r}();ie.propTypes={onChange:f.a.func.isRequired,editorState:f.a.object.isRequired,modalHandler:f.a.object,config:f.a.object,translations:f.a.object};n(15);function ae(e){return(ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ce(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function le(e,t){return!t||"object"!==ae(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function se(e){return(se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ue(e,t){return(ue=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var pe=function(){function n(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(t=le(this,se(n).call(this,e))).getBlockTypes=function(e){return[{label:"Normal",displayName:e["components.controls.blocktype.normal"]},{label:"H1",displayName:e["components.controls.blocktype.h1"]},{label:"H2",displayName:e["components.controls.blocktype.h2"]},{label:"H3",displayName:e["components.controls.blocktype.h3"]},{label:"H4",displayName:e["components.controls.blocktype.h4"]},{label:"H5",displayName:e["components.controls.blocktype.h5"]},{label:"H6",displayName:e["components.controls.blocktype.h6"]},{label:"Blockquote",displayName:e["components.controls.blocktype.blockquote"]},{label:"Code",displayName:e["components.controls.blocktype.code"]}]},t.state={blockTypes:t.getBlockTypes(e.translations)},t}var e,t,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ue(e,t)}(n,m["Component"]),e=n,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.translations;t!==e.translations&&this.setState({blockTypes:this.getBlockTypes(t)})}},{key:"renderFlat",value:function(e){var t=this.props,n=t.config.className,o=t.onChange,r=t.currentState.blockType;return S.a.createElement("div",{className:L()("rdw-inline-wrapper",n)},e.map(function(e,t){return S.a.createElement(T,{key:t,value:e.label,active:r===e.label,onClick:o},e.displayName)}))}},{key:"renderInDropdown",value:function(e){var t=this.props,n=t.config,o=n.className,r=n.dropdownClassName,i=n.title,a=t.currentState.blockType,c=t.expanded,l=t.doExpand,s=t.onExpandEvent,u=t.doCollapse,p=t.onChange,d=t.translations,m=this.state.blockTypes.filter(function(e){return e.label===a}),f=m&&m[0]&&m[0].displayName;return S.a.createElement("div",{className:"rdw-block-wrapper","aria-label":"rdw-block-control"},S.a.createElement(F,{className:L()("rdw-block-dropdown",o),optionWrapperClassName:L()(r),onChange:p,expanded:c,doExpand:l,doCollapse:u,onExpandEvent:s,title:i||d["components.controls.blocktype.blocktype"]},S.a.createElement("span",null,f||d["components.controls.blocktype.blocktype"]),e.map(function(e,t){return S.a.createElement(G,{active:a===e.label,value:e.label,key:t},e.displayName)})))}},{key:"render",value:function(){var n=this.props.config,e=n.inDropdown,t=this.state.blockTypes.filter(function(e){var t=e.label;return-1<n.options.indexOf(t)});return e?this.renderInDropdown(t):this.renderFlat(t)}}])&&ce(e.prototype,t),o&&ce(e,o),n}();pe.propTypes={expanded:f.a.bool,onExpandEvent:f.a.func,doExpand:f.a.func,doCollapse:f.a.func,onChange:f.a.func,config:f.a.object,currentState:f.a.object,translations:f.a.object};var de=pe;function me(e){return(me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ge(e,t){return!t||"object"!==me(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function ye(e){return(ye=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function he(e,t){return(he=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Me=function(){function o(e){var a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(a=ge(this,ye(o).call(this,e))).onExpandEvent=function(){a.signalExpanded=!a.state.expanded},a.expandCollapse=function(){a.setState({expanded:a.signalExpanded}),a.signalExpanded=!1},a.blocksTypes=[{label:"Normal",style:"unstyled"},{label:"H1",style:"header-one"},{label:"H2",style:"header-two"},{label:"H3",style:"header-three"},{label:"H4",style:"header-four"},{label:"H5",style:"header-five"},{label:"H6",style:"header-six"},{label:"Blockquote",style:"blockquote"},{label:"Code",style:"code"}],a.doExpand=function(){a.setState({expanded:!0})},a.doCollapse=function(){a.setState({expanded:!1})},a.toggleBlockType=function(t){var e=a.blocksTypes.find(function(e){return e.label===t}).style,n=a.props,o=n.editorState,r=n.onChange,i=E.RichUtils.toggleBlockType(o,e);i&&r(i)};var t=e.editorState,n=e.modalHandler;return a.state={expanded:!1,currentBlockType:t?Object(C.getSelectedBlocksType)(t):"unstyled"},n.registerCallBack(a.expandCollapse),a}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&he(e,t)}(o,m["Component"]),e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlockType:Object(C.getSelectedBlocksType)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,o=this.state,r=o.expanded,i=o.currentBlockType,a=t.component||de,c=this.blocksTypes.find(function(e){return e.style===i});return S.a.createElement(a,{config:t,translations:n,currentState:{blockType:c&&c.label},onChange:this.toggleBlockType,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&fe(e.prototype,t),n&&fe(e,n),o}();Me.propTypes={onChange:f.a.func.isRequired,editorState:f.a.object,modalHandler:f.a.object,config:f.a.object,translations:f.a.object};var be=Me;n(16);function je(e){return(je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ne(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Se(e,t){return!t||"object"!==je(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Ee(e){return(Ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ce(e,t){return(Ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Le=function(){function i(){var e,t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=Se(this,(e=Ee(i)).call.apply(e,[this].concat(o)))).state={defaultFontSize:void 0},t}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ce(e,t)}(i,m["Component"]),e=i,(t=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");if(e&&0<e.length){var t=window.getComputedStyle(e[0]).getPropertyValue("font-size");t=t.substring(0,t.length-2),this.setState({defaultFontSize:t})}}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,o=t.className,r=t.dropdownClassName,i=t.options,a=t.title,c=e.onChange,l=e.expanded,s=e.doCollapse,u=e.onExpandEvent,p=e.doExpand,d=e.translations,m=this.props.currentState.fontSize,f=this.state.defaultFontSize;return f=Number(f),m=m||i&&0<=i.indexOf(f)&&f,S.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},S.a.createElement(F,{className:L()("rdw-fontsize-dropdown",o),optionWrapperClassName:L()(r),onChange:c,expanded:l,doExpand:p,doCollapse:s,onExpandEvent:u,title:a||d["components.controls.fontsize.fontsize"]},m?S.a.createElement("span",null,m):S.a.createElement("img",{src:n,alt:""}),i.map(function(e,t){return S.a.createElement(G,{className:"rdw-fontsize-option",active:m===e,value:e,key:t},e)})))}}])&&Ne(e.prototype,t),n&&Ne(e,n),i}();function ke(e){return(ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function De(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ve(e,t){return!t||"object"!==ke(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function we(e){return(we=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xe(e,t){return(xe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Le.propTypes={expanded:f.a.bool,onExpandEvent:f.a.func,doExpand:f.a.func,doCollapse:f.a.func,onChange:f.a.func,config:f.a.object,currentState:f.a.object,translations:f.a.object};var Ie=function(){function o(e){var i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(i=ve(this,we(o).call(this,e))).onExpandEvent=function(){i.signalExpanded=!i.state.expanded},i.expandCollapse=function(){i.setState({expanded:i.signalExpanded}),i.signalExpanded=!1},i.doExpand=function(){i.setState({expanded:!0})},i.doCollapse=function(){i.setState({expanded:!1})},i.toggleFontSize=function(e){var t=i.props,n=t.editorState,o=t.onChange,r=Object(C.toggleCustomInlineStyle)(n,"fontSize",e);r&&o(r)};var t=e.editorState,n=e.modalHandler;return i.state={expanded:void 0,currentFontSize:t?Object(C.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE:void 0},n.registerCallBack(i.expandCollapse),i}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xe(e,t)}(o,m["Component"]),e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontSize:Object(C.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,o=this.state,r=o.expanded,i=o.currentFontSize,a=t.component||Le,c=i&&Number(i.substring(9));return S.a.createElement(a,{config:t,translations:n,currentState:{fontSize:c},onChange:this.toggleFontSize,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&De(e.prototype,t),n&&De(e,n),o}();Ie.propTypes={onChange:f.a.func.isRequired,editorState:f.a.object,modalHandler:f.a.object,config:f.a.object,translations:f.a.object};n(17);function Oe(e){return(Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ae(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Te(e,t){return!t||"object"!==Oe(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function ze(e){return(ze=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _e(e,t){return(_e=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Pe=function(){function i(){var e,t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=Te(this,(e=ze(i)).call.apply(e,[this].concat(o)))).state={defaultFontFamily:void 0},t}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_e(e,t)}(i,m["Component"]),e=i,(t=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");if(e&&0<e.length){var t=window.getComputedStyle(e[0]).getPropertyValue("font-family");this.setState({defaultFontFamily:t})}}},{key:"render",value:function(){var t=this.state.defaultFontFamily,e=this.props,n=e.config,o=n.className,r=n.dropdownClassName,i=n.options,a=n.title,c=e.translations,l=e.onChange,s=e.expanded,u=e.doCollapse,p=e.onExpandEvent,d=e.doExpand,m=this.props.currentState.fontFamily;return m=m||i&&t&&i.some(function(e){return e.toLowerCase()===t.toLowerCase()})&&t,S.a.createElement("div",{className:"rdw-fontfamily-wrapper","aria-label":"rdw-font-family-control"},S.a.createElement(F,{className:L()("rdw-fontfamily-dropdown",o),optionWrapperClassName:L()("rdw-fontfamily-optionwrapper",r),onChange:l,expanded:s,doExpand:d,doCollapse:u,onExpandEvent:p,title:a||c["components.controls.fontfamily.fontfamily"]},S.a.createElement("span",{className:"rdw-fontfamily-placeholder"},m||c["components.controls.fontfamily.fontfamily"]),i.map(function(e,t){return S.a.createElement(G,{active:m===e,value:e,key:t},e)})))}}])&&Ae(e.prototype,t),n&&Ae(e,n),i}();Pe.propTypes={expanded:f.a.bool,onExpandEvent:f.a.func,doExpand:f.a.func,doCollapse:f.a.func,onChange:f.a.func,config:f.a.object,currentState:f.a.object,translations:f.a.object};var Ue=Pe;function Ye(e){return(Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Fe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Re(e,t){return!t||"object"!==Ye(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Be(e){return(Be=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Qe(e,t){return(Qe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var He=function(){function o(e){var i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(i=Re(this,Be(o).call(this,e))).onExpandEvent=function(){i.signalExpanded=!i.state.expanded},i.expandCollapse=function(){i.setState({expanded:i.signalExpanded}),i.signalExpanded=!1},i.doExpand=function(){i.setState({expanded:!0})},i.doCollapse=function(){i.setState({expanded:!1})},i.toggleFontFamily=function(e){var t=i.props,n=t.editorState,o=t.onChange,r=Object(C.toggleCustomInlineStyle)(n,"fontFamily",e);r&&o(r)};var t=e.editorState,n=e.modalHandler;return i.state={expanded:void 0,currentFontFamily:t?Object(C.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY:void 0},n.registerCallBack(i.expandCollapse),i}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qe(e,t)}(o,m["Component"]),e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontFamily:Object(C.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,o=this.state,r=o.expanded,i=o.currentFontFamily,a=t.component||Ue,c=i&&i.substring(11);return S.a.createElement(a,{translations:n,config:t,currentState:{fontFamily:c},onChange:this.toggleFontFamily,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Fe(e.prototype,t),n&&Fe(e,n),o}();He.propTypes={onChange:f.a.func.isRequired,editorState:f.a.object,modalHandler:f.a.object,config:f.a.object,translations:f.a.object};n(18);function Ze(e){return(Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function We(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ge(e,t){return!t||"object"!==Ze(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Je(e){return(Je=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ve(e,t){return(Ve=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var qe=function(){function i(){var e,t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=Ge(this,(e=Je(i)).call.apply(e,[this].concat(o)))).options=["unordered","ordered","indent","outdent"],t.toggleBlockType=function(e){(0,t.props.onChange)(e)},t.indent=function(){(0,t.props.onChange)("indent")},t.outdent=function(){(0,t.props.onChange)("outdent")},t}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ve(e,t)}(i,m["Component"]),e=i,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState.listType,o=e.translations,r=e.indentDisabled,i=e.outdentDisabled,a=t.options,c=t.unordered,l=t.ordered,s=t.indent,u=t.outdent,p=t.className;return S.a.createElement("div",{className:L()("rdw-list-wrapper",p),"aria-label":"rdw-list-control"},0<=a.indexOf("unordered")&&S.a.createElement(T,{value:"unordered",onClick:this.toggleBlockType,className:L()(c.className),active:"unordered"===n,title:c.title||o["components.controls.list.unordered"]},S.a.createElement("img",{src:c.icon,alt:""})),0<=a.indexOf("ordered")&&S.a.createElement(T,{value:"ordered",onClick:this.toggleBlockType,className:L()(l.className),active:"ordered"===n,title:l.title||o["components.controls.list.ordered"]},S.a.createElement("img",{src:l.icon,alt:""})),0<=a.indexOf("indent")&&S.a.createElement(T,{onClick:this.indent,disabled:r,className:L()(s.className),title:s.title||o["components.controls.list.indent"]},S.a.createElement("img",{src:s.icon,alt:""})),0<=a.indexOf("outdent")&&S.a.createElement(T,{onClick:this.outdent,disabled:i,className:L()(u.className),title:u.title||o["components.controls.list.outdent"]},S.a.createElement("img",{src:u.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var n=this,e=this.props,o=e.config,t=e.expanded,r=e.doCollapse,i=e.doExpand,a=e.onExpandEvent,c=e.onChange,l=e.currentState.listType,s=e.translations,u=o.options,p=o.className,d=o.dropdownClassName,m=o.title;return S.a.createElement(F,{className:L()("rdw-list-dropdown",p),optionWrapperClassName:L()(d),onChange:c,expanded:t,doExpand:i,doCollapse:r,onExpandEvent:a,"aria-label":"rdw-list-control",title:m||s["components.controls.list.list"]},S.a.createElement("img",{src:h(o),alt:""}),this.options.filter(function(e){return 0<=u.indexOf(e)}).map(function(e,t){return S.a.createElement(G,{key:t,value:e,disabled:n.props["".concat(e,"Disabled")],className:L()("rdw-list-dropdownOption",o[e].className),active:l===e,title:o[e].title||s["components.controls.list.".concat(e)]},S.a.createElement("img",{src:o[e].icon,alt:""}))}))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&We(e.prototype,t),n&&We(e,n),i}();function Ke(e){return(Ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function $e(e,t){return!t||"object"!==Ke(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function et(e){return(et=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tt(e,t){return(tt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}qe.propTypes={expanded:f.a.bool,doExpand:f.a.func,doCollapse:f.a.func,onExpandEvent:f.a.func,config:f.a.object,onChange:f.a.func,currentState:f.a.object,translations:f.a.object,indentDisabled:f.a.bool,outdentDisabled:f.a.bool};var nt=function(){function r(e){var i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(i=$e(this,et(r).call(this,e))).onExpandEvent=function(){i.signalExpanded=!i.state.expanded},i.onChange=function(e){"unordered"===e?i.toggleBlockType("unordered-list-item"):"ordered"===e?i.toggleBlockType("ordered-list-item"):"indent"===e?i.adjustDepth(1):i.adjustDepth(-1)},i.expandCollapse=function(){i.setState({expanded:i.signalExpanded}),i.signalExpanded=!1},i.doExpand=function(){i.setState({expanded:!0})},i.doCollapse=function(){i.setState({expanded:!1})},i.toggleBlockType=function(e){var t=i.props,n=t.onChange,o=t.editorState,r=E.RichUtils.toggleBlockType(o,e);r&&n(r)},i.adjustDepth=function(e){var t=i.props,n=t.onChange,o=t.editorState,r=Object(C.changeDepth)(o,e,4);r&&n(r)},i.isIndentDisabled=function(){var e=i.props.editorState,t=i.state.currentBlock,n=Object(C.getBlockBeforeSelectedBlock)(e);return!n||!Object(C.isListBlock)(t)||n.get("type")!==t.get("type")||n.get("depth")<t.get("depth")},i.isOutdentDisabled=function(){var e=i.state.currentBlock;return!e||!Object(C.isListBlock)(e)||e.get("depth")<=0};var t=i.props,n=t.editorState,o=t.modalHandler;return i.state={expanded:!1,currentBlock:n?Object(C.getSelectedBlock)(n):void 0},o.registerCallBack(i.expandCollapse),i}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tt(e,t)}(r,m["Component"]),e=r,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlock:Object(C.getSelectedBlock)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e,t=this.props,n=t.config,o=t.translations,r=this.state,i=r.expanded,a=r.currentBlock,c=n.component||qe;"unordered-list-item"===a.get("type")?e="unordered":"ordered-list-item"===a.get("type")&&(e="ordered");var l=this.isIndentDisabled(),s=this.isOutdentDisabled();return S.a.createElement(c,{config:n,translations:o,currentState:{listType:e},expanded:i,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange,indentDisabled:l,outdentDisabled:s})}}])&&Xe(e.prototype,t),n&&Xe(e,n),r}();nt.propTypes={onChange:f.a.func.isRequired,editorState:f.a.object.isRequired,modalHandler:f.a.object,config:f.a.object,translations:f.a.object};n(19);function ot(e){return(ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function it(e,t){return!t||"object"!==ot(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function at(e){return(at=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ct(e,t){return(ct=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var lt=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),it(this,at(e).apply(this,arguments))}var t,n,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ct(e,t)}(e,m["Component"]),t=e,(n=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,o=t.left,r=t.center,i=t.right,a=t.justify,c=t.className,l=e.onChange,s=e.currentState.textAlignment,u=e.translations;return S.a.createElement("div",{className:L()("rdw-text-align-wrapper",c),"aria-label":"rdw-textalign-control"},0<=n.indexOf("left")&&S.a.createElement(T,{value:"left",className:L()(o.className),active:"left"===s,onClick:l,title:o.title||u["components.controls.textalign.left"]},S.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("center")&&S.a.createElement(T,{value:"center",className:L()(r.className),active:"center"===s,onClick:l,title:r.title||u["components.controls.textalign.center"]},S.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("right")&&S.a.createElement(T,{value:"right",className:L()(i.className),active:"right"===s,onClick:l,title:i.title||u["components.controls.textalign.right"]},S.a.createElement("img",{src:i.icon,alt:""})),0<=n.indexOf("justify")&&S.a.createElement(T,{value:"justify",className:L()(a.className),active:"justify"===s,onClick:l,title:a.title||u["components.controls.textalign.justify"]},S.a.createElement("img",{src:a.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,o=e.doExpand,r=e.onExpandEvent,i=e.doCollapse,a=e.currentState.textAlignment,c=e.onChange,l=e.translations,s=t.options,u=t.left,p=t.center,d=t.right,m=t.justify,f=t.className,g=t.dropdownClassName,y=t.title;return S.a.createElement(F,{className:L()("rdw-text-align-dropdown",f),optionWrapperClassName:L()(g),onChange:c,expanded:n,doExpand:o,doCollapse:i,onExpandEvent:r,"aria-label":"rdw-textalign-control",title:y||l["components.controls.textalign.textalign"]},S.a.createElement("img",{src:a&&t[a]&&t[a].icon||h(t),alt:""}),0<=s.indexOf("left")&&S.a.createElement(G,{value:"left",active:"left"===a,className:L()("rdw-text-align-dropdownOption",u.className),title:u.title||l["components.controls.textalign.left"]},S.a.createElement("img",{src:u.icon,alt:""})),0<=s.indexOf("center")&&S.a.createElement(G,{value:"center",active:"center"===a,className:L()("rdw-text-align-dropdownOption",p.className),title:p.title||l["components.controls.textalign.center"]},S.a.createElement("img",{src:p.icon,alt:""})),0<=s.indexOf("right")&&S.a.createElement(G,{value:"right",active:"right"===a,className:L()("rdw-text-align-dropdownOption",d.className),title:d.title||l["components.controls.textalign.right"]},S.a.createElement("img",{src:d.icon,alt:""})),0<=s.indexOf("justify")&&S.a.createElement(G,{value:"justify",active:"justify"===a,className:L()("rdw-text-align-dropdownOption",m.className),title:m.title||l["components.controls.textalign.justify"]},S.a.createElement("img",{src:m.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&rt(t.prototype,n),o&&rt(t,o),e}();function st(e){return(st="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ut(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function pt(e,t){return!t||"object"!==st(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function dt(e){return(dt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mt(e,t){return(mt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}lt.propTypes={expanded:f.a.bool,doExpand:f.a.func,doCollapse:f.a.func,onExpandEvent:f.a.func,config:f.a.object,onChange:f.a.func,currentState:f.a.object,translations:f.a.object};var ft=function(){function n(e){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=pt(this,dt(n).call(this,e))).onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})},r.addBlockAlignmentData=function(e){var t=r.props,n=t.editorState,o=t.onChange;o(r.state.currentTextAlignment!==e?Object(C.setBlockData)(n,{"text-align":e}):Object(C.setBlockData)(n,{"text-align":void 0}))};var t=r.props.modalHandler;return r.state={currentTextAlignment:void 0},t.registerCallBack(r.expandCollapse),r}var e,t,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mt(e,t)}(n,m["Component"]),e=n,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t!==e.editorState&&this.setState({currentTextAlignment:Object(C.getSelectedBlocksMetadata)(t).get("text-align")})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,o=this.state,r=o.expanded,i=o.currentTextAlignment,a=t.component||lt;return S.a.createElement(a,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:i},onChange:this.addBlockAlignmentData})}}])&&ut(e.prototype,t),o&&ut(e,o),n}();ft.propTypes={editorState:f.a.object.isRequired,onChange:f.a.func.isRequired,modalHandler:f.a.object,config:f.a.object,translations:f.a.object};n(20);function gt(e){return(gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ht(e,t){return!t||"object"!==gt(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Mt(e){return(Mt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function bt(e,t){return(bt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var jt=function(){function r(){var e,u;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(u=ht(this,(e=Mt(r)).call.apply(e,[this].concat(n)))).state={currentStyle:"color"},u.onChange=function(e){(0,u.props.onChange)(u.state.currentStyle,e)},u.setCurrentStyleColor=function(){u.setState({currentStyle:"color"})},u.setCurrentStyleBgcolor=function(){u.setState({currentStyle:"bgcolor"})},u.renderModal=function(){var e=u.props,t=e.config,n=t.popupClassName,o=t.colors,r=e.currentState,i=r.color,a=r.bgColor,c=e.translations,l=u.state.currentStyle,s="color"===l?i:a;return S.a.createElement("div",{className:L()("rdw-colorpicker-modal",n),onClick:d},S.a.createElement("span",{className:"rdw-colorpicker-modal-header"},S.a.createElement("span",{className:L()("rdw-colorpicker-modal-style-label",{"rdw-colorpicker-modal-style-label-active":"color"===l}),onClick:u.setCurrentStyleColor},c["components.controls.colorpicker.text"]),S.a.createElement("span",{className:L()("rdw-colorpicker-modal-style-label",{"rdw-colorpicker-modal-style-label-active":"bgcolor"===l}),onClick:u.setCurrentStyleBgcolor},c["components.controls.colorpicker.background"])),S.a.createElement("span",{className:"rdw-colorpicker-modal-options"},o.map(function(e,t){return S.a.createElement(T,{value:e,key:t,className:"rdw-colorpicker-option",activeClassName:"rdw-colorpicker-option-active",active:s===e,onClick:u.onChange},S.a.createElement("span",{style:{backgroundColor:e},className:"rdw-colorpicker-cube"}))})))},u}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bt(e,t)}(r,m["Component"]),e=r,(t=[{key:"componentDidUpdate",value:function(e){this.props.expanded&&!e.expanded&&this.setState({currentStyle:"color"})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,o=t.className,r=t.title,i=e.expanded,a=e.onExpandEvent,c=e.translations;return S.a.createElement("div",{className:"rdw-colorpicker-wrapper","aria-haspopup":"true","aria-expanded":i,"aria-label":"rdw-color-picker",title:r||c["components.controls.colorpicker.colorpicker"]},S.a.createElement(T,{onClick:a,className:L()(o)},S.a.createElement("img",{src:n,alt:""})),i?this.renderModal():void 0)}}])&&yt(e.prototype,t),n&&yt(e,n),r}();jt.propTypes={expanded:f.a.bool,onExpandEvent:f.a.func,onChange:f.a.func,config:f.a.object,currentState:f.a.object,translations:f.a.object};var Nt=jt;function St(e){return(St="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Et(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ct(e,t){return!t||"object"!==St(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Lt(e){return(Lt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function kt(e,t){return(kt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Dt=function(){function r(e){var a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(a=Ct(this,Lt(r).call(this,e))).state={expanded:!1,currentColor:void 0,currentBgColor:void 0},a.onExpandEvent=function(){a.signalExpanded=!a.state.expanded},a.expandCollapse=function(){a.setState({expanded:a.signalExpanded}),a.signalExpanded=!1},a.doExpand=function(){a.setState({expanded:!0})},a.doCollapse=function(){a.setState({expanded:!1})},a.toggleColor=function(e,t){var n=a.props,o=n.editorState,r=n.onChange,i=Object(C.toggleCustomInlineStyle)(o,e,t);i&&r(i),a.doCollapse()};var t=e.editorState,n=e.modalHandler,o={expanded:!1,currentColor:void 0,currentBgColor:void 0};return t&&(o.currentColor=Object(C.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR,o.currentBgColor=Object(C.getSelectionCustomInlineStyle)(t,["BGCOLOR"]).BGCOLOR),a.state=o,n.registerCallBack(a.expandCollapse),a}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&kt(e,t)}(r,m["Component"]),e=r,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentColor:Object(C.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR,currentBgColor:Object(C.getSelectionCustomInlineStyle)(t,["BGCOLOR"]).BGCOLOR})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,o=this.state,r=o.currentColor,i=o.currentBgColor,a=o.expanded,c=t.component||Nt,l=r&&r.substring(6),s=i&&i.substring(8);return S.a.createElement(c,{config:t,translations:n,onChange:this.toggleColor,expanded:a,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{color:l,bgColor:s}})}}])&&Et(e.prototype,t),n&&Et(e,n),r}();Dt.propTypes={onChange:f.a.func.isRequired,editorState:f.a.object.isRequired,modalHandler:f.a.object,config:f.a.object,translations:f.a.object};var vt=Dt,wt=n(7),xt=n.n(wt);n(26);function It(e){return(It="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ot(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function At(e,t){return!t||"object"!==It(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Tt(e){return(Tt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function zt(e,t){return(zt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _t=function(){function r(){var e,a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(a=At(this,(e=Tt(r)).call.apply(e,[this].concat(n)))).state={showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:a.props.config.defaultTargetOption},a.removeLink=function(){(0,a.props.onChange)("unlink")},a.addLink=function(){var e=a.props.onChange,t=a.state;e("link",t.linkTitle,t.linkTarget,t.linkTargetOption)},a.updateValue=function(e){var t,n,o;a.setState((t={},n="".concat(e.target.name),o=e.target.value,n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t))},a.updateTargetOption=function(e){a.setState({linkTargetOption:e.target.checked?"_blank":"_self"})},a.hideModal=function(){a.setState({showModal:!1})},a.signalExpandShowModal=function(){var e=a.props,t=e.onExpandEvent,n=e.currentState,o=n.link,r=n.selectionText,i=a.state.linkTargetOption;t(),a.setState({showModal:!0,linkTarget:o&&o.target||"",linkTargetOption:o&&o.targetOption||i,linkTitle:o&&o.title||r})},a.forceExpandAndShowModal=function(){var e=a.props,t=e.doExpand,n=e.currentState,o=n.link,r=n.selectionText,i=a.state.linkTargetOption;t(),a.setState({showModal:!0,linkTarget:o&&o.target,linkTargetOption:o&&o.targetOption||i,linkTitle:o&&o.title||r})},a}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zt(e,t)}(r,m["Component"]),e=r,(t=[{key:"componentDidUpdate",value:function(e){e.expanded&&!this.props.expanded&&this.setState({showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:this.props.config.defaultTargetOption})}},{key:"renderAddLinkModal",value:function(){var e=this.props,t=e.config.popupClassName,n=e.doCollapse,o=e.translations,r=this.state,i=r.linkTitle,a=r.linkTarget,c=r.linkTargetOption;return S.a.createElement("div",{className:L()("rdw-link-modal",t),onClick:d},S.a.createElement("label",{className:"rdw-link-modal-label",htmlFor:"linkTitle"},o["components.controls.link.linkTitle"]),S.a.createElement("input",{id:"linkTitle",className:"rdw-link-modal-input",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTitle",value:i}),S.a.createElement("label",{className:"rdw-link-modal-label",htmlFor:"linkTarget"},o["components.controls.link.linkTarget"]),S.a.createElement("input",{id:"linkTarget",className:"rdw-link-modal-input",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTarget",value:a}),S.a.createElement("label",{className:"rdw-link-modal-target-option",htmlFor:"openLinkInNewWindow"},S.a.createElement("input",{id:"openLinkInNewWindow",type:"checkbox",defaultChecked:"_blank"===c,value:"_blank",onChange:this.updateTargetOption}),S.a.createElement("span",null,o["components.controls.link.linkTargetOption"])),S.a.createElement("span",{className:"rdw-link-modal-buttonsection"},S.a.createElement("button",{className:"rdw-link-modal-btn",onClick:this.addLink,disabled:!a||!i},o["generic.add"]),S.a.createElement("button",{className:"rdw-link-modal-btn",onClick:n},o["generic.cancel"])))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,o=t.link,r=t.unlink,i=t.className,a=e.currentState,c=e.expanded,l=e.translations,s=this.state.showModal;return S.a.createElement("div",{className:L()("rdw-link-wrapper",i),"aria-label":"rdw-link-control"},0<=n.indexOf("link")&&S.a.createElement(T,{value:"unordered-list-item",className:L()(o.className),onClick:this.signalExpandShowModal,"aria-haspopup":"true","aria-expanded":s,title:o.title||l["components.controls.link.link"]},S.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("unlink")&&S.a.createElement(T,{disabled:!a.link,value:"ordered-list-item",className:L()(r.className),onClick:this.removeLink,title:r.title||l["components.controls.link.unlink"]},S.a.createElement("img",{src:r.icon,alt:""})),c&&s?this.renderAddLinkModal():void 0)}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.expanded,n=e.onExpandEvent,o=e.doCollapse,r=e.doExpand,i=e.onChange,a=e.config,c=e.currentState,l=e.translations,s=a.options,u=a.link,p=a.unlink,d=a.className,m=a.dropdownClassName,f=a.title,g=this.state.showModal;return S.a.createElement("div",{className:"rdw-link-wrapper","aria-haspopup":"true","aria-label":"rdw-link-control","aria-expanded":t,title:f},S.a.createElement(F,{className:L()("rdw-link-dropdown",d),optionWrapperClassName:L()(m),onChange:i,expanded:t&&!g,doExpand:r,doCollapse:o,onExpandEvent:n},S.a.createElement("img",{src:h(a),alt:""}),0<=s.indexOf("link")&&S.a.createElement(G,{onClick:this.forceExpandAndShowModal,className:L()("rdw-link-dropdownoption",u.className),title:u.title||l["components.controls.link.link"]},S.a.createElement("img",{src:u.icon,alt:""})),0<=s.indexOf("unlink")&&S.a.createElement(G,{onClick:this.removeLink,disabled:!c.link,className:L()("rdw-link-dropdownoption",p.className),title:p.title||l["components.controls.link.unlink"]},S.a.createElement("img",{src:p.icon,alt:""}))),t&&g?this.renderAddLinkModal():void 0)}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Ot(e.prototype,t),n&&Ot(e,n),r}();_t.propTypes={expanded:f.a.bool,doExpand:f.a.func,doCollapse:f.a.func,onExpandEvent:f.a.func,config:f.a.object,onChange:f.a.func,currentState:f.a.object,translations:f.a.object};var Pt=_t;function Ut(e){return(Ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Yt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ft(e,t){return!t||"object"!==Ut(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Rt(e){return(Rt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Bt(e,t){return(Bt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,o)}return n}function Ht(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zt(e){var t=Wt.match(e.target);return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Qt(Object(n),!0).forEach(function(e){Ht(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},e,{target:t&&t[0]&&t[0].url||e.target})}var Wt=xt()(),Gt=function(){function r(e){var d;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(d=Ft(this,Rt(r).call(this,e))).onExpandEvent=function(){d.signalExpanded=!d.state.expanded},d.onChange=function(e,t,n,o){var r=d.props.config.linkCallback;if("link"===e){var i=(r||Zt)({title:t,target:n,targetOption:o});d.addLink(i.title,i.target,i.targetOption)}else d.removeLink()},d.getCurrentValues=function(){var e=d.props.editorState,t=d.state.currentEntity,n=e.getCurrentContent(),o={};if(t&&"LINK"===n.getEntity(t).get("type")){o.link={};var r=t&&Object(C.getEntityRange)(e,t);o.link.target=t&&n.getEntity(t).get("data").url,o.link.targetOption=t&&n.getEntity(t).get("data").targetOption,o.link.title=r&&r.text}return o.selectionText=Object(C.getSelectionText)(e),o},d.doExpand=function(){d.setState({expanded:!0})},d.expandCollapse=function(){d.setState({expanded:d.signalExpanded}),d.signalExpanded=!1},d.doCollapse=function(){d.setState({expanded:!1})},d.removeLink=function(){var e=d.props,t=e.editorState,n=e.onChange,o=d.state.currentEntity,r=t.getSelection();if(o){var i=Object(C.getEntityRange)(t,o);r=r.getIsBackward()?r.merge({anchorOffset:i.end,focusOffset:i.start}):r.merge({anchorOffset:i.start,focusOffset:i.end}),n(E.RichUtils.toggleLink(t,r,null))}},d.addLink=function(e,t,n){var o=d.props,r=o.editorState,i=o.onChange,a=d.state.currentEntity,c=r.getSelection();if(a){var l=Object(C.getEntityRange)(r,a);c=c.getIsBackward()?c.merge({anchorOffset:l.end,focusOffset:l.start}):c.merge({anchorOffset:l.start,focusOffset:l.end})}var s=r.getCurrentContent().createEntity("LINK","MUTABLE",{url:t,targetOption:n}).getLastCreatedEntityKey(),u=E.Modifier.replaceText(r.getCurrentContent(),c,"".concat(e),r.getCurrentInlineStyle(),s),p=E.EditorState.push(r,u,"insert-characters");c=p.getSelection().merge({anchorOffset:c.get("anchorOffset")+e.length,focusOffset:c.get("anchorOffset")+e.length}),p=E.EditorState.acceptSelection(p,c),u=E.Modifier.insertText(p.getCurrentContent(),c," ",p.getCurrentInlineStyle(),void 0),i(E.EditorState.push(p,u,"insert-characters")),d.doCollapse()};var t=d.props,n=t.editorState,o=t.modalHandler;return d.state={expanded:!1,link:void 0,selectionText:void 0,currentEntity:n?Object(C.getSelectionEntity)(n):void 0},o.registerCallBack(d.expandCollapse),d}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Bt(e,t)}(r,m["Component"]),e=r,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentEntity:Object(C.getSelectionEntity)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,o=this.state.expanded,r=this.getCurrentValues(),i=r.link,a=r.selectionText,c=t.component||Pt;return S.a.createElement(c,{config:t,translations:n,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:i,selectionText:a},onChange:this.onChange})}}])&&Yt(e.prototype,t),n&&Yt(e,n),r}();Gt.propTypes={editorState:f.a.object.isRequired,onChange:f.a.func.isRequired,modalHandler:f.a.object,config:f.a.object,translations:f.a.object};var Jt=Gt;n(27);function Vt(e){return(Vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Kt(e,t){return!t||"object"!==Vt(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Xt(e){return(Xt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $t(e,t){return($t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var en=function(){function i(){var e,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(r=Kt(this,(e=Xt(i)).call.apply(e,[this].concat(n)))).state={embeddedLink:"",height:r.props.config.defaultSize.height,width:r.props.config.defaultSize.width},r.onChange=function(){var e=r.props.onChange,t=r.state;e(t.embeddedLink,t.height,t.width)},r.updateValue=function(e){var t,n,o;r.setState((t={},n="".concat(e.target.name),o=e.target.value,n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t))},r}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$t(e,t)}(i,m["Component"]),e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.expanded,o=t.config;if(!n&&e.expanded){var r=o.defaultSize,i=r.height,a=r.width;this.setState({embeddedLink:"",height:i,width:a})}}},{key:"rendeEmbeddedLinkModal",value:function(){var e=this.state,t=e.embeddedLink,n=e.height,o=e.width,r=this.props,i=r.config.popupClassName,a=r.doCollapse,c=r.translations;return S.a.createElement("div",{className:L()("rdw-embedded-modal",i),onClick:d},S.a.createElement("div",{className:"rdw-embedded-modal-header"},S.a.createElement("span",{className:"rdw-embedded-modal-header-option"},c["components.controls.embedded.embeddedlink"],S.a.createElement("span",{className:"rdw-embedded-modal-header-label"}))),S.a.createElement("div",{className:"rdw-embedded-modal-link-section"},S.a.createElement("span",{className:"rdw-embedded-modal-link-input-wrapper"},S.a.createElement("input",{className:"rdw-embedded-modal-link-input",placeholder:c["components.controls.embedded.enterlink"],onChange:this.updateValue,onBlur:this.updateValue,value:t,name:"embeddedLink"}),S.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),S.a.createElement("div",{className:"rdw-embedded-modal-size"},S.a.createElement("span",null,S.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:n,name:"height",className:"rdw-embedded-modal-size-input",placeholder:"Height"}),S.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),S.a.createElement("span",null,S.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:o,name:"width",className:"rdw-embedded-modal-size-input",placeholder:"Width"}),S.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")))),S.a.createElement("span",{className:"rdw-embedded-modal-btn-section"},S.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:this.onChange,disabled:!t||!n||!o},c["generic.add"]),S.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:a},c["generic.cancel"])))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,o=t.className,r=t.title,i=e.expanded,a=e.onExpandEvent,c=e.translations;return S.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":i,"aria-label":"rdw-embedded-control"},S.a.createElement(T,{className:L()(o),value:"unordered-list-item",onClick:a,title:r||c["components.controls.embedded.embedded"]},S.a.createElement("img",{src:n,alt:""})),i?this.rendeEmbeddedLinkModal():void 0)}}])&&qt(e.prototype,t),n&&qt(e,n),i}();en.propTypes={expanded:f.a.bool,onExpandEvent:f.a.func,onChange:f.a.func,config:f.a.object,translations:f.a.object,doCollapse:f.a.func};var tn=en;function nn(e){return(nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function on(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function rn(e,t){return!t||"object"!==nn(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function an(e){return(an=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function cn(e,t){return(cn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ln=function(){function r(){var e,s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(s=rn(this,(e=an(r)).call.apply(e,[this].concat(n)))).state={expanded:!1},s.onExpandEvent=function(){s.signalExpanded=!s.state.expanded},s.expandCollapse=function(){s.setState({expanded:s.signalExpanded}),s.signalExpanded=!1},s.doExpand=function(){s.setState({expanded:!0})},s.doCollapse=function(){s.setState({expanded:!1})},s.addEmbeddedLink=function(e,t,n){var o=s.props,r=o.editorState,i=o.onChange,a=o.config.embedCallback,c=a?a(e):e,l=r.getCurrentContent().createEntity("EMBEDDED_LINK","MUTABLE",{src:c,height:t,width:n}).getLastCreatedEntityKey();i(E.AtomicBlockUtils.insertAtomicBlock(r,l," ")),s.doCollapse()},s}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cn(e,t)}(r,m["Component"]),e=r,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,o=this.state.expanded,r=t.component||tn;return S.a.createElement(r,{config:t,translations:n,onChange:this.addEmbeddedLink,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&on(e.prototype,t),n&&on(e,n),r}();ln.propTypes={editorState:f.a.object.isRequired,onChange:f.a.func.isRequired,modalHandler:f.a.object,config:f.a.object,translations:f.a.object};var sn=ln;n(28);function un(e){return(un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function dn(e,t){return!t||"object"!==un(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function mn(e){return(mn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function fn(e,t){return(fn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var gn=function(){function i(){var e,t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=dn(this,(e=mn(i)).call.apply(e,[this].concat(o)))).onChange=function(e){(0,t.props.onChange)(e.target.innerHTML)},t}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fn(e,t)}(i,m["Component"]),e=i,(t=[{key:"renderEmojiModal",value:function(){var n=this,e=this.props.config,t=e.popupClassName,o=e.emojis;return S.a.createElement("div",{className:L()("rdw-emoji-modal",t),onClick:d},o.map(function(e,t){return S.a.createElement("span",{key:t,className:"rdw-emoji-icon",alt:"",onClick:n.onChange},e)}))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,o=t.className,r=t.title,i=e.expanded,a=e.onExpandEvent,c=e.translations;return S.a.createElement("div",{className:"rdw-emoji-wrapper","aria-haspopup":"true","aria-label":"rdw-emoji-control","aria-expanded":i,title:r||c["components.controls.emoji.emoji"]},S.a.createElement(T,{className:L()(o),value:"unordered-list-item",onClick:a},S.a.createElement("img",{src:n,alt:""})),i?this.renderEmojiModal():void 0)}}])&&pn(e.prototype,t),n&&pn(e,n),i}();gn.propTypes={expanded:f.a.bool,onExpandEvent:f.a.func,onChange:f.a.func,config:f.a.object,translations:f.a.object};var yn=gn;function hn(e){return(hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function bn(e,t){return!t||"object"!==hn(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function jn(e){return(jn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Nn(e,t){return(Nn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Sn=function(){function r(){var e,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(i=bn(this,(e=jn(r)).call.apply(e,[this].concat(n)))).state={expanded:!1},i.onExpandEvent=function(){i.signalExpanded=!i.state.expanded},i.expandCollapse=function(){i.setState({expanded:i.signalExpanded}),i.signalExpanded=!1},i.doExpand=function(){i.setState({expanded:!0})},i.doCollapse=function(){i.setState({expanded:!1})},i.addEmoji=function(e){var t=i.props,n=t.editorState,o=t.onChange,r=E.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());o(E.EditorState.push(n,r,"insert-characters")),i.doCollapse()},i}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nn(e,t)}(r,m["Component"]),e=r,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,o=this.state.expanded,r=t.component||yn;return S.a.createElement(r,{config:t,translations:n,onChange:this.addEmoji,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&Mn(e.prototype,t),n&&Mn(e,n),r}();Sn.propTypes={editorState:f.a.object.isRequired,onChange:f.a.func.isRequired,modalHandler:f.a.object,config:f.a.object,translations:f.a.object};function En(){return S.a.createElement("div",{className:"rdw-spinner"},S.a.createElement("div",{className:"rdw-bounce1"}),S.a.createElement("div",{className:"rdw-bounce2"}),S.a.createElement("div",{className:"rdw-bounce3"}))}n(29),n(30);function Cn(e){return(Cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ln(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function kn(e,t){return!t||"object"!==Cn(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Dn(e){return(Dn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function vn(e,t){return(vn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var wn=function(){function r(){var e,c;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(c=kn(this,(e=Dn(r)).call.apply(e,[this].concat(n)))).state={imgSrc:"",dragEnter:!1,uploadHighlighted:c.props.config.uploadEnabled&&!!c.props.config.uploadCallback,showImageLoading:!1,height:c.props.config.defaultSize.height,width:c.props.config.defaultSize.width,alt:""},c.onDragEnter=function(e){c.stopPropagation(e),c.setState({dragEnter:!0})},c.onImageDrop=function(e){var t,n;e.preventDefault(),e.stopPropagation(),c.setState({dragEnter:!1}),n=e.dataTransfer.items?(t=e.dataTransfer.items,!0):(t=e.dataTransfer.files,!1);for(var o=0;o<t.length;o+=1)if((!n||"file"===t[o].kind)&&t[o].type.match("^image/")){var r=n?t[o].getAsFile():t[o];c.uploadImage(r)}},c.showImageUploadOption=function(){c.setState({uploadHighlighted:!0})},c.addImageFromState=function(){var e=c.state,t=e.imgSrc,n=e.alt,o=c.state,r=o.height,i=o.width,a=c.props.onChange;isNaN(r)||(r+="px"),isNaN(i)||(i+="px"),a(t,r,i,n)},c.showImageURLOption=function(){c.setState({uploadHighlighted:!1})},c.toggleShowImageLoading=function(){var e=!c.state.showImageLoading;c.setState({showImageLoading:e})},c.updateValue=function(e){var t,n,o;c.setState((t={},n="".concat(e.target.name),o=e.target.value,n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t))},c.selectImage=function(e){e.target.files&&0<e.target.files.length&&c.uploadImage(e.target.files[0])},c.uploadImage=function(e){c.toggleShowImageLoading(),(0,c.props.config.uploadCallback)(e).then(function(e){var t=e.data;c.setState({showImageLoading:!1,dragEnter:!1,imgSrc:t.link||t.url}),c.fileUpload=!1}).catch(function(){c.setState({showImageLoading:!1,dragEnter:!1})})},c.fileUploadClick=function(e){c.fileUpload=!0,e.stopPropagation()},c.stopPropagation=function(e){c.fileUpload?c.fileUpload=!1:(e.preventDefault(),e.stopPropagation())},c}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vn(e,t)}(r,m["Component"]),e=r,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.config;e.expanded&&!this.props.expanded?this.setState({imgSrc:"",dragEnter:!1,uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback,showImageLoading:!1,height:t.defaultSize.height,width:t.defaultSize.width,alt:""}):t.uploadCallback===e.config.uploadCallback&&t.uploadEnabled===e.config.uploadEnabled||this.setState({uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback})}},{key:"renderAddImageModal",value:function(){var e=this.state,t=e.imgSrc,n=e.uploadHighlighted,o=e.showImageLoading,r=e.dragEnter,i=e.height,a=e.width,c=e.alt,l=this.props,s=l.config,u=s.popupClassName,p=s.uploadCallback,d=s.uploadEnabled,m=s.urlEnabled,f=s.previewImage,g=s.inputAccept,y=s.alt,h=l.doCollapse,M=l.translations;return S.a.createElement("div",{className:L()("rdw-image-modal",u),onClick:this.stopPropagation},S.a.createElement("div",{className:"rdw-image-modal-header"},d&&p&&S.a.createElement("span",{onClick:this.showImageUploadOption,className:"rdw-image-modal-header-option"},M["components.controls.image.fileUpload"],S.a.createElement("span",{className:L()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":n})})),m&&S.a.createElement("span",{onClick:this.showImageURLOption,className:"rdw-image-modal-header-option"},M["components.controls.image.byURL"],S.a.createElement("span",{className:L()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":!n})}))),n?S.a.createElement("div",{onClick:this.fileUploadClick},S.a.createElement("div",{onDragEnter:this.onDragEnter,onDragOver:this.stopPropagation,onDrop:this.onImageDrop,className:L()("rdw-image-modal-upload-option",{"rdw-image-modal-upload-option-highlighted":r})},S.a.createElement("label",{htmlFor:"file",className:"rdw-image-modal-upload-option-label"},f&&t?S.a.createElement("img",{src:t,alt:t,className:"rdw-image-modal-upload-option-image-preview"}):t||M["components.controls.image.dropFileText"])),S.a.createElement("input",{type:"file",id:"file",accept:g,onChange:this.selectImage,className:"rdw-image-modal-upload-option-input"})):S.a.createElement("div",{className:"rdw-image-modal-url-section"},S.a.createElement("input",{className:"rdw-image-modal-url-input",placeholder:M["components.controls.image.enterlink"],name:"imgSrc",onChange:this.updateValue,onBlur:this.updateValue,value:t}),S.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),y.present&&S.a.createElement("div",{className:"rdw-image-modal-size"},S.a.createElement("span",{className:"rdw-image-modal-alt-lbl"},"Alt Text"),S.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:c,name:"alt",className:"rdw-image-modal-alt-input",placeholder:"alt"}),S.a.createElement("span",{className:"rdw-image-mandatory-sign"},y.mandatory&&"*")),S.a.createElement("div",{className:"rdw-image-modal-size"},"↕ ",S.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:i,name:"height",className:"rdw-image-modal-size-input",placeholder:"Height"}),S.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")," ↔ ",S.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:a,name:"width",className:"rdw-image-modal-size-input",placeholder:"Width"}),S.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),S.a.createElement("span",{className:"rdw-image-modal-btn-section"},S.a.createElement("button",{className:"rdw-image-modal-btn",onClick:this.addImageFromState,disabled:!t||!i||!a||y.mandatory&&!c},M["generic.add"]),S.a.createElement("button",{className:"rdw-image-modal-btn",onClick:h},M["generic.cancel"])),o?S.a.createElement("div",{className:"rdw-image-modal-spinner"},S.a.createElement(En,null)):void 0)}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,o=t.className,r=t.title,i=e.expanded,a=e.onExpandEvent,c=e.translations;return S.a.createElement("div",{className:"rdw-image-wrapper","aria-haspopup":"true","aria-expanded":i,"aria-label":"rdw-image-control"},S.a.createElement(T,{className:L()(o),value:"unordered-list-item",onClick:a,title:r||c["components.controls.image.image"]},S.a.createElement("img",{src:n,alt:""})),i?this.renderAddImageModal():void 0)}}])&&Ln(e.prototype,t),n&&Ln(e,n),r}();wn.propTypes={expanded:f.a.bool,onExpandEvent:f.a.func,doCollapse:f.a.func,onChange:f.a.func,config:f.a.object,translations:f.a.object};var xn=wn;function In(e){return(In="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function On(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function An(e,t){return!t||"object"!==In(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Tn(e){return(Tn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function zn(e,t){return(zn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _n=function(){function n(e){var s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(s=An(this,Tn(n).call(this,e))).onExpandEvent=function(){s.signalExpanded=!s.state.expanded},s.doExpand=function(){s.setState({expanded:!0})},s.doCollapse=function(){s.setState({expanded:!1})},s.expandCollapse=function(){s.setState({expanded:s.signalExpanded}),s.signalExpanded=!1},s.addImage=function(e,t,n,o){var r=s.props,i=r.editorState,a=r.onChange,c={src:e,height:t,width:n};r.config.alt.present&&(c.alt=o);var l=i.getCurrentContent().createEntity("IMAGE","MUTABLE",c).getLastCreatedEntityKey();a(E.AtomicBlockUtils.insertAtomicBlock(i,l," ")),s.doCollapse()};var t=s.props.modalHandler;return s.state={expanded:!1},t.registerCallBack(s.expandCollapse),s}var e,t,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zn(e,t)}(n,m["Component"]),e=n,(t=[{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,o=this.state.expanded,r=t.component||xn;return S.a.createElement(r,{config:t,translations:n,onChange:this.addImage,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&On(e.prototype,t),o&&On(e,o),n}();_n.propTypes={editorState:f.a.object.isRequired,onChange:f.a.func.isRequired,modalHandler:f.a.object,config:f.a.object,translations:f.a.object};function Pn(e){var t=e.config,n=e.onChange,o=e.translations,r=t.icon,i=t.className,a=t.title;return S.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},S.a.createElement(T,{className:L()(i),onClick:n,title:a||o["components.controls.remove.remove"]},S.a.createElement("img",{src:r,alt:""})))}var Un=_n;n(31);Pn.propTypes={onChange:f.a.func,config:f.a.object,translations:f.a.object};var Yn=Pn;function Fn(e){return(Fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Rn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Bn(e,t){return!t||"object"!==Fn(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Qn(e){return(Qn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Hn(e,t){return(Hn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Zn=function(){function i(){var e,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];return(n=Bn(this,(e=Qn(i)).call.apply(e,[this].concat(o)))).state={expanded:!1},n.onExpandEvent=function(){n.signalExpanded=!n.state.expanded},n.expandCollapse=function(){n.setState({expanded:n.signalExpanded}),n.signalExpanded=!1},n.removeInlineStyles=function(){var e=n.props,t=e.editorState;(0,e.onChange)(n.removeAllInlineStyles(t))},n.removeAllInlineStyles=function(n){var o=n.getCurrentContent();return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","MONOSPACE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){o=E.Modifier.removeInlineStyle(o,n.getSelection(),e)}),u(Object(C.getSelectionCustomInlineStyle)(n,["FONTSIZE","FONTFAMILY","COLOR","BGCOLOR"]),function(e,t){t&&(o=E.Modifier.removeInlineStyle(o,n.getSelection(),t))}),E.EditorState.push(n,o,"change-inline-style")},n.doExpand=function(){n.setState({expanded:!0})},n.doCollapse=function(){n.setState({expanded:!1})},n}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Hn(e,t)}(i,m["Component"]),e=i,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,o=this.state.expanded,r=t.component||Yn;return S.a.createElement(r,{config:t,translations:n,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&Rn(e.prototype,t),n&&Rn(e,n),i}();Zn.propTypes={onChange:f.a.func.isRequired,editorState:f.a.object.isRequired,config:f.a.object,translations:f.a.object,modalHandler:f.a.object};n(32);function Wn(e){return(Wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Jn(e,t){return!t||"object"!==Wn(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Vn(e){return(Vn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qn(e,t){return(qn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Kn=function(){function i(){var e,t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=Jn(this,(e=Vn(i)).call.apply(e,[this].concat(o)))).onChange=function(e){(0,t.props.onChange)(e)},t}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qn(e,t)}(i,m["Component"]),e=i,(t=[{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,o=e.doExpand,r=e.onExpandEvent,i=e.doCollapse,a=e.currentState,c=a.undoDisabled,l=a.redoDisabled,s=e.translations,u=t.options,p=t.undo,d=t.redo,m=t.className,f=t.dropdownClassName,g=t.title;return S.a.createElement(F,{className:L()("rdw-history-dropdown",m),optionWrapperClassName:L()(f),expanded:n,doExpand:o,doCollapse:i,onExpandEvent:r,"aria-label":"rdw-history-control",title:g||s["components.controls.history.history"]},S.a.createElement("img",{src:h(t),alt:""}),0<=u.indexOf("undo")&&S.a.createElement(G,{value:"undo",onClick:this.onChange,disabled:c,className:L()("rdw-history-dropdownoption",p.className),title:p.title||s["components.controls.history.undo"]},S.a.createElement("img",{src:p.icon,alt:""})),0<=u.indexOf("redo")&&S.a.createElement(G,{value:"redo",onClick:this.onChange,disabled:l,className:L()("rdw-history-dropdownoption",d.className),title:d.title||s["components.controls.history.redo"]},S.a.createElement("img",{src:d.icon,alt:""})))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,o=t.undo,r=t.redo,i=t.className,a=e.currentState,c=a.undoDisabled,l=a.redoDisabled,s=e.translations;return S.a.createElement("div",{className:L()("rdw-history-wrapper",i),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&S.a.createElement(T,{value:"undo",onClick:this.onChange,className:L()(o.className),disabled:c,title:o.title||s["components.controls.history.undo"]},S.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("redo")&&S.a.createElement(T,{value:"redo",onClick:this.onChange,className:L()(r.className),disabled:l,title:r.title||s["components.controls.history.redo"]},S.a.createElement("img",{src:r.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Gn(e.prototype,t),n&&Gn(e,n),i}();function Xn(e){return(Xn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function eo(e,t){return!t||"object"!==Xn(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function to(e){return(to=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function no(e,t){return(no=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Kn.propTypes={expanded:f.a.bool,doExpand:f.a.func,doCollapse:f.a.func,onExpandEvent:f.a.func,config:f.a.object,onChange:f.a.func,currentState:f.a.object,translations:f.a.object};var oo=function(){function r(e){var i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(i=eo(this,to(r).call(this,e))).onExpandEvent=function(){i.signalExpanded=!i.state.expanded},i.onChange=function(e){var t=i.props,n=t.editorState,o=t.onChange,r=E.EditorState[e](n);r&&o(r)},i.doExpand=function(){i.setState({expanded:!0})},i.doCollapse=function(){i.setState({expanded:!1})};var t={expanded:!(i.expandCollapse=function(){i.setState({expanded:i.signalExpanded}),i.signalExpanded=!1}),undoDisabled:!1,redoDisabled:!1},n=e.editorState,o=e.modalHandler;return n&&(t.undoDisabled=0===n.getUndoStack().size,t.redoDisabled=0===n.getRedoStack().size),i.state=t,o.registerCallBack(i.expandCollapse),i}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&no(e,t)}(r,m["Component"]),e=r,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&e.editorState!==t&&this.setState({undoDisabled:0===t.getUndoStack().size,redoDisabled:0===t.getRedoStack().size})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,o=this.state,r=o.undoDisabled,i=o.redoDisabled,a=o.expanded,c=t.component||Kn;return S.a.createElement(c,{config:t,translations:n,currentState:{undoDisabled:r,redoDisabled:i},expanded:a,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange})}}])&&$n(e.prototype,t),n&&$n(e,n),r}();oo.propTypes={onChange:f.a.func.isRequired,editorState:f.a.object,modalHandler:f.a.object,config:f.a.object,translations:f.a.object};var ro={inline:ie,blockType:be,fontSize:Ie,fontFamily:He,list:nt,textAlign:ft,colorPicker:vt,link:Jt,embedded:sn,emoji:Sn,image:Un,remove:Zn,history:oo},io=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,ao=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i;function co(e){return String(e).replace(io,"").match(ao)?e:"#"}n(33);function lo(e){return(lo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function so(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function uo(e,t){return!t||"object"!==lo(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function po(e){return(po=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mo(e,t){return(mo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fo(e,t,n){e.findEntityRanges(function(e){var t=e.getEntity();return null!==t&&"LINK"===n.getEntity(t).getType()},t)}function go(e){var t,n,c=e.showOpenOptionOnHover;return n=t=function(){function i(){var e,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(r=uo(this,(e=po(i)).call.apply(e,[this].concat(n)))).state={showPopOver:!1},r.openLink=function(){var e=r.props,t=e.entityKey,n=e.contentState.getEntity(t).getData().url,o=window.open(co(n),"blank");o&&o.focus()},r.toggleShowPopOver=function(){var e=!r.state.showPopOver;r.setState({showPopOver:e})},r}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mo(e,t)}(i,m["Component"]),e=i,(t=[{key:"render",value:function(){var e=this.props,t=e.children,n=e.entityKey,o=e.contentState.getEntity(n).getData(),r=o.url,i=o.targetOption,a=this.state.showPopOver;return S.a.createElement("span",{className:"rdw-link-decorator-wrapper",onMouseEnter:this.toggleShowPopOver,onMouseLeave:this.toggleShowPopOver},S.a.createElement("a",{href:co(r),target:i},t),a&&c?S.a.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuMDcyIDBIOC45MTVhLjkyNS45MjUgMCAwIDAgMCAxLjg0OWgyLjkyNUw2Ljk2MSA2LjcyN2EuOTE4LjkxOCAwIDAgMC0uMjcuNjU0YzAgLjI0Ny4wOTUuNDguMjcuNjU0YS45MTguOTE4IDAgMCAwIC42NTQuMjcuOTE4LjkxOCAwIDAgMCAuNjUzLS4yN2w0Ljg4LTQuODh2Mi45MjZhLjkyNS45MjUgMCAwIDAgMS44NDggMFYuOTI0QS45MjUuOTI1IDAgMCAwIDE0LjA3MiAweiIvPjxwYXRoIGQ9Ik0xMC42MjMgMTMuNDExSDEuNTg1VjQuMzcyaDYuNzk4bDEuNTg0LTEuNTg0SC43OTJBLjc5Mi43OTIgMCAwIDAgMCAzLjU4djEwLjYyNGMwIC40MzcuMzU1Ljc5Mi43OTIuNzkyaDEwLjYyNGEuNzkyLjc5MiAwIDAgMCAuNzkyLS43OTJWNS4wMjlsLTEuNTg1IDEuNTg0djYuNzk4eiIvPjwvZz48L3N2Zz4=",alt:"",onClick:this.openLink,className:"rdw-link-decorator-icon"}):void 0)}}])&&so(e.prototype,t),n&&so(e,n),i}(),t.propTypes={entityKey:f.a.string.isRequired,children:f.a.array,contentState:f.a.object},n}n(34);function yo(e){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,yo),this.getMentionComponent=function(){function e(e){var t=e.entityKey,n=e.children,o=e.contentState.getEntity(t).getData(),r=o.url,i=o.value;return S.a.createElement("a",{href:r||i,className:L()("rdw-mention-link",a)},n)}var a=t.className;return e.propTypes={entityKey:f.a.number,children:f.a.array,contentState:f.a.object},e},this.getMentionDecorator=function(){return{strategy:t.findMentionEntities,component:t.getMentionComponent()}},this.className=e}yo.prototype.findMentionEntities=function(e,t,n){e.findEntityRanges(function(e){var t=e.getEntity();return null!==t&&"MENTION"===n.getEntity(t).getType()},t)};var ho=yo;n(35);function Mo(e){return(Mo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function jo(e,t){return!t||"object"!==Mo(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function No(e){return(No=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function So(e,t){return(So=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Eo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Co=function e(t){var p=this;Eo(this,e),this.findSuggestionEntities=function(e,t){if(p.config.getEditorState()){var n=p.config,o=n.separator,r=n.trigger,i=n.getSuggestions,a=(0,n.getEditorState)().getSelection();if(a.get("anchorKey")===e.get("key")&&a.get("anchorKey")===a.get("focusKey")){var c=e.getText(),l=(c=c.substr(0,a.get("focusOffset")===c.length-1?c.length:a.get("focusOffset")+1)).lastIndexOf(o+r),s=o+r;if((void 0===l||l<0)&&c[0]===r&&(l=0,s=r),0<=l){var u=c.substr(l+s.length,c.length);i().some(function(e){return!!e.value&&(p.config.caseSensitive?0<=e.value.indexOf(u):0<=e.value.toLowerCase().indexOf(u&&u.toLowerCase()))})&&t(0===l?0:l+1,c.length)}}}},this.getSuggestionComponent=function(){var e,t,c=this.config;return t=e=function(){function r(){var e,a;Eo(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(a=jo(this,(e=No(r)).call.apply(e,[this].concat(n)))).state={style:{left:15},activeOption:-1,showSuggestions:!0},a.onEditorKeyDown=function(e){var t=a.state.activeOption,n={};"ArrowDown"===e.key?(e.preventDefault(),t===a.filteredSuggestions.length-1?n.activeOption=0:n.activeOption=t+1):"ArrowUp"===e.key?n.activeOption=t<=0?a.filteredSuggestions.length-1:t-1:"Escape"===e.key?(n.showSuggestions=!1,y()):"Enter"===e.key&&a.addMention(),a.setState(n)},a.onOptionMouseEnter=function(e){var t=e.target.getAttribute("data-index");a.setState({activeOption:t})},a.onOptionMouseLeave=function(){a.setState({activeOption:-1})},a.setSuggestionReference=function(e){a.suggestion=e},a.setDropdownReference=function(e){a.dropdown=e},a.closeSuggestionDropdown=function(){a.setState({showSuggestions:!1})},a.filteredSuggestions=[],a.filterSuggestions=function(e){var t=e.children[0].props.text.substr(1),n=c.getSuggestions();a.filteredSuggestions=n&&n.filter(function(e){return!t||0===t.length||(c.caseSensitive?0<=e.value.indexOf(t):0<=e.value.toLowerCase().indexOf(t&&t.toLowerCase()))})},a.addMention=function(){var e=a.state.activeOption,t=c.getEditorState(),n=c.onChange,o=c.separator,r=c.trigger,i=a.filteredSuggestions[e];i&&function(e,t,n,o,r){var i=r.value,a=r.url,c=e.getCurrentContent().createEntity("MENTION","IMMUTABLE",{text:"".concat(o).concat(i),value:i,url:a}).getLastCreatedEntityKey(),l=Object(C.getSelectedBlock)(e).getText(),s=e.getSelection().focusOffset,u=(l.lastIndexOf(n+o,s)||0)+1,p=!1;l.length===u+1&&(s=l.length)," "===l[s]&&(p=!0);var d=e.getSelection().merge({anchorOffset:u,focusOffset:s}),m=E.EditorState.acceptSelection(e,d),f=E.Modifier.replaceText(m.getCurrentContent(),d,"".concat(o).concat(i),m.getCurrentInlineStyle(),c);m=E.EditorState.push(m,f,"insert-characters"),p||(d=m.getSelection().merge({anchorOffset:u+i.length+o.length,focusOffset:u+i.length+o.length}),m=E.EditorState.acceptSelection(m,d),f=E.Modifier.insertText(m.getCurrentContent(),d," ",m.getCurrentInlineStyle(),void 0)),t(E.EditorState.push(m,f,"insert-characters"))}(t,n,o,r,i)},a}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&So(e,t)}(r,m["Component"]),e=r,(t=[{key:"componentDidMount",value:function(){var e,t,n,o=c.getWrapperRef().getBoundingClientRect(),r=this.suggestion.getBoundingClientRect(),i=this.dropdown.getBoundingClientRect();o.width<r.left-o.left+i.width?t=15:e=15,o.bottom<i.bottom&&(n=0),this.setState({style:{left:e,right:t,bottom:n}}),k.registerCallBack(this.onEditorKeyDown),g(),c.modalHandler.setSuggestionCallback(this.closeSuggestionDropdown),this.filterSuggestions(this.props)}},{key:"componentDidUpdate",value:function(e){this.props.children!==e.children&&(this.filterSuggestions(e),this.setState({showSuggestions:!0}))}},{key:"componentWillUnmount",value:function(){k.deregisterCallBack(this.onEditorKeyDown),y(),c.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var n=this,e=this.props.children,t=this.state,o=t.activeOption,r=t.showSuggestions,i=c.dropdownClassName,a=c.optionClassName;return S.a.createElement("span",{className:"rdw-suggestion-wrapper",ref:this.setSuggestionReference,onClick:c.modalHandler.onSuggestionClick,"aria-haspopup":"true","aria-label":"rdw-suggestion-popup"},S.a.createElement("span",null,e),r&&S.a.createElement("span",{className:L()("rdw-suggestion-dropdown",i),contentEditable:"false",suppressContentEditableWarning:!0,style:this.state.style,ref:this.setDropdownReference},this.filteredSuggestions.map(function(e,t){return S.a.createElement("span",{key:t,spellCheck:!1,onClick:n.addMention,"data-index":t,onMouseEnter:n.onOptionMouseEnter,onMouseLeave:n.onOptionMouseLeave,className:L()("rdw-suggestion-option",a,{"rdw-suggestion-option-active":t===o})},e.text)})))}}])&&bo(e.prototype,t),n&&bo(e,n),r}(),e.propTypes={children:f.a.array},t}.bind(this),this.getSuggestionDecorator=function(){return{strategy:p.findSuggestionEntities,component:p.getSuggestionComponent()}};var n=t.separator,o=t.trigger,r=t.getSuggestions,i=t.onChange,a=t.getEditorState,c=t.getWrapperRef,l=t.caseSensitive,s=t.dropdownClassName,u=t.optionClassName,d=t.modalHandler;this.config={separator:n,trigger:o,getSuggestions:r,onChange:i,getEditorState:a,getWrapperRef:c,caseSensitive:l,dropdownClassName:s,optionClassName:u,modalHandler:d}},Lo=function(e){return[new ho(e.mentionClassName).getMentionDecorator(),new Co(e).getSuggestionDecorator()]};n(36);function ko(e){var c=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,ko),this.getHashtagComponent=function(){function e(e){var t=e.children,n=t[0].props.text;return S.a.createElement("a",{href:n,className:L()("rdw-hashtag-link",o)},t)}var o=c.className;return e.propTypes={children:f.a.object},e},this.findHashtagEntities=function(e,t){for(var n=e.getText(),o=0,r=0;0<n.length&&0<=o;)if(n[0]===c.hashCharacter?(r=o=0,n=n.substr(c.hashCharacter.length)):0<=(o=n.indexOf(c.separator+c.hashCharacter))&&(n=n.substr(o+(c.separator+c.hashCharacter).length),r+=o+c.separator.length),0<=o){var i=0<=n.indexOf(c.separator)?n.indexOf(c.separator):n.length,a=n.substr(0,i);a&&0<a.length&&(t(r,r+a.length+c.hashCharacter.length),r+=c.hashCharacter.length)}},this.getHashtagDecorator=function(){return{strategy:c.findHashtagEntities,component:c.getHashtagComponent()}},this.className=e.className,this.hashCharacter=e.hashCharacter||"#",this.separator=e.separator||" "}function Do(e){var t=e.block,n=e.contentState.getEntity(t.getEntityAt(0)).getData(),o=n.src,r=n.height,i=n.width;return S.a.createElement("iframe",{height:r,width:i,src:o,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}var vo=function(e){return new ko(e).getHashtagDecorator()};Do.propTypes={block:f.a.object,contentState:f.a.object};var wo=Do;n(37);function xo(e){return(xo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Io(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Oo(e,t){return!t||"object"!==xo(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Ao(e){return(Ao=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function To(e,t){return(To=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var zo=function(d){var e,t;return t=e=function(){function r(){var e,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(i=Oo(this,(e=Ao(r)).call.apply(e,[this].concat(n)))).state={hovered:!1},i.setEntityAlignmentLeft=function(){i.setEntityAlignment("left")},i.setEntityAlignmentRight=function(){i.setEntityAlignment("right")},i.setEntityAlignmentCenter=function(){i.setEntityAlignment("none")},i.setEntityAlignment=function(e){var t=i.props,n=t.block,o=t.contentState,r=n.getEntityAt(0);o.mergeEntityData(r,{alignment:e}),d.onChange(E.EditorState.push(d.getEditorState(),o,"change-block-data")),i.setState({dummy:!0})},i.toggleHovered=function(){var e=!i.state.hovered;i.setState({hovered:e})},i}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&To(e,t)}(r,m["Component"]),e=r,(t=[{key:"renderAlignmentOptions",value:function(e){return S.a.createElement("div",{className:L()("rdw-image-alignment-options-popup",{"rdw-image-alignment-options-popup-right":"right"===e})},S.a.createElement(T,{onClick:this.setEntityAlignmentLeft,className:"rdw-image-alignment-option"},"L"),S.a.createElement(T,{onClick:this.setEntityAlignmentCenter,className:"rdw-image-alignment-option"},"C"),S.a.createElement(T,{onClick:this.setEntityAlignmentRight,className:"rdw-image-alignment-option"},"R"))}},{key:"render",value:function(){var e=this.props,t=e.block,n=e.contentState,o=this.state.hovered,r=d.isReadOnly,i=d.isImageAlignmentEnabled,a=n.getEntity(t.getEntityAt(0)).getData(),c=a.src,l=a.alignment,s=a.height,u=a.width,p=a.alt;return S.a.createElement("span",{onMouseEnter:this.toggleHovered,onMouseLeave:this.toggleHovered,className:L()("rdw-image-alignment",{"rdw-image-left":"left"===l,"rdw-image-right":"right"===l,"rdw-image-center":!l||"none"===l})},S.a.createElement("span",{className:"rdw-image-imagewrapper"},S.a.createElement("img",{src:c,alt:p,style:{height:s,width:u}}),!r()&&o&&i()?this.renderAlignmentOptions(l):void 0))}}])&&Io(e.prototype,t),n&&Io(e,n),r}(),e.propTypes={block:f.a.object,contentState:f.a.object},t},_o=function(o,r){return function(e){if("function"==typeof r){var t=r(e,o,o.getEditorState);if(t)return t}if("atomic"===e.getType()){var n=o.getEditorState().getCurrentContent().getEntity(e.getEntityAt(0));if(n&&"IMAGE"===n.type)return{component:zo(o),editable:!1};if(n&&"EMBEDDED_LINK"===n.type)return{component:wo,editable:!1}}}},Po={options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","embedded","emoji","image","remove","history"],inline:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["bold","italic","underline","strikethrough","monospace","superscript","subscript"],bold:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuMjM2IDBjMS42NTIgMCAyLjk0LjI5OCAzLjg2Ni44OTMuOTI1LjU5NSAxLjM4OCAxLjQ4NSAxLjM4OCAyLjY2OSAwIC42MDEtLjE3MyAxLjEzOS0uNTE2IDEuNjEtLjM0My40NzQtLjg0NC44My0xLjQ5OSAxLjA2OC44NDMuMTY3IDEuNDc0LjUyMyAxLjg5NSAxLjA3MS40MTkuNTUuNjMgMS4xODMuNjMgMS45MDMgMCAxLjI0NS0uNDQ0IDIuMTg3LTEuMzMgMi44MjUtLjg4Ni42NDEtMi4xNDQuOTYxLTMuNzY5Ljk2MUgwdi0yLjE2N2gxLjQ5NFYyLjE2N0gwVjBoNi4yMzZ6TTQuMzA4IDUuNDQ2aDIuMDI0Yy43NTIgMCAxLjMzLS4xNDMgMS43MzQtLjQzLjQwNS0uMjg1LjYwOC0uNzAxLjYwOC0xLjI1IDAtLjYtLjIwNC0xLjA0NC0uNjEyLTEuMzMtLjQwOC0uMjg2LTEuMDE2LS40MjctMS44MjYtLjQyN0g0LjMwOHYzLjQzN3ptMCAxLjgwNFYxMWgyLjU5M2MuNzQ3IDAgMS4zMTQtLjE1MiAxLjcwNy0uNDUyLjM5LS4zLjU4OC0uNzQ1LjU4OC0xLjMzNCAwLS42MzYtLjE2OC0xLjEyNC0uNS0xLjQ2LS4zMzYtLjMzNS0uODY0LS41MDQtMS41ODItLjUwNEg0LjMwOHoiIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==",className:void 0,title:void 0},italic:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTcgM1YyaDR2MUg5Ljc1M2wtMyAxMEg4djFINHYtMWgxLjI0N2wzLTEwSDd6Ii8+PC9zdmc+",className:void 0,title:void 0},underline:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTYuMDQ1IDJ2Ljk5Mkw0Ljc4NSAzdjUuMTcyYzAgLjg1OS4yNDMgMS41MTIuNzI3IDEuOTU3czEuMTI0LjY2OCAxLjkxOC42NjhjLjgzNiAwIDEuNTA5LS4yMjEgMi4wMTktLjY2NC41MTEtLjQ0Mi43NjYtMS4wOTYuNzY2LTEuOTYxVjNsLTEuMjYtLjAwOFYySDEzdi45OTJMMTEuNzM5IDN2NS4xNzJjMCAxLjIzNC0uMzk4IDIuMTgxLTEuMTk1IDIuODQtLjc5Ny42NTktMS44MzUuOTg4LTMuMTE0Ljk4OC0xLjI0MiAwLTIuMjQ4LS4zMjktMy4wMTctLjk4OC0uNzY5LS42NTktMS4xNTItMS42MDUtMS4xNTItMi44NFYzTDIgMi45OTJWMmg0LjA0NXpNMiAxM2gxMXYxSDJ6Ii8+PC9zdmc+",className:void 0,title:void 0},strikethrough:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNC4wNCA1Ljk1NGg2LjIxNWE3LjQxMiA3LjQxMiAwIDAgMC0uNzk1LS40MzggMTEuOTA3IDExLjkwNyAwIDAgMC0xLjQ0Ny0uNTU3Yy0xLjE4OC0uMzQ4LTEuOTY2LS43MTEtMi4zMzQtMS4wODgtLjM2OC0uMzc3LS41NTItLjc3LS41NTItMS4xODEgMC0uNDk1LjE4Ny0uOTA2LjU2LTEuMjMyLjM4LS4zMzEuODg3LS40OTcgMS41MjMtLjQ5Ny42OCAwIDEuMjY2LjI1NSAxLjc1Ny43NjcuMjk1LjMxNS41ODIuODkxLjg2MSAxLjczbC4xMTcuMDE2LjcwMy4wNS4xLS4wMjRjLjAyOC0uMTUyLjA0Mi0uMjc5LjA0Mi0uMzggMC0uMzM3LS4wMzktLjg1Mi0uMTE3LTEuNTQ0YTkuMzc0IDkuMzc0IDAgMCAwLS4xNzYtLjk5NUM5Ljg4LjM3OSA5LjM4NS4yNDQgOS4wMTcuMTc2IDguMzY1LjA3IDcuODk5LjAxNiA3LjYyLjAxNmMtMS40NSAwLTIuNTQ1LjM1Ny0zLjI4NyAxLjA3MS0uNzQ3LjcyLTEuMTIgMS41ODktMS4xMiAyLjYwNyAwIC41MTEuMTMzIDEuMDQuNCAxLjU4Ni4xMjkuMjUzLjI3LjQ3OC40MjcuNjc0ek04LjI4IDguMTE0Yy41NzUuMjM2Ljk1Ny40MzYgMS4xNDcuNTk5LjQ1MS40MS42NzcuODUyLjY3NyAxLjMyNCAwIC4zODMtLjEzLjc0NS0uMzkzIDEuMDg4LS4yNS4zMzgtLjU5LjU4LTEuMDIuNzI2YTMuNDE2IDMuNDE2IDAgMCAxLTEuMTYzLjIyOGMtLjQwNyAwLS43NzUtLjA2Mi0xLjEwNC0uMTg2YTIuNjk2IDIuNjk2IDAgMCAxLS44NzgtLjQ4IDMuMTMzIDMuMTMzIDAgMCAxLS42Ny0uNzk0IDEuNTI3IDEuNTI3IDAgMCAxLS4xMDQtLjIyNyA1Ny41MjMgNTcuNTIzIDAgMCAwLS4xODgtLjQ3MyAyMS4zNzEgMjEuMzcxIDAgMCAwLS4yNTEtLjU5OWwtLjg1My4wMTd2LjM3MWwtLjAxNy4zMTNhOS45MiA5LjkyIDAgMCAwIDAgLjU3M2MuMDExLjI3LjAxNy43MDkuMDE3IDEuMzE2di4xMWMwIC4wNzkuMDIyLjE0LjA2Ny4xODUuMDgzLjA2OC4yODQuMTQ3LjYwMi4yMzdsMS4xNy4zMzdjLjQ1Mi4xMy45OTYuMTk0IDEuNjMyLjE5NC42ODYgMCAxLjI1Mi0uMDU5IDEuNjk4LS4xNzdhNC42OTQgNC42OTQgMCAwIDAgMS4yOC0uNTU3Yy40MDEtLjI1OS43MDUtLjQ4Ni45MTEtLjY4My4yNjgtLjI3Ni40NjYtLjU2OC41OTQtLjg3OGE0Ljc0IDQuNzQgMCAwIDAgLjM0My0xLjc4OGMwLS4yOTgtLjAyLS41NTctLjA1OC0uNzc2SDguMjgxek0xNC45MTQgNi41N2EuMjYuMjYgMCAwIDAtLjE5My0uMDc2SC4yNjhhLjI2LjI2IDAgMCAwLS4xOTMuMDc2LjI2NC4yNjQgMCAwIDAtLjA3NS4xOTR2LjU0YzAgLjA3OS4wMjUuMTQzLjA3NS4xOTRhLjI2LjI2IDAgMCAwIC4xOTMuMDc2SDE0LjcyYS4yNi4yNiAwIDAgMCAuMTkzLS4wNzYuMjY0LjI2NCAwIDAgMCAuMDc1LS4xOTR2LS41NGEuMjY0LjI2NCAwIDAgMC0uMDc1LS4xOTR6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},monospace:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzQ0NCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMS4wMjEgMi45MDZjLjE4NiAxLjIxOS4zNzIgMS41LjM3MiAyLjcxOUMxLjM5MyA2LjM3NSAwIDcuMDMxIDAgNy4wMzF2LjkzOHMxLjM5My42NTYgMS4zOTMgMS40MDZjMCAxLjIxOS0uMTg2IDEuNS0uMzcyIDIuNzE5Qy43NDMgMTQuMDYzIDEuNzY0IDE1IDIuNjkzIDE1aDEuOTV2LTEuODc1cy0xLjY3Mi4xODgtMS42NzItLjkzOGMwLS44NDMuMTg2LS44NDMuMzcyLTIuNzE4LjA5My0uODQ0LS40NjQtMS41LTEuMDIyLTEuOTY5LjU1OC0uNDY5IDEuMTE1LTEuMDMxIDEuMDIyLTEuODc1QzMuMDY0IDMuNzUgMi45NyAzLjc1IDIuOTcgMi45MDZjMC0xLjEyNSAxLjY3Mi0xLjAzMSAxLjY3Mi0xLjAzMVYwaC0xLjk1QzEuNjcgMCAuNzQzLjkzOCAxLjAyIDIuOTA2ek0xMS45NzkgMi45MDZjLS4xODYgMS4yMTktLjM3MiAxLjUtLjM3MiAyLjcxOSAwIC43NSAxLjM5MyAxLjQwNiAxLjM5MyAxLjQwNnYuOTM4cy0xLjM5My42NTYtMS4zOTMgMS40MDZjMCAxLjIxOS4xODYgMS41LjM3MiAyLjcxOS4yNzggMS45NjktLjc0MyAyLjkwNi0xLjY3MiAyLjkwNmgtMS45NXYtMS44NzVzMS42NzIuMTg4IDEuNjcyLS45MzhjMC0uODQzLS4xODYtLjg0My0uMzcyLTIuNzE4LS4wOTMtLjg0NC40NjQtMS41IDEuMDIyLTEuOTY5LS41NTgtLjQ2OS0xLjExNS0xLjAzMS0xLjAyMi0xLjg3NS4xODYtMS44NzUuMzcyLTEuODc1LjM3Mi0yLjcxOSAwLTEuMTI1LTEuNjcyLTEuMDMxLTEuNjcyLTEuMDMxVjBoMS45NWMxLjAyMiAwIDEuOTUuOTM4IDEuNjcyIDIuOTA2eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},superscript:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcuMzA1IDEwLjE2NUwxMS44NjUgMTVIOS4wNTdsLTMuMTkyLTMuNTM2TDIuNzQ2IDE1SDBsNC41MjMtNC44MzVMLjIxOCA1LjYwM2gyLjc3TDUuOTg2IDguOTEgOS4wMSA1LjYwM2gyLjY0OWwtNC4zNTQgNC41NjJ6bTYuMjM0LTMuMjY5bDEuODc5LTEuMzA2Yy42NC0uNDE2IDEuMDYyLS44MDEgMS4yNjQtMS4xNTcuMjAxLS4zNTYuMzAyLS43MzguMzAyLTEuMTQ4IDAtLjY2OS0uMjM3LTEuMjEtLjcxLTEuNjItLjQ3NC0uNDExLTEuMDk3LS42MTctMS44NjgtLjYxNy0uNzQ0IDAtMS4zNC4yMDgtMS43ODUuNjI0LS40NDcuNDE2LS42NyAxLjA0My0uNjcgMS44ODFoMS40MzZjMC0uNS4wOTQtLjg0Ni4yODEtMS4wMzguMTg4LS4xOTEuNDQ1LS4yODcuNzcyLS4yODdzLjU4NS4wOTcuNzc3LjI5MmMuMTkuMTk1LjI4Ni40MzcuMjg2LjcyNiAwIC4yOS0uMDg5LjU1LS4yNjYuNzg1cy0uNjcuNjI4LTEuNDc5IDEuMTg0Yy0uNjkxLjQ3Ny0xLjYyNy45MjctMS45MDggMS4zNWwuMDE0IDEuNTY5SDE3VjYuODk2aC0zLjQ2MXoiLz48L3N2Zz4=",className:void 0,title:void 0},subscript:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExLjg2NiAxMS42NDZIOS4wNkw1Ljg2NyA3Ljk0MmwtMy4xMjEgMy43MDRIMGw0LjUyNC01LjA2NEwuMjE4IDEuODA0aDIuNzdsMyAzLjQ2NCAzLjAyMy0zLjQ2NGgyLjY1TDcuMzA2IDYuNTgybDQuNTYgNS4wNjR6bTEuNzI1IDIuMDU4bDEuODI3LTEuMzY4Yy42NC0uNDM1IDEuMDYyLS44NCAxLjI2NC0xLjIxMi4yMDItLjM3Mi4zMDItLjc3My4zMDItMS4yMDIgMC0uNy0uMjM3LTEuMjY2LS43MS0xLjY5Ni0uNDc0LS40MzEtMS4wOTctLjY0Ni0xLjg2OS0uNjQ2LS43NDQgMC0xLjM0LjIxOC0xLjc4NS42NTMtLjQ0Ni40MzYtLjY3IDEuMDkyLS42NyAxLjk3aDEuNDM2YzAtLjUyNC4wOTQtLjg4Ni4yODEtMS4wODcuMTg4LS4yLjQ0NS0uMzAxLjc3Mi0uMzAxcy41ODYuMTAyLjc3Ny4zMDZjLjE5LjIwNC4yODYuNDU4LjI4Ni43NiAwIC4zMDMtLjA4OC41NzctLjI2Ni44MjItLjE3Ny4yNDUtLjY3LjY1OC0xLjQ3OCAxLjI0LS42OTIuNS0xLjYyOC45NzEtMS45MSAxLjQxM0wxMS44NjQgMTVIMTd2LTEuMjk2aC0zLjQxeiIvPjwvc3ZnPg==",className:void 0,title:void 0}},blockType:{inDropdown:!0,options:["Normal","H1","H2","H3","H4","H5","H6","Blockquote","Code"],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},fontSize:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuOTIxIDMuMTE5YS40MjcuNDI3IDAgMCAwIC4zMzUuMTY0aC45N2EuNDI2LjQyNiAwIDAgMCAuMzA0LS4xMy40NDEuNDQxIDAgMCAwIC4xMjUtLjMxbC4wMDItMi40MWEuNDM0LjQzNCAwIDAgMC0uNDMtLjQzMkguNDNBLjQzNC40MzQgMCAwIDAgMCAuNDR2Mi40MDZjMCAuMjQyLjE5Mi40MzguNDMuNDM4aC45N2MuMTMgMCAuMjU0LS4wNi4zMzUtLjE2NWwuNzMtLjkzSDUuNTR2MTEuMzZjMCAuMjQxLjE5Mi40MzcuNDMuNDM3aDEuNzE3Yy4yMzcgMCAuNDMtLjE5Ni40My0uNDM3VjIuMTg4aDMuMDdsLjczNC45MzF6TTEzLjg5OCAxMS4yNjNhLjQyNS40MjUgMCAwIDAtLjQ4Mi0uMTQ2bC0uNTQ3LjE5NFY5LjYxN2EuNDQyLjQ0MiAwIDAgMC0uMTI2LS4zMS40MjYuNDI2IDAgMCAwLS4zMDQtLjEyN2gtLjQyOWEuNDM0LjQzNCAwIDAgMC0uNDMuNDM3djEuNjk0bC0uNTQ3LS4xOTRhLjQyNS40MjUgMCAwIDAtLjQ4MS4xNDYuNDQ0LjQ0NCAwIDAgMC0uMDE2LjUxMmwxLjMzMiAyLjAxN2EuNDI3LjQyNyAwIDAgMCAuNzEzIDBsMS4zMzMtMi4wMTdhLjQ0NC40NDQgMCAwIDAtLjAxNi0uNTEyeiIvPjwvZz48L3N2Zz4=",options:[8,9,10,11,12,14,16,18,24,30,36,48,60,72,96],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},fontFamily:{options:["Arial","Georgia","Impact","Tahoma","Times New Roman","Verdana"],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},list:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["unordered","ordered","indent","outdent"],unordered:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMS43MiAzLjQyN2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3LjAxIDEuNzIuMDFDLjc3LjAwOCAwIC43NzUgMCAxLjcxNWMwIC45NC43NzQgMS43MTEgMS43MiAxLjcxMXptMC0yLjYyNWMuNTEgMCAuOTIyLjQxMi45MjIuOTE0YS45Mi45MiAwIDAgMS0xLjg0MiAwIC45Mi45MiAwIDAgMSAuOTItLjkxNHpNMS43MiA4LjcwM2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3IDUuMjg3IDEuNzIgNS4yODdDLjc3IDUuMjg3IDAgNi4wNTIgMCA2Ljk5NXMuNzc0IDEuNzA4IDEuNzIgMS43MDh6bTAtMi42MjJjLjUxIDAgLjkyMi40MTIuOTIyLjkxNGEuOTIuOTIgMCAwIDEtMS44NDIgMGMwLS41MDUuNDE1LS45MTQuOTItLjkxNHpNMS43MiAxMy45ODJjLjk1MSAwIDEuNzIyLS43NjggMS43MjItMS43MDggMC0uOTQzLS43NzQtMS43MDgtMS43MjEtMS43MDgtLjk0NyAwLTEuNzIxLjc2OC0xLjcyMSAxLjcwOHMuNzc0IDEuNzA4IDEuNzIgMS43MDh6bTAtMi42MjVjLjUxIDAgLjkyMi40MTIuOTIyLjkxNGEuOTIuOTIgMCAxIDEtMS44NDIgMCAuOTIuOTIgMCAwIDEgLjkyLS45MTR6TTUuNzQ0IDIuMTE1aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOTlINS43NDRhLjQuNCAwIDAgMC0uNDAyLjM5OS40LjQgMCAwIDAgLjQwMi4zOTl6TTUuNzQ0IDcuMzk0aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOThINS43NDRhLjQuNCAwIDAgMC0uNDAyLjM5OC40LjQgMCAwIDAgLjQwMi4zOTl6TTUuNzQ0IDEyLjY3aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOTlINS43NDRhLjQuNCAwIDAgMC0uNDAyLjQuNC40IDAgMCAwIC40MDIuMzk4eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},ordered:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNC4yMDIgMS40NjZoOC4xNWMuMzM4IDAgLjYxMi0uMzIyLjYxMi0uNzIgMC0uMzk3LS4yNzQtLjcyLS42MTItLjcyaC04LjE1Yy0uMzM4IDAtLjYxMS4zMjMtLjYxMS43MiAwIC4zOTguMjczLjcyLjYxLjcyek0xMi4zNTIgNS43ODNoLTguMTVjLS4zMzggMC0uNjExLjMyMi0uNjExLjcyIDAgLjM5Ny4yNzMuNzIuNjEuNzJoOC4xNTFjLjMzOCAwIC42MTItLjMyMy42MTItLjcyIDAtLjM5OC0uMjc0LS43Mi0uNjEyLS43MnpNMTIuMzUyIDExLjU0aC04LjE1Yy0uMzM4IDAtLjYxMS4zMjItLjYxMS43MiAwIC4zOTYuMjczLjcxOS42MS43MTloOC4xNTFjLjMzOCAwIC42MTItLjMyMy42MTItLjcyIDAtLjM5Ny0uMjc0LS43Mi0uNjEyLS43MnpNLjc2NyAxLjI0OXYxLjgwMmMwIC4xOTUuMTM2LjM0My4zMTUuMzQzLjE3NiAwIC4zMTUtLjE1LjMxNS0uMzQzVi4zNTZjMC0uMTktLjEzMy0uMzM5LS4zMDItLjMzOS0uMTQ4IDAtLjIyMy4xMTgtLjI0Ny4xNTZhLjIyOC4yMjggMCAwIDAtLjAwMy4wMDVMLjU3OS42MjFhLjQ3NC40NzQgMCAwIDAtLjA5OC4yNzNjMCAuMTk0LjEyOC4zNTEuMjg2LjM1NXpNLjM1MiA4LjE5SDEuNTVjLjE1NyAwIC4yODUtLjE2Mi4yODUtLjM2MiAwLS4xOTgtLjEyOC0uMzU5LS4yODUtLjM1OUguNjh2LS4wMDZjMC0uMTA3LjIxLS4yODEuMzc4LS40MjIuMzM2LS4yNzguNzUzLS42MjUuNzUzLTEuMjI2IDAtLjU3LS4zNzYtMS0uODc0LTEtLjQ3NyAwLS44MzYuMzg1LS44MzYuODk3IDAgLjI5Ny4xNjQuNDAyLjMwNS40MDIuMiAwIC4zMjEtLjE3Ni4zMjEtLjM0NiAwLS4xMDYuMDIzLS4yMjguMjA0LS4yMjguMjQzIDAgLjI1LjI1NC4yNS4yODMgMCAuMjI4LS4yNTIuNDQyLS40OTUuNjQ5LS4zMDEuMjU1LS42NDIuNTQ0LS42NDIuOTkydi4zODRjMCAuMjA1LjE1OS4zNDMuMzA4LjM0M3pNMS43NyAxMC41NDNjMC0uNTkyLS4yOTYtLjkzMS0uODE0LS45MzEtLjY4IDAtLjg1OS41Ny0uODU5Ljg3MiAwIC4zNTEuMjIyLjM5LjMxOC4zOS4xODUgMCAuMzEtLjE0OC4zMS0uMzY2IDAtLjA4NC4wMjYtLjE4MS4yMjQtLjE4MS4xNDIgMCAuMi4wMjQuMi4yNjcgMCAuMjM3LS4wNDMuMjYzLS4yMTMuMjYzLS4xNjQgMC0uMjg4LjE1Mi0uMjg4LjM1NCAwIC4yLjEyNS4zNS4yOTEuMzUuMjI1IDAgLjI3LjEwOC4yNy4yODN2LjA3NWMwIC4yOTQtLjA5Ny4zNS0uMjc3LjM1LS4yNDggMC0uMjY3LS4xNS0uMjY3LS4xOTcgMC0uMTc0LS4wOTgtLjM1LS4zMTctLjM1LS4xOTIgMC0uMzA3LjE0MS0uMzA3LjM3OCAwIC40My4zMTMuODg4Ljg5NS44ODguNTY0IDAgLjkwMS0uNC45MDEtMS4wN3YtLjA3NGMwLS4yNzQtLjA3NC0uNTAyLS4yMTQtLjY2Ni4wOTYtLjE2My4xNDgtLjM4LjE0OC0uNjM1eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},indent:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNS43MTYgMy4yMTFIMTd2MS4xOTdINS43MTZ6TTAgLjAyaDE3djEuMTk3SDB6TTAgMTIuNzgzaDE3djEuMTk3SDB6TTUuNzE2IDkuNTkzSDE3djEuMTk3SDUuNzE2ek01LjcxNiA2LjQwMkgxN3YxLjE5N0g1LjcxNnpNLjE4NyA5LjQ5MUwyLjUyIDcgLjE4NyA0LjUwOXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},outdent:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNS4zOTYgMy4xOTNoMTAuNTczVjQuMzlINS4zOTZ6TS4wMzkuMDAzaDE1LjkzVjEuMkguMDM5ek0uMDM5IDEyLjc2NmgxNS45M3YxLjE5N0guMDM5ek01LjM5NiA5LjU3NWgxMC41NzN2MS4xOTdINS4zOTZ6TTUuMzk2IDYuMzg0aDEwLjU3M3YxLjE5N0g1LjM5NnpNMi4xODcgNC40OTFMMCA2Ljk4M2wyLjE4NyAyLjQ5MXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},title:void 0},textAlign:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["left","center","right","justify"],left:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNOC40OTMgMTQuODg3SC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDguMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4IDEwLjE2MkguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1M2gxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUzek04LjQ5MyA1LjQzNUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1Mmg4LjE2N2EuMzI2LjMyNiAwIDAgMSAwIC42NTJ6TTE0LjYxOC43MDlILjMyNmEuMzI2LjMyNiAwIDAgMSAwLS42NTJoMTQuMjkyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},center:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuNTU2IDE0Ljg4N0gzLjM4OGEuMzI2LjMyNiAwIDAgMSAwLS42NTJoOC4xNjdhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42MTggMTAuMTYySC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUzaDE0LjI5MmEuMzI2LjMyNiAwIDAgMSAwIC42NTN6TTExLjU1NiA1LjQzNUgzLjM4OGEuMzI2LjMyNiAwIDAgMSAwLS42NTJoOC4xNjdhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42MTguNzA5SC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDE0LjI5MmEuMzI2LjMyNiAwIDAgMSAwIC42NTJ6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},right:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNjE4IDE0Ljg4N0g2LjQ1YS4zMjYuMzI2IDAgMCAxIDAtLjY1Mmg4LjE2N2EuMzI2LjMyNiAwIDAgMSAwIC42NTJ6TTE0LjYxOCAxMC4xNjJILjMyNmEuMzI2LjMyNiAwIDAgMSAwLS42NTNoMTQuMjkyYS4zMjYuMzI2IDAgMCAxIDAgLjY1M3pNMTQuNjE4IDUuNDM1SDYuNDVhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDguMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4LjcwOUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1MmgxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUyeiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},justify:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNjIgMTQuODg4SC4zMjVhLjMyNi4zMjYgMCAwIDEgMC0uNjUySDE0LjYyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjIgMTAuMTYySC4zMjVhLjMyNi4zMjYgMCAwIDEgMC0uNjUySDE0LjYyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjIgNS40MzZILjMyNWEuMzI2LjMyNiAwIDAgMSAwLS42NTJIMTQuNjJhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42Mi43MUguMzI1YS4zMjYuMzI2IDAgMCAxIDAtLjY1M0gxNC42MmEuMzI2LjMyNiAwIDAgMSAwIC42NTN6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},title:void 0},colorPicker:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNDA2LjU4NWExLjk5OCAxLjk5OCAwIDAgMC0yLjgyNSAwbC0uNTQuNTRhLjc0MS43NDEgMCAxIDAtMS4wNDggMS4wNDhsLjE3NS4xNzUtNS44MjYgNS44MjUtMi4wMjIgMi4wMjNhLjkxLjkxIDAgMCAwLS4yNjYuNjAybC0uMDA1LjEwOHYuMDAybC0uMDgxIDEuODI5YS4zMDIuMzAyIDAgMCAwIC4zMDIuMzE2aC4wMTNsLjk3LS4wNDQuNTkyLS4wMjYuMjY4LS4wMTJjLjI5Ny0uMDEzLjU3OS0uMTM3Ljc5LS4zNDdsNy43Ny03Ljc3LjE0Ni4xNDRhLjc0Ljc0IDAgMCAwIDEuMDQ4IDBjLjI5LS4yOS4yOS0uNzU5IDAtMS4wNDhsLjU0LS41NGMuNzgtLjc4Ljc4LTIuMDQ0IDAtMi44MjV6TTguNzk1IDcuMzMzbC0yLjczLjUxNSA0LjQ1Mi00LjQ1MiAxLjEwOCAxLjEwNy0yLjgzIDIuODN6TTIuMDggMTMuNjczYy0xLjE0OCAwLTIuMDguMjk1LTIuMDguNjYgMCAuMzYzLjkzMi42NTggMi4wOC42NTggMS4xNSAwIDIuMDgtLjI5NCAyLjA4LS42NTkgMC0uMzY0LS45My0uNjU5LTIuMDgtLjY1OXoiLz48L2c+PC9zdmc+",className:void 0,component:void 0,popupClassName:void 0,colors:["rgb(97,189,109)","rgb(26,188,156)","rgb(84,172,210)","rgb(44,130,201)","rgb(147,101,184)","rgb(71,85,119)","rgb(204,204,204)","rgb(65,168,95)","rgb(0,168,133)","rgb(61,142,185)","rgb(41,105,176)","rgb(85,57,130)","rgb(40,50,78)","rgb(0,0,0)","rgb(247,218,100)","rgb(251,160,38)","rgb(235,107,86)","rgb(226,80,65)","rgb(163,143,132)","rgb(239,239,239)","rgb(255,255,255)","rgb(250,197,28)","rgb(243,121,52)","rgb(209,72,65)","rgb(184,49,47)","rgb(124,112,107)","rgb(209,213,216)"],title:void 0},link:{inDropdown:!1,className:void 0,component:void 0,popupClassName:void 0,dropdownClassName:void 0,showOpenOptionOnHover:!0,defaultTargetOption:"_self",options:["link","unlink"],link:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEzLjk2Ny45NUEzLjIyNiAzLjIyNiAwIDAgMCAxMS42Ny4wMDJjLS44NyAwLTEuNjg2LjMzNy0yLjI5Ny45NDhMNy4xMDUgMy4yMThBMy4yNDcgMy4yNDcgMCAwIDAgNi4yNCA2LjI0YTMuMjI1IDMuMjI1IDAgMCAwLTMuMDIyLjg2NUwuOTUgOS4zNzNhMy4yNTMgMy4yNTMgMCAwIDAgMCA0LjU5NCAzLjIyNiAzLjIyNiAwIDAgMCAyLjI5Ny45NDhjLjg3IDAgMS42ODYtLjMzNiAyLjI5OC0uOTQ4TDcuODEyIDExLjdhMy4yNDcgMy4yNDcgMCAwIDAgLjg2NS0zLjAyMyAzLjIyNSAzLjIyNSAwIDAgMCAzLjAyMi0uODY1bDIuMjY4LTIuMjY3YTMuMjUyIDMuMjUyIDAgMCAwIDAtNC41OTV6TTcuMTA1IDEwLjk5M0w0LjgzNyAxMy4yNmEyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LjY1NSAyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LS42NTUgMi4yNTIgMi4yNTIgMCAwIDEgMC0zLjE4bDIuMjY4LTIuMjY4YTIuMjMyIDIuMjMyIDAgMCAxIDEuNTktLjY1NWMuNDMgMCAuODQxLjEyIDEuMTk1LjM0M0w0Ljc3MiA5LjQzOGEuNS41IDAgMSAwIC43MDcuNzA3bDEuOTM5LTEuOTM4Yy41NDUuODY4LjQ0MiAyLjAzLS4zMTMgMi43ODV6bTYuMTU1LTYuMTU1bC0yLjI2OCAyLjI2N2EyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LjY1NWMtLjQzMSAwLS44NDEtLjEyLTEuMTk1LS4zNDNsMS45MzgtMS45MzhhLjUuNSAwIDEgMC0uNzA3LS43MDdMNy40OTkgNi43MWEyLjI1MiAyLjI1MiAwIDAgMSAuMzEzLTIuNzg1bDIuMjY3LTIuMjY4YTIuMjMzIDIuMjMzIDAgMCAxIDEuNTktLjY1NSAyLjIzMyAyLjIzMyAwIDAgMSAyLjI0NiAyLjI0NWMwIC42MDMtLjIzMiAxLjE2OC0uNjU1IDEuNTl6IiBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",className:void 0,title:void 0},unlink:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTMuOTU2IDEuMDM3YTMuNTUgMy41NSAwIDAgMC01LjAxNCAwTDYuNDM2IDMuNTQ0YS41NDUuNTQ1IDAgMSAwIC43Ny43N2wyLjUwOC0yLjUwNmEyLjQzOCAyLjQzOCAwIDAgMSAxLjczNS0uNzE1Yy42NTggMCAxLjI3NS4yNTQgMS43MzYuNzE1LjQ2LjQ2MS43MTUgMS4wNzguNzE1IDEuNzM2IDAgLjY1OC0uMjU0IDEuMjc0LS43MTUgMS43MzVMOS45MDcgOC41NThhMi40NTggMi40NTggMCAwIDEtMy40NzIgMCAuNTQ1LjU0NSAwIDEgMC0uNzcxLjc3MSAzLjUzNCAzLjUzNCAwIDAgMCAyLjUwNyAxLjAzN2MuOTA4IDAgMS44MTYtLjM0NiAyLjUwNy0xLjAzN2wzLjI3OC0zLjI3OGEzLjUyIDMuNTIgMCAwIDAgMS4wMzUtMi41MDdjMC0uOTUtLjM2Ny0xLjg0LTEuMDM1LTIuNTA3eiIvPjxwYXRoIGQ9Ik03LjQgMTEuMDY1bC0yLjEyMiAyLjEyYTIuNDM3IDIuNDM3IDAgMCAxLTEuNzM1LjcxNiAyLjQzNyAyLjQzNyAwIDAgMS0xLjczNi0uNzE1IDIuNDU3IDIuNDU3IDAgMCAxIDAtMy40NzFsMy4wODYtMy4wODZhMi40MzggMi40MzggMCAwIDEgMS43MzUtLjcxNWMuNjU4IDAgMS4yNzUuMjU0IDEuNzM2LjcxNWEuNTQ1LjU0NSAwIDEgMCAuNzcxLS43NzEgMy41NSAzLjU1IDAgMCAwLTUuMDE0IDBMMS4wMzYgOC45NDRBMy41MiAzLjUyIDAgMCAwIDAgMTEuNDVjMCAuOTUuMzY3IDEuODQgMS4wMzUgMi41MDdhMy41MiAzLjUyIDAgMCAwIDIuNTA2IDEuMDM1Yy45NSAwIDEuODQtLjM2OCAyLjUwNy0xLjAzNWwyLjEyMi0yLjEyMWEuNTQ1LjU0NSAwIDAgMC0uNzcxLS43NzF6TTkuMjc0IDEyLjAwMmEuNTQ2LjU0NiAwIDAgMC0uNTQ2LjU0NXYxLjYzN2EuNTQ2LjU0NiAwIDAgMCAxLjA5MSAwdi0xLjYzN2EuNTQ1LjU0NSAwIDAgMC0uNTQ1LS41NDV6TTExLjIzIDExLjYxNmEuNTQ1LjU0NSAwIDEgMC0uNzcyLjc3MmwxLjE1NyAxLjE1NmEuNTQzLjU0MyAwIDAgMCAuNzcxIDAgLjU0NS41NDUgMCAwIDAgMC0uNzdsLTEuMTU2LTEuMTU4ek0xMi41MzcgOS44MkgxMC45YS41NDYuNTQ2IDAgMCAwIDAgMS4wOTFoMS42MzdhLjU0Ni41NDYgMCAwIDAgMC0xLjA5ek00LjkxIDMuNTQ3YS41NDYuNTQ2IDAgMCAwIC41NDUtLjU0NVYxLjM2NmEuNTQ2LjU0NiAwIDAgMC0xLjA5IDB2MS42MzZjMCAuMzAxLjI0NC41NDUuNTQ1LjU0NXpNMi44ODggMy45MzNhLjU0My41NDMgMCAwIDAgLjc3MSAwIC41NDUuNTQ1IDAgMCAwIDAtLjc3MUwyLjUwMiAyLjAwNWEuNTQ1LjU0NSAwIDEgMC0uNzcxLjc3bDEuMTU3IDEuMTU4ek0xLjYyOCA1LjczaDEuNjM2YS41NDYuNTQ2IDAgMCAwIDAtMS4wOTJIMS42MjhhLjU0Ni41NDYgMCAwIDAgMCAxLjA5MXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},linkCallback:void 0},emoji:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHZpZXdCb3g9IjE1LjcyOSAyMi4wODIgMTcgMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTI5LjcwOCAyNS4xMDRjLTMuMDIxLTMuMDIyLTcuOTM3LTMuMDIyLTEwLjk1OCAwLTMuMDIxIDMuMDItMy4wMiA3LjkzNiAwIDEwLjk1OCAzLjAyMSAzLjAyIDcuOTM3IDMuMDIgMTAuOTU4LS4wMDEgMy4wMi0zLjAyMSAzLjAyLTcuOTM2IDAtMTAuOTU3em0tLjg0NSAxMC4xMTJhNi41NiA2LjU2IDAgMCAxLTkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAtOS4yNjcgNi41NiA2LjU2IDAgMCAxIDkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAgOS4yNjd6bS03LjUyNC02LjczYS45MDYuOTA2IDAgMSAxIDEuODExIDAgLjkwNi45MDYgMCAwIDEtMS44MTEgMHptNC4xMDYgMGEuOTA2LjkwNiAwIDEgMSAxLjgxMiAwIC45MDYuOTA2IDAgMCAxLTEuODEyIDB6bTIuMTQxIDMuNzA4Yy0uNTYxIDEuMjk4LTEuODc1IDIuMTM3LTMuMzQ4IDIuMTM3LTEuNTA1IDAtMi44MjctLjg0My0zLjM2OS0yLjE0N2EuNDM4LjQzOCAwIDAgMSAuODEtLjMzNmMuNDA1Ljk3NiAxLjQxIDEuNjA3IDIuNTU5IDEuNjA3IDEuMTIzIDAgMi4xMjEtLjYzMSAyLjU0NC0xLjYwOGEuNDM4LjQzOCAwIDAgMSAuODA0LjM0N3oiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,emojis:["😀","😁","😂","😃","😉","😋","😎","😍","😗","🤗","🤔","😣","😫","😴","😌","🤓","😛","😜","😠","😇","😷","😈","👻","😺","😸","😹","😻","😼","😽","🙀","🙈","🙉","🙊","👼","👮","🕵","💂","👳","🎅","👸","👰","👲","🙍","🙇","🚶","🏃","💃","⛷","🏂","🏌","🏄","🚣","🏊","⛹","🏋","🚴","👫","💪","👈","👉","👆","🖕","👇","🖖","🤘","🖐","👌","👍","👎","✊","👊","👏","🙌","🙏","🐵","🐶","🐇","🐥","🐸","🐌","🐛","🐜","🐝","🍉","🍄","🍔","🍤","🍨","🍪","🎂","🍰","🍾","🍷","🍸","🍺","🌍","🚑","⏰","🌙","🌝","🌞","⭐","🌟","🌠","🌨","🌩","⛄","🔥","🎄","🎈","🎉","🎊","🎁","🎗","🏀","🏈","🎲","🔇","🔈","📣","🔔","🎵","🎷","💰","🖊","📅","✅","❎","💯"],title:void 0},embedded:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNzA4IDYuNjE1YS40MzYuNDM2IDAgMCAwLS41NDMuMjkxbC0xLjgzIDYuMDQ1YS40MzYuNDM2IDAgMCAwIC44MzMuMjUyTDcgNy4xNmEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHpNOC45MzEgNi42MTVhLjQzNi40MzYgMCAwIDAtLjU0My4yOTFsLTEuODMgNi4wNDVhLjQzNi40MzYgMCAwIDAgLjgzNC4yNTJsMS44My02LjA0NGEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHoiLz48cGF0aCBkPSJNMTYuNTY0IDBILjQzNkEuNDM2LjQzNiAwIDAgMCAwIC40MzZ2MTYuMTI4YzAgLjI0LjE5NS40MzYuNDM2LjQzNmgxNi4xMjhjLjI0IDAgLjQzNi0uMTk1LjQzNi0uNDM2Vi40MzZBLjQzNi40MzYgMCAwIDAgMTYuNTY0IDB6TTMuNDg3Ljg3MmgxMC4wMjZ2MS43NDNIMy40ODdWLjg3MnptLTIuNjE1IDBoMS43NDN2MS43NDNILjg3MlYuODcyem0xNS4yNTYgMTUuMjU2SC44NzJWMy40ODhoMTUuMjU2djEyLjY0em0wLTEzLjUxM2gtMS43NDNWLjg3MmgxLjc0M3YxLjc0M3oiLz48Y2lyY2xlIGN4PSI5My44NjciIGN5PSIyNDUuMDY0IiByPSIxMy4xMjgiIHRyYW5zZm9ybT0ibWF0cml4KC4wMzMyIDAgMCAuMDMzMiAwIDApIi8+PGNpcmNsZSBjeD0iOTMuODY3IiBjeT0iMzYwLjU5MiIgcj0iMTMuMTI4IiB0cmFuc2Zvcm09Im1hdHJpeCguMDMzMiAwIDAgLjAzMzIgMCAwKSIvPjxwYXRoIGQ9Ik0xNC4yNTQgMTIuNjQxSDEwLjJhLjQzNi40MzYgMCAwIDAgMCAuODcyaDQuMDU0YS40MzYuNDM2IDAgMCAwIDAtLjg3MnoiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,embedCallback:void 0,defaultSize:{height:"auto",width:"auto"},title:void 0},image:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNzQxIDBILjI2Qy4xMTYgMCAwIC4xMzYgMCAuMzA0djEzLjM5MmMwIC4xNjguMTE2LjMwNC4yNTkuMzA0SDE0Ljc0Yy4xNDMgMCAuMjU5LS4xMzYuMjU5LS4zMDRWLjMwNEMxNSAuMTM2IDE0Ljg4NCAwIDE0Ljc0MSAwem0tLjI1OCAxMy4zOTFILjUxN1YuNjFoMTMuOTY2VjEzLjM5eiIvPjxwYXRoIGQ9Ik00LjEzOCA2LjczOGMuNzk0IDAgMS40NC0uNzYgMS40NC0xLjY5NXMtLjY0Ni0xLjY5NS0xLjQ0LTEuNjk1Yy0uNzk0IDAtMS40NC43Ni0xLjQ0IDEuNjk1IDAgLjkzNC42NDYgMS42OTUgMS40NCAxLjY5NXptMC0yLjc4MWMuNTA5IDAgLjkyMy40ODcuOTIzIDEuMDg2IDAgLjU5OC0uNDE0IDEuMDg2LS45MjMgMS4wODYtLjUwOSAwLS45MjMtLjQ4Ny0uOTIzLTEuMDg2IDAtLjU5OS40MTQtMS4wODYuOTIzLTEuMDg2ek0xLjgxIDEyLjE3NGMuMDYgMCAuMTIyLS4wMjUuMTcxLS4wNzZMNi4yIDcuNzI4bDIuNjY0IDMuMTM0YS4yMzIuMjMyIDAgMCAwIC4zNjYgMCAuMzQzLjM0MyAwIDAgMCAwLS40M0w3Ljk4NyA4Ljk2OWwyLjM3NC0zLjA2IDIuOTEyIDMuMTQyYy4xMDYuMTEzLjI3LjEwNS4zNjYtLjAyYS4zNDMuMzQzIDAgMCAwLS4wMTYtLjQzbC0zLjEwNC0zLjM0N2EuMjQ0LjI0NCAwIDAgMC0uMTg2LS4wOC4yNDUuMjQ1IDAgMCAwLS4xOC4xTDcuNjIyIDguNTM3IDYuMzk0IDcuMDk0YS4yMzIuMjMyIDAgMCAwLS4zNTQtLjAxM2wtNC40IDQuNTZhLjM0My4zNDMgMCAwIDAtLjAyNC40My4yNDMuMjQzIDAgMCAwIC4xOTQuMTAzeiIvPjwvZz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,urlEnabled:!0,uploadEnabled:!0,previewImage:!1,alignmentEnabled:!0,uploadCallback:void 0,inputAccept:"image/gif,image/jpeg,image/jpg,image/png,image/svg",alt:{present:!1,mandatory:!1},defaultSize:{height:"auto",width:"auto"},title:void 0},remove:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNSIgaGVpZ2h0PSIxNSIgdmlld0JveD0iMCAwIDE2IDE2Ij48cGF0aCBkPSJNOC4xIDE0bDYuNC03LjJjLjYtLjcuNi0xLjgtLjEtMi41bC0yLjctMi43Yy0uMy0uNC0uOC0uNi0xLjMtLjZIOC42Yy0uNSAwLTEgLjItMS40LjZMLjUgOS4yYy0uNi43LS42IDEuOS4xIDIuNWwyLjcgMi43Yy4zLjQuOC42IDEuMy42SDE2di0xSDguMXptLTEuMy0uMXMwLS4xIDAgMGwtMi43LTIuN2MtLjQtLjQtLjQtLjkgMC0xLjNMNy41IDZoLTFsLTMgMy4zYy0uNi43LS42IDEuNy4xIDIuNEw1LjkgMTRINC42Yy0uMiAwLS40LS4xLS42LS4yTDEuMiAxMWMtLjMtLjMtLjMtLjggMC0xLjFMNC43IDZoMS44TDEwIDJoMUw3LjUgNmwzLjEgMy43LTMuNSA0Yy0uMS4xLS4yLjEtLjMuMnoiLz48L3N2Zz4=",className:void 0,component:void 0,title:void 0},history:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["undo","redo"],undo:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcgMTQuODc1YzIuNjcyIDAgNC44NDYtMi4xNDUgNC44NDYtNC43ODEgMC0yLjYzNy0yLjE3NC00Ljc4MS00Ljg0Ni00Ljc4MVY4LjVMMS42MTUgNC4yNSA3IDB2My4xODhjMy44NiAwIDcgMy4wOTggNyA2LjkwNlMxMC44NiAxNyA3IDE3cy03LTMuMDk4LTctNi45MDZoMi4xNTRjMCAyLjYzNiAyLjE3NCA0Ljc4MSA0Ljg0NiA0Ljc4MXoiIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==",className:void 0,title:void 0},redo:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNTA0IDEzLjk3N2E0LjQ5NyA0LjQ5NyAwIDAgMS00LjQ5Mi00LjQ5MiA0LjQ5NyA0LjQ5NyAwIDAgMSA0LjQ5Mi00LjQ5M3YyLjk5NWw0Ljk5LTMuOTkzTDYuNTA0IDB2Mi45OTVhNi40OTYgNi40OTYgMCAwIDAtNi40ODggNi40OWMwIDMuNTc4IDIuOTEgNi40OSA2LjQ4OCA2LjQ5YTYuNDk2IDYuNDk2IDAgMCAwIDYuNDg3LTYuNDloLTEuOTk2YTQuNDk3IDQuNDk3IDAgMCAxLTQuNDkxIDQuNDkyeiIgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+",className:void 0,title:void 0},title:void 0}},Uo={en:{"generic.add":"Add","generic.cancel":"Cancel","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Block Type","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Color Picker","components.controls.colorpicker.text":"Text","components.controls.colorpicker.background":"Highlight","components.controls.embedded.embedded":"Embedded","components.controls.embedded.embeddedlink":"Embedded Link","components.controls.embedded.enterlink":"Enter link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Font","components.controls.fontsize.fontsize":"Font Size","components.controls.history.history":"History","components.controls.history.undo":"Undo","components.controls.history.redo":"Redo","components.controls.image.image":"Image","components.controls.image.fileUpload":"File Upload","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop the file or click to upload","components.controls.inline.bold":"Bold","components.controls.inline.italic":"Italic","components.controls.inline.underline":"Underline","components.controls.inline.strikethrough":"Strikethrough","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Superscript","components.controls.inline.subscript":"Subscript","components.controls.link.linkTitle":"Link Title","components.controls.link.linkTarget":"Link Target","components.controls.link.linkTargetOption":"Open link in new window","components.controls.link.link":"Link","components.controls.link.unlink":"Unlink","components.controls.list.list":"List","components.controls.list.unordered":"Unordered","components.controls.list.ordered":"Ordered","components.controls.list.indent":"Indent","components.controls.list.outdent":"Outdent","components.controls.remove.remove":"Remove","components.controls.textalign.textalign":"Text Align","components.controls.textalign.left":"Left","components.controls.textalign.center":"Center","components.controls.textalign.right":"Right","components.controls.textalign.justify":"Justify"},fr:{"generic.add":"Ok","generic.cancel":"Annuler","components.controls.blocktype.h1":"Titre 1","components.controls.blocktype.h2":"Titre 2","components.controls.blocktype.h3":"Titre 3","components.controls.blocktype.h4":"Titre 4","components.controls.blocktype.h5":"Titre 5","components.controls.blocktype.h6":"Titre 6","components.controls.blocktype.blockquote":"Citation","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Type bloc","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Palette de couleur","components.controls.colorpicker.text":"Texte","components.controls.colorpicker.background":"Fond","components.controls.embedded.embedded":"Embedded","components.controls.embedded.embeddedlink":"Lien iFrame","components.controls.embedded.enterlink":"Entrer le lien","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Police","components.controls.fontsize.fontsize":"Taille de police","components.controls.history.history":"Historique","components.controls.history.undo":"Précédent","components.controls.history.redo":"Suivant","components.controls.image.image":"Image","components.controls.image.fileUpload":"Téléchargement","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Glisser une image ou cliquer pour télécharger","components.controls.inline.bold":"Gras","components.controls.inline.italic":"Italique","components.controls.inline.underline":"Souligner","components.controls.inline.strikethrough":"Barrer","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Exposant","components.controls.inline.subscript":"Indice","components.controls.link.linkTitle":"Titre du lien","components.controls.link.linkTarget":"Cible du lien","components.controls.link.linkTargetOption":"Ouvrir le lien dans une nouvelle fenêtre","components.controls.link.link":"Lier","components.controls.link.unlink":"Délier","components.controls.list.list":"Liste","components.controls.list.unordered":"Désordonnée","components.controls.list.ordered":"Ordonnée","components.controls.list.indent":"Augmenter le retrait","components.controls.list.outdent":"Diminuer le retrait","components.controls.remove.remove":"Supprimer","components.controls.textalign.textalign":"Alignement du texte","components.controls.textalign.left":"Gauche","components.controls.textalign.center":"Centre","components.controls.textalign.right":"Droite","components.controls.textalign.justify":"Justifier"},zh:{"generic.add":"添加","generic.cancel":"取消","components.controls.blocktype.h1":"标题1","components.controls.blocktype.h2":"标题2","components.controls.blocktype.h3":"标题3","components.controls.blocktype.h4":"标题4","components.controls.blocktype.h5":"标题5","components.controls.blocktype.h6":"标题6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"源码","components.controls.blocktype.blocktype":"样式","components.controls.blocktype.normal":"正文","components.controls.colorpicker.colorpicker":"选色器","components.controls.colorpicker.text":"文字","components.controls.colorpicker.background":"背景","components.controls.embedded.embedded":"内嵌","components.controls.embedded.embeddedlink":"内嵌网页","components.controls.embedded.enterlink":"输入网页地址","components.controls.emoji.emoji":"表情符号","components.controls.fontfamily.fontfamily":"字体","components.controls.fontsize.fontsize":"字号","components.controls.history.history":"历史","components.controls.history.undo":"撤销","components.controls.history.redo":"恢复","components.controls.image.image":"图片","components.controls.image.fileUpload":"来自文件","components.controls.image.byURL":"在线图片","components.controls.image.dropFileText":"点击或者拖拽文件上传","components.controls.inline.bold":"粗体","components.controls.inline.italic":"斜体","components.controls.inline.underline":"下划线","components.controls.inline.strikethrough":"删除线","components.controls.inline.monospace":"等宽字体","components.controls.inline.superscript":"上标","components.controls.inline.subscript":"下标","components.controls.link.linkTitle":"超链接","components.controls.link.linkTarget":"输入链接地址","components.controls.link.linkTargetOption":"在新窗口中打开链接","components.controls.link.link":"链接","components.controls.link.unlink":"删除链接","components.controls.list.list":"列表","components.controls.list.unordered":"项目符号","components.controls.list.ordered":"编号","components.controls.list.indent":"增加缩进量","components.controls.list.outdent":"减少缩进量","components.controls.remove.remove":"清除格式","components.controls.textalign.textalign":"文本对齐","components.controls.textalign.left":"文本左对齐","components.controls.textalign.center":"居中","components.controls.textalign.right":"文本右对齐","components.controls.textalign.justify":"两端对齐"},ru:{"generic.add":"Добавить","generic.cancel":"Отменить","components.controls.blocktype.h1":"Заголовок 1","components.controls.blocktype.h2":"Заголовок 2","components.controls.blocktype.h3":"Заголовок 3","components.controls.blocktype.h4":"Заголовок 4","components.controls.blocktype.h5":"Заголовок 5","components.controls.blocktype.h6":"Заголовок 6","components.controls.blocktype.blockquote":"Цитата","components.controls.blocktype.code":"Код","components.controls.blocktype.blocktype":"Форматирование","components.controls.blocktype.normal":"Обычный","components.controls.colorpicker.colorpicker":"Выбор цвета","components.controls.colorpicker.text":"Текст","components.controls.colorpicker.background":"Фон","components.controls.embedded.embedded":"Встраивание","components.controls.embedded.embeddedlink":"Ссылка в iFrame","components.controls.embedded.enterlink":"Вставьте ссылку","components.controls.emoji.emoji":"Эмодзи","components.controls.fontfamily.fontfamily":"Шрифт","components.controls.fontsize.fontsize":"Размер шрифта","components.controls.history.history":"История","components.controls.history.undo":"Отменить","components.controls.history.redo":"Вернуть","components.controls.image.image":"Изображение","components.controls.image.fileUpload":"Файлы","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Переместите в эту область файлы или кликните для загрузки","components.controls.inline.bold":"Жирный","components.controls.inline.italic":"Курсив","components.controls.inline.underline":"Подчеркивание","components.controls.inline.strikethrough":"Зачеркивание","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Верхний индекс","components.controls.inline.subscript":"Нижний индекс","components.controls.link.linkTitle":"Текст","components.controls.link.linkTarget":"Адрес ссылки","components.controls.link.linkTargetOption":"Открывать в новом окне","components.controls.link.link":"Ссылка","components.controls.link.unlink":"Убрать ссылку","components.controls.list.list":"Список","components.controls.list.unordered":"Неупорядоченный","components.controls.list.ordered":"Упорядоченный","components.controls.list.indent":"Отступ","components.controls.list.outdent":"Выступ","components.controls.remove.remove":"Удалить","components.controls.textalign.textalign":"Выравнивание текста","components.controls.textalign.left":"Слева","components.controls.textalign.center":"По центру","components.controls.textalign.right":"Справа","components.controls.textalign.justify":"Выравнить"},pt:{"generic.add":"Ok","generic.cancel":"Cancelar","components.controls.blocktype.h1":"Título 1","components.controls.blocktype.h2":"Título 2","components.controls.blocktype.h3":"Título 3","components.controls.blocktype.h4":"Título 4","components.controls.blocktype.h5":"Título 5","components.controls.blocktype.h6":"Título 6","components.controls.blocktype.blockquote":"Citação","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Estilo","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Paleta de cores","components.controls.colorpicker.text":"Texto","components.controls.colorpicker.background":"Fundo","components.controls.embedded.embedded":"Embarcado","components.controls.embedded.embeddedlink":"Link embarcado","components.controls.embedded.enterlink":"Coloque o link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fonte","components.controls.fontsize.fontsize":"Tamanho da Fonte","components.controls.history.history":"Histórico","components.controls.history.undo":"Desfazer","components.controls.history.redo":"Refazer","components.controls.image.image":"Imagem","components.controls.image.fileUpload":"Carregar arquivo","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Arraste uma imagem aqui ou clique para carregar","components.controls.inline.bold":"Negrito","components.controls.inline.italic":"Itálico","components.controls.inline.underline":"Sublinhado","components.controls.inline.strikethrough":"Strikethrough","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Sobrescrito","components.controls.inline.subscript":"Subscrito","components.controls.link.linkTitle":"Título do link","components.controls.link.linkTarget":"Alvo do link","components.controls.link.linkTargetOption":"Abrir link em outra janela","components.controls.link.link":"Adicionar Link","components.controls.link.unlink":"Remover link","components.controls.list.list":"Lista","components.controls.list.unordered":"Sem ordenção","components.controls.list.ordered":"Ordenada","components.controls.list.indent":"Aumentar recuo","components.controls.list.outdent":"Diminuir recuo","components.controls.remove.remove":"Remover","components.controls.textalign.textalign":"Alinhamento do texto","components.controls.textalign.left":"À Esquerda","components.controls.textalign.center":"Centralizado","components.controls.textalign.right":"À Direita","components.controls.textalign.justify":"Justificado"},ko:{"generic.add":"입력","generic.cancel":"취소","components.controls.blocktype.h1":"제목1","components.controls.blocktype.h2":"제목2","components.controls.blocktype.h3":"제목3","components.controls.blocktype.h4":"제목4","components.controls.blocktype.h5":"제목5","components.controls.blocktype.h6":"제목6","components.controls.blocktype.blockquote":"인용","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"블록","components.controls.blocktype.normal":"표준","components.controls.colorpicker.colorpicker":"색상 선택","components.controls.colorpicker.text":"글꼴색","components.controls.colorpicker.background":"배경색","components.controls.embedded.embedded":"임베드","components.controls.embedded.embeddedlink":"임베드 링크","components.controls.embedded.enterlink":"주소를 입력하세요","components.controls.emoji.emoji":"이모지","components.controls.fontfamily.fontfamily":"글꼴","components.controls.fontsize.fontsize":"글꼴 크기","components.controls.history.history":"히스토리","components.controls.history.undo":"실행 취소","components.controls.history.redo":"다시 실행","components.controls.image.image":"이미지","components.controls.image.fileUpload":"파일 업로드","components.controls.image.byURL":"주소","components.controls.image.dropFileText":"클릭하거나 파일을 드롭하여 업로드하세요","components.controls.inline.bold":"굵게","components.controls.inline.italic":"기울임꼴","components.controls.inline.underline":"밑줄","components.controls.inline.strikethrough":"취소선","components.controls.inline.monospace":"고정 너비","components.controls.inline.superscript":"위 첨자","components.controls.inline.subscript":"아래 첨자","components.controls.link.linkTitle":"링크 제목","components.controls.link.linkTarget":"링크 타겟","components.controls.link.linkTargetOption":"새창으로 열기","components.controls.link.link":"링크","components.controls.link.unlink":"링크 제거","components.controls.list.list":"리스트","components.controls.list.unordered":"일반 리스트","components.controls.list.ordered":"순서 리스트","components.controls.list.indent":"들여쓰기","components.controls.list.outdent":"내어쓰기","components.controls.remove.remove":"삭제","components.controls.textalign.textalign":"텍스트 정렬","components.controls.textalign.left":"왼쪽","components.controls.textalign.center":"중앙","components.controls.textalign.right":"오른쪽","components.controls.textalign.justify":"양쪽"},it:{"generic.add":"Aggiungi","generic.cancel":"Annulla","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Citazione","components.controls.blocktype.code":"Codice","components.controls.blocktype.blocktype":"Stili","components.controls.blocktype.normal":"Normale","components.controls.colorpicker.colorpicker":"Colore testo","components.controls.colorpicker.text":"Testo","components.controls.colorpicker.background":"Evidenziazione","components.controls.embedded.embedded":"Incorpora","components.controls.embedded.embeddedlink":"Incorpora link","components.controls.embedded.enterlink":"Inserisci link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Carattere","components.controls.fontsize.fontsize":"Dimensione carattere","components.controls.history.history":"Modifiche","components.controls.history.undo":"Annulla","components.controls.history.redo":"Ripristina","components.controls.image.image":"Immagine","components.controls.image.fileUpload":"Carica immagine","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Trascina il file o clicca per caricare","components.controls.inline.bold":"Grassetto","components.controls.inline.italic":"Corsivo","components.controls.inline.underline":"Sottolineato","components.controls.inline.strikethrough":"Barrato","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Apice","components.controls.inline.subscript":"Pedice","components.controls.link.linkTitle":"Testo","components.controls.link.linkTarget":"Link","components.controls.link.linkTargetOption":"Apri link in una nuova finestra","components.controls.link.link":"Inserisci link","components.controls.link.unlink":"Rimuovi link","components.controls.list.list":"Lista","components.controls.list.unordered":"Elenco puntato","components.controls.list.ordered":"Elenco numerato","components.controls.list.indent":"Indent","components.controls.list.outdent":"Outdent","components.controls.remove.remove":"Rimuovi formattazione","components.controls.textalign.textalign":"Allineamento del testo","components.controls.textalign.left":"Allinea a sinistra","components.controls.textalign.center":"Allinea al centro","components.controls.textalign.right":"Allinea a destra","components.controls.textalign.justify":"Giustifica"},nl:{"generic.add":"Toevoegen","generic.cancel":"Annuleren","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Blocktype","components.controls.blocktype.normal":"Normaal","components.controls.colorpicker.colorpicker":"Kleurkiezer","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Achtergrond","components.controls.embedded.embedded":"Ingevoegd","components.controls.embedded.embeddedlink":"Ingevoegde link","components.controls.embedded.enterlink":"Voeg link toe","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Lettertype","components.controls.fontsize.fontsize":"Lettergrootte","components.controls.history.history":"Geschiedenis","components.controls.history.undo":"Ongedaan maken","components.controls.history.redo":"Opnieuw","components.controls.image.image":"Afbeelding","components.controls.image.fileUpload":"Bestand uploaden","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop het bestand hier of klik om te uploaden","components.controls.inline.bold":"Dikgedrukt","components.controls.inline.italic":"Schuingedrukt","components.controls.inline.underline":"Onderstrepen","components.controls.inline.strikethrough":"Doorstrepen","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Superscript","components.controls.inline.subscript":"Subscript","components.controls.link.linkTitle":"Linktitel","components.controls.link.linkTarget":"Link bestemming","components.controls.link.linkTargetOption":"Open link in een nieuw venster","components.controls.link.link":"Link","components.controls.link.unlink":"Unlink","components.controls.list.list":"Lijst","components.controls.list.unordered":"Ongeordend","components.controls.list.ordered":"Geordend","components.controls.list.indent":"Inspringen","components.controls.list.outdent":"Inspringen verkleinen","components.controls.remove.remove":"Verwijderen","components.controls.textalign.textalign":"Tekst uitlijnen","components.controls.textalign.left":"Links","components.controls.textalign.center":"Gecentreerd","components.controls.textalign.right":"Rechts","components.controls.textalign.justify":"Uitgelijnd"},de:{"generic.add":"Hinzufügen","generic.cancel":"Abbrechen","components.controls.blocktype.h1":"Überschrift 1","components.controls.blocktype.h2":"Überschrift 2","components.controls.blocktype.h3":"Überschrift 3","components.controls.blocktype.h4":"Überschrift 4","components.controls.blocktype.h5":"Überschrift 5","components.controls.blocktype.h6":"Überschrift 6","components.controls.blocktype.blockquote":"Zitat","components.controls.blocktype.code":"Quellcode","components.controls.blocktype.blocktype":"Blocktyp","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Farbauswahl","components.controls.colorpicker.text":"Text","components.controls.colorpicker.background":"Hintergrund","components.controls.embedded.embedded":"Eingebettet","components.controls.embedded.embeddedlink":"Eingebetteter Link","components.controls.embedded.enterlink":"Link eingeben","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Schriftart","components.controls.fontsize.fontsize":"Schriftgröße","components.controls.history.history":"Historie","components.controls.history.undo":"Zurücknehmen","components.controls.history.redo":"Wiederholen","components.controls.image.image":"Bild","components.controls.image.fileUpload":"Datei-Upload","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Dateien ziehen und ablegen, oder klicken zum Hochladen","components.controls.inline.bold":"Fett","components.controls.inline.italic":"Kursiv","components.controls.inline.underline":"Unterstreichen","components.controls.inline.strikethrough":"Durchstreichen","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Hochgestellt","components.controls.inline.subscript":"Tiefgestellt","components.controls.link.linkTitle":"Link-Titel","components.controls.link.linkTarget":"Link-Ziel","components.controls.link.linkTargetOption":"Link in neuem Fenster öffnen","components.controls.link.link":"Link","components.controls.link.unlink":"Aufheben","components.controls.list.list":"Liste","components.controls.list.unordered":"Aufzählung","components.controls.list.ordered":"Nummerierte Liste","components.controls.list.indent":"Einzug vergrößern","components.controls.list.outdent":"Einzug reduzieren","components.controls.remove.remove":"Entfernen","components.controls.textalign.textalign":"Textausrichtung","components.controls.textalign.left":"Linksbündig","components.controls.textalign.center":"Zentrieren","components.controls.textalign.right":"Rechtsbündig","components.controls.textalign.justify":"Blocksatz"},da:{"generic.add":"Tilføj","generic.cancel":"Annuller","components.controls.blocktype.h1":"Overskrift 1","components.controls.blocktype.h2":"Overskrift 2","components.controls.blocktype.h3":"Overskrift 3","components.controls.blocktype.h4":"Overskrift 4","components.controls.blocktype.h5":"Overskrift 5","components.controls.blocktype.h6":"Overskrift 6","components.controls.blocktype.blockquote":"Blokcitat","components.controls.blocktype.code":"Kode","components.controls.blocktype.blocktype":"Blok Type","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Farver","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Baggrund","components.controls.embedded.embedded":"Indlejre","components.controls.embedded.embeddedlink":"Indlejre Link","components.controls.embedded.enterlink":"Indtast link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fonttype","components.controls.fontsize.fontsize":"Fontstørrelser","components.controls.history.history":"Historie","components.controls.history.undo":"Fortryd","components.controls.history.redo":"Gendan","components.controls.image.image":"Billede","components.controls.image.fileUpload":"Filoverførsel","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop filen eller klik for at uploade","components.controls.inline.bold":"Fed","components.controls.inline.italic":"Kursiv","components.controls.inline.underline":"Understrege","components.controls.inline.strikethrough":"Gennemstreget","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Hævet","components.controls.inline.subscript":"Sænket","components.controls.link.linkTitle":"Link Titel","components.controls.link.linkTarget":"Link Mål","components.controls.link.linkTargetOption":"Åbn link i nyt vindue","components.controls.link.link":"Link","components.controls.link.unlink":"Fjern link","components.controls.list.list":"Liste","components.controls.list.unordered":"Uordnet","components.controls.list.ordered":"Ordnet","components.controls.list.indent":"Indrykning","components.controls.list.outdent":"Udrykning","components.controls.remove.remove":"Fjern","components.controls.textalign.textalign":"Tekstjustering","components.controls.textalign.left":"Venstre","components.controls.textalign.center":"Center","components.controls.textalign.right":"Højre","components.controls.textalign.justify":"Margener"},zh_tw:{"generic.add":"新增","generic.cancel":"取消","components.controls.blocktype.h1":"標題1","components.controls.blocktype.h2":"標題2","components.controls.blocktype.h3":"標題3","components.controls.blocktype.h4":"標題4","components.controls.blocktype.h5":"標題5","components.controls.blocktype.h6":"標題6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"程式碼","components.controls.blocktype.blocktype":"樣式","components.controls.blocktype.normal":"正文","components.controls.colorpicker.colorpicker":"選色器","components.controls.colorpicker.text":"文字","components.controls.colorpicker.background":"背景","components.controls.embedded.embedded":"內嵌","components.controls.embedded.embeddedlink":"內嵌網頁","components.controls.embedded.enterlink":"輸入網頁地址","components.controls.emoji.emoji":"表情符號","components.controls.fontfamily.fontfamily":"字體","components.controls.fontsize.fontsize":"字體大小","components.controls.history.history":"歷史紀錄","components.controls.history.undo":"復原","components.controls.history.redo":"重做","components.controls.image.image":"圖片","components.controls.image.fileUpload":"檔案上傳","components.controls.image.byURL":"網址","components.controls.image.dropFileText":"點擊或拖曳檔案上傳","components.controls.inline.bold":"粗體","components.controls.inline.italic":"斜體","components.controls.inline.underline":"底線","components.controls.inline.strikethrough":"刪除線","components.controls.inline.monospace":"等寬字體","components.controls.inline.superscript":"上標","components.controls.inline.subscript":"下標","components.controls.link.linkTitle":"超連結","components.controls.link.linkTarget":"輸入連結位址","components.controls.link.linkTargetOption":"在新視窗打開連結","components.controls.link.link":"連結","components.controls.link.unlink":"刪除連結","components.controls.list.list":"列表","components.controls.list.unordered":"項目符號","components.controls.list.ordered":"編號","components.controls.list.indent":"增加縮排","components.controls.list.outdent":"減少縮排","components.controls.remove.remove":"清除格式","components.controls.textalign.textalign":"文字對齊","components.controls.textalign.left":"文字向左對齊","components.controls.textalign.center":"文字置中","components.controls.textalign.right":"文字向右對齊","components.controls.textalign.justify":"兩端對齊"},pl:{"generic.add":"Dodaj","generic.cancel":"Anuluj","components.controls.blocktype.h1":"Nagłówek 1","components.controls.blocktype.h2":"Nagłówek 2","components.controls.blocktype.h3":"Nagłówek 3","components.controls.blocktype.h4":"Nagłówek 4","components.controls.blocktype.h5":"Nagłówek 5","components.controls.blocktype.h6":"Nagłówek 6","components.controls.blocktype.blockquote":"Cytat","components.controls.blocktype.code":"Kod","components.controls.blocktype.blocktype":"Format","components.controls.blocktype.normal":"Normalny","components.controls.colorpicker.colorpicker":"Kolor","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Tło","components.controls.embedded.embedded":"Osadź","components.controls.embedded.embeddedlink":"Osadź odnośnik","components.controls.embedded.enterlink":"Wprowadź odnośnik","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Krój czcionki","components.controls.fontsize.fontsize":"Rozmiar czcionki","components.controls.history.history":"Historia","components.controls.history.undo":"Cofnij","components.controls.history.redo":"Ponów","components.controls.image.image":"Obrazek","components.controls.image.fileUpload":"Prześlij plik","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Upuść plik lub kliknij, aby przesłać","components.controls.inline.bold":"Pogrubienie","components.controls.inline.italic":"Kursywa","components.controls.inline.underline":"Podkreślenie","components.controls.inline.strikethrough":"Przekreślenie","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Indeks górny","components.controls.inline.subscript":"Indeks dolny","components.controls.link.linkTitle":"Tytuł odnośnika","components.controls.link.linkTarget":"Adres odnośnika","components.controls.link.linkTargetOption":"Otwórz odnośnik w nowej karcie","components.controls.link.link":"Wstaw odnośnik","components.controls.link.unlink":"Usuń odnośnik","components.controls.list.list":"Lista","components.controls.list.unordered":"Lista nieuporządkowana","components.controls.list.ordered":"Lista uporządkowana","components.controls.list.indent":"Zwiększ wcięcie","components.controls.list.outdent":"Zmniejsz wcięcie","components.controls.remove.remove":"Usuń","components.controls.textalign.textalign":"Wyrównaj tekst","components.controls.textalign.left":"Do lewej","components.controls.textalign.center":"Do środka","components.controls.textalign.right":"Do prawej","components.controls.textalign.justify":"Wyjustuj"},es:{"generic.add":"Añadir","generic.cancel":"Cancelar","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Código","components.controls.blocktype.blocktype":"Tipo de bloque","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Seleccionar color","components.controls.colorpicker.text":"Texto","components.controls.colorpicker.background":"Subrayado","components.controls.embedded.embedded":"Adjuntar","components.controls.embedded.embeddedlink":"Adjuntar Link","components.controls.embedded.enterlink":"Introducir link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fuente","components.controls.fontsize.fontsize":"Tamaño de fuente","components.controls.history.history":"Histórico","components.controls.history.undo":"Deshacer","components.controls.history.redo":"Rehacer","components.controls.image.image":"Imagen","components.controls.image.fileUpload":"Subir archivo","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Arrastra el archivo o haz click para subirlo","components.controls.inline.bold":"Negrita","components.controls.inline.italic":"Cursiva","components.controls.inline.underline":"Subrayado","components.controls.inline.strikethrough":"Tachado","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Sobreíndice","components.controls.inline.subscript":"Subíndice","components.controls.link.linkTitle":"Título del enlace","components.controls.link.linkTarget":"Objetivo del enlace","components.controls.link.linkTargetOption":"Abrir en nueva ventana","components.controls.link.link":"Enlazar","components.controls.link.unlink":"Desenlazar","components.controls.list.list":"Lista","components.controls.list.unordered":"Desordenada","components.controls.list.ordered":"Ordenada","components.controls.list.indent":"Indentada","components.controls.list.outdent":"Dentada","components.controls.remove.remove":"Eliminar","components.controls.textalign.textalign":"Alineación del texto","components.controls.textalign.left":"Izquierda","components.controls.textalign.center":"Centrado","components.controls.textalign.right":"Derecha","components.controls.textalign.justify":"Justificado"},ja:{"generic.add":"追加","generic.cancel":"キャンセル","components.controls.blocktype.h1":"見出し1","components.controls.blocktype.h2":"見出し2","components.controls.blocktype.h3":"見出し3","components.controls.blocktype.h4":"見出し4","components.controls.blocktype.h5":"見出し5","components.controls.blocktype.h6":"見出し6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"コード","components.controls.blocktype.blocktype":"スタイル","components.controls.blocktype.normal":"標準テキスト","components.controls.colorpicker.colorpicker":"テキストの色","components.controls.colorpicker.text":"テキスト","components.controls.colorpicker.background":"ハイライト","components.controls.embedded.embedded":"埋め込み","components.controls.embedded.embeddedlink":"埋め込みリンク","components.controls.embedded.enterlink":"リンクを入力してください","components.controls.emoji.emoji":"絵文字","components.controls.fontfamily.fontfamily":"フォント","components.controls.fontsize.fontsize":"フォントサイズ","components.controls.history.history":"履歴","components.controls.history.undo":"元に戻す","components.controls.history.redo":"やり直し","components.controls.image.image":"画像","components.controls.image.fileUpload":"ファイルをアップロード","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"ここに画像をドラッグするか、クリックしてください","components.controls.inline.bold":"太字","components.controls.inline.italic":"斜体","components.controls.inline.underline":"下線","components.controls.inline.strikethrough":"取り消し線","components.controls.inline.monospace":"等幅フォント","components.controls.inline.superscript":"上付き文字","components.controls.inline.subscript":"下付き文字","components.controls.link.linkTitle":"リンクタイトル","components.controls.link.linkTarget":"リンク対象","components.controls.link.linkTargetOption":"新しいウィンドウで開く","components.controls.link.link":"リンク","components.controls.link.unlink":"リンクを解除","components.controls.list.list":"リスト","components.controls.list.unordered":"箇条書き","components.controls.list.ordered":"番号付き","components.controls.list.indent":"インデント増","components.controls.list.outdent":"インデント減","components.controls.remove.remove":"書式をクリア","components.controls.textalign.textalign":"整列","components.controls.textalign.left":"左揃え","components.controls.textalign.center":"中央揃え","components.controls.textalign.right":"右揃え","components.controls.textalign.justify":"両端揃え"}};n(38),n(39);function Yo(e){return(Yo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Fo(){return(Fo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function Ro(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,o)}return n}function Bo(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ro(Object(n),!0).forEach(function(e){Qo(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ro(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Qo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ho(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function Zo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Wo(e,t){return!t||"object"!==Yo(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Go(e){return(Go=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Jo(e,t){return(Jo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Vo=function(){function r(e){var a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(a=Wo(this,Go(r).call(this,e))).onEditorBlur=function(){a.setState({editorFocused:!1})},a.onEditorFocus=function(e){var t=a.props.onFocus;a.setState({editorFocused:!0});var n=a.focusHandler.isEditorFocused();t&&n&&t(e)},a.onEditorMouseDown=function(){a.focusHandler.onEditorMouseDown()},a.keyBindingFn=function(e){if("Tab"!==e.key)return"ArrowUp"!==e.key&&"ArrowDown"!==e.key||s()&&e.preventDefault(),Object(E.getDefaultKeyBinding)(e);var t=a.props.onTab;if(!t||!t(e)){var n=Object(C.changeDepth)(a.state.editorState,e.shiftKey?-1:1,4);n&&n!==a.state.editorState&&(a.onChange(n),e.preventDefault())}return null},a.onToolbarFocus=function(e){var t=a.props.onFocus;t&&a.focusHandler.isToolbarFocused()&&t(e)},a.onWrapperBlur=function(e){var t=a.props.onBlur;t&&a.focusHandler.isEditorBlur(e)&&t(e,a.getEditorState())},a.onChange=function(e){var t=a.props,n=t.readOnly,o=t.onEditorStateChange;n||"atomic"===Object(C.getSelectedBlocksType)(e)&&e.getSelection().isCollapsed||(o&&o(e,a.props.wrapperId),p(a.props,"editorState")?a.afterChange(e):a.setState({editorState:e},a.afterChange(e)))},a.setWrapperReference=function(e){a.wrapper=e},a.setEditorReference=function(e){a.props.editorRef&&a.props.editorRef(e),a.editor=e},a.getCompositeDecorator=function(e){var t=[].concat(Ho(a.props.customDecorators),[{strategy:fo,component:go({showOpenOptionOnHover:e.link.showOpenOptionOnHover})}]);return a.props.mention&&t.push.apply(t,Ho(Lo(Bo({},a.props.mention,{onChange:a.onChange,getEditorState:a.getEditorState,getSuggestions:a.getSuggestions,getWrapperRef:a.getWrapperRef,modalHandler:a.modalHandler})))),a.props.hashtag&&t.push(vo(a.props.hashtag)),new E.CompositeDecorator(t)},a.getWrapperRef=function(){return a.wrapper},a.getEditorState=function(){return a.state?a.state.editorState:null},a.getSuggestions=function(){return a.props.mention&&a.props.mention.suggestions},a.afterChange=function(o){setTimeout(function(){var e=a.props,t=e.onChange,n=e.onContentStateChange;t&&t(Object(E.convertToRaw)(o.getCurrentContent())),n&&n(Object(E.convertToRaw)(o.getCurrentContent()))})},a.isReadOnly=function(){return a.props.readOnly},a.isImageAlignmentEnabled=function(){return a.state.toolbar.image.alignmentEnabled},a.createEditorState=function(e){var t;if(p(a.props,"editorState"))a.props.editorState&&(t=E.EditorState.set(a.props.editorState,{decorator:e}));else if(p(a.props,"defaultEditorState"))a.props.defaultEditorState&&(t=E.EditorState.set(a.props.defaultEditorState,{decorator:e}));else if(p(a.props,"contentState")){if(a.props.contentState){var n=Object(E.convertFromRaw)(a.props.contentState);t=E.EditorState.createWithContent(n,e),t=E.EditorState.moveSelectionToEnd(t)}}else if(p(a.props,"defaultContentState")||p(a.props,"initialContentState")){var o=a.props.defaultContentState||a.props.initialContentState;o&&(o=Object(E.convertFromRaw)(o),t=E.EditorState.createWithContent(o,e),t=E.EditorState.moveSelectionToEnd(t))}return t=t||E.EditorState.createEmpty(e)},a.filterEditorProps=function(e){return t=e,n=["onChange","onEditorStateChange","onContentStateChange","initialContentState","defaultContentState","contentState","editorState","defaultEditorState","locale","localization","toolbarOnFocus","toolbar","toolbarCustomButtons","toolbarClassName","editorClassName","toolbarHidden","wrapperClassName","toolbarStyle","editorStyle","wrapperStyle","uploadCallback","onFocus","onBlur","onTab","mention","hashtag","ariaLabel","customBlockRenderFunc","customDecorators","handlePastedText","customStyleMap"],o=Object.keys(t).filter(function(e){return n.indexOf(e)<0}),r={},o&&0<o.length&&o.forEach(function(e){r[e]=t[e]}),r;var t,n,o,r},a.getStyleMap=function(e){return Bo({},Object(C.getCustomStyleMap)(),{},e.customStyleMap)},a.changeEditorState=function(e){var t=Object(E.convertFromRaw)(e),n=a.state.editorState;return n=E.EditorState.push(n,t,"insert-characters"),n=E.EditorState.moveSelectionToEnd(n)},a.focusEditor=function(){setTimeout(function(){a.editor.focus()})},a.handleKeyCommand=function(e){var t=a.state,n=t.editorState,o=t.toolbar.inline;if(o&&0<=o.options.indexOf(e)){var r=E.RichUtils.handleKeyCommand(n,e);if(r)return a.onChange(r),!0}return!1},a.handleReturn=function(e){if(s())return!0;var t=a.state.editorState,n=Object(C.handleNewLine)(t,e);return!!n&&(a.onChange(n),!0)},a.handlePastedTextFn=function(e,t){var n=a.state.editorState,o=a.props,r=o.handlePastedText,i=o.stripPastedStyles;return r?r(e,t,n,a.onChange):!i&&function(e,t,n,o){var r=Object(C.getSelectedBlock)(n);if(r&&"code"===r.type){var i=E.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());return o(E.EditorState.push(n,i,"insert-characters")),!0}if(t){var a=j()(t),c=n.getCurrentContent();return a.entityMap.forEach(function(e,t){c=c.mergeEntityData(t,e)}),c=E.Modifier.replaceWithFragment(c,n.getSelection(),new N.List(a.contentBlocks)),o(E.EditorState.push(n,c,"insert-characters")),!0}return!1}(e,t,n,a.onChange)},a.preventDefault=function(e){"INPUT"===e.target.tagName||"LABEL"===e.target.tagName||"TEXTAREA"===e.target.tagName?a.focusHandler.onInputMouseDown():e.preventDefault()};var t=M(Po,e.toolbar),n=e.wrapperId?e.wrapperId:Math.floor(1e4*Math.random());a.wrapperId="rdw-wrapper-".concat(n),a.modalHandler=new i,a.focusHandler=new c,a.blockRendererFn=_o({isReadOnly:a.isReadOnly,isImageAlignmentEnabled:a.isImageAlignmentEnabled,getEditorState:a.getEditorState,onChange:a.onChange},e.customBlockRenderFunc),a.editorProps=a.filterEditorProps(e),a.customStyleMap=a.getStyleMap(e),a.compositeDecorator=a.getCompositeDecorator(t);var o=a.createEditorState(a.compositeDecorator);return Object(C.extractInlineStyle)(o),a.state={editorState:o,editorFocused:!1,toolbar:t},a}var e,t,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jo(e,t)}(r,m["Component"]),e=r,(t=[{key:"componentDidMount",value:function(){this.modalHandler.init(this.wrapperId)}},{key:"componentDidUpdate",value:function(e){if(e!==this.props){var t={},n=this.props,o=n.editorState,r=n.contentState;if(!this.state.toolbar){var i=M(Po,i);t.toolbar=i}if(p(this.props,"editorState")&&o!==e.editorState)t.editorState=o?E.EditorState.set(o,{decorator:this.compositeDecorator}):E.EditorState.createEmpty(this.compositeDecorator);else if(p(this.props,"contentState")&&r!==e.contentState)if(r){var a=this.changeEditorState(r);a&&(t.editorState=a)}else t.editorState=E.EditorState.createEmpty(this.compositeDecorator);e.editorState===o&&e.contentState===r||Object(C.extractInlineStyle)(t.editorState),Object.keys(t).length&&this.setState(t),this.editorProps=this.filterEditorProps(this.props),this.customStyleMap=this.getStyleMap(this.props)}}},{key:"render",value:function(){var e=this.state,t=e.editorState,n=e.editorFocused,r=e.toolbar,o=this.props,i=o.locale,a=o.localization,c=a.locale,l=a.translations,s=o.toolbarCustomButtons,u=o.toolbarOnFocus,p=o.toolbarClassName,d=o.toolbarHidden,m=o.editorClassName,f=o.wrapperClassName,g=o.toolbarStyle,y=o.editorStyle,h=o.wrapperStyle,M=o.uploadCallback,b=o.ariaLabel,j={modalHandler:this.modalHandler,editorState:t,onChange:this.onChange,translations:Bo({},Uo[i||c],{},l)},N=n||this.focusHandler.isInputFocused()||!u;return S.a.createElement("div",{id:this.wrapperId,className:L()(f,"rdw-editor-wrapper"),style:h,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur,"aria-label":"rdw-wrapper"},!d&&S.a.createElement("div",{className:L()("rdw-editor-toolbar",p),style:Bo({visibility:N?"visible":"hidden"},g),onMouseDown:this.preventDefault,"aria-label":"rdw-toolbar","aria-hidden":(!n&&u).toString(),onFocus:this.onToolbarFocus},r.options.map(function(e,t){var n=ro[e],o=r[e];return"image"===e&&M&&(o.uploadCallback=M),S.a.createElement(n,Fo({key:t},j,{config:o}))}),s&&s.map(function(e,t){return S.a.cloneElement(e,Bo({key:t},j))})),S.a.createElement("div",{ref:this.setWrapperReference,className:L()(m,"rdw-editor-main"),style:y,onClick:this.focusEditor,onFocus:this.onEditorFocus,onBlur:this.onEditorBlur,onKeyDown:k.onKeyDown,onMouseDown:this.onEditorMouseDown},S.a.createElement(E.Editor,Fo({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:t,onChange:this.onChange,blockStyleFn:D,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,handlePastedText:this.handlePastedTextFn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,ariaLabel:b||"rdw-editor",blockRenderMap:C.blockRenderMap},this.editorProps))))}}])&&Zo(e.prototype,t),n&&Zo(e,n),r}();Vo.propTypes={onChange:f.a.func,onEditorStateChange:f.a.func,onContentStateChange:f.a.func,initialContentState:f.a.object,defaultContentState:f.a.object,contentState:f.a.object,editorState:f.a.object,defaultEditorState:f.a.object,toolbarOnFocus:f.a.bool,spellCheck:f.a.bool,stripPastedStyles:f.a.bool,toolbar:f.a.object,toolbarCustomButtons:f.a.array,toolbarClassName:f.a.string,toolbarHidden:f.a.bool,locale:f.a.string,localization:f.a.object,editorClassName:f.a.string,wrapperClassName:f.a.string,toolbarStyle:f.a.object,editorStyle:f.a.object,wrapperStyle:f.a.object,uploadCallback:f.a.func,onFocus:f.a.func,onBlur:f.a.func,onTab:f.a.func,mention:f.a.object,hashtag:f.a.object,textAlignment:f.a.string,readOnly:f.a.bool,tabIndex:f.a.number,placeholder:f.a.string,ariaLabel:f.a.string,ariaOwneeID:f.a.string,ariaActiveDescendantID:f.a.string,ariaAutoComplete:f.a.string,ariaDescribedBy:f.a.string,ariaExpanded:f.a.string,ariaHasPopup:f.a.string,customBlockRenderFunc:f.a.func,wrapperId:f.a.number,customDecorators:f.a.array,editorRef:f.a.func,handlePastedText:f.a.func},Vo.defaultProps={toolbarOnFocus:!1,toolbarHidden:!1,stripPastedStyles:!1,localization:{locale:"en",translations:{}},customDecorators:[]};var qo=Vo;n.d(t,"Editor",function(){return qo})}],i.c=c,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=8);function i(e){if(c[e])return c[e].exports;var t=c[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}var a,c}); |
{
"name": "react-draft-wysiwyg",
"version": "1.14.5",
"description": "A wysiwyg on top of DraftJS.",
"main": "dist/react-draft-wysiwyg.js",
"repository": {
"type": "git",
"url": "https://github.com/jpuri/react-draft-wysiwyg.git"
},
"author": "Jyoti Puri",
"devDependencies": {
"@babel/core": "^7.7.4",
"@babel/preset-env": "^7.7.4",
"@babel/preset-react": "^7.7.4",
"@babel/register": "^7.7.4",
"@storybook/react": "^5.2.8",
"autoprefixer": "^9.7.3",
"babel-eslint": "^10.0.3",
"babel-loader": "^8.0.6",
"babel-plugin-transform-flow-strip-types": "^6.22.0",
"chai": "^4.2.0",
"cross-env": "^6.0.3",
"css-loader": "^3.2.1",
"draft-js": "^0.11.2",
"draftjs-to-html": "^0.9.0",
"draftjs-to-markdown": "^0.6.0",
"embed-video": "^2.0.4",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.15.1",
"eslint": "^6.7.2",
"eslint-config-airbnb": "^18.0.1",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-mocha": "^6.2.2",
"eslint-plugin-react": "^7.17.0",
"file-loader": "^5.0.2",
"flow-bin": "^0.113.0",
"immutable": "^4.0.0-rc.12",
"jsdom": "^15.2.1",
"mini-css-extract-plugin": "^0.8.0",
"mocha": "^6.2.2",
"postcss-loader": "^3.0.0",
"precss": "^4.0.0",
"react": "^16.12.0",
"react-addons-test-utils": "^15.6.2",
"react-dom": "^16.12.0",
"react-test-renderer": "^16.12.0",
"rimraf": "^3.0.0",
"sinon": "^7.5.0",
"style-loader": "^1.0.1",
"uglifyjs-webpack-plugin": "^2.2.0",
"url-loader": "^3.0.0",
"webpack": "^4.41.2",
"webpack-bundle-analyzer": "^3.6.0",
"webpack-cli": "^3.3.10"
},
"dependencies": {
"classnames": "^2.2.6",
"draftjs-utils": "^0.10.2",
"html-to-draftjs": "^1.5.0",
"linkify-it": "^2.2.0",
"prop-types": "^15.7.2"
},
"peerDependencies": {
"draft-js": "^0.10.x || ^0.11.x",
"immutable": "3.x.x || 4.x.x",
"react": "0.13.x || 0.14.x || ^15.0.0-0 || 15.x.x || ^16.0.0-0 || ^16.x.x",
"react-dom": "0.13.x || 0.14.x || ^15.0.0-0 || 15.x.x || ^16.0.0-0 || ^16.x.x"
},
"scripts": {
"clean": "rimraf dist",
"build:webpack": "cross-env NODE_ENV=production webpack --mode production --config config/webpack.config.js",
"build": "npm run clean && npm run build:webpack",
"test": "cross-env BABEL_ENV=test mocha --require config/test-compiler.js config/test-setup.js src/**/*Test.js",
"lint": "eslint src",
"lintdocs": "eslint docs/src",
"flow": "flow; test $? -eq 0 -o $? -eq 2",
"check": "npm run lint && npm run flow",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
},
"license": "MIT"
}
| {
"name": "react-draft-wysiwyg",
"version": "1.14.6",
"description": "A wysiwyg on top of DraftJS.",
"main": "dist/react-draft-wysiwyg.js",
"repository": {
"type": "git",
"url": "https://github.com/jpuri/react-draft-wysiwyg.git"
},
"author": "Jyoti Puri",
"devDependencies": {
"@babel/core": "^7.7.4",
"@babel/preset-env": "^7.7.4",
"@babel/preset-react": "^7.7.4",
"@babel/register": "^7.7.4",
"@storybook/react": "^5.2.8",
"autoprefixer": "^9.7.3",
"babel-eslint": "^10.0.3",
"babel-loader": "^8.0.6",
"babel-plugin-transform-flow-strip-types": "^6.22.0",
"chai": "^4.2.0",
"cross-env": "^6.0.3",
"css-loader": "^3.2.1",
"draft-js": "^0.11.2",
"draftjs-to-html": "^0.9.0",
"draftjs-to-markdown": "^0.6.0",
"embed-video": "^2.0.4",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.15.1",
"eslint": "^6.7.2",
"eslint-config-airbnb": "^18.0.1",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-mocha": "^6.2.2",
"eslint-plugin-react": "^7.17.0",
"file-loader": "^5.0.2",
"flow-bin": "^0.113.0",
"immutable": "^4.0.0-rc.12",
"jsdom": "^15.2.1",
"mini-css-extract-plugin": "^0.8.0",
"mocha": "^6.2.2",
"postcss-loader": "^3.0.0",
"precss": "^4.0.0",
"react": "^16.12.0",
"react-addons-test-utils": "^15.6.2",
"react-dom": "^16.12.0",
"react-test-renderer": "^16.12.0",
"rimraf": "^3.0.0",
"sinon": "^7.5.0",
"style-loader": "^1.0.1",
"uglifyjs-webpack-plugin": "^2.2.0",
"url-loader": "^3.0.0",
"webpack": "^4.41.2",
"webpack-bundle-analyzer": "^3.6.0",
"webpack-cli": "^3.3.10"
},
"dependencies": {
"classnames": "^2.2.6",
"draftjs-utils": "^0.10.2",
"html-to-draftjs": "^1.5.0",
"linkify-it": "^2.2.0",
"prop-types": "^15.7.2"
},
"peerDependencies": {
"draft-js": "^0.10.x || ^0.11.x",
"immutable": "3.x.x || 4.x.x",
"react": "0.13.x || 0.14.x || ^15.0.0-0 || 15.x.x || ^16.0.0-0 || ^16.x.x",
"react-dom": "0.13.x || 0.14.x || ^15.0.0-0 || 15.x.x || ^16.0.0-0 || ^16.x.x"
},
"scripts": {
"clean": "rimraf dist",
"build:webpack": "cross-env NODE_ENV=production webpack --mode production --config config/webpack.config.js",
"build": "npm run clean && npm run build:webpack",
"test": "cross-env BABEL_ENV=test mocha --require config/test-compiler.js config/test-setup.js src/**/*Test.js",
"lint": "eslint src",
"lintdocs": "eslint docs/src",
"flow": "flow; test $? -eq 0 -o $? -eq 2",
"check": "npm run lint && npm run flow",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
},
"license": "MIT"
}
|
{
"extends": ["plugin:react/recommended", "prettier", "prettier/react"],
"env": {
"browser": true,
"es6": true
},
"parser": "babel-eslint",
"rules": {
"react/display-name": 0,
"react/prop-types": 1,
"react/no-find-dom-node": 1,
"react/no-string-refs": 1
}
}
| {
"extends": ["plugin:react/recommended", "prettier", "prettier/react"],
"env": {
"browser": true,
"es6": true
},
"parser": "babel-eslint",
"rules": {
"react/display-name": 0,
"react/prop-types": 1,
"react/no-find-dom-node": 1,
"react/no-string-refs": 1,
"react/no-danger": 2
}
}
|
import PropTypes from 'prop-types';
import React from 'react';
import PhoneNumberInput from '../../ui/input/phone_number_input';
// import LocationInput from '../../ui/input/location_input';
import SelectInput from '../../ui/input/select_input';
import { startOptionSelection } from '../actions';
import * as c from '../index';
import * as l from '../../core/index';
import { swap, updateEntity } from '../../store/index';
import { humanLocation, setPhoneNumber } from '../phone_number';
export const icon =
'<svg focusable="false" width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" class="auth0-lock-icon auth0-lock-icon-box auth0-lock-icon-location"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage"><g id="Lock" transform="translate(-201.000000, -3519.000000)" fill="#919191"><g id="SMS" transform="translate(153.000000, 3207.000000)"><g transform="translate(35.000000, 299.000000)"><path id="Fill-349-Copy" d="M22.4023125,22.8 C22.543625,21.9425 22.625,20.9975 22.625,20 L26.125,20 C26.125,21.316875 25.69275,22.52 24.9853125,23.5175 C24.3255625,23.2025 23.4383125,22.953125 22.4023125,22.8 L22.4023125,22.8 Z M21.372875,25.954375 C21.72725,25.3725 22.0234375,24.5675 22.2404375,23.6225 C22.8975625,23.696875 23.483375,23.80625 23.9624375,23.9375 L24.67075,23.9375 C23.829875,24.92625 22.6849375,25.6525 21.372875,25.954375 L21.372875,25.954375 Z M20,26.125 C19.412875,26.125 18.896625,25.105625 18.579,23.5525 C19.034,23.521875 19.503875,23.5 20,23.5 C20.4956875,23.5 20.966,23.521875 21.421,23.5525 C21.1029375,25.105625 20.5866875,26.125 20,26.125 L20,26.125 Z M15.3288125,23.9375 L16.0375625,23.9375 C16.5161875,23.80625 17.1024375,23.696875 17.759125,23.6225 C17.976125,24.5675 18.2723125,25.3725 18.6266875,25.954375 C17.3150625,25.6525 16.170125,24.92625 15.3288125,23.9375 L15.3288125,23.9375 Z M15.0146875,23.5175 C14.3068125,22.52 13.875,21.316875 13.875,20 L17.375,20 C17.375,20.9975 17.4559375,21.9425 17.59725,22.8 C16.56125,22.953125 15.6744375,23.2025 15.0146875,23.5175 L15.0146875,23.5175 Z M15.030875,16.45625 C15.6796875,16.78 16.5634375,17.03375 17.60075,17.195625 C17.501,17.799375 17.428375,18.4425 17.3964375,19.125 L13.951125,19.125 C14.0933125,18.13625 14.477,17.230625 15.030875,16.45625 L15.030875,16.45625 Z M18.6266875,14.04125 C18.27275,14.623125 17.977,15.42375 17.760875,16.373125 C17.1265,16.294375 16.558625,16.189375 16.0944375,16.0625 L15.34325,16.0625 C16.180625,15.069375 17.3168125,14.343125 18.6266875,14.04125 L18.6266875,14.04125 Z M20,13.875 C20.585375,13.875 21.0959375,14.894375 21.4118125,16.443125 C20.959875,16.478125 20.492625,16.5 20,16.5 C19.5069375,16.5 19.0396875,16.478125 18.58775,16.443125 C18.903625,14.894375 19.4141875,13.875 20,13.875 L20,13.875 Z M18.2749375,19.125 C18.3020625,18.473125 18.362,17.865 18.441625,17.29625 C18.9408125,17.344375 19.4596875,17.375 20,17.375 C20.5403125,17.375 21.0591875,17.344375 21.5579375,17.29625 C21.638,17.865 21.6979375,18.473125 21.724625,19.125 L18.2749375,19.125 L18.2749375,19.125 Z M21.75,20 C21.75,20.97125 21.6786875,21.88125 21.5631875,22.699375 C21.06225,22.65125 20.5420625,22.625 20,22.625 C19.4579375,22.625 18.9373125,22.65125 18.436375,22.699375 C18.320875,21.88125 18.25,20.97125 18.25,20 L21.75,20 L21.75,20 Z M24.6563125,16.0625 L23.905125,16.0625 C23.441375,16.189375 22.8730625,16.294375 22.2386875,16.373125 C22.0225625,15.42375 21.7268125,14.623125 21.372875,14.04125 C22.68275,14.343125 23.8189375,15.069375 24.6563125,16.0625 L24.6563125,16.0625 Z M24.9686875,16.45625 C25.5225625,17.230625 25.90625,18.13625 26.048875,19.125 L22.603125,19.125 C22.5711875,18.4425 22.499,17.799375 22.39925,17.195625 C23.4365625,17.03375 24.3203125,16.78 24.9686875,16.45625 L24.9686875,16.45625 Z M20,13 C16.1338125,13 13,16.1325 13,20 C13,23.863125 16.1338125,27 20,27 C23.86575,27 27,23.863125 27,20 C27,16.1325 23.86575,13 20,13 L20,13 Z"></path></g></g></g></g></svg>';
export default class PhoneNumberPane extends React.Component {
handlePhoneNumberChange(e) {
swap(updateEntity, 'lock', l.id(this.props.lock), setPhoneNumber, e.target.value);
}
render() {
const { instructions, lock, placeholder, invalidHint } = this.props;
const headerText = instructions || null;
const header = headerText && <p>{headerText}</p>;
return (
<div>
{header}
<SelectInput
icon={icon}
isValid={!c.isFieldVisiblyInvalid(lock, 'location')}
name="location"
placeholder=""
label={humanLocation(lock)}
onClick={() => startOptionSelection(l.id(lock), 'location', '', icon)}
/>
<PhoneNumberInput
value={c.phoneNumber(lock)}
isValid={!c.isFieldVisiblyInvalid(lock, 'phoneNumber')}
invalidHint={invalidHint}
onChange={::this.handlePhoneNumberChange}
placeholder={placeholder}
disabled={l.submitting(lock)}
/>
</div>
);
}
}
PhoneNumberPane.propTypes = {
instructions: PropTypes.element,
lock: PropTypes.object.isRequired,
placeholder: PropTypes.string.isRequired,
invalidHint: PropTypes.string
};
| import PropTypes from 'prop-types';
import React from 'react';
import PhoneNumberInput from '../../ui/input/phone_number_input';
// import LocationInput from '../../ui/input/location_input';
import SelectInput from '../../ui/input/select_input';
import { startOptionSelection } from '../actions';
import * as c from '../index';
import * as l from '../../core/index';
import { swap, updateEntity } from '../../store/index';
import { humanLocation, setPhoneNumber } from '../phone_number';
export const IconSvg = (
<svg
focusable="false"
width="14px"
height="14px"
viewBox="0 0 14 14"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
className="auth0-lock-icon auth0-lock-icon-box auth0-lock-icon-location"
>
<g stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
<g id="Lock" transform="translate(-201.000000, -3519.000000)" fill="#919191">
<g id="SMS" transform="translate(153.000000, 3207.000000)">
<g transform="translate(35.000000, 299.000000)">
<path
id="Fill-349-Copy"
d="M22.4023125,22.8 C22.543625,21.9425 22.625,20.9975 22.625,20 L26.125,20 C26.125,21.316875 25.69275,22.52 24.9853125,23.5175 C24.3255625,23.2025 23.4383125,22.953125 22.4023125,22.8 L22.4023125,22.8 Z M21.372875,25.954375 C21.72725,25.3725 22.0234375,24.5675 22.2404375,23.6225 C22.8975625,23.696875 23.483375,23.80625 23.9624375,23.9375 L24.67075,23.9375 C23.829875,24.92625 22.6849375,25.6525 21.372875,25.954375 L21.372875,25.954375 Z M20,26.125 C19.412875,26.125 18.896625,25.105625 18.579,23.5525 C19.034,23.521875 19.503875,23.5 20,23.5 C20.4956875,23.5 20.966,23.521875 21.421,23.5525 C21.1029375,25.105625 20.5866875,26.125 20,26.125 L20,26.125 Z M15.3288125,23.9375 L16.0375625,23.9375 C16.5161875,23.80625 17.1024375,23.696875 17.759125,23.6225 C17.976125,24.5675 18.2723125,25.3725 18.6266875,25.954375 C17.3150625,25.6525 16.170125,24.92625 15.3288125,23.9375 L15.3288125,23.9375 Z M15.0146875,23.5175 C14.3068125,22.52 13.875,21.316875 13.875,20 L17.375,20 C17.375,20.9975 17.4559375,21.9425 17.59725,22.8 C16.56125,22.953125 15.6744375,23.2025 15.0146875,23.5175 L15.0146875,23.5175 Z M15.030875,16.45625 C15.6796875,16.78 16.5634375,17.03375 17.60075,17.195625 C17.501,17.799375 17.428375,18.4425 17.3964375,19.125 L13.951125,19.125 C14.0933125,18.13625 14.477,17.230625 15.030875,16.45625 L15.030875,16.45625 Z M18.6266875,14.04125 C18.27275,14.623125 17.977,15.42375 17.760875,16.373125 C17.1265,16.294375 16.558625,16.189375 16.0944375,16.0625 L15.34325,16.0625 C16.180625,15.069375 17.3168125,14.343125 18.6266875,14.04125 L18.6266875,14.04125 Z M20,13.875 C20.585375,13.875 21.0959375,14.894375 21.4118125,16.443125 C20.959875,16.478125 20.492625,16.5 20,16.5 C19.5069375,16.5 19.0396875,16.478125 18.58775,16.443125 C18.903625,14.894375 19.4141875,13.875 20,13.875 L20,13.875 Z M18.2749375,19.125 C18.3020625,18.473125 18.362,17.865 18.441625,17.29625 C18.9408125,17.344375 19.4596875,17.375 20,17.375 C20.5403125,17.375 21.0591875,17.344375 21.5579375,17.29625 C21.638,17.865 21.6979375,18.473125 21.724625,19.125 L18.2749375,19.125 L18.2749375,19.125 Z M21.75,20 C21.75,20.97125 21.6786875,21.88125 21.5631875,22.699375 C21.06225,22.65125 20.5420625,22.625 20,22.625 C19.4579375,22.625 18.9373125,22.65125 18.436375,22.699375 C18.320875,21.88125 18.25,20.97125 18.25,20 L21.75,20 L21.75,20 Z M24.6563125,16.0625 L23.905125,16.0625 C23.441375,16.189375 22.8730625,16.294375 22.2386875,16.373125 C22.0225625,15.42375 21.7268125,14.623125 21.372875,14.04125 C22.68275,14.343125 23.8189375,15.069375 24.6563125,16.0625 L24.6563125,16.0625 Z M24.9686875,16.45625 C25.5225625,17.230625 25.90625,18.13625 26.048875,19.125 L22.603125,19.125 C22.5711875,18.4425 22.499,17.799375 22.39925,17.195625 C23.4365625,17.03375 24.3203125,16.78 24.9686875,16.45625 L24.9686875,16.45625 Z M20,13 C16.1338125,13 13,16.1325 13,20 C13,23.863125 16.1338125,27 20,27 C23.86575,27 27,23.863125 27,20 C27,16.1325 23.86575,13 20,13 L20,13 Z"
></path>
</g>
</g>
</g>
</g>
</svg>
);
export default class PhoneNumberPane extends React.Component {
handlePhoneNumberChange(e) {
swap(updateEntity, 'lock', l.id(this.props.lock), setPhoneNumber, e.target.value);
}
render() {
const { instructions, lock, placeholder, invalidHint } = this.props;
const headerText = instructions || null;
const header = headerText && <p>{headerText}</p>;
return (
<div>
{header}
<SelectInput
icon={IconSvg}
isValid={!c.isFieldVisiblyInvalid(lock, 'location')}
name="location"
placeholder=""
label={humanLocation(lock)}
onClick={() => startOptionSelection(l.id(lock), 'location', '', <IconSvg />)}
/>
<PhoneNumberInput
value={c.phoneNumber(lock)}
isValid={!c.isFieldVisiblyInvalid(lock, 'phoneNumber')}
invalidHint={invalidHint}
onChange={::this.handlePhoneNumberChange}
placeholder={placeholder}
disabled={l.submitting(lock)}
/>
</div>
);
}
}
PhoneNumberPane.propTypes = {
instructions: PropTypes.element,
lock: PropTypes.object.isRequired,
placeholder: PropTypes.string.isRequired,
invalidHint: PropTypes.string
};
|
import PropTypes from 'prop-types';
import React from 'react';
const svgs = {
back:
'<svg aria-hidden="true" focusable="false" enable-background="new 0 0 24 24" version="1.0" viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <polyline fill="none" points="12.5,21 3.5,12 12.5,3 " stroke="#000000" stroke-miterlimit="10" stroke-width="2"></polyline> <line fill="none" stroke="#000000" stroke-miterlimit="10" stroke-width="2" x1="22" x2="3.5" y1="12" y2="12"></line> </svg>',
close:
'<svg aria-hidden="true" focusable="false" enable-background="new 0 0 128 128" version="1.1" viewBox="0 0 128 128" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><polygon fill="#373737" points="123.5429688,11.59375 116.4765625,4.5185547 64.0019531,56.9306641 11.5595703,4.4882813 4.4882813,11.5595703 56.9272461,63.9970703 4.4570313,116.4052734 11.5244141,123.4814453 63.9985352,71.0683594 116.4423828,123.5117188 123.5126953,116.4414063 71.0732422,64.0019531 "></polygon></g></svg>'
};
const IconButton = ({ lockId, name, onClick, svg }) => (
<span
id={`${lockId}-${name}-button`}
role="button"
tabIndex={0}
className={`auth0-lock-${name}-button`}
dangerouslySetInnerHTML={{ __html: svg }}
onClick={e => {
e.preventDefault();
onClick();
}}
onKeyPress={e => {
if (e.key === 'Enter') {
e.preventDefault();
onClick();
}
}}
aria-label={name}
/>
);
IconButton.propTypes = {
name: PropTypes.string.isRequired,
onClick: PropTypes.func.isRequired,
svg: PropTypes.string.isRequired
};
// const createButton = name => {
// const f = ({onClick}) => (
// <IconButton name={name} svg={svgs[name]} onClick={onClick} />
// );
// f.displayName = `IconButton (${name})`;
// f.propTypes = { onClick: React.PropTypes.func.isRequired };
//
// return f;
// };
//
// export const CloseButton = createButton("close");
// export const BackButton = createButton("back");
export const CloseButton = ({ lockId, onClick }) => (
<IconButton lockId={lockId} name="close" svg={svgs['close']} onClick={onClick} />
);
CloseButton.propTypes = {
onClick: PropTypes.func.isRequired
};
export const BackButton = ({ lockId, onClick }) => (
<IconButton lockId={lockId} name="back" svg={svgs['back']} onClick={onClick} />
);
BackButton.propTypes = {
onClick: PropTypes.func.isRequired
};
| import PropTypes from 'prop-types';
import React from 'react';
const SvgBackIcon = () => (
<svg
aria-hidden="true"
focusable="false"
enableBackground="new 0 0 24 24"
version="1.0"
viewBox="0 0 24 24"
xmlSpace="preserve"
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
{' '}
<polyline
fill="none"
points="12.5,21 3.5,12 12.5,3 "
stroke="#000000"
strokeMiterlimit="10"
strokeWidth="2"
></polyline>{' '}
<line
fill="none"
stroke="#000000"
strokeMiterlimit="10"
strokeWidth="2"
x1="22"
x2="3.5"
y1="12"
y2="12"
></line>{' '}
</svg>
);
const SvgCloseIcon = () => (
<svg
aria-hidden="true"
focusable="false"
enableBackground="new 0 0 128 128"
version="1.1"
viewBox="0 0 128 128"
xmlSpace="preserve"
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<g>
<polygon
fill="#373737"
points="123.5429688,11.59375 116.4765625,4.5185547 64.0019531,56.9306641 11.5595703,4.4882813 4.4882813,11.5595703 56.9272461,63.9970703 4.4570313,116.4052734 11.5244141,123.4814453 63.9985352,71.0683594 116.4423828,123.5117188 123.5126953,116.4414063 71.0732422,64.0019531 "
></polygon>
</g>
</svg>
);
const IconButton = ({ lockId, name, onClick, svg }) => (
<span
id={`${lockId}-${name}-button`}
role="button"
tabIndex={0}
className={`auth0-lock-${name}-button`}
onClick={e => {
e.preventDefault();
onClick();
}}
onKeyPress={e => {
if (e.key === 'Enter') {
e.preventDefault();
onClick();
}
}}
aria-label={name}
>
{svg}
</span>
);
IconButton.propTypes = {
name: PropTypes.string.isRequired,
onClick: PropTypes.func.isRequired,
svg: PropTypes.element.isRequired
};
export const CloseButton = ({ lockId, onClick }) => (
<IconButton lockId={lockId} name="close" onClick={onClick} svg={<SvgCloseIcon />} />
);
CloseButton.propTypes = {
onClick: PropTypes.func.isRequired
};
export const BackButton = ({ lockId, onClick }) => (
<IconButton lockId={lockId} name="back" onClick={onClick} svg={<SvgBackIcon />} />
);
BackButton.propTypes = {
onClick: PropTypes.func.isRequired
};
|
import PropTypes from 'prop-types';
import React from 'react';
import { BackButton, CloseButton } from './button';
import * as l from '../../core/index';
const ConfirmationPane = ({ lock, backHandler, children, closeHandler, svg }) => (
<div className="auth0-lock-confirmation">
{closeHandler && <CloseButton lockId={l.id(lock)} onClick={closeHandler} />}
{backHandler && <BackButton lockId={l.id(lock)} onClick={backHandler} />}
<div className="auth0-lock-confirmation-content">
<span dangerouslySetInnerHTML={{ __html: svg }} />
{children}
</div>
</div>
);
ConfirmationPane.propTypes = {
backHandler: PropTypes.func,
closeHandler: PropTypes.func,
children: PropTypes.oneOfType([
PropTypes.element.isRequired,
PropTypes.arrayOf(PropTypes.element).isRequired
]),
svg: PropTypes.string.isRequired
};
export default ConfirmationPane;
| import PropTypes from 'prop-types';
import React from 'react';
import { BackButton, CloseButton } from './button';
import * as l from '../../core/index';
const ConfirmationPane = ({ lock, backHandler, children, closeHandler, svg }) => (
<div className="auth0-lock-confirmation">
{closeHandler && <CloseButton lockId={l.id(lock)} onClick={closeHandler} />}
{backHandler && <BackButton lockId={l.id(lock)} onClick={backHandler} />}
<div className="auth0-lock-confirmation-content">
<span>{svg}</span>
{children}
</div>
</div>
);
ConfirmationPane.propTypes = {
backHandler: PropTypes.func,
closeHandler: PropTypes.func,
children: PropTypes.oneOfType([
PropTypes.element.isRequired,
PropTypes.arrayOf(PropTypes.element).isRequired
]),
svg: PropTypes.element.isRequired
};
export default ConfirmationPane;
|
import React from 'react';
export default class CheckboxInput extends React.Component {
render() {
const { lockId, name, ariaLabel, placeholder, checked, placeholderHTML } = this.props;
return (
<div className="auth0-lock-input-checkbox">
<label>
<input
id={`${lockId}-${name}`}
type="checkbox"
checked={checked === 'true'}
onChange={::this.handleOnChange}
name={name}
aria-label={ariaLabel || name}
/>
{placeholderHTML ? (
<span dangerouslySetInnerHTML={{ __html: placeholderHTML }} />
) : (
<span>{placeholder}</span>
)}
</label>
</div>
);
}
handleOnChange(e) {
if (this.props.onChange) {
this.props.onChange(e);
}
}
}
| import React from 'react';
export default class CheckboxInput extends React.Component {
render() {
const { lockId, name, ariaLabel, placeholder, checked, placeholderHTML } = this.props;
return (
<div className="auth0-lock-input-checkbox">
<label>
<input
id={`${lockId}-${name}`}
type="checkbox"
checked={checked === 'true'}
onChange={::this.handleOnChange}
name={name}
aria-label={ariaLabel || name}
/>
{placeholderHTML ? (
// placeholderHTML allows raw HTML
// eslint-disable-next-line react/no-danger
<span dangerouslySetInnerHTML={{ __html: placeholderHTML }} />
) : (
<span>{placeholder}</span>
)}
</label>
</div>
);
}
handleOnChange(e) {
if (this.props.onChange) {
this.props.onChange(e);
}
}
}
|
import PropTypes from 'prop-types';
import React from 'react';
export default class InputWrap extends React.Component {
render() {
const { after, focused, invalidHint, isValid, name, icon } = this.props;
let blockClassName = `auth0-lock-input-block auth0-lock-input-${name}`;
if (!isValid) {
blockClassName += ' auth0-lock-error';
}
let wrapClassName = 'auth0-lock-input-wrap';
if (focused && isValid) {
wrapClassName += ' auth0-lock-focused';
}
// NOTE: Ugly hack until we upgrade to React 15 which has better
// support for SVG.
let iconElement = null;
if (typeof icon === 'string') {
iconElement = <span aria-hidden="true" dangerouslySetInnerHTML={{ __html: icon }} />;
} else if (icon) {
iconElement = icon;
}
if (iconElement) {
wrapClassName += ' auth0-lock-input-wrap-with-icon';
}
const errorTooltip =
!isValid && invalidHint ? (
<div role="alert" id={`auth0-lock-error-msg-${name}`} className="auth0-lock-error-msg">
<div className="auth0-lock-error-invalid-hint">{invalidHint}</div>
</div>
) : null;
return (
<div className={blockClassName}>
<div className={wrapClassName}>
{iconElement}
{this.props.children}
{after}
</div>
{errorTooltip}
</div>
);
}
}
InputWrap.propTypes = {
after: PropTypes.element,
children: PropTypes.oneOfType([
PropTypes.element.isRequired,
PropTypes.arrayOf(PropTypes.element).isRequired
]),
focused: PropTypes.bool,
invalidHint: PropTypes.node,
isValid: PropTypes.bool.isRequired,
name: PropTypes.string.isRequired,
svg: PropTypes.string
};
| import PropTypes from 'prop-types';
import React from 'react';
export default class InputWrap extends React.Component {
render() {
const { after, focused, invalidHint, isValid, name, icon } = this.props;
let blockClassName = `auth0-lock-input-block auth0-lock-input-${name}`;
if (!isValid) {
blockClassName += ' auth0-lock-error';
}
let wrapClassName = 'auth0-lock-input-wrap';
if (focused && isValid) {
wrapClassName += ' auth0-lock-focused';
}
if (icon) {
wrapClassName += ' auth0-lock-input-wrap-with-icon';
}
const errorTooltip =
!isValid && invalidHint ? (
<div role="alert" id={`auth0-lock-error-msg-${name}`} className="auth0-lock-error-msg">
<div className="auth0-lock-error-invalid-hint">{invalidHint}</div>
</div>
) : null;
return (
<div className={blockClassName}>
<div className={wrapClassName}>
{icon}
{this.props.children}
{after}
</div>
{errorTooltip}
</div>
);
}
}
InputWrap.propTypes = {
after: PropTypes.element,
children: PropTypes.oneOfType([
PropTypes.element.isRequired,
PropTypes.arrayOf(PropTypes.element).isRequired
]),
focused: PropTypes.bool,
invalidHint: PropTypes.node,
isValid: PropTypes.bool.isRequired,
name: PropTypes.string.isRequired,
icon: PropTypes.object
};
|
Subsets and Splits