diff --git a/ChangeLog b/ChangeLog index 1ab674f77c..5623214771 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +14-MAR-2024: 24.0.7 + +- Moves Cloudflare workers to mxgraph-gliffy-java repository +- Fixes possible HTML content as SVG subtree +- Fixes overridden font in background page images +- Fixes timeout for invalid image in SVG export +- Disables and removes links in background pages +- Adds tooltips for values in Property pane +- Fixes clipped cell ID in Property pane [drawio-4262] +- Fixes regex performance in Graph.isLink [drawio-3939] +- [conf cloud] Adds upload embed diagrams to custom templates parsing [DID-11066] + 13-MAR-2024: 24.0.6 - Moves subtree when tree is collapsed [drawio-3113] diff --git a/VERSION b/VERSION index 460897ead0..352755d108 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -24.0.6 \ No newline at end of file +24.0.7 \ No newline at end of file diff --git a/etc/imageResize/README.md b/etc/imageResize/README.md new file mode 100644 index 0000000000..d0228e8a58 --- /dev/null +++ b/etc/imageResize/README.md @@ -0,0 +1,17 @@ +draw.io file sizing script + +Takes any draw.io file or mx model as input and resizes embedded PNG and JPEG images according to passed in parameters. + +Installing + +Run 'npm install' in this folder. Ensure you have node locally. + +Running + +To resize all images to 200 width: + +node drawImageResize.js --file=path/to/your/file.drawio --width=200 + +To resize all images to 40% their current width: + +node drawImageResize.js --file=path/to/your/file.drawio --percentage=40 \ No newline at end of file diff --git a/etc/imageResize/drawImageResize.js b/etc/imageResize/drawImageResize.js new file mode 100644 index 0000000000..392f80a3e1 --- /dev/null +++ b/etc/imageResize/drawImageResize.js @@ -0,0 +1,84 @@ +const fs = require('fs'); +const sharp = require('sharp'); +const yargs = require('yargs/yargs'); +const { hideBin } = require('yargs/helpers'); +const sizeOf = require('image-size'); + +const argv = yargs(hideBin(process.argv)).options({ + file: { type: 'string', demandOption: true, describe: 'The path to the .drawio file' }, + percentage: { type: 'number', demandOption: false, describe: 'The percentage to resize the images to' }, + width: { type: 'number', demandOption: false, describe: 'The width to resize the images to' } +}).argv; + +const resizeImage = async (base64Image, percentage, width) => +{ + console.log(`Resizing image...`); + // Adjust the regex to match the new end character ";" instead of "," + const matches = base64Image.match(/^data:image\/(jpeg|png),(.*);$/); + if (!matches) return null; + + const imageBuffer = Buffer.from(matches[2], 'base64'); + const dimensions = sizeOf(imageBuffer); + + console.log(`width = ${width}`); + console.log(`percentage = ${percentage}`); + + if (percentage && !width) + { + // Width isn't passed in, use percentage + width = Math.floor(dimensions.width * (percentage / 100)); + console.log(`dimensions.width = ${dimensions.width}`); + } + console.log(`width = ${width}`); + return sharp(imageBuffer) + .resize({ width: width, withoutEnlargement: true }) + .toBuffer() + .then(resizedBuffer => + { + console.log(`Image resized to ${percentage}% of its original size.`); + // Ensure to append ";" at the end after re-encoding to base64 + return `data:image/${matches[1]},` + resizedBuffer.toString('base64') + ';'; + }); +}; + +const processDrawioFile = async (filePath, percentage, width) => +{ + console.log(`Starting processing of ${filePath}`); + + if (!(percentage || width)) + { + console.log(`You must pass in one of percentage or width`); + return; + } + + try + { + let data = fs.readFileSync(filePath, { encoding: 'utf-8' }); + // Adjust the regex pattern to expect ";" as the closing character of the base64 data + const base64Pattern = /data:image\/(?:jpeg|png),[^;]+;/g; + const images = [...data.matchAll(base64Pattern)].map(match => match[0]); + + console.log(`Found ${images.length} images to process.`); + + for (let i = 0; i < images.length; i++) + { + console.log(`Processing image ${i + 1} of ${images.length}...`); + const newBase64 = await resizeImage(images[i], percentage, width); + + if (newBase64) + { + data = data.replace(images[i], newBase64); + } + } + + fs.writeFileSync(filePath, data, { encoding: 'utf-8' }); + console.log(`All images processed. Updated file saved.`); + } + catch (error) + { + console.error(`Error processing file: ${error.message}`); + } +}; + +processDrawioFile(argv.file, argv.percentage, argv.width); + diff --git a/etc/imageResize/package-lock.json b/etc/imageResize/package-lock.json new file mode 100644 index 0000000000..648b8889c4 --- /dev/null +++ b/etc/imageResize/package-lock.json @@ -0,0 +1,763 @@ +{ + "name": "drawio-image-resize", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "drawio-image-resize", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "image-size": "^1.1.1", + "sharp": "^0.33.2", + "yargs": "^17.7.2" + } + }, + "node_modules/@emnapi/runtime": { + "version": "0.45.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-0.45.0.tgz", + "integrity": "sha512-Txumi3td7J4A/xTTwlssKieHKTGl3j4A1tglBx72auZ49YK7ePY6XZricgIg9mnZT4xPfA+UPCUdnhRuEFDL+w==", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@img/sharp-darwin-arm64": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.2.tgz", + "integrity": "sha512-itHBs1rPmsmGF9p4qRe++CzCgd+kFYktnsoR1sbIAfsRMrJZau0Tt1AH9KVnufc2/tU02Gf6Ibujx+15qRE03w==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "glibc": ">=2.26", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-arm64": "1.0.1" + } + }, + "node_modules/@img/sharp-darwin-x64": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.2.tgz", + "integrity": "sha512-/rK/69Rrp9x5kaWBjVN07KixZanRr+W1OiyKdXcbjQD6KbW+obaTeBBtLUAtbBsnlTTmWthw99xqoOS7SsySDg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "glibc": ">=2.26", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-x64": "1.0.1" + } + }, + "node_modules/@img/sharp-libvips-darwin-arm64": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.1.tgz", + "integrity": "sha512-kQyrSNd6lmBV7O0BUiyu/OEw9yeNGFbQhbxswS1i6rMDwBBSX+e+rPzu3S+MwAiGU3HdLze3PanQ4Xkfemgzcw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "macos": ">=11", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-darwin-x64": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.1.tgz", + "integrity": "sha512-eVU/JYLPVjhhrd8Tk6gosl5pVlvsqiFlt50wotCvdkFGf+mDNBJxMh+bvav+Wt3EBnNZWq8Sp2I7XfSjm8siog==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "macos": ">=10.13", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.1.tgz", + "integrity": "sha512-FtdMvR4R99FTsD53IA3LxYGghQ82t3yt0ZQ93WMZ2xV3dqrb0E8zq4VHaTOuLEAuA83oDawHV3fd+BsAPadHIQ==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.28", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm64": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.1.tgz", + "integrity": "sha512-bnGG+MJjdX70mAQcSLxgeJco11G+MxTz+ebxlz8Y3dxyeb3Nkl7LgLI0mXupoO+u1wRNx/iRj5yHtzA4sde1yA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.26", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-s390x": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.1.tgz", + "integrity": "sha512-3+rzfAR1YpMOeA2zZNp+aYEzGNWK4zF3+sdMxuCS3ey9HhDbJ66w6hDSHDMoap32DueFwhhs3vwooAB2MaK4XQ==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.28", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-x64": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.1.tgz", + "integrity": "sha512-3NR1mxFsaSgMMzz1bAnnKbSAI+lHXVTqAHgc1bgzjHuXjo4hlscpUxc0vFSAPKI3yuzdzcZOkq7nDPrP2F8Jgw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.26", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-arm64": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.1.tgz", + "integrity": "sha512-5aBRcjHDG/T6jwC3Edl3lP8nl9U2Yo8+oTl5drd1dh9Z1EBfzUKAJFUDTDisDjUwc7N4AjnPGfCA3jl3hY8uDg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "musl": ">=1.2.2", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-x64": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.1.tgz", + "integrity": "sha512-dcT7inI9DBFK6ovfeWRe3hG30h51cBAP5JXlZfx6pzc/Mnf9HFCQDLtYf4MCBjxaaTfjCCjkBxcy3XzOAo5txw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "musl": ">=1.2.2", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-linux-arm": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.2.tgz", + "integrity": "sha512-Fndk/4Zq3vAc4G/qyfXASbS3HBZbKrlnKZLEJzPLrXoJuipFNNwTes71+Ki1hwYW5lch26niRYoZFAtZVf3EGA==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.28", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm": "1.0.1" + } + }, + "node_modules/@img/sharp-linux-arm64": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.2.tgz", + "integrity": "sha512-pz0NNo882vVfqJ0yNInuG9YH71smP4gRSdeL09ukC2YLE6ZyZePAlWKEHgAzJGTiOh8Qkaov6mMIMlEhmLdKew==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.26", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm64": "1.0.1" + } + }, + "node_modules/@img/sharp-linux-s390x": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.2.tgz", + "integrity": "sha512-MBoInDXDppMfhSzbMmOQtGfloVAflS2rP1qPcUIiITMi36Mm5YR7r0ASND99razjQUpHTzjrU1flO76hKvP5RA==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.28", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-s390x": "1.0.1" + } + }, + "node_modules/@img/sharp-linux-x64": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.2.tgz", + "integrity": "sha512-xUT82H5IbXewKkeF5aiooajoO1tQV4PnKfS/OZtb5DDdxS/FCI/uXTVZ35GQ97RZXsycojz/AJ0asoz6p2/H/A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.26", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-x64": "1.0.1" + } + }, + "node_modules/@img/sharp-linuxmusl-arm64": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.2.tgz", + "integrity": "sha512-F+0z8JCu/UnMzg8IYW1TMeiViIWBVg7IWP6nE0p5S5EPQxlLd76c8jYemG21X99UzFwgkRo5yz2DS+zbrnxZeA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "musl": ">=1.2.2", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-arm64": "1.0.1" + } + }, + "node_modules/@img/sharp-linuxmusl-x64": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.2.tgz", + "integrity": "sha512-+ZLE3SQmSL+Fn1gmSaM8uFusW5Y3J9VOf+wMGNnTtJUMUxFhv+P4UPaYEYT8tqnyYVaOVGgMN/zsOxn9pSsO2A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "musl": ">=1.2.2", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-x64": "1.0.1" + } + }, + "node_modules/@img/sharp-wasm32": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.2.tgz", + "integrity": "sha512-fLbTaESVKuQcpm8ffgBD7jLb/CQLcATju/jxtTXR1XCLwbOQt+OL5zPHSDMmp2JZIeq82e18yE0Vv7zh6+6BfQ==", + "cpu": [ + "wasm32" + ], + "optional": true, + "dependencies": { + "@emnapi/runtime": "^0.45.0" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-ia32": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.2.tgz", + "integrity": "sha512-okBpql96hIGuZ4lN3+nsAjGeggxKm7hIRu9zyec0lnfB8E7Z6p95BuRZzDDXZOl2e8UmR4RhYt631i7mfmKU8g==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-x64": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.2.tgz", + "integrity": "sha512-E4magOks77DK47FwHUIGH0RYWSgRBfGdK56kIHSVeB9uIS4pPFr4N2kIVsXdQQo4LzOsENKV5KAhRlRL7eMAdg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/color": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", + "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", + "dependencies": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "engines": { + "node": ">=12.5.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "node_modules/detect-libc": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", + "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/image-size": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.1.1.tgz", + "integrity": "sha512-541xKlUw6jr/6gGuk92F+mYM5zaFAc5ahphvkqvNe2bQ6gVBkd6bfrmVJ2t4KDAfikAYZyIqTnktX3i6/aQDrQ==", + "dependencies": { + "queue": "6.0.2" + }, + "bin": { + "image-size": "bin/image-size.js" + }, + "engines": { + "node": ">=16.x" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/queue": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz", + "integrity": "sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==", + "dependencies": { + "inherits": "~2.0.3" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/sharp": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.2.tgz", + "integrity": "sha512-WlYOPyyPDiiM07j/UO+E720ju6gtNtHjEGg5vovUk1Lgxyjm2LFO+37Nt/UI3MMh2l6hxTWQWi7qk3cXJTutcQ==", + "hasInstallScript": true, + "dependencies": { + "color": "^4.2.3", + "detect-libc": "^2.0.2", + "semver": "^7.5.4" + }, + "engines": { + "libvips": ">=8.15.1", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-darwin-arm64": "0.33.2", + "@img/sharp-darwin-x64": "0.33.2", + "@img/sharp-libvips-darwin-arm64": "1.0.1", + "@img/sharp-libvips-darwin-x64": "1.0.1", + "@img/sharp-libvips-linux-arm": "1.0.1", + "@img/sharp-libvips-linux-arm64": "1.0.1", + "@img/sharp-libvips-linux-s390x": "1.0.1", + "@img/sharp-libvips-linux-x64": "1.0.1", + "@img/sharp-libvips-linuxmusl-arm64": "1.0.1", + "@img/sharp-libvips-linuxmusl-x64": "1.0.1", + "@img/sharp-linux-arm": "0.33.2", + "@img/sharp-linux-arm64": "0.33.2", + "@img/sharp-linux-s390x": "0.33.2", + "@img/sharp-linux-x64": "0.33.2", + "@img/sharp-linuxmusl-arm64": "0.33.2", + "@img/sharp-linuxmusl-x64": "0.33.2", + "@img/sharp-wasm32": "0.33.2", + "@img/sharp-win32-ia32": "0.33.2", + "@img/sharp-win32-x64": "0.33.2" + } + }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "optional": true + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "engines": { + "node": ">=12" + } + } + } +} diff --git a/etc/imageResize/package.json b/etc/imageResize/package.json new file mode 100644 index 0000000000..ec07ebddfb --- /dev/null +++ b/etc/imageResize/package.json @@ -0,0 +1,17 @@ +{ + "name": "drawio-image-resize", + "version": "1.0.0", + "description": "", + "main": "drawImageResize.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "image-size": "^1.1.1", + "sharp": "^0.33.2", + "yargs": "^17.7.2" + } +} diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index 45f08bb200..ed2cf6cbcf 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -144,9 +144,9 @@ window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;"1"==urlParams.extA a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net";b=a.length-c.length;c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})(); if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0"; "se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1"); -"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources"; -window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang; -window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"24.0.6",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), +"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open"; +window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images"; +window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"24.0.7",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor), IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS|| @@ -2070,12 +2070,12 @@ Editor.prototype.setModified=function(a){this.modified=a};Editor.prototype.setFi Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(f,g){b.undoableEditHappened(g.getProperty("edit"))};var e=mxUtils.bind(this,function(f,g){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(f,g){f=a.getSelectionCellsForChanges(g.getProperty("edit").changes,function(h){return!(h instanceof mxChildChange)});if(0O.clientHeight-F&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(d&&(d=document.createElement("img"),d.setAttribute("src",Dialog.prototype.closeImage),d.setAttribute("title",mxResources.get("close")), -d.className="geDialogClose",d.style.top=I+14+"px",d.style.left=D+e+38-w+"px",d.style.zIndex=this.zIndex,mxEvent.addListener(d,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(d),this.dialogImg=d,!p)){var K=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(Z){K=!0}),null,mxUtils.bind(this,function(Z){K&&(a.hideDialog(!0),K=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var Z=l();null!=Z&&(z=e=Z.w,C=f=Z.h)}Z=Editor.inlineFullscreen|| +d.className="geDialogClose",d.style.top=I+14+"px",d.style.left=D+e+38-x+"px",d.style.zIndex=this.zIndex,mxEvent.addListener(d,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(d),this.dialogImg=d,!p)){var K=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(Z){K=!0}),null,mxUtils.bind(this,function(Z){K&&(a.hideDialog(!0),K=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var Z=l();null!=Z&&(z=e=Z.w,C=f=Z.h)}Z=Editor.inlineFullscreen|| null==a.embedViewport?this.getDocumentSize():mxUtils.clone(a.embedViewport);G=Z.height;this.bg.style.height=G+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px");e=null!=document.body?Math.min(z,document.body.scrollWidth-F):z;f=Math.min(C,G-F);Z=Math.max(1,Math.round((Z.width-e-F)/2));var S=Math.max(1,Math.round((G-f-a.footerHeight)/3));S=this.getPosition(Z,S,e,f);Z=S.x;S=S.y;var X=mxUtils.getDocumentScrollOrigin(document);Z+=X.x;S+=X.y;Editor.inlineFullscreen|| -null==a.embedViewport||(S+=a.embedViewport.y,Z+=a.embedViewport.x);O.style.left=Z+"px";O.style.top=S+"px";O.style.width=e+"px";O.style.height=f+"px";!n&&b.clientHeight>O.clientHeight-F&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=S+14+"px",this.dialogImg.style.left=Z+e+38-w+"px")});null!=a.embedViewport?a.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=h;this.container=O;a.editor.fireEvent(new mxEventObject("showDialog"))} +null==a.embedViewport||(S+=a.embedViewport.y,Z+=a.embedViewport.x);O.style.left=Z+"px";O.style.top=S+"px";O.style.width=e+"px";O.style.height=f+"px";!n&&b.clientHeight>O.clientHeight-F&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=S+14+"px",this.dialogImg.style.left=Z+e+38-x+"px")});null!=a.embedViewport?a.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=h;this.container=O;a.editor.fireEvent(new mxEventObject("showDialog"))} Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2; Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+ "/nocolor.png";Dialog.prototype.defaultColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAKUlEQVQI1wXBMREAIAwEsHAMjJVQKZVW6U8CDpdH0QxLnLjxoqJjYvMBewMJ51TWcscAAAAASUVORK5CYII=":IMAGE_PATH+"/defaultcolor.png"; @@ -2084,63 +2084,63 @@ Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKA "/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getDocumentSize=function(){return mxUtils.getDocumentSize()};Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)}; Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))return!1;this.onDialogClose=null}null!=this.dialogImg&&null!=this.dialogImg.parentNode&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);null!=this.editorUi.embedViewport?this.editorUi.removeListener(this.resizeListener):mxEvent.removeListener(window,"resize",this.resizeListener);null!=this.container.parentNode&& this.container.parentNode.removeChild(this.container)}; -var ErrorDialog=function(a,b,e,f,g,d,h,n,r,l,p){r=null!=r?r:!0;var w=document.createElement("div");w.style.textAlign="center";if(null!=b){var z=document.createElement("div");z.style.padding="0px";z.style.margin="0px";z.style.fontSize="18px";z.style.paddingBottom="16px";z.style.marginBottom="10px";z.style.borderBottom="1px solid #c0c0c0";z.style.color="gray";z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.overflow="hidden";mxUtils.write(z,b);z.setAttribute("title",b);w.appendChild(z)}b= -document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";"string"===typeof e&&(e=e.replace(/\n/g,"
"));b.innerHTML=Graph.sanitizeHtml(e);w.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=d&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();d()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=p&&p()}),l.className="geBtn",e.appendChild(l)); -var C=mxUtils.button(f,function(){r&&a.hideDialog();null!=g&&g()});C.className="geBtn";e.appendChild(C);null!=h&&(f=mxUtils.button(h,function(){r&&a.hideDialog();null!=n&&n()}),f.className="geBtn gePrimaryBtn",e.appendChild(f));this.init=function(){C.focus()};w.appendChild(e);this.container=w},PrintDialog=function(a,b){this.create(a,b)}; -PrintDialog.prototype.create=function(a){function b(C){var F=h.checked||l.checked,D=parseInt(w.value)/100;isNaN(D)&&(D=1,w.value="100%");mxClient.IS_SF&&(D*=.75);var G=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,I=1/e.pageScale;if(F){var J=h.checked?1:parseInt(p.value);isNaN(J)||(I=mxUtils.getScaleForPageCount(J,e,G))}var O=J=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*D);G.height=Math.ceil(G.height*D);I*=D;!F&&e.pageVisible?(D=e.getPageLayout(),J-=D.x*G.width,O-=D.y*G.height): +var ErrorDialog=function(a,b,e,f,g,d,h,n,r,l,p){r=null!=r?r:!0;var x=document.createElement("div");x.style.textAlign="center";if(null!=b){var z=document.createElement("div");z.style.padding="0px";z.style.margin="0px";z.style.fontSize="18px";z.style.paddingBottom="16px";z.style.marginBottom="10px";z.style.borderBottom="1px solid #c0c0c0";z.style.color="gray";z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.overflow="hidden";mxUtils.write(z,b);z.setAttribute("title",b);x.appendChild(z)}b= +document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";"string"===typeof e&&(e=e.replace(/\n/g,"
"));b.innerHTML=Graph.sanitizeHtml(e);x.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=d&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();d()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=p&&p()}),l.className="geBtn",e.appendChild(l)); +var C=mxUtils.button(f,function(){r&&a.hideDialog();null!=g&&g()});C.className="geBtn";e.appendChild(C);null!=h&&(f=mxUtils.button(h,function(){r&&a.hideDialog();null!=n&&n()}),f.className="geBtn gePrimaryBtn",e.appendChild(f));this.init=function(){C.focus()};x.appendChild(e);this.container=x},PrintDialog=function(a,b){this.create(a,b)}; +PrintDialog.prototype.create=function(a){function b(C){var F=h.checked||l.checked,D=parseInt(x.value)/100;isNaN(D)&&(D=1,x.value="100%");mxClient.IS_SF&&(D*=.75);var G=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,I=1/e.pageScale;if(F){var J=h.checked?1:parseInt(p.value);isNaN(J)||(I=mxUtils.getScaleForPageCount(J,e,G))}var O=J=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*D);G.height=Math.ceil(G.height*D);I*=D;!F&&e.pageVisible?(D=e.getPageLayout(),J-=D.x*G.width,O-=D.y*G.height): F=!0;F=PrintDialog.createPrintPreview(e,I,G,0,J,O,F);F.open();C&&PrintDialog.printPreview(F)}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var g=document.createElement("tbody");var d=document.createElement("tr");var h=document.createElement("input");h.setAttribute("type","checkbox");var n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";n.appendChild(h);var r=document.createElement("span");mxUtils.write(r," "+mxResources.get("fitPage")); n.appendChild(r);mxEvent.addListener(r,"click",function(C){h.checked=!h.checked;l.checked=!h.checked;mxEvent.consume(C)});mxEvent.addListener(h,"change",function(){l.checked=!h.checked});d.appendChild(n);g.appendChild(d);d=d.cloneNode(!1);var l=document.createElement("input");l.setAttribute("type","checkbox");n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(l);r=document.createElement("span");mxUtils.write(r," "+mxResources.get("posterPrint")+":");n.appendChild(r);mxEvent.addListener(r, "click",function(C){l.checked=!l.checked;h.checked=!l.checked;mxEvent.consume(C)});d.appendChild(n);var p=document.createElement("input");p.setAttribute("value","1");p.setAttribute("type","number");p.setAttribute("min","1");p.setAttribute("size","4");p.setAttribute("disabled","disabled");p.style.width="50px";n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(p);mxUtils.write(n," "+mxResources.get("pages")+" (max)");d.appendChild(n);g.appendChild(d);mxEvent.addListener(l,"change", -function(){l.checked?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled");h.checked=!l.checked});d=d.cloneNode(!1);n=document.createElement("td");mxUtils.write(n,mxResources.get("pageScale")+":");d.appendChild(n);n=document.createElement("td");var w=document.createElement("input");w.setAttribute("value","100 %");w.setAttribute("size","5");w.style.width="50px";n.appendChild(w);d.appendChild(n);g.appendChild(d);d=document.createElement("tr");n=document.createElement("td");n.colSpan=2; +function(){l.checked?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled");h.checked=!l.checked});d=d.cloneNode(!1);n=document.createElement("td");mxUtils.write(n,mxResources.get("pageScale")+":");d.appendChild(n);n=document.createElement("td");var x=document.createElement("input");x.setAttribute("value","100 %");x.setAttribute("size","5");x.style.width="50px";n.appendChild(x);d.appendChild(n);g.appendChild(d);d=document.createElement("tr");n=document.createElement("td");n.colSpan=2; n.style.paddingTop="20px";n.setAttribute("align","right");r=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});r.className="geBtn";a.editor.cancelFirst&&n.appendChild(r);if(PrintDialog.previewEnabled){var z=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});z.className="geBtn";n.appendChild(z)}z=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});z.className="geBtn gePrimaryBtn";n.appendChild(z);a.editor.cancelFirst|| n.appendChild(r);d.appendChild(n);g.appendChild(d);f.appendChild(g);this.container=f};PrintDialog.printPreview=function(a){try{null!=a.wnd&&window.setTimeout(function(){a.wnd.focus();a.wnd.print();a.wnd.close()},500)}catch(b){}}; PrintDialog.createPrintPreview=function(a,b,e,f,g,d,h){b=new mxPrintPreview(a,b,e,f,g,d);b.title=mxResources.get("preview");b.addPageCss=!mxClient.IS_SF;b.printBackgroundImage=!0;b.autoOrigin=h;h=a.background;if(null==h||""==h||h==mxConstants.NONE)h="#ffffff";b.backgroundColor=h;var n=b.isTextLabel;b.isTextLabel=function(p){return"geHint"==!p.className&&n.apply(this,arguments)};var r=b.getLinkForCellState;b.getLinkForCellState=function(p){return a.getAbsoluteUrl(r.apply(this,arguments))};var l=b.writeHead; b.writeHead=function(p){l.apply(this,arguments);p.writeln('")};return b};PrintDialog.previewEnabled=!0; -var PageSetupDialog=function(a){function b(){var D=w;null!=D&&null!=D.originalSrc&&(D=a.createImageForPageLink(D.originalSrc,null));null!=D&&null!=D.src?(p.style.backgroundImage="url("+D.src+")",p.style.display="inline-block"):(p.style.backgroundImage="",p.style.display="none");p.style.backgroundColor="";null!=z&&z!=mxConstants.NONE&&(p.style.backgroundColor=z,p.style.display="inline-block")}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var g=document.createElement("tbody"); +var PageSetupDialog=function(a){function b(){var D=x;null!=D&&null!=D.originalSrc&&(D=a.createImageForPageLink(D.originalSrc,null));null!=D&&null!=D.src?(p.style.backgroundImage="url("+D.src+")",p.style.display="inline-block"):(p.style.backgroundImage="",p.style.display="none");p.style.backgroundColor="";null!=z&&z!=mxConstants.NONE&&(p.style.backgroundColor=z,p.style.display="inline-block")}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var g=document.createElement("tbody"); var d=document.createElement("tr");var h=document.createElement("td");h.style.verticalAlign="top";h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("paperSize")+":");d.appendChild(h);h=document.createElement("td");h.style.verticalAlign="top";h.style.fontSize="10pt";var n=PageSetupDialog.addPageFormatPanel(h,"pagesetupdialog",e.pageFormat);d.appendChild(h);g.appendChild(d);d=document.createElement("tr");h=document.createElement("td");mxUtils.write(h,mxResources.get("gridSize")+":");d.appendChild(h); h=document.createElement("td");h.style.whiteSpace="nowrap";var r=document.createElement("input");r.setAttribute("type","number");r.setAttribute("min","0");r.style.width="40px";r.style.marginLeft="6px";r.value=e.getGridSize();h.appendChild(r);mxEvent.addListener(r,"change",function(){var D=parseInt(r.value);r.value=Math.max(1,isNaN(D)?e.getGridSize():D)});d.appendChild(h);g.appendChild(d);d=document.createElement("tr");h=document.createElement("td");mxUtils.write(h,mxResources.get("background")+":"); d.appendChild(h);h=document.createElement("td");var l=document.createElement("button");l.className="geBtn";l.style.margin="0px";mxUtils.write(l,mxResources.get("change")+"...");var p=document.createElement("div");p.style.display="inline-block";p.style.verticalAlign="middle";p.style.backgroundPosition="center center";p.style.backgroundRepeat="no-repeat";p.style.backgroundSize="contain";p.style.border="1px solid lightGray";p.style.borderRadius="4px";p.style.marginRight="14px";p.style.height="32px"; -p.style.width="64px";p.style.cursor="pointer";p.style.padding="4px";var w=e.backgroundImage,z=e.background,C=e.shadowVisible,F=function(D){a.showBackgroundImageDialog(function(G,I,J,O){I||(null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src}),w=G,C=O);z=J;b()},w,z,!0);mxEvent.consume(D)};mxEvent.addListener(l,"click",F);mxEvent.addListener(p,"click",F);b();h.appendChild(p);h.appendChild(l);d.appendChild(h);g.appendChild(d);d=document.createElement("tr");h=document.createElement("td"); -h.colSpan=2;h.style.paddingTop="16px";h.setAttribute("align","right");l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst&&h.appendChild(l);F=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var D=parseInt(r.value);isNaN(D)||e.gridSize===D||e.setGridSize(D);D=new ChangePageSetup(a,z,w,n.get());D.ignoreColor=e.background==z;D.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=w?w.src:null);null!=C&& +p.style.width="64px";p.style.cursor="pointer";p.style.padding="4px";var x=e.backgroundImage,z=e.background,C=e.shadowVisible,F=function(D){a.showBackgroundImageDialog(function(G,I,J,O){I||(null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src}),x=G,C=O);z=J;b()},x,z,!0);mxEvent.consume(D)};mxEvent.addListener(l,"click",F);mxEvent.addListener(p,"click",F);b();h.appendChild(p);h.appendChild(l);d.appendChild(h);g.appendChild(d);d=document.createElement("tr");h=document.createElement("td"); +h.colSpan=2;h.style.paddingTop="16px";h.setAttribute("align","right");l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst&&h.appendChild(l);F=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var D=parseInt(r.value);isNaN(D)||e.gridSize===D||e.setGridSize(D);D=new ChangePageSetup(a,z,x,n.get());D.ignoreColor=e.background==z;D.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=x?x.src:null);null!=C&& (D.shadowVisible=C);e.pageFormat.width==D.previousFormat.width&&e.pageFormat.height==D.previousFormat.height&&D.ignoreColor&&D.ignoreImage&&D.shadowVisible==e.shadowVisible||e.model.execute(D)});F.className="geBtn gePrimaryBtn";h.appendChild(F);a.editor.cancelFirst||h.appendChild(l);d.appendChild(h);g.appendChild(d);f.appendChild(g);this.container=f}; -PageSetupDialog.addPageFormatPanel=function(a,b,e,f){function g(Z,S,X){if(X||w!=document.activeElement&&z!=document.activeElement){Z=!1;for(S=0;S=Z)w.value=e.width/100;Z=parseFloat(z.value);if(isNaN(Z)||0>=Z)z.value=e.height/100;Z=new mxRectangle(0,0,Math.floor(100*parseFloat(w.value)), -Math.floor(100*parseFloat(z.value)));"custom"!=n.value&&h.checked&&(Z=new mxRectangle(0,0,Z.height,Z.width));S&&J||Z.width==O.width&&Z.height==O.height||(O=Z,null!=f&&f(O))};mxEvent.addListener(b,"click",function(Z){d.checked=!0;K(Z);mxEvent.consume(Z)});mxEvent.addListener(l,"click",function(Z){h.checked=!0;K(Z);mxEvent.consume(Z)});mxEvent.addListener(w,"blur",K);mxEvent.addListener(w,"click",K);mxEvent.addListener(z,"blur",K);mxEvent.addListener(z,"click",K);mxEvent.addListener(h,"change",K);mxEvent.addListener(d, -"change",K);mxEvent.addListener(n,"change",function(Z){J="custom"==n.value;K(Z,!0)});K();return{set:function(Z){e=Z;g(null,null,!0)},get:function(){return O},widthInput:w,heightInput:z}}; +"4px";p.style.width="210px";p.style.height="24px";var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";p.appendChild(x);mxUtils.write(p," in x ");var z=document.createElement("input");z.setAttribute("size","7");z.style.textAlign="right";p.appendChild(z);mxUtils.write(p," in");r.style.display="none";p.style.display="none";for(var C={},F=PageSetupDialog.getFormats(),D=0;D=Z)x.value=e.width/100;Z=parseFloat(z.value);if(isNaN(Z)||0>=Z)z.value=e.height/100;Z=new mxRectangle(0,0,Math.floor(100*parseFloat(x.value)), +Math.floor(100*parseFloat(z.value)));"custom"!=n.value&&h.checked&&(Z=new mxRectangle(0,0,Z.height,Z.width));S&&J||Z.width==O.width&&Z.height==O.height||(O=Z,null!=f&&f(O))};mxEvent.addListener(b,"click",function(Z){d.checked=!0;K(Z);mxEvent.consume(Z)});mxEvent.addListener(l,"click",function(Z){h.checked=!0;K(Z);mxEvent.consume(Z)});mxEvent.addListener(x,"blur",K);mxEvent.addListener(x,"click",K);mxEvent.addListener(z,"blur",K);mxEvent.addListener(z,"click",K);mxEvent.addListener(h,"change",K);mxEvent.addListener(d, +"change",K);mxEvent.addListener(n,"change",function(Z){J="custom"==n.value;K(Z,!0)});K();return{set:function(Z){e=Z;g(null,null,!0)},get:function(){return O},widthInput:x,heightInput:z}}; PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)", format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)}, {key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]}; -var FilenameDialog=function(a,b,e,f,g,d,h,n,r,l,p){r=null!=r?r:!0;var w=document.createElement("div"),z=document.createElement("div");z.style.width="100%";z.style.display="grid";z.style.gap="5px 8px";z.style.gridAutoColumns="auto 1fr";z.style.boxSizing="border-box";z.style.padding="3px";var C=document.createElement("div");C.style.display="inline-flex";C.style.alignItems="center";C.style.justifyContent="flex-end";C.style.minWidth="0";var F=document.createElement("div");F.style.display="inline-block"; +var FilenameDialog=function(a,b,e,f,g,d,h,n,r,l,p){r=null!=r?r:!0;var x=document.createElement("div"),z=document.createElement("div");z.style.width="100%";z.style.display="grid";z.style.gap="5px 8px";z.style.gridAutoColumns="auto 1fr";z.style.boxSizing="border-box";z.style.padding="3px";var C=document.createElement("div");C.style.display="inline-flex";C.style.alignItems="center";C.style.justifyContent="flex-end";C.style.minWidth="0";var F=document.createElement("div");F.style.display="inline-block"; F.style.textOverflow="ellipsis";F.style.whiteSpace="nowrap";F.style.overflow="hidden";F.style.fontSize="10pt";F.style.padding="2px 0";F.setAttribute("title",g||mxResources.get("filename"));mxUtils.write(F,(g||mxResources.get("filename"))+":");C.appendChild(F);z.appendChild(C);var D=document.createElement("input");D.setAttribute("value",b||"");D.style.flexGrow="1";var G=mxUtils.button(e,function(){if(null==d||d(D.value))r&&a.hideDialog(),f(D.value)});G.className="geBtn gePrimaryBtn";this.init=function(){if(null!= g||null==h)if(null!=p?Editor.selectFilename(D):(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var I=z.parentNode;if(null!=I){var J=null;mxEvent.addListener(I,"dragleave",function(O){null!=J&&(J.style.backgroundColor="",J=null);O.stopPropagation();O.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(O){null==J&&(!mxClient.IS_IE||10'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(h,n){a.apply(this,arguments);if(null!=this.shiftPreview1){var r=this.view.canvas; -null!=r.ownerSVGElement&&(r=r.ownerSVGElement);var l=this.gridSize*this.view.scale*this.view.gridSteps;l=-Math.round(l-mxUtils.mod(this.view.translate.x*this.view.scale+h,l))+"px "+-Math.round(l-mxUtils.mod(this.view.translate.y*this.view.scale+n,l))+"px";r.style.backgroundPosition=l}};mxGraph.prototype.updatePageBreaks=function(h,n,r){var l=this.view.scale,p=this.view.translate,w=this.pageFormat,z=l*this.pageScale,C=this.view.getBackgroundPageBounds();n=C.width;r=C.height;var F=new mxRectangle(l* -p.x,l*p.y,w.width*z,w.height*z),D=(h=h&&Math.min(F.width,F.height)>this.minPageBreakDist)?Math.ceil(r/F.height)-1:0,G=h?Math.ceil(n/F.width)-1:0,I=C.x+n,J=C.y+r;null==this.horizontalPageBreaks&&0this.minPageBreakDist)?Math.ceil(r/F.height)-1:0,G=h?Math.ceil(n/F.width)-1:0,I=C.x+n,J=C.y+r;null==this.horizontalPageBreaks&&0document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):g.panningHandler.usePopupTrigger=!1;g.init(this.diagramContainer);mxClient.IS_SVG&&null!=g.view.getDrawPane()&& (b=g.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=g.graphHandler){var p=g.graphHandler.start;g.graphHandler.start=function(){null!=f.hoverIcons&&f.hoverIcons.reset();p.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(Q){var aa=mxUtils.getOffset(this.diagramContainer);0mxUtils.indexOf(this.toolbar.staticElements,Q)&&(Q.parentNode.removeChild(Q),aa.push(Q));Q=da}Q=this.toolbar.fontMenu;da=this.toolbar.sizeMenu;if(null==J)this.toolbar.createTextToolbar();else{for(var ma=0;mah.length?35*h.length:140;z.className="geToolbarContainer geSidebarContainer geShapePicker";z.setAttribute("title",mxResources.get("sidebarTooltip"));z.style.left=a+"px";z.style.top=b+"px";z.style.width=g+"px";mxClient.IS_POINTER&&(z.style.touchAction="none");n||mxUtils.setPrefixedStyle(z.style,"transform","translate(-22px,-22px)");null!=w.background&&w.background!=mxConstants.NONE&&(z.style.backgroundColor= -w.background);w.container.appendChild(z);g=mxUtils.bind(this,function(D){var G=document.createElement("a");G.className="geItem";G.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:1px";z.appendChild(G);null!=F&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(F,[D]):this.sidebar.graph.pasteCellStyles([D],w.currentVertexStyle,w.currentEdgeStyle);var I=D.geometry;w.model.isEdge(D)&&(I=I.getTerminalPoint(!1),I=new mxRectangle(0, -0,I.x,I.y));null!=I&&G.appendChild(this.sidebar.createVertexTemplateFromCells([D],I.width,I.height,"",!0,!1,null,!1,mxUtils.bind(this,function(J){if(!mxEvent.isShiftDown(J)||null==e&&w.isSelectionEmpty()){var O=w.cloneCell(D);if(null!=f)f(O);else{var K=r([O]);w.model.isEdge(O)?O.geometry.translate(K.x,K.y):(O.geometry.x=K.x,O.geometry.y=K.y);w.model.beginUpdate();try{w.addCell(O),w.model.isVertex(O)&&w.isAutoSizeCell(O)&&w.updateCellSize(O)}finally{w.model.endUpdate()}w.setSelectionCell(O);w.scrollCellToVisible(O); -p&&w.startEditing(O);null!=C.hoverIcons&&C.hoverIcons.update(w.view.getState(O))}}else O=w.getEditableCells(null!=e?[e]:w.getSelectionCells()),w.updateShapes(D,O);null!=d&&d(J);mxEvent.consume(J)}),25,25,null,null,e))});for(l=0;l<(n?Math.min(h.length,4):h.length);l++)g(h[l]);h=z.offsetTop+z.clientHeight-(w.container.scrollTop+w.container.offsetHeight);0h.length?35*h.length:140;z.className="geToolbarContainer geSidebarContainer geShapePicker";z.setAttribute("title",mxResources.get("sidebarTooltip"));z.style.left=a+"px";z.style.top=b+"px";z.style.width=g+"px";mxClient.IS_POINTER&&(z.style.touchAction="none");n||mxUtils.setPrefixedStyle(z.style,"transform","translate(-22px,-22px)");null!=x.background&&x.background!=mxConstants.NONE&&(z.style.backgroundColor= +x.background);x.container.appendChild(z);g=mxUtils.bind(this,function(D){var G=document.createElement("a");G.className="geItem";G.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:1px";z.appendChild(G);null!=F&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(F,[D]):this.sidebar.graph.pasteCellStyles([D],x.currentVertexStyle,x.currentEdgeStyle);var I=D.geometry;x.model.isEdge(D)&&(I=I.getTerminalPoint(!1),I=new mxRectangle(0, +0,I.x,I.y));null!=I&&G.appendChild(this.sidebar.createVertexTemplateFromCells([D],I.width,I.height,"",!0,!1,null,!1,mxUtils.bind(this,function(J){if(!mxEvent.isShiftDown(J)||null==e&&x.isSelectionEmpty()){var O=x.cloneCell(D);if(null!=f)f(O);else{var K=r([O]);x.model.isEdge(O)?O.geometry.translate(K.x,K.y):(O.geometry.x=K.x,O.geometry.y=K.y);x.model.beginUpdate();try{x.addCell(O),x.model.isVertex(O)&&x.isAutoSizeCell(O)&&x.updateCellSize(O)}finally{x.model.endUpdate()}x.setSelectionCell(O);x.scrollCellToVisible(O); +p&&x.startEditing(O);null!=C.hoverIcons&&C.hoverIcons.update(x.view.getState(O))}}else O=x.getEditableCells(null!=e?[e]:x.getSelectionCells()),x.updateShapes(D,O);null!=d&&d(J);mxEvent.consume(J)}),25,25,null,null,e))});for(l=0;l<(n?Math.min(h.length,4):h.length);l++)g(h[l]);h=z.offsetTop+z.clientHeight-(x.container.scrollTop+x.container.offsetHeight);0=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=ha,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=ha,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale); this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==ua&&""!=la.getAttribute("filter")&&(ua=la.getAttribute("filter"),la.removeAttribute("filter"));T=new mxPoint(a.container.scrollLeft,a.container.scrollTop);V=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);ha=ka||null==U?a.container.scrollLeft+a.container.clientWidth/2:U.x+a.container.scrollLeft-a.container.offsetLeft; var va=ka||null==U?a.container.scrollTop+a.container.clientHeight/2:U.y+a.container.scrollTop-a.container.offsetTop;la.style.transformOrigin=ha+"px "+va+"px";la.style.transform="scale("+V+")";ma.style.transformOrigin=ha+"px "+va+"px";ma.style.transform="scale("+V+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node?(ha=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(ha.style,"transform-origin",(ka||null==U?a.container.clientWidth/2+a.container.scrollLeft-ha.offsetLeft+ "px":U.x+a.container.scrollLeft-ha.offsetLeft-a.container.offsetLeft+"px")+" "+(ka||null==U?a.container.clientHeight/2+a.container.scrollTop-ha.offsetTop+"px":U.y+a.container.scrollTop-ha.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(ha.style,"transform","scale("+V+")")):a.view.validateBackgroundStyles(V,ha,va);a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset();a.fireEvent(new mxEventObject("zoomPreview", "factor",V))}R(a.isFastZoomEnabled()?ra:0)};mxEvent.addGestureListeners(a.container,function(V){null!=M&&window.clearTimeout(M)},null,function(V){1!=a.cumulativeZoomFactor&&R(0)});mxEvent.addListener(a.container,"scroll",function(V){null==M||a.isMouseDown||1==a.cumulativeZoomFactor||R(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(V,ka,ra,ha,va){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!ra&&a.isScrollWheelEvent(V))ra=a.view.getTranslate(), -ha=40/a.view.scale,mxEvent.isShiftDown(V)?a.view.setTranslate(ra.x+(ka?-ha:ha),ra.y):a.view.setTranslate(ra.x,ra.y+(ka?ha:-ha));else if(ra||a.isZoomWheelEvent(V))for(var Ca=mxEvent.getSource(V);null!=Ca;){if(Ca==a.container)return a.tooltipHandler.hideTooltip(),U=null!=ha&&null!=va?new mxPoint(ha,va):new mxPoint(mxEvent.getClientX(V),mxEvent.getClientY(V)),Y=ra,ra=a.zoomFactor,ha=null,V.ctrlKey&&null!=V.deltaY&&40>Math.abs(V.deltaY)&&Math.round(V.deltaY)!=V.deltaY?ra=1+Math.abs(V.deltaY)/20*(ra-1): -null!=V.movementY&&"pointermove"==V.type&&(ra=1+Math.max(1,Math.abs(V.movementY))/20*(ra-1),ha=-1),a.lazyZoom(ka,null,ha,ra),mxEvent.consume(V),!1;Ca=Ca.parentNode}}),a.container);a.panningHandler.zoomGraph=function(V){a.cumulativeZoomFactor=V.scale;a.lazyZoom(0Math.abs(V.deltaY)&&Math.round(V.deltaY)!=V.deltaY?ra=1+Math.abs(V.deltaY)/20*(ra-1): +null!=V.movementY&&"pointermove"==V.type&&(ra=1+Math.max(1,Math.abs(V.movementY))/20*(ra-1),ha=-1),a.lazyZoom(ka,null,ha,ra),mxEvent.consume(V),!1;Ba=Ba.parentNode}}),a.container);a.panningHandler.zoomGraph=function(V){a.cumulativeZoomFactor=V.scale;a.lazyZoom(0this.maxTooltipWidth||f>this.maxTooltipHeight)?Math.round(100*Math.min(this.maxTooltipWidth/e,this.maxTooltipHeight/f))/100:1;this.tooltip.style.display= +this.tooltipMouseDown(z);window.setTimeout(mxUtils.bind(this,function(){null!=this.tooltipCloseImage&&"none"!=this.tooltipCloseImage.style.display||this.hideTooltip()}),0)}),null,mxUtils.bind(this,function(z){this.hideTooltip()}));mxClient.IS_SVG||(this.graph2.view.canvas.style.position="relative");var x=document.createElement("img");x.setAttribute("src",Dialog.prototype.closeImage);x.setAttribute("title",mxResources.get("close"));x.style.position="absolute";x.style.cursor="default";x.style.padding= +"8px";x.style.right="2px";x.style.top="2px";this.tooltip.appendChild(x);this.tooltipCloseImage=x;mxEvent.addListener(x,"click",mxUtils.bind(this,function(z){this.hideTooltip();mxEvent.consume(z)}))}this.tooltipCloseImage.style.display=l?"":"none";this.graph2.model.clear();this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder);this.graph2.view.scale=!n&&(e>this.maxTooltipWidth||f>this.maxTooltipHeight)?Math.round(100*Math.min(this.maxTooltipWidth/e,this.maxTooltipHeight/f))/100:1;this.tooltip.style.display= "block";this.graph2.labelsVisible=null==d||d;d=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;l=mxUtils.getCurrentStyle(this.tooltip);this.graph2.shapeBackgroundColor=l.backgroundColor;null!=b&&(b=this.graph2.cloneCells(b),this.graph2.pasteCellStyles(r.includeDescendants(b),p?r.currentVertexStyle:r.defaultVertexStyle,p?r.currentEdgeStyle:r.defaultEdgeStyle,null,r.pasteEdgeStyle),this.graph2.addCells(b));mxClient.NO_FO=d;p=this.graph2.getGraphBounds();n&&0 e||p.height>f)?(e=Math.round(100*Math.min(e/p.width,f/p.height))/100,mxClient.NO_FO?(this.graph2.view.setScale(Math.round(100*Math.min(this.maxTooltipWidth/p.width,this.maxTooltipHeight/p.height))/100),p=this.graph2.getGraphBounds()):(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="scale("+e+")",this.graph2.view.getDrawPane().ownerSVGElement.style.transformOrigin="0 0",p.width*=e,p.height*=e)):mxClient.NO_FO||(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="");e=p.width+ 2*this.tooltipBorder+4;f=p.height+2*this.tooltipBorder;this.tooltip.style.overflow="visible";this.tooltip.style.width=e+"px";n=e;this.tooltipTitles&&null!=g&&0V&&null!=La&&!mxEvent.isShiftDown(Qa)&&(mxUtils.getValue(La.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(ra,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(La.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE|| -mxUtils.getValue(La.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(La.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(ra,mxConstants.STYLE_SHAPE)||1500this.dropTargetDelay&&!this.isDropStyleTargetIgnored(La)&&(ha.model.isVertex(La.cell)&&null!=w||ha.model.isEdge(La.cell)&&ha.model.isEdge(f[0]))){if(ha.isCellEditable(La.cell)){K=La;var ta=ha.model.isEdge(La.cell)?ha.view.getPoint(La): -new mxPoint(La.getCenterX(),La.getCenterY());ta=new mxRectangle(ta.x-this.refreshTarget.width/2,ta.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);aa.style.left=Math.floor(ta.x)+"px";aa.style.top=Math.floor(ta.y)+"px";null==da&&(ha.container.appendChild(aa),da=aa.parentNode);n(va,Ca,ta,aa)}}else null==K||!mxUtils.contains(K,va,Ca)||1500V&&V>this.dropTargetDelay||ha.model.isEdge(Na)?La:null,null!=J&&ta){Fa=[ma,la,S,X,ca,Q];for(ta=0;taV&&null!=La&&!mxEvent.isShiftDown(Sa)&&(mxUtils.getValue(La.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(ra,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(La.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE|| +mxUtils.getValue(La.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(La.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(ra,mxConstants.STYLE_SHAPE)||1500this.dropTargetDelay&&!this.isDropStyleTargetIgnored(La)&&(ha.model.isVertex(La.cell)&&null!=x||ha.model.isEdge(La.cell)&&ha.model.isEdge(f[0]))){if(ha.isCellEditable(La.cell)){K=La;var ta=ha.model.isEdge(La.cell)?ha.view.getPoint(La): +new mxPoint(La.getCenterX(),La.getCenterY());ta=new mxRectangle(ta.x-this.refreshTarget.width/2,ta.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);aa.style.left=Math.floor(ta.x)+"px";aa.style.top=Math.floor(ta.y)+"px";null==da&&(ha.container.appendChild(aa),da=aa.parentNode);n(va,Ba,ta,aa)}}else null==K||!mxUtils.contains(K,va,Ba)||1500V&&V>this.dropTargetDelay||ha.model.isEdge(Na)?La:null,null!=J&&ta){Fa=[ma,la,S,X,ca,Q];for(ta=0;tar||Math.abs(p.y-mxEvent.getClientY(C))>r))&&null!=this.dragElement&&"none"==this.dragElement.style.display&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100*z));h.apply(this,arguments)};b.mouseUp=function(C){try{mxEvent.isPopupTrigger(C)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||(null!=f&&f(C),mxEvent.isConsumed(C)||w.itemClicked(e,b,C,a)),n.apply(b,arguments),mxUtils.setOpacity(a,100*z),p=null, -w.currentElt=a}catch(F){b.reset(),w.editorUi.handleError(F)}}};Sidebar.prototype.createVertexTemplateEntry=function(a,b,e,f,g,d,h,n){null!=n&&null!=g&&(n+=" "+g);n=null!=n&&0r||Math.abs(p.y-mxEvent.getClientY(C))>r))&&null!=this.dragElement&&"none"==this.dragElement.style.display&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100*z));h.apply(this,arguments)};b.mouseUp=function(C){try{mxEvent.isPopupTrigger(C)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||(null!=f&&f(C),mxEvent.isConsumed(C)||x.itemClicked(e,b,C,a)),n.apply(b,arguments),mxUtils.setOpacity(a,100*z),p=null, +x.currentElt=a}catch(F){b.reset(),x.editorUi.handleError(F)}}};Sidebar.prototype.createVertexTemplateEntry=function(a,b,e,f,g,d,h,n){null!=n&&null!=g&&(n+=" "+g);n=null!=n&&0mxUtils.indexOf(g,z)){C=this.getTagsForStencil(w,z);var G=null!=n?n[z]:null;null!=G&&C.push(G);p.push(this.createVertexTemplateEntry("shape="+w+z.toLowerCase()+f,Math.round(F*h),Math.round(D*h),"",z.replace(/_/g," "),null,null,this.filterTags(C.join(" "))))}}), -!0,!0);this.addPaletteFunctions(a,b,!1,p)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(w){null==f&&(f="");null!=d&&d.call(this,w);if(null!=r)for(var z=0;zmxUtils.indexOf(g,F))&&w.appendChild(this.createVertexTemplate("shape="+C+F.toLowerCase()+f,Math.round(G*h),Math.round(I*h),"",F.replace(/_/g," "),!0))}),!0)}))}; +Sidebar.prototype.addStencilPalette=function(a,b,e,f,g,d,h,n,r,l){h=null!=h?h:1;if(this.addStencilsToIndex){var p=[];if(null!=r)for(l=0;lmxUtils.indexOf(g,z)){C=this.getTagsForStencil(x,z);var G=null!=n?n[z]:null;null!=G&&C.push(G);p.push(this.createVertexTemplateEntry("shape="+x+z.toLowerCase()+f,Math.round(F*h),Math.round(D*h),"",z.replace(/_/g," "),null,null,this.filterTags(C.join(" "))))}}), +!0,!0);this.addPaletteFunctions(a,b,!1,p)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(x){null==f&&(f="");null!=d&&d.call(this,x);if(null!=r)for(var z=0;zmxUtils.indexOf(g,F))&&x.appendChild(this.createVertexTemplate("shape="+C+F.toLowerCase()+f,Math.round(G*h),Math.round(I*h),"",F.replace(/_/g," "),!0))}),!0)}))}; Sidebar.prototype.destroy=function(){null!=this.graph&&(null!=this.graph.container&&null!=this.graph.container.parentNode&&this.graph.container.parentNode.removeChild(this.graph.container),this.graph.destroy(),this.graph=null);null!=this.pointerUpHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler),this.pointerUpHandler=null);null!=this.pointerDownHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler), this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(f){for(var g=0;gY||Math.abs(h.y-U.getGraphY())>Y){var ua=null;mxEvent.isControlDown(U.getEvent())||mxEvent.isShiftDown(U.getEvent())|| (ua=this.selectionCellsHandler.getHandler(T.cell));if(null!=ua&&null!=ua.bends&&0pageSize){var O=w.startIndex||0;I=G.slice(Math.max(0,O),Math.min(G.length,O+pageSize))}I=I.concat(f.getOpposites(I,D));var K=p.cloneCells(I);for(J=0;J(w.startIndex||0)+pageSize){var S=p.createVertex(null,null,mxResources.get("nextPage")+"...",0,0,100,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;"); -S.referenceCell=F;S.startIndex=(w.startIndex||0)+pageSize;K.splice(0,0,S)}for(var X in p.getModel().cells){var ca=p.getModel().getCell(X);ca!=p.rootCell&&!p.getModel().isAncestor(p.rootCell,ca)&&p.getModel().isVertex(ca)&&p.removeCells([ca])}p.addCells(K);var Q=p.getModel().getGeometry(p.rootCell);null!=Q&&(Q=Q.clone(),Q.x=z-Q.width/2,Q.y=C-Q.height/3,p.getModel().setGeometry(p.rootCell,Q));w=[];for(X in p.getModel().cells)ca=p.getModel().getCell(X),ca!=p.rootCell&&p.getModel().isVertex(ca)&&p.getModel().getParent(ca)== -p.getDefaultParent()&&(w.push(ca),Q=p.getModel().getGeometry(ca),null!=Q&&(Q.x=z-Q.width/2,Q.y=C-Q.height/2));var aa=w.length,da=2*Math.PI/aa,ma=Math.max(minSize,Math.min(p.container.scrollWidth/3-80,p.container.scrollHeight/3-80));for(z=0;zpageSize){var O=x.startIndex||0;I=G.slice(Math.max(0,O),Math.min(G.length,O+pageSize))}I=I.concat(f.getOpposites(I,D));var K=p.cloneCells(I);for(J=0;J(x.startIndex||0)+pageSize){var S=p.createVertex(null,null,mxResources.get("nextPage")+"...",0,0,100,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;"); +S.referenceCell=F;S.startIndex=(x.startIndex||0)+pageSize;K.splice(0,0,S)}for(var X in p.getModel().cells){var ca=p.getModel().getCell(X);ca!=p.rootCell&&!p.getModel().isAncestor(p.rootCell,ca)&&p.getModel().isVertex(ca)&&p.removeCells([ca])}p.addCells(K);var Q=p.getModel().getGeometry(p.rootCell);null!=Q&&(Q=Q.clone(),Q.x=z-Q.width/2,Q.y=C-Q.height/3,p.getModel().setGeometry(p.rootCell,Q));x=[];for(X in p.getModel().cells)ca=p.getModel().getCell(X),ca!=p.rootCell&&p.getModel().isVertex(ca)&&p.getModel().getParent(ca)== +p.getDefaultParent()&&(x.push(ca),Q=p.getModel().getGeometry(ca),null!=Q&&(Q.x=z-Q.width/2,Q.y=C-Q.height/2));var aa=x.length,da=2*Math.PI/aa,ma=Math.max(minSize,Math.min(p.container.scrollWidth/3-80,p.container.scrollHeight/3-80));for(z=0;zmxUtils.indexOf(r,p)})),this.updateCellStyles(h,n))};Graph.prototype.copyCellStyles=function(h,n,r,l,p,w,z){var C=!1,F=!1;if(0mxUtils.indexOf(r,p)})),this.updateCellStyles(h,n))};Graph.prototype.copyCellStyles=function(h,n,r,l,p,x,z){var C=!1,F=!1;if(0mxUtils.indexOf(Graph.edgeStyles,K))&&(C=mxUtils.setStyle(C,K,aa),"fontFamily"==K&&null==F.fontSource&&(C=mxUtils.setStyle(C,"fontSource",null)),Q&&"rounded"==K&&"1"==aa&&null==F.curved&&(C=mxUtils.setStyle(C,"curved",null)))}Editor.simpleLabels&&(C=mxUtils.setStyle(mxUtils.setStyle(C,"html",null),"whiteSpace",null));this.model.setStyle(z,C)}}finally{this.model.endUpdate()}return h};Graph.prototype.updateCellStyles=function(h,n){this.model.beginUpdate(); -try{for(var r=0;rz?"a":"p",tt:12>z?"am":"pm",T:12>z?"A":"P",TT:12>z?"AM":"PM",Z:e?"UTC":(String(a).match(g)||[""]).pop().replace(d,""),o:(0z?"a":"p",tt:12>z?"am":"pm",T:12>z?"A":"P",TT:12>z?"AM":"PM",Z:e?"UTC":(String(a).match(g)||[""]).pop().replace(d,""),o:(0D||Math.abs(da.y-J.y)>D)&&(Math.abs(da.x-I.x)>D||Math.abs(da.y-I.y)>D)&&(null==ca||mxUtils.ptLineDist(J.x, -J.y,I.x,I.y,ca.x,ca.y)>D||mxUtils.ptLineDist(J.x,J.y,I.x,I.y,aa.x,aa.y)>D)&&(null==K||mxUtils.ptLineDist(J.x,J.y,I.x,I.y,K.x,K.y)>D||mxUtils.ptLineDist(J.x,J.y,I.x,I.y,Q.x,Q.y)>D)){K=da.x-J.x;ca=da.y-J.y;da={distSq:K*K+ca*ca,x:da.x,y:da.y};for(K=0;Kda.distSq){O.splice(K,0,da);da=null;break}null==da||0!=O.length&&O[O.length-1].x===da.x&&O[O.length-1].y===da.y||O.push(da)}ca=aa}}}for(S=0;SD||mxUtils.ptLineDist(J.x,J.y,I.x,I.y,aa.x,aa.y)>D)&&(null==K||mxUtils.ptLineDist(J.x,J.y,I.x,I.y,K.x,K.y)>D||mxUtils.ptLineDist(J.x,J.y,I.x,I.y,Q.x,Q.y)>D)){K=da.x-J.x;ca=da.y-J.y;da={distSq:K*K+ca*ca,x:da.x,y:da.y};for(K=0;Kda.distSq){O.splice(K,0,da);da=null;break}null==da||0!=O.length&&O[O.length-1].x===da.x&&O[O.length-1].y===da.y||O.push(da)}ca=aa}}}for(S=0;SF*F&&0F*F&&(ca=new mxPoint(X.x-K.x,X.y-K.y),S=new mxPoint(X.x+K.x,X.y+K.y),O.push(ca),this.addPoints(p,O,z,C,!1,null,G),O=0>Math.round(K.x)||0==Math.round(K.x)&&0>=Math.round(K.y)?1:-1,G=!1,"sharp"==D?(p.lineTo(ca.x-K.y*O,ca.y+K.x*O),p.lineTo(S.x-K.y*O,S.y+K.x*O),p.lineTo(S.x,S.y)):"line"==D?(p.moveTo(ca.x+K.y*O,ca.y-K.x*O),p.lineTo(ca.x-K.y*O,ca.y+K.x*O),p.moveTo(S.x-K.y*O,S.y+K.x*O),p.lineTo(S.x+K.y*O,S.y-K.x*O),p.moveTo(S.x,S.y)):"arc"==D?(O*= -1.3,p.curveTo(ca.x-K.y*O,ca.y+K.x*O,S.x-K.y*O,S.y+K.x*O,S.x,S.y)):(p.moveTo(S.x,S.y),G=!0),O=[S],ca=!0))}else K=null;ca||(O.push(X),I=X)}this.addPoints(p,O,z,C,!1,null,G);p.stroke()}};var h=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(p,w,z,C){return null!=w&&"centerPerimeter"==w.style[mxConstants.STYLE_PERIMETER]?new mxPoint(w.getCenterX(),w.getCenterY()):h.apply(this,arguments)};var n=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint= -function(p,w,z,C){if(null==w||null==p||"1"!=w.style.snapToPoint&&"1"!=p.style.snapToPoint)n.apply(this,arguments);else{w=this.getTerminalPort(p,w,C);var F=this.getNextPoint(p,z,C),D=this.graph.isOrthogonal(p),G=mxUtils.toRadians(Number(w.style[mxConstants.STYLE_ROTATION]||"0")),I=new mxPoint(w.getCenterX(),w.getCenterY());if(0!=G){var J=Math.cos(-G),O=Math.sin(-G);F=mxUtils.getRotatedPoint(F,J,O,I)}J=parseFloat(p.style[mxConstants.STYLE_PERIMETER_SPACING]||0);J+=parseFloat(p.style[C?mxConstants.STYLE_SOURCE_PERIMETER_SPACING: -mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);F=this.getPerimeterPoint(w,F,0==G&&D,J);0!=G&&(J=Math.cos(G),O=Math.sin(G),F=mxUtils.getRotatedPoint(F,J,O,I));p.setAbsoluteTerminalPoint(this.snapToAnchorPoint(p,w,z,C,F),C)}};mxGraphView.prototype.snapToAnchorPoint=function(p,w,z,C,F){if(null!=w&&null!=p){p=this.graph.getAllConnectionConstraints(w);C=z=null;if(null!=p)for(var D=0;D=d.getStatus()&&eval.call(window,d.getText())}}catch(h){null!=window.console&&console.log("error in getStencil:",a,e,b,g,h)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b}; mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0=ia.x&&this.model.remove(sa[A]);var Ja=this.model.getTerminal(B,!1); -if(null!=Ja){var Ka=this.getCurrentCellStyle(Ja);null!=Ka&&"1"==Ka.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[u]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[u]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[B]))}}finally{this.model.endUpdate()}return B};var w=Graph.prototype.selectCell;Graph.prototype.selectCell=function(u,A,B){if(A||B)w.apply(this,arguments);else{var E=this.getSelectionCell(),L=null,P=[],W=mxUtils.bind(this, +if(null!=Ja){var Ka=this.getCurrentCellStyle(Ja);null!=Ka&&"1"==Ka.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[u]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[u]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[B]))}}finally{this.model.endUpdate()}return B};var x=Graph.prototype.selectCell;Graph.prototype.selectCell=function(u,A,B){if(A||B)x.apply(this,arguments);else{var E=this.getSelectionCell(),L=null,P=[],W=mxUtils.bind(this, function(ja){if(null!=this.view.getState(ja)&&(this.model.isVertex(ja)||this.model.isEdge(ja)))if(P.push(ja),ja==E)L=P.length-1;else if(u&&null==E&&0L||!u&&0wa)for(ya=0;ya>wa;ya--)this.model.remove(xa[xa.length+ya-1]);xa=this.model.getChildCells(u[ea],!0);for(ya=0;yawa)for(ya=0;ya>wa;ya--)this.model.remove(xa[xa.length+ya-1]);xa=this.model.getChildCells(u[ea],!0);for(ya=0;yamxUtils.indexOf(u,P)&&0>mxUtils.indexOf(B,P)&&B.push(P):this.labelChanged(u[E],"")}else{if(this.isTableRow(u[E])&&(P=this.model.getParent(u[E]),0>mxUtils.indexOf(u,P)&&0>mxUtils.indexOf(B,P))){for(var W=this.model.getChildCells(P,!0),ja=0,ea=0;eav&&m++;q++}t.lengthmxUtils.indexOf(E,P)&&E.push(P);break}else P=P.parentNode;return E};Graph.prototype.getSelectedElement=function(){var u= -null;if(window.getSelection){var A=window.getSelection();A.getRangeAt&&A.rangeCount&&(u=A.getRangeAt(0).commonAncestorContainer)}else document.selection&&(u=document.selection.createRange().parentElement());return u};Graph.prototype.getSelectedEditingElement=function(){for(var u=this.getSelectedElement();null!=u&&u.nodeType!=mxConstants.NODETYPE_ELEMENT;)u=u.parentNode;null!=u&&u==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType== -mxConstants.NODETYPE_ELEMENT&&(u=this.cellEditor.textarea.firstChild);return u};Graph.prototype.getParentByName=function(u,A,B){for(;null!=u&&u.nodeName!=A;){if(u==B)return null;u=u.parentNode}return u};Graph.prototype.getParentByNames=function(u,A,B){for(;null!=u&&!(0<=mxUtils.indexOf(A,u.nodeName));){if(u==B)return null;u=u.parentNode}return u};Graph.prototype.selectNode=function(u){var A=null;if(window.getSelection){if(A=window.getSelection(),A.getRangeAt&&A.rangeCount){var B=document.createRange(); -B.selectNode(u);A.removeAllRanges();A.addRange(B)}}else(A=document.selection)&&"Control"!=A.type&&(u=A.createRange(),u.collapse(!0),B=A.createRange(),B.setEndPoint("StartToStart",u),B.select())};Graph.prototype.flipEdgePoints=function(u,A,B){var E=this.getCellGeometry(u);if(null!=E){E=E.clone();if(null!=E.points)for(var L=0;L=P.length)A.remove(B);else{var W=P.length-1;this.isTableCell(u)&&(W=mxUtils.indexOf(P,u));for(E=u=0;E=L.length)A.remove(B);else{this.isTableRow(E)||(E=L[L.length-1]);A.remove(E);u=0;var P=this.getCellGeometry(E);null!=P&&(u=P.height);var W=this.getCellGeometry(B);null!=W&&(W=W.clone(),W.height-=u,A.setGeometry(B, -W))}}finally{A.endUpdate()}};Graph.prototype.insertRow=function(u,A){for(var B=u.tBodies[0],E=B.rows[0].cells,L=u=0;LA&&u[B].deleteCell(A)}};Graph.prototype.pasteHtmlAtCaret=function(u){if(window.getSelection){var A=window.getSelection();if(A.getRangeAt&&A.rangeCount){A=A.getRangeAt(0);A.deleteContents();var B=document.createElement("div");B.innerHTML= -u;u=document.createDocumentFragment();for(var E;E=B.firstChild;)lastNode=u.appendChild(E);A.insertNode(u)}}else(A=document.selection)&&"Control"!=A.type&&A.createRange().pasteHTML(u)};Graph.prototype.createLinkForHint=function(u,A,B){function E(P,W){P.length>W&&(P=P.substring(0,Math.round(W/2))+"..."+P.substring(P.length-Math.round(W/4)));return P}u=null!=u?u:"javascript:void(0);";if(null==A||0==A.length)A=this.isCustomLink(u)?this.getLinkTitle(u):u;var L=document.createElement("a");L.setAttribute("rel", -this.linkRelation);L.setAttribute("href",this.getAbsoluteUrl(u));L.setAttribute("title",E(this.isCustomLink(u)?this.getLinkTitle(u):u,80));null!=this.linkTarget&&L.setAttribute("target",this.linkTarget);mxUtils.write(L,E(A,40));this.isCustomLink(u)&&mxEvent.addListener(L,"click",mxUtils.bind(this,function(P){this.customLinkClicked(u,B);mxEvent.consume(P)}));return L};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first}; -this.addListener(mxEvent.START_EDITING,function(P,W){this.popupMenuHandler.hideMenu()});var u=this.updateMouseEvent;this.updateMouseEvent=function(P){P=u.apply(this,arguments);if(mxEvent.isTouchEvent(P.getEvent())&&null==P.getState()){var W=this.getCellAt(P.graphX,P.graphY);null!=W&&this.isSwimlane(W)&&this.hitsSwimlaneContent(W,P.graphX,P.graphY)||(P.state=this.view.getState(W),null!=P.state&&null!=P.state.shape&&(this.container.style.cursor=P.state.shape.node.style.cursor))}null==P.getState()&& -this.isEnabled()&&(this.container.style.cursor="default");return P};var A=!1,B=!1,E=!1,L=this.fireMouseEvent;this.fireMouseEvent=function(P,W,ja){P==mxEvent.MOUSE_DOWN&&(W=this.updateMouseEvent(W),A=this.isCellSelected(W.getCell()),B=this.isSelectionEmpty(),E=this.popupMenuHandler.isMenuShowing());L.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(P,W){var ja=mxEvent.isMouseEvent(W.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null== -W.getState()||!W.isSource(W.getState().control))&&(this.popupMenuHandler.popupTrigger||!E&&!ja&&(B&&null==W.getCell()&&this.isSelectionEmpty()||A&&this.isCellSelected(W.getCell())));ja=!A||ja?null:mxUtils.bind(this,function(ea){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ia=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(W.getX()+ia.x+1,W.getY()+ia.y+1,ea,W.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[P,W,ja])})};mxCellEditor.prototype.isContentEditing= -function(){var u=this.graph.view.getState(this.editingCell);return null!=u&&1==u.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var u="";window.getSelection?u=window.getSelection():document.getSelection?u=document.getSelection():document.selection&&(u=document.selection.createRange().text);return""!=u};mxCellEditor.prototype.insertTab=function(u){var A= -this.textarea.ownerDocument.defaultView.getSelection(),B=A.getRangeAt(0);u=Graph.createTabNode(u);B.insertNode(u);B.setStartAfter(u);B.setEndAfter(u);A.removeAllRanges();A.addRange(B)};mxCellEditor.prototype.alignText=function(u,A){var B=this.graph.getView().getState(this.editingCell);if(null!=B){B=mxUtils.getValue(B.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var E=null!=B&&"vertical-"==B.substring(0,9),L=null!=A&&mxEvent.isShiftDown(A);if(L||null!=window.getSelection&& -null!=window.getSelection().containsNode){var P=!0;this.graph.processElements(this.textarea,function(W){L||E||window.getSelection().containsNode(W,!0)?(W.removeAttribute("align"),W.style.textAlign=null):P=!1});(P||E)&&this.graph.cellEditor.setAlign(u)}E||document.execCommand("justify"+u.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var u=window.getSelection();if(u.getRangeAt&&u.rangeCount){for(var A=[],B=0,E=u.rangeCount;B"):ja,!0);this.textarea.className="mxCellEditor geContentEditable";ea=mxUtils.getValue(u.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);A=mxUtils.getValue(u.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var E=mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT), -L=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,P=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,W=[];(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&W.push("underline");(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&W.push("line-through");this.textarea.style.lineHeight= -mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration=W.join(" ");this.textarea.style.fontWeight=L?"bold":"normal";this.textarea.style.fontStyle=P?"italic":"";this.textarea.style.fontFamily=A;this.textarea.style.textAlign=E;this.textarea.style.padding="0px";this.textarea.innerHTML!=ja&&(this.textarea.innerHTML=ja,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML= -this.getEmptyLabelText(),this.clearOnChange=0
"));ja=Graph.sanitizeHtml(A?ja.replace(/\n/g,"").replace(/<br\s*.?>/g,"
"):ja,!0);this.textarea.className="mxCellEditor mxPlainTextEditor"; -var ea=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!= -ja&&(this.textarea.innerHTML=ja);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=B;this.resize()}};var O=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(u,A){if(null!=this.textarea)if(u=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=u){var B=u.view.scale;this.bounds=mxRectangle.fromRectangle(u);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width= -160*B;this.bounds.height=60*B;var E=null!=u.text?u.text.margin:null;null==E&&(E=mxUtils.getAlignmentAsPoint(mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(u.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=E.x*this.bounds.width;this.bounds.y+=E.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/B)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/B)+"px";this.textarea.style.overflow= -"auto";this.textarea.clientHeight"));return B=Graph.sanitizeHtml(B,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(u){if("0"==mxUtils.getValue(u.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var A=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(u.style,"nl2Br","1")?(A=A.replace(/\r\n/g,"
").replace(/\n/g,"
"),0"==A.substring(A.length- -5)||"
"==A.substring(A.length-4))&&(A=A.substring(0,A.lastIndexOf("
")):A=A.replace(/\r\n/g,"").replace(/\n/g,"");return A};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(u){this.codeViewMode&&this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(u){}};var Z=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(u, -A){this.graph.getModel().beginUpdate();try{Z.apply(this,arguments),""==A&&this.graph.isCellDeletable(u.cell)&&0==this.graph.model.getChildCount(u.cell)&&this.graph.isTransparentState(u)&&this.graph.removeCells([u.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(u){u=mxUtils.getValue(u.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);u==mxConstants.NONE&&(u=null);return u};mxCellEditor.prototype.getBorderColor=function(u){u=mxUtils.getValue(u.style, -mxConstants.STYLE_LABEL_BORDERCOLOR,null);u==mxConstants.NONE&&(u=null);return u};mxCellEditor.prototype.getMinimumSize=function(u){var A=this.graph.getView().scale;return new mxRectangle(0,0,null==u.text?30:u.text.size*A+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(u,A){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(A.getEvent)};mxGraphView.prototype.formatUnitText=function(u){return u? -b(u,this.unit):u};mxGraphHandler.prototype.updateHint=function(u){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var A=this.graph.view.translate,B=this.graph.view.scale;u=this.roundLength((this.bounds.x+this.currentDx)/B-A.x);A=this.roundLength((this.bounds.y+this.currentDy)/B-A.y);B=this.graph.view.unit;this.hint.innerHTML=b(u,B)+", "+b(A,B);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width- -this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var S=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(u,A){S.apply(this,arguments);var B=this.graph.getCellStyle(u);if(null==B.childLayout){var E=this.graph.model.getParent(u),L=null!=E?this.graph.getCellGeometry(E): -null;if(null!=L&&(B=this.graph.getCellStyle(E),"stackLayout"==B.childLayout)){var P=parseFloat(mxUtils.getValue(B,"stackBorder",mxStackLayout.prototype.border));B="1"==mxUtils.getValue(B,"horizontalStack","1");var W=this.graph.getActualStartSize(E);L=L.clone();B?L.height=A.height+W.y+W.height+2*P:L.width=A.width+W.x+W.width+2*P;this.graph.model.setGeometry(E,L)}}};var X=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function u(ja){B.get(ja)|| -(B.put(ja,!0),L.push(ja))}for(var A=X.apply(this,arguments),B=new mxDictionary,E=this.graph.model,L=[],P=0;Pu;u++){var A=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);A.dialect=mxConstants.DIALECT_SVG;A.init(this.graph.view.getOverlayPane());this.cornerHandles.push(A)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();u=this.graph.getLinkForCell(this.state.cell);A=this.graph.getLinksForState(this.state); -this.updateLinkHint(u,A)};var V=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var u=new mxPoint(0,0),A=this.tolerance,B=this.state.style.shape;null==mxCellRenderer.defaultShapes[B]&&mxStencilRegistry.getStencil(B);B=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!B&&null!=this.customHandles)for(var E=0;E'); +function(u){return u};Graph.prototype.getSvg=function(u,A,B,E,L,P,W,ja,ea,ia,sa,Ja,Ka,xa,Ca,wa){var ya=null;if(null!=xa)for(ya=new mxDictionary,sa=0;saH&&v++;w++}q.lengthmxUtils.indexOf(E,P)&&E.push(P);break}else P=P.parentNode;return E};Graph.prototype.getSelectedElement=function(){var u=null;if(window.getSelection){var A=window.getSelection();A.getRangeAt&&A.rangeCount&&(u=A.getRangeAt(0).commonAncestorContainer)}else document.selection&&(u=document.selection.createRange().parentElement()); +return u};Graph.prototype.getSelectedEditingElement=function(){for(var u=this.getSelectedElement();null!=u&&u.nodeType!=mxConstants.NODETYPE_ELEMENT;)u=u.parentNode;null!=u&&u==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(u=this.cellEditor.textarea.firstChild);return u};Graph.prototype.getParentByName=function(u,A,B){for(;null!=u&&u.nodeName!=A;){if(u==B)return null;u=u.parentNode}return u};Graph.prototype.getParentByNames= +function(u,A,B){for(;null!=u&&!(0<=mxUtils.indexOf(A,u.nodeName));){if(u==B)return null;u=u.parentNode}return u};Graph.prototype.selectNode=function(u){var A=null;if(window.getSelection){if(A=window.getSelection(),A.getRangeAt&&A.rangeCount){var B=document.createRange();B.selectNode(u);A.removeAllRanges();A.addRange(B)}}else(A=document.selection)&&"Control"!=A.type&&(u=A.createRange(),u.collapse(!0),B=A.createRange(),B.setEndPoint("StartToStart",u),B.select())};Graph.prototype.flipEdgePoints=function(u, +A,B){var E=this.getCellGeometry(u);if(null!=E){E=E.clone();if(null!=E.points)for(var L=0;L=P.length)A.remove(B);else{var W=P.length-1;this.isTableCell(u)&&(W=mxUtils.indexOf(P,u));for(E=u=0;E=L.length)A.remove(B);else{this.isTableRow(E)||(E=L[L.length-1]);A.remove(E);u=0;var P=this.getCellGeometry(E);null!=P&&(u=P.height);var W=this.getCellGeometry(B);null!=W&&(W=W.clone(),W.height-=u,A.setGeometry(B,W))}}finally{A.endUpdate()}};Graph.prototype.insertRow=function(u,A){for(var B=u.tBodies[0],E=B.rows[0].cells,L=u=0;LA&&u[B].deleteCell(A)}};Graph.prototype.pasteHtmlAtCaret=function(u){if(window.getSelection){var A=window.getSelection();if(A.getRangeAt&&A.rangeCount){A=A.getRangeAt(0);A.deleteContents();var B=document.createElement("div");B.innerHTML=u;u=document.createDocumentFragment();for(var E;E=B.firstChild;)lastNode=u.appendChild(E);A.insertNode(u)}}else(A=document.selection)&&"Control"!=A.type&&A.createRange().pasteHTML(u)};Graph.prototype.createLinkForHint=function(u, +A,B){function E(P,W){P.length>W&&(P=P.substring(0,Math.round(W/2))+"..."+P.substring(P.length-Math.round(W/4)));return P}u=null!=u?u:"javascript:void(0);";if(null==A||0==A.length)A=this.isCustomLink(u)?this.getLinkTitle(u):u;var L=document.createElement("a");L.setAttribute("rel",this.linkRelation);L.setAttribute("href",this.getAbsoluteUrl(u));L.setAttribute("title",E(this.isCustomLink(u)?this.getLinkTitle(u):u,80));null!=this.linkTarget&&L.setAttribute("target",this.linkTarget);mxUtils.write(L,E(A, +40));this.isCustomLink(u)&&mxEvent.addListener(L,"click",mxUtils.bind(this,function(P){this.customLinkClicked(u,B);mxEvent.consume(P)}));return L};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(P,W){this.popupMenuHandler.hideMenu()});var u=this.updateMouseEvent;this.updateMouseEvent=function(P){P=u.apply(this,arguments);if(mxEvent.isTouchEvent(P.getEvent())&&null== +P.getState()){var W=this.getCellAt(P.graphX,P.graphY);null!=W&&this.isSwimlane(W)&&this.hitsSwimlaneContent(W,P.graphX,P.graphY)||(P.state=this.view.getState(W),null!=P.state&&null!=P.state.shape&&(this.container.style.cursor=P.state.shape.node.style.cursor))}null==P.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return P};var A=!1,B=!1,E=!1,L=this.fireMouseEvent;this.fireMouseEvent=function(P,W,ja){P==mxEvent.MOUSE_DOWN&&(W=this.updateMouseEvent(W),A=this.isCellSelected(W.getCell()), +B=this.isSelectionEmpty(),E=this.popupMenuHandler.isMenuShowing());L.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(P,W){var ja=mxEvent.isMouseEvent(W.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==W.getState()||!W.isSource(W.getState().control))&&(this.popupMenuHandler.popupTrigger||!E&&!ja&&(B&&null==W.getCell()&&this.isSelectionEmpty()||A&&this.isCellSelected(W.getCell())));ja=!A||ja?null:mxUtils.bind(this,function(ea){window.setTimeout(mxUtils.bind(this, +function(){if(!this.isEditing()){var ia=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(W.getX()+ia.x+1,W.getY()+ia.y+1,ea,W.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[P,W,ja])})};mxCellEditor.prototype.isContentEditing=function(){var u=this.graph.view.getState(this.editingCell);return null!=u&&1==u.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)}; +mxCellEditor.prototype.isTextSelected=function(){var u="";window.getSelection?u=window.getSelection():document.getSelection?u=document.getSelection():document.selection&&(u=document.selection.createRange().text);return""!=u};mxCellEditor.prototype.insertTab=function(u){var A=this.textarea.ownerDocument.defaultView.getSelection(),B=A.getRangeAt(0);u=Graph.createTabNode(u);B.insertNode(u);B.setStartAfter(u);B.setEndAfter(u);A.removeAllRanges();A.addRange(B)};mxCellEditor.prototype.alignText=function(u, +A){var B=this.graph.getView().getState(this.editingCell);if(null!=B){B=mxUtils.getValue(B.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var E=null!=B&&"vertical-"==B.substring(0,9),L=null!=A&&mxEvent.isShiftDown(A);if(L||null!=window.getSelection&&null!=window.getSelection().containsNode){var P=!0;this.graph.processElements(this.textarea,function(W){L||E||window.getSelection().containsNode(W,!0)?(W.removeAttribute("align"),W.style.textAlign=null):P=!1});(P||E)&&this.graph.cellEditor.setAlign(u)}E|| +document.execCommand("justify"+u.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var u=window.getSelection();if(u.getRangeAt&&u.rangeCount){for(var A=[],B=0,E=u.rangeCount;B"):ja,!0);this.textarea.className="mxCellEditor geContentEditable"; +ea=mxUtils.getValue(u.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);A=mxUtils.getValue(u.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var E=mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),L=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,P=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,W=[];(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE, +0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&W.push("underline");(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&W.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration=W.join(" ");this.textarea.style.fontWeight=L?"bold":"normal"; +this.textarea.style.fontStyle=P?"italic":"";this.textarea.style.fontFamily=A;this.textarea.style.textAlign=E;this.textarea.style.padding="0px";this.textarea.innerHTML!=ja&&(this.textarea.innerHTML=ja,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0
"));ja=Graph.sanitizeHtml(A?ja.replace(/\n/g,"").replace(/<br\s*.?>/g,"
"):ja,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ea=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight= +"normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=ja&&(this.textarea.innerHTML=ja);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=B;this.resize()}};var O=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(u, +A){if(null!=this.textarea)if(u=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=u){var B=u.view.scale;this.bounds=mxRectangle.fromRectangle(u);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*B;this.bounds.height=60*B;var E=null!=u.text?u.text.margin:null;null==E&&(E=mxUtils.getAlignmentAsPoint(mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(u.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE))); +this.bounds.x+=E.x*this.bounds.width;this.bounds.y+=E.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/B)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/B)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight"));return B=Graph.sanitizeHtml(B,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(u){if("0"==mxUtils.getValue(u.style,"html", +"0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var A=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(u.style,"nl2Br","1")?(A=A.replace(/\r\n/g,"
").replace(/\n/g,"
"),0"==A.substring(A.length-5)||"
"==A.substring(A.length-4))&&(A=A.substring(0,A.lastIndexOf("
")):A=A.replace(/\r\n/g,"").replace(/\n/g,"");return A};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(u){this.codeViewMode&& +this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(u){}};var Z=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(u,A){this.graph.getModel().beginUpdate();try{Z.apply(this,arguments),""==A&&this.graph.isCellDeletable(u.cell)&&0==this.graph.model.getChildCount(u.cell)&&this.graph.isTransparentState(u)&&this.graph.removeCells([u.cell],!1)}finally{this.graph.getModel().endUpdate()}}; +mxCellEditor.prototype.getBackgroundColor=function(u){u=mxUtils.getValue(u.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);u==mxConstants.NONE&&(u=null);return u};mxCellEditor.prototype.getBorderColor=function(u){u=mxUtils.getValue(u.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);u==mxConstants.NONE&&(u=null);return u};mxCellEditor.prototype.getMinimumSize=function(u){var A=this.graph.getView().scale;return new mxRectangle(0,0,null==u.text?30:u.text.size*A+20,30)};mxGraphHandlerIsValidDropTarget= +mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(u,A){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(A.getEvent)};mxGraphView.prototype.formatUnitText=function(u){return u?b(u,this.unit):u};mxGraphHandler.prototype.updateHint=function(u){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var A=this.graph.view.translate,B=this.graph.view.scale; +u=this.roundLength((this.bounds.x+this.currentDx)/B-A.x);A=this.roundLength((this.bounds.y+this.currentDy)/B-A.y);B=this.graph.view.unit;this.hint.innerHTML=b(u,B)+", "+b(A,B);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint), +this.hint=null)};var S=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(u,A){S.apply(this,arguments);var B=this.graph.getCellStyle(u);if(null==B.childLayout){var E=this.graph.model.getParent(u),L=null!=E?this.graph.getCellGeometry(E):null;if(null!=L&&(B=this.graph.getCellStyle(E),"stackLayout"==B.childLayout)){var P=parseFloat(mxUtils.getValue(B,"stackBorder",mxStackLayout.prototype.border));B="1"==mxUtils.getValue(B,"horizontalStack","1");var W=this.graph.getActualStartSize(E); +L=L.clone();B?L.height=A.height+W.y+W.height+2*P:L.width=A.width+W.x+W.width+2*P;this.graph.model.setGeometry(E,L)}}};var X=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function u(ja){B.get(ja)||(B.put(ja,!0),L.push(ja))}for(var A=X.apply(this,arguments),B=new mxDictionary,E=this.graph.model,L=[],P=0;Pu;u++){var A=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR); +A.dialect=mxConstants.DIALECT_SVG;A.init(this.graph.view.getOverlayPane());this.cornerHandles.push(A)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();u=this.graph.getLinkForCell(this.state.cell);A=this.graph.getLinksForState(this.state);this.updateLinkHint(u,A)};var V=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var u=new mxPoint(0,0),A=this.tolerance,B=this.state.style.shape;null==mxCellRenderer.defaultShapes[B]&& +mxStencilRegistry.getStencil(B);B=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!B&&null!=this.customHandles)for(var E=0;E'); Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle= Graph.createSvgImage(18,18,'');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,''); HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'');HoverIcons.prototype.endTerminalHandle=Graph.createSvgImage(22,22,'=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px", null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&& -(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),A.consume()}};var va=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);va.apply(this,arguments)};var Ca=(new Date).getTime(),Qa=0,Na=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(u,A,B,E){Na.apply(this,arguments);B!=this.currentTerminalState?(Ca=(new Date).getTime(), -Qa=0):Qa=(new Date).getTime()-Ca;this.currentTerminalState=B};var Fa=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(u){return mxEvent.isShiftDown(u.getEvent())&&mxEvent.isAltDown(u.getEvent())?!1:null!=this.currentTerminalState&&u.getState()==this.currentTerminalState&&2E3=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==u)?this.graph.getConnectionConstraint(this.state,E,A):null;B=null!=(null!=u?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(A),u):null)?B?this.endFixedHandleImage:this.fixedHandleImage:null!=u&&null!=E?B?this.endTerminalHandleImage:this.terminalHandleImage:B?this.endHandleImage:this.handleImage;if(null!=B)return B= new mxImageShape(new mxRectangle(0,0,B.width,B.height),B.src),B.preserveImageAspect=!1,B;B=mxConstants.HANDLE_SIZE;this.preferHtml&&--B;return new mxRectangleShape(new mxRectangle(0,0,B,B),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var La=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(u,A,B,E){E=A==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:A==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:E;return La.apply(this,arguments)}; var ta=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(u){if(null!=u&&1==u.length){var A=this.graph.getModel(),B=A.getParent(u[0]),E=this.graph.getCellGeometry(u[0]);if(A.isEdge(B)&&null!=E&&E.relative&&(A=this.graph.view.getState(u[0]),null!=A&&2>A.width&&2>A.height&&null!=A.text&&null!=A.text.boundingBox))return mxRectangle.fromRectangle(A.text.boundingBox)}return ta.apply(this,arguments)};var Ma=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates= -function(){for(var u=Ma.apply(this,arguments),A=[],B=0;Bu.width&&2>u.height&&null!=u.text&&null!=u.text.boundingBox?(A=u.text.unrotatedBoundingBox||u.text.boundingBox,new mxRectangle(Math.round(A.x), -Math.round(A.y),Math.round(A.width),Math.round(A.height))):Xa.apply(this,arguments)};var hb=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(u,A){var B=this.graph.getModel(),E=B.getParent(this.state.cell),L=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(A)==mxEvent.ROTATION_HANDLE||!B.isEdge(E)||null==L||!L.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&hb.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var u= +function(){for(var u=Ma.apply(this,arguments),A=[],B=0;Bu.width&&2>u.height&&null!=u.text&&null!=u.text.boundingBox?(A=u.text.unrotatedBoundingBox||u.text.boundingBox,new mxRectangle(Math.round(A.x), +Math.round(A.y),Math.round(A.width),Math.round(A.height))):Wa.apply(this,arguments)};var hb=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(u,A){var B=this.graph.getModel(),E=B.getParent(this.state.cell),L=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(A)==mxEvent.ROTATION_HANDLE||!B.isEdge(E)||null==L||!L.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&hb.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var u= mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),A=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&u==mxConstants.NONE&&A==mxConstants.NONE?(u=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,u,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var fb=mxVertexHandler.prototype.mouseMove; mxVertexHandler.prototype.mouseMove=function(u,A){fb.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var ib=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(u,A){ib.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display= 1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(u,A){try{if(null==u&&(null==A||0==A.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=u||null!=A&&0',32,20);Format.classicThinFilledMarkerImage=Graph.createSvgImage(20,22,'',32,20); Format.openFilledMarkerImage=Graph.createSvgImage(20,22,'',32,20);Format.openThinFilledMarkerImage=Graph.createSvgImage(20,22,'',32,20); Format.openAsyncFilledMarkerImage=Graph.createSvgImage(20,22,'',32,20);Format.blockFilledMarkerImage=Graph.createSvgImage(20,22,'',32,20); @@ -3060,27 +3059,27 @@ Format.prototype.immediateRefresh=function(){if("0px"!=this.container.style.widt f.style.borderStyle="solid";f.style.display="inline-block";f.style.height="25px";f.style.overflow="hidden";f.style.width="100%";this.container.appendChild(e);mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()}));var g=a.getSelectionState(),d=g.containsLabel,h=null,n=null,r=mxUtils.bind(this,function(C,F,D,G){var I=mxUtils.bind(this,function(J){h!=C&&(d?this.labelIndex=D:b.isSelectionEmpty()?this.diagramIndex=D:this.currentIndex=D,null!= h&&(h.style.backgroundColor=Format.inactiveTabBackgroundColor,h.style.borderBottomWidth="1px"),h=C,h.style.backgroundColor="",h.style.borderBottomWidth="0px",n!=F&&(null!=n&&(n.style.display="none"),n=F,n.style.display=""))});mxEvent.addListener(C,"click",I);mxEvent.addListener(C,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(J){J.preventDefault()}));(G&&null==h||D==(d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&I()}),l=0;if(b.isSelectionEmpty()){mxUtils.write(f, mxResources.get("diagram"));f.style.borderLeftWidth="0px";e.appendChild(f);g=e.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,g));this.container.appendChild(g);if(null!=Editor.styles){g.style.display="none";f.style.width=this.showCloseButton?"106px":"50%";f.style.cursor="pointer";f.style.backgroundColor=Format.inactiveTabBackgroundColor;var p=f.cloneNode(!1);p.style.borderLeftWidth="1px";p.style.borderRightWidth="1px";p.style.backgroundColor=Format.inactiveTabBackgroundColor;r(f,g,l++); -var w=e.cloneNode(!1);w.style.display="none";mxUtils.write(p,mxResources.get("style"));e.appendChild(p);this.panels.push(new DiagramStylePanel(this,a,w));this.container.appendChild(w);r(p,w,l++)}this.showCloseButton&&(p=f.cloneNode(!1),p.style.borderLeftWidth="1px",p.style.borderRightWidth="1px",p.style.borderBottomWidth="1px",p.style.backgroundColor=Format.inactiveTabBackgroundColor,p.style.position="absolute",p.style.right="0px",p.style.top="0px",p.style.width="25px",r=document.createElement("img"), +var x=e.cloneNode(!1);x.style.display="none";mxUtils.write(p,mxResources.get("style"));e.appendChild(p);this.panels.push(new DiagramStylePanel(this,a,x));this.container.appendChild(x);r(p,x,l++)}this.showCloseButton&&(p=f.cloneNode(!1),p.style.borderLeftWidth="1px",p.style.borderRightWidth="1px",p.style.borderBottomWidth="1px",p.style.backgroundColor=Format.inactiveTabBackgroundColor,p.style.position="absolute",p.style.right="0px",p.style.top="0px",p.style.width="25px",r=document.createElement("img"), r.setAttribute("border","0"),r.setAttribute("src",Dialog.prototype.closeImage),r.setAttribute("title",mxResources.get("hide")),r.style.position="absolute",r.style.display="block",r.style.right="0px",r.style.top="8px",r.style.cursor="pointer",r.style.marginTop="1px",r.style.marginRight="6px",r.style.border="1px solid transparent",r.style.padding="1px",r.style.opacity=.5,p.appendChild(r),mxEvent.addListener(r,"click",function(){a.actions.get("format").funct()}),e.appendChild(p))}else if(b.isEditing())mxUtils.write(f, mxResources.get("text")),e.appendChild(f),f.style.borderLeftStyle="none",this.panels.push(new TextFormatPanel(this,a,e));else{f.style.backgroundColor=Format.inactiveTabBackgroundColor;f.style.borderLeftWidth="1px";f.style.cursor="pointer";f.style.width=0==g.cells.length?"100%":d?"50%":"33.3%";p=f.cloneNode(!1);var z=p.cloneNode(!1);p.style.backgroundColor=Format.inactiveTabBackgroundColor;z.style.backgroundColor=Format.inactiveTabBackgroundColor;d?p.style.borderLeftWidth="0px":0=Aa.length||fa[u]!=Aa[u].node||fa[u]==Aa[u].node&&fa[u].getAttribute("color")!=Aa[u].color){Aa=fa[u].firstChild;if(null!=Aa&&"A"==Aa.nodeName&&null==Aa.nextSibling&&null!=Aa.firstChild){fa[u].parentNode.insertBefore(Aa,fa[u]);for(Ia=Aa.firstChild;null!=Ia;){var A=Ia.nextSibling;fa[u].appendChild(Ia);Ia= -A}Aa.appendChild(fa[u])}break}}else document.execCommand("forecolor",!1,fa!=mxConstants.NONE?fa:"transparent"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[fa],"cells",g.cells))},null!=n[mxConstants.STYLE_FONTCOLOR]?n[mxConstants.STYLE_FONTCOLOR]:f.shapeForegroundColor,{install:function(fa){V=fa},destroy:function(){V=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(fa){ra.style.display= +f.shapeForegroundColor);ha.style.fontWeight="bold";n=1<=g.vertices.length?f.stylesheet.getDefaultVertexStyle():f.stylesheet.getDefaultEdgeStyle();n=f.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return ka},function(fa){if(mxClient.IS_FF){for(var Ia=f.cellEditor.textarea.getElementsByTagName("font"),za=[],u=0;u=za.length||fa[u]!=za[u].node||fa[u]==za[u].node&&fa[u].getAttribute("color")!=za[u].color){za=fa[u].firstChild;if(null!=za&&"A"==za.nodeName&&null==za.nextSibling&&null!=za.firstChild){fa[u].parentNode.insertBefore(za,fa[u]);for(Ia=za.firstChild;null!=Ia;){var A=Ia.nextSibling;fa[u].appendChild(Ia);Ia= +A}za.appendChild(fa[u])}break}}else document.execCommand("forecolor",!1,fa!=mxConstants.NONE?fa:"transparent"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[fa],"cells",g.cells))},null!=n[mxConstants.STYLE_FONTCOLOR]?n[mxConstants.STYLE_FONTCOLOR]:f.shapeForegroundColor,{install:function(fa){V=fa},destroy:function(){V=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(fa){ra.style.display= fa==mxConstants.NONE?"none":"";ha.style.display=ra.style.display},function(fa){fa==mxConstants.NONE?f.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):f.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);f.setCellStyles(mxConstants.STYLE_FONTCOLOR,fa,g.cells);f.updateLabelElements(g.cells,function(Ia){Ia.removeAttribute("color");Ia.style.color=null})},f.shapeForegroundColor);n.style.fontWeight="bold";h.appendChild(n);h.appendChild(ra);n=this.createCellOption(mxResources.get("shadow"),mxConstants.STYLE_TEXT_SHADOW, 0);n.style.width="100%";n.style.fontWeight="bold";Editor.enableShadowOption||(n.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(n,60));f.cellEditor.isContentEditing()||(h.appendChild(ha),h.appendChild(n));a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";n=f.filterSelectionCells(mxUtils.bind(this,function(fa){var Ia=f.view.getState(fa);return null==Ia||f.isAutoSizeState(Ia)||f.getModel().isEdge(fa)||!f.isTableRow(fa)&& -!f.isTableCell(fa)&&!f.isCellResizable(fa)}));w=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,n);w.style.fontWeight="bold";0"+f.cellEditor.textarea.innerHTML+"

"),Aa=[f.cellEditor.textarea.firstChild]);for(var u=0;u"+f.cellEditor.textarea.innerHTML+"

"),za=[f.cellEditor.textarea.firstChild]);for(var u=0;uz;z++)(function(fa){mxEvent.addListener(l[fa],"click",function(){b(l[fa],""==l[fa].style.backgroundImage)})})(z);var Xa=mxUtils.bind(this,function(fa,Ia,Aa){g=e.getSelectionState();fa=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);b(l[0],(fa&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);b(l[1], -(fa&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);b(l[2],(fa&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);r.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);b(p,"0"==mxUtils.getValue(g.style,mxConstants.STYLE_HORIZONTAL,"1"));if(Aa||document.activeElement!=T)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),T.value=isNaN(fa)?"":fa+" pt";fa=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN, +mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=S&&null!=ca&&f.deleteRow(S,ca.sectionRowIndex)}catch(fa){this.editorUi.handleError(fa)}}),n)];this.styleButtons(x);x[2].style.marginRight="10px";h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(n);d=d.cloneNode(!1);d.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this, +function(fa){if(null!=S){var Ia=S.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(za,u,A,B){return"#"+("0"+Number(u).toString(16)).substr(-2)+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(B).toString(16)).substr(-2)});this.editorUi.pickColor(Ia,function(za){var u=null==X||null!=fa&&mxEvent.isShiftDown(fa)?S:X;f.processElements(u,function(A){A.style.border=null});null==za||za==mxConstants.NONE?(u.removeAttribute("border"),u.style.border="",u.style.borderCollapse= +""):(u.setAttribute("border","1"),u.style.border="1px solid "+za,u.style.borderCollapse="collapse")})}}),d),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(fa){if(null!=S){var Ia=S.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(za,u,A,B){return"#"+("0"+Number(u).toString(16)).substr(-2)+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(B).toString(16)).substr(-2)});this.editorUi.pickColor(Ia, +function(za){var u=null==X||null!=fa&&mxEvent.isShiftDown(fa)?S:X;f.processElements(u,function(A){A.style.backgroundColor=null});u.style.backgroundColor=null==za||za==mxConstants.NONE?"":za})}}),d),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=S){var fa=S.getAttribute("cellPadding")||0;fa=new FilenameDialog(e,fa,mxResources.get("apply"),mxUtils.bind(this,function(Ia){null!=Ia&&0z;z++)(function(fa){mxEvent.addListener(l[fa],"click",function(){b(l[fa],""==l[fa].style.backgroundImage)})})(z);var Wa=mxUtils.bind(this,function(fa,Ia,za){g=e.getSelectionState();fa=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);b(l[0],(fa&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);b(l[1], +(fa&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);b(l[2],(fa&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);r.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);b(p,"0"==mxUtils.getValue(g.style,mxConstants.STYLE_HORIZONTAL,"1"));if(za||document.activeElement!=T)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),T.value=isNaN(fa)?"":fa+" pt";fa=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN, mxConstants.ALIGN_CENTER);b(C,fa==mxConstants.ALIGN_LEFT);b(F,fa==mxConstants.ALIGN_CENTER);b(D,fa==mxConstants.ALIGN_RIGHT);fa=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(I,fa==mxConstants.ALIGN_TOP);b(J,fa==mxConstants.ALIGN_MIDDLE);b(O,fa==mxConstants.ALIGN_BOTTOM);fa=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);Ia=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);aa.value= fa==mxConstants.ALIGN_LEFT&&Ia==mxConstants.ALIGN_TOP?"topLeft":fa==mxConstants.ALIGN_CENTER&&Ia==mxConstants.ALIGN_TOP?"top":fa==mxConstants.ALIGN_RIGHT&&Ia==mxConstants.ALIGN_TOP?"topRight":fa==mxConstants.ALIGN_LEFT&&Ia==mxConstants.ALIGN_BOTTOM?"bottomLeft":fa==mxConstants.ALIGN_CENTER&&Ia==mxConstants.ALIGN_BOTTOM?"bottom":fa==mxConstants.ALIGN_RIGHT&&Ia==mxConstants.ALIGN_BOTTOM?"bottomRight":fa==mxConstants.ALIGN_LEFT?"left":fa==mxConstants.ALIGN_RIGHT?"right":"center";fa=mxUtils.getValue(g.style, -mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);fa==mxConstants.TEXT_DIRECTION_RTL?la.value="rightToLeft":fa==mxConstants.TEXT_DIRECTION_LTR?la.value="leftToRight":fa!=mxConstants.TEXT_DIRECTION_AUTO&&g.html?fa==mxConstants.TEXT_DIRECTION_VERTICAL_LR?la.value="vertical-leftToRight":fa==mxConstants.TEXT_DIRECTION_VERTICAL_RL&&(la.value="vertical-rightToLeft"):la.value="automatic";if(Aa||document.activeElement!=Ca)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING, -2)),Ca.value=isNaN(fa)?"":fa+" pt";if(Aa||document.activeElement!=va)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),va.value=isNaN(fa)?"":fa+" pt";if(Aa||document.activeElement!=Fa)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),Fa.value=isNaN(fa)?"":fa+" pt";if(Aa||document.activeElement!=Na)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Na.value=isNaN(fa)?"":fa+" pt";if(Aa||document.activeElement!=Qa)fa=parseFloat(mxUtils.getValue(g.style, -mxConstants.STYLE_SPACING_LEFT,0)),Qa.value=isNaN(fa)?"":fa+" pt"});var hb=this.installInputHandler(Ca,mxConstants.STYLE_SPACING,2,-999,999," pt");var fb=this.installInputHandler(va,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var ib=this.installInputHandler(Fa,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");var eb=this.installInputHandler(Na,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var gb=this.installInputHandler(Qa,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(T, -Xa);this.addKeyHandler(Ca,Xa);this.addKeyHandler(va,Xa);this.addKeyHandler(Fa,Xa);this.addKeyHandler(Na,Xa);this.addKeyHandler(Qa,Xa);f.getModel().addListener(mxEvent.CHANGE,Xa);this.listeners.push({destroy:function(){f.getModel().removeListener(Xa)}});Xa();if(f.cellEditor.isContentEditing()){var jb=null,cb=!1;d=mxUtils.bind(this,function(){cb||(cb=!0,window.setTimeout(mxUtils.bind(this,function(){var fa=f.getSelectedEditingElement();if(null!=fa){var Ia=function(xa,za){if(null!=xa&&null!=za){if(xa== -za)return!0;if(xa.length>za.length+1)return xa.substring(xa.length-za.length-1,xa.length)=="-"+za}return!1},Aa=function(xa){if(null!=f.getParentByName(fa,xa,f.cellEditor.textarea))return!0;for(var za=fa;null!=za&&1==za.childNodes.length;)if(za=za.childNodes[0],za.nodeName==xa)return!0;return!1},u=function(xa){xa=null!=xa?xa.fontSize:null;return null!=xa&&"px"==xa.substring(xa.length-2)?parseFloat(xa):mxConstants.DEFAULT_FONTSIZE},A=function(xa,za,wa){return null!=wa.style&&null!=za?(za=za.lineHeight, -null!=wa.style.lineHeight&&"%"==wa.style.lineHeight.substring(wa.style.lineHeight.length-1)?parseInt(wa.style.lineHeight)/100:"px"==za.substring(za.length-2)?parseFloat(za)/xa:parseInt(za)):""},B=function(xa){for(;null!=xa&&xa!=f.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(xa).display)return xa;xa=xa.parentNode}return null},E=mxUtils.getCurrentStyle(fa),L=u(E),P=A(L,E,fa),W=fa.getElementsByTagName("*");if(0Ca.length+1)return xa.substring(xa.length-Ca.length-1,xa.length)=="-"+Ca}return!1},za=function(xa){if(null!=f.getParentByName(fa,xa,f.cellEditor.textarea))return!0;for(var Ca=fa;null!=Ca&&1==Ca.childNodes.length;)if(Ca=Ca.childNodes[0],Ca.nodeName==xa)return!0;return!1},u=function(xa){xa=null!=xa?xa.fontSize:null;return null!=xa&&"px"==xa.substring(xa.length-2)?parseFloat(xa):mxConstants.DEFAULT_FONTSIZE},A=function(xa,Ca,wa){return null!=wa.style&&null!=Ca?(Ca=Ca.lineHeight, +null!=wa.style.lineHeight&&"%"==wa.style.lineHeight.substring(wa.style.lineHeight.length-1)?parseInt(wa.style.lineHeight)/100:"px"==Ca.substring(Ca.length-2)?parseFloat(Ca)/xa:parseInt(Ca)):""},B=function(xa){for(;null!=xa&&xa!=f.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(xa).display)return xa;xa=xa.parentNode}return null},E=mxUtils.getCurrentStyle(fa),L=u(E),P=A(L,E,fa),W=fa.getElementsByTagName("*");if(0x?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(m-v,0),c.lineTo(m,v),c.lineTo(v, +!1,w=this.isHorizontal(),H=this.getTitleSize();0==H||this.outline?sa.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-k,-t));v||this.outline||!(w&&Hw?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(m-v,0),c.lineTo(m,v),c.lineTo(v, v),c.close(),c.fill()),0!=H&&(c.setFillAlpha(Math.abs(H)),c.setFillColor(0>H?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(v,v),c.lineTo(v,q),c.lineTo(0,q-v),c.close(),c.fill()),c.begin(),c.moveTo(v,q),c.lineTo(v,v),c.lineTo(0,0),c.moveTo(v,v),c.lineTo(m,v),c.end(),c.stroke())};f.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube", -f);var Ra=Math.tan(mxUtils.toRadians(30)),Pa=(.5-Ra)/2;mxCellRenderer.registerShape("isoRectangle",h);mxUtils.extend(g,mxConnector);g.prototype.paintEdgeShape=function(c,k){var t=this.createMarker(c,k,!0),m=this.createMarker(c,k,!1);c.setDashed(!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);null!=this.isDashed&&c.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);c.setShadow(!1);c.setStrokeColor(this.fill);mxPolyline.prototype.paintEdgeShape.apply(this, +f);var Qa=Math.tan(mxUtils.toRadians(30)),Pa=(.5-Qa)/2;mxCellRenderer.registerShape("isoRectangle",h);mxUtils.extend(g,mxConnector);g.prototype.paintEdgeShape=function(c,k){var t=this.createMarker(c,k,!0),m=this.createMarker(c,k,!1);c.setDashed(!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);null!=this.isDashed&&c.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);c.setShadow(!1);c.setStrokeColor(this.fill);mxPolyline.prototype.paintEdgeShape.apply(this, arguments);c.setStrokeColor(this.stroke);c.setFillColor(this.stroke);c.setDashed(!1);null!=t&&t();null!=m&&m()};mxCellRenderer.registerShape("wire",g);mxUtils.extend(d,mxCylinder);d.prototype.size=6;d.prototype.paintVertexShape=function(c,k,t,m,q){c.setFillColor(this.stroke);var v=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(k+.5*(m-v),t+.5*(q-v),v,v);c.fill();c.setFillColor(mxConstants.NONE);c.rect(k,t,m,q);c.fill()};mxCellRenderer.registerShape("waypoint", -d);mxUtils.extend(h,mxActor);h.prototype.size=20;h.prototype.redrawPath=function(c,k,t,m,q){k=Math.min(m,q/Ra);c.translate((m-k)/2,(q-k)/2+k/4);c.moveTo(0,.25*k);c.lineTo(.5*k,k*Pa);c.lineTo(k,.25*k);c.lineTo(.5*k,(.5-Pa)*k);c.lineTo(0,.25*k);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",h);mxUtils.extend(n,mxCylinder);n.prototype.size=20;n.prototype.redrawPath=function(c,k,t,m,q,v){k=Math.min(m,q/(.5+Ra));v?(c.moveTo(0,.25*k),c.lineTo(.5*k,(.5-Pa)*k),c.lineTo(k,.25*k),c.moveTo(.5* +d);mxUtils.extend(h,mxActor);h.prototype.size=20;h.prototype.redrawPath=function(c,k,t,m,q){k=Math.min(m,q/Qa);c.translate((m-k)/2,(q-k)/2+k/4);c.moveTo(0,.25*k);c.lineTo(.5*k,k*Pa);c.lineTo(k,.25*k);c.lineTo(.5*k,(.5-Pa)*k);c.lineTo(0,.25*k);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",h);mxUtils.extend(n,mxCylinder);n.prototype.size=20;n.prototype.redrawPath=function(c,k,t,m,q,v){k=Math.min(m,q/(.5+Qa));v?(c.moveTo(0,.25*k),c.lineTo(.5*k,(.5-Pa)*k),c.lineTo(k,.25*k),c.moveTo(.5* k,(.5-Pa)*k),c.lineTo(.5*k,(1-Pa)*k)):(c.translate((m-k)/2,(q-k)/2),c.moveTo(0,.25*k),c.lineTo(.5*k,k*Pa),c.lineTo(k,.25*k),c.lineTo(k,.75*k),c.lineTo(.5*k,(1-Pa)*k),c.lineTo(0,.75*k),c.close());c.end()};mxCellRenderer.registerShape("isoCube",n);mxUtils.extend(r,mxCylinder);r.prototype.redrawPath=function(c,k,t,m,q,v){k=Math.min(q/2,Math.round(q/8)+this.strokewidth-1);if(v&&null!=this.fill||!v&&null==this.fill)c.moveTo(0,k),c.curveTo(0,2*k,m,2*k,m,k),v||(c.stroke(),c.begin()),c.translate(0,k/2),c.moveTo(0, k),c.curveTo(0,2*k,m,2*k,m,k),v||(c.stroke(),c.begin()),c.translate(0,k/2),c.moveTo(0,k),c.curveTo(0,2*k,m,2*k,m,k),v||(c.stroke(),c.begin()),c.translate(0,-k);v||(c.moveTo(0,k),c.curveTo(0,-k/3,m,-k/3,m,k),c.lineTo(m,q-k),c.curveTo(m,q+k/3,0,q+k/3,0,q-k),c.close())};r.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",r);mxUtils.extend(l,mxCylinder);l.prototype.size=30;l.prototype.darkOpacity= -0;l.prototype.paintVertexShape=function(c,k,t,m,q){var v=Math.max(0,Math.min(m,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),x=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(k,t);c.begin();c.moveTo(0,0);c.lineTo(m-v,0);c.lineTo(m,v);c.lineTo(m,q);c.lineTo(0,q);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=x&&(c.setFillAlpha(Math.abs(x)),c.setFillColor(0>x?"#FFFFFF":"#000000"), -c.begin(),c.moveTo(m-v,0),c.lineTo(m-v,v),c.lineTo(m,v),c.close(),c.fill()),c.begin(),c.moveTo(m-v,0),c.lineTo(m-v,v),c.lineTo(m,v),c.end(),c.stroke())};mxCellRenderer.registerShape("note",l);mxUtils.extend(p,l);mxCellRenderer.registerShape("note2",p);p.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,k*this.scale),0,0)}return null};mxUtils.extend(w,mxShape);w.prototype.isoAngle= -15;w.prototype.paintVertexShape=function(c,k,t,m,q){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;v=Math.min(m*Math.tan(v),.5*q);c.translate(k,t);c.begin();c.moveTo(.5*m,0);c.lineTo(m,v);c.lineTo(m,q-v);c.lineTo(.5*m,q);c.lineTo(0,q-v);c.lineTo(0,v);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,v);c.lineTo(.5*m,2*v);c.lineTo(m,v);c.moveTo(.5*m,2*v);c.lineTo(.5*m,q);c.stroke()};mxCellRenderer.registerShape("isoCube2", -w);mxUtils.extend(z,mxShape);z.prototype.size=15;z.prototype.paintVertexShape=function(c,k,t,m,q){var v=Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(k,t);0==v?(c.rect(0,0,m,q),c.fillAndStroke()):(c.begin(),c.moveTo(0,v),c.arcTo(.5*m,v,0,0,1,.5*m,0),c.arcTo(.5*m,v,0,0,1,m,v),c.lineTo(m,q-v),c.arcTo(.5*m,v,0,0,1,.5*m,q),c.arcTo(.5*m,v,0,0,1,0,q-v),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(m,v),c.arcTo(.5*m,v,0,0,1,.5*m,2*v),c.arcTo(.5* -m,v,0,0,1,0,v),c.stroke())};mxCellRenderer.registerShape("cylinder2",z);mxUtils.extend(C,mxCylinder);C.prototype.size=15;C.prototype.paintVertexShape=function(c,k,t,m,q){var v=Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),x=mxUtils.getValue(this.style,"lid",!0);c.translate(k,t);0==v?(c.rect(0,0,m,q),c.fillAndStroke()):(c.begin(),x?(c.moveTo(0,v),c.arcTo(.5*m,v,0,0,1,.5*m,0),c.arcTo(.5*m,v,0,0,1,m,v)):(c.moveTo(0,0),c.arcTo(.5*m,v,0,0,0,.5*m,v),c.arcTo(.5*m,v, -0,0,0,m,0)),c.lineTo(m,q-v),c.arcTo(.5*m,v,0,0,1,.5*m,q),c.arcTo(.5*m,v,0,0,1,0,q-v),c.close(),c.fillAndStroke(),c.setShadow(!1),x&&(c.begin(),c.moveTo(m,v),c.arcTo(.5*m,v,0,0,1,.5*m,2*v),c.arcTo(.5*m,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",C);mxUtils.extend(F,mxActor);F.prototype.redrawPath=function(c,k,t,m,q){c.moveTo(0,0);c.quadTo(m/2,.5*q,m,0);c.quadTo(.5*m,q/2,m,q);c.quadTo(m/2,.5*q,0,q);c.quadTo(.5*m,q/2,0,0);c.end()};mxCellRenderer.registerShape("switch",F);mxUtils.extend(D, -mxCylinder);D.prototype.tabWidth=60;D.prototype.tabHeight=20;D.prototype.tabPosition="right";D.prototype.arcSize=.1;D.prototype.paintVertexShape=function(c,k,t,m,q){c.translate(k,t);k=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));t=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),x=mxUtils.getValue(this.style,"rounded",!1),H=mxUtils.getValue(this.style, -"absoluteArcSize",!1),y=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));H||(y*=Math.min(m,q));y=Math.min(y,.5*m,.5*(q-t));k=Math.max(k,y);k=Math.min(m-y,k);x||(y=0);c.begin();"left"==v?(c.moveTo(Math.max(y,0),t),c.lineTo(Math.max(y,0),0),c.lineTo(k,0),c.lineTo(k,t)):(c.moveTo(m-k,t),c.lineTo(m-k,0),c.lineTo(m-Math.max(y,0),0),c.lineTo(m-Math.max(y,0),t));x?(c.moveTo(0,y+t),c.arcTo(y,y,0,0,1,y,t),c.lineTo(m-y,t),c.arcTo(y,y,0,0,1,m,y+t),c.lineTo(m,q-y),c.arcTo(y,y,0,0,1,m-y,q),c.lineTo(y, +0;l.prototype.paintVertexShape=function(c,k,t,m,q){var v=Math.max(0,Math.min(m,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),w=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(k,t);c.begin();c.moveTo(0,0);c.lineTo(m-v,0);c.lineTo(m,v);c.lineTo(m,q);c.lineTo(0,q);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=w&&(c.setFillAlpha(Math.abs(w)),c.setFillColor(0>w?"#FFFFFF":"#000000"), +c.begin(),c.moveTo(m-v,0),c.lineTo(m-v,v),c.lineTo(m,v),c.close(),c.fill()),c.begin(),c.moveTo(m-v,0),c.lineTo(m-v,v),c.lineTo(m,v),c.end(),c.stroke())};mxCellRenderer.registerShape("note",l);mxUtils.extend(p,l);mxCellRenderer.registerShape("note2",p);p.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,k*this.scale),0,0)}return null};mxUtils.extend(x,mxShape);x.prototype.isoAngle= +15;x.prototype.paintVertexShape=function(c,k,t,m,q){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;v=Math.min(m*Math.tan(v),.5*q);c.translate(k,t);c.begin();c.moveTo(.5*m,0);c.lineTo(m,v);c.lineTo(m,q-v);c.lineTo(.5*m,q);c.lineTo(0,q-v);c.lineTo(0,v);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,v);c.lineTo(.5*m,2*v);c.lineTo(m,v);c.moveTo(.5*m,2*v);c.lineTo(.5*m,q);c.stroke()};mxCellRenderer.registerShape("isoCube2", +x);mxUtils.extend(z,mxShape);z.prototype.size=15;z.prototype.paintVertexShape=function(c,k,t,m,q){var v=Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(k,t);0==v?(c.rect(0,0,m,q),c.fillAndStroke()):(c.begin(),c.moveTo(0,v),c.arcTo(.5*m,v,0,0,1,.5*m,0),c.arcTo(.5*m,v,0,0,1,m,v),c.lineTo(m,q-v),c.arcTo(.5*m,v,0,0,1,.5*m,q),c.arcTo(.5*m,v,0,0,1,0,q-v),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(m,v),c.arcTo(.5*m,v,0,0,1,.5*m,2*v),c.arcTo(.5* +m,v,0,0,1,0,v),c.stroke())};mxCellRenderer.registerShape("cylinder2",z);mxUtils.extend(C,mxCylinder);C.prototype.size=15;C.prototype.paintVertexShape=function(c,k,t,m,q){var v=Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),w=mxUtils.getValue(this.style,"lid",!0);c.translate(k,t);0==v?(c.rect(0,0,m,q),c.fillAndStroke()):(c.begin(),w?(c.moveTo(0,v),c.arcTo(.5*m,v,0,0,1,.5*m,0),c.arcTo(.5*m,v,0,0,1,m,v)):(c.moveTo(0,0),c.arcTo(.5*m,v,0,0,0,.5*m,v),c.arcTo(.5*m,v, +0,0,0,m,0)),c.lineTo(m,q-v),c.arcTo(.5*m,v,0,0,1,.5*m,q),c.arcTo(.5*m,v,0,0,1,0,q-v),c.close(),c.fillAndStroke(),c.setShadow(!1),w&&(c.begin(),c.moveTo(m,v),c.arcTo(.5*m,v,0,0,1,.5*m,2*v),c.arcTo(.5*m,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",C);mxUtils.extend(F,mxActor);F.prototype.redrawPath=function(c,k,t,m,q){c.moveTo(0,0);c.quadTo(m/2,.5*q,m,0);c.quadTo(.5*m,q/2,m,q);c.quadTo(m/2,.5*q,0,q);c.quadTo(.5*m,q/2,0,0);c.end()};mxCellRenderer.registerShape("switch",F);mxUtils.extend(D, +mxCylinder);D.prototype.tabWidth=60;D.prototype.tabHeight=20;D.prototype.tabPosition="right";D.prototype.arcSize=.1;D.prototype.paintVertexShape=function(c,k,t,m,q){c.translate(k,t);k=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));t=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),w=mxUtils.getValue(this.style,"rounded",!1),H=mxUtils.getValue(this.style, +"absoluteArcSize",!1),y=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));H||(y*=Math.min(m,q));y=Math.min(y,.5*m,.5*(q-t));k=Math.max(k,y);k=Math.min(m-y,k);w||(y=0);c.begin();"left"==v?(c.moveTo(Math.max(y,0),t),c.lineTo(Math.max(y,0),0),c.lineTo(k,0),c.lineTo(k,t)):(c.moveTo(m-k,t),c.lineTo(m-k,0),c.lineTo(m-Math.max(y,0),0),c.lineTo(m-Math.max(y,0),t));w?(c.moveTo(0,y+t),c.arcTo(y,y,0,0,1,y,t),c.lineTo(m-y,t),c.arcTo(y,y,0,0,1,m,y+t),c.lineTo(m,q-y),c.arcTo(y,y,0,0,1,m-y,q),c.lineTo(y, q),c.arcTo(y,y,0,0,1,0,q-y)):(c.moveTo(0,t),c.lineTo(m,t),c.lineTo(m,q),c.lineTo(0,q));c.close();c.fillAndStroke();c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(m-30,t+20),c.lineTo(m-20,t+10),c.lineTo(m-10,t+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",D);D.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style, "labelInHeader",!1)){var t=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;k=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var m=mxUtils.getValue(this.style,"rounded",!1),q=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));q||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-k));m||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width- -t),Math.min(c.height,c.height-k)):new mxRectangle(Math.min(c.width,c.width-t),0,v,Math.min(c.height,c.height-k))}return new mxRectangle(0,Math.min(c.height,k),0,0)}return null};mxUtils.extend(G,mxCylinder);G.prototype.arcSize=.1;G.prototype.paintVertexShape=function(c,k,t,m,q){c.translate(k,t);var v=mxUtils.getValue(this.style,"rounded",!1),x=mxUtils.getValue(this.style,"absoluteArcSize",!1);k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t=mxUtils.getValue(this.style,"umlStateConnection", -null);x||(k*=Math.min(m,q));k=Math.min(k,.5*m,.5*q);v||(k=0);v=0;null!=t&&(v=10);c.begin();c.moveTo(v,k);c.arcTo(k,k,0,0,1,v+k,0);c.lineTo(m-k,0);c.arcTo(k,k,0,0,1,m,k);c.lineTo(m,q-k);c.arcTo(k,k,0,0,1,m-k,q);c.lineTo(v+k,q);c.arcTo(k,k,0,0,1,v,q-k);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(m-40,q-20,10,10,3,3),c.stroke(),c.roundrect(m-20,q-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(m-30,q-15),c.lineTo(m-20,q-15), +t),Math.min(c.height,c.height-k)):new mxRectangle(Math.min(c.width,c.width-t),0,v,Math.min(c.height,c.height-k))}return new mxRectangle(0,Math.min(c.height,k),0,0)}return null};mxUtils.extend(G,mxCylinder);G.prototype.arcSize=.1;G.prototype.paintVertexShape=function(c,k,t,m,q){c.translate(k,t);var v=mxUtils.getValue(this.style,"rounded",!1),w=mxUtils.getValue(this.style,"absoluteArcSize",!1);k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t=mxUtils.getValue(this.style,"umlStateConnection", +null);w||(k*=Math.min(m,q));k=Math.min(k,.5*m,.5*q);v||(k=0);v=0;null!=t&&(v=10);c.begin();c.moveTo(v,k);c.arcTo(k,k,0,0,1,v+k,0);c.lineTo(m-k,0);c.arcTo(k,k,0,0,1,m,k);c.lineTo(m,q-k);c.arcTo(k,k,0,0,1,m-k,q);c.lineTo(v+k,q);c.arcTo(k,k,0,0,1,v,q-k);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(m-40,q-20,10,10,3,3),c.stroke(),c.roundrect(m-20,q-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(m-30,q-15),c.lineTo(m-20,q-15), c.stroke());"connPointRefEntry"==t?(c.ellipse(0,.5*q-10,20,20),c.fillAndStroke()):"connPointRefExit"==t&&(c.ellipse(0,.5*q-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*q-5),c.lineTo(15,.5*q+5),c.moveTo(15,.5*q-5),c.lineTo(5,.5*q+5),c.stroke())};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",G);mxUtils.extend(I, mxActor);I.prototype.size=30;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(c,k,t,m,q){k=Math.max(0,Math.min(m,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(k,0),new mxPoint(m,0),new mxPoint(m,q),new mxPoint(0,q),new mxPoint(0,k)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("card",I);mxUtils.extend(J,mxActor);J.prototype.size= .4;J.prototype.redrawPath=function(c,k,t,m,q){k=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,k/2);c.quadTo(m/4,1.4*k,m/2,k/2);c.quadTo(3*m/4,k*(1-1.4),m,k/2);c.lineTo(m,q-k/2);c.quadTo(3*m/4,q-1.4*k,m/2,q-k/2);c.quadTo(m/4,q-k*(1-1.4),0,q-k/2);c.lineTo(0,k/2);c.close();c.end()};J.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=mxUtils.getValue(this.style,"size",this.size),t=c.width,m=c.height;if(null==this.direction|| this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return k*=m,new mxRectangle(c.x,c.y+k,t,m-2*k);k*=t;return new mxRectangle(c.x+k,c.y,t-2*k,m)}return c};mxCellRenderer.registerShape("tape",J);mxUtils.extend(O,mxActor);O.prototype.size=.3;O.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};O.prototype.redrawPath=function(c,k,t, -m,q){k=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,0);c.lineTo(m,0);c.lineTo(m,q-k/2);c.quadTo(3*m/4,q-1.4*k,m/2,q-k/2);c.quadTo(m/4,q-k*(1-1.4),0,q-k/2);c.lineTo(0,k/2);c.close();c.end()};mxCellRenderer.registerShape("document",O);var Wa=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,k,t,m){var q=mxUtils.getValue(this.style,"size");return null!=q?m*Math.max(0,Math.min(1,q)):Wa.apply(this,arguments)};mxCylinder.prototype.getLabelMargins= +m,q){k=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,0);c.lineTo(m,0);c.lineTo(m,q-k/2);c.quadTo(3*m/4,q-1.4*k,m/2,q-k/2);c.quadTo(m/4,q-k*(1-1.4),0,q-k/2);c.lineTo(0,k/2);c.close();c.end()};mxCellRenderer.registerShape("document",O);var Va=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,k,t,m){var q=mxUtils.getValue(this.style,"size");return null!=q?m*Math.max(0,Math.min(1,q)):Va.apply(this,arguments)};mxCylinder.prototype.getLabelMargins= function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*k),0,0)}return null};C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(k/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*k*this.scale),0,Math.max(0,.3*k*this.scale))}return null};D.prototype.getLabelMargins= function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var t=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;k=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var m=mxUtils.getValue(this.style,"rounded",!1),q=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));q||(v*=Math.min(c.width,c.height));v=Math.min(v, .5*c.width,.5*(c.height-k));m||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-t),Math.min(c.height,c.height-k)):new mxRectangle(Math.min(c.width,c.width-t),0,v,Math.min(c.height,c.height-k))}return new mxRectangle(0,Math.min(c.height,k),0,0)}return null};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10* @@ -3376,180 +3375,180 @@ this.scale,0,0,0):null};p.prototype.getLabelMargins=function(c){if(mxUtils.getVa k,t,m,q){k="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*m,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):m*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,q),new mxPoint(k,0),new mxPoint(m-k,0),new mxPoint(m,q)],this.isRounded,t,!0)};mxCellRenderer.registerShape("trapezoid",Z);mxUtils.extend(S,mxActor); S.prototype.size=.5;S.prototype.redrawPath=function(c,k,t,m,q){c.setFillColor(null);k=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(k,0),new mxPoint(k,q/2),new mxPoint(0,q/2),new mxPoint(k,q/2),new mxPoint(k,q),new mxPoint(m,q)],this.isRounded,t,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",S);mxUtils.extend(X,mxActor); X.prototype.redrawPath=function(c,k,t,m,q){c.setStrokeWidth(1);c.setFillColor(this.stroke);k=m/5;c.rect(0,0,k,q);c.fillAndStroke();c.rect(2*k,0,k,q);c.fillAndStroke();c.rect(4*k,0,k,q);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",X);ca.prototype.moveTo=function(c,k){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=k;this.firstX=c;this.firstY=k};ca.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas, -arguments));this.originalClose.apply(this.canvas,arguments)};ca.prototype.quadTo=function(c,k,t,m){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=t;this.lastY=m};ca.prototype.curveTo=function(c,k,t,m,q,v){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=q;this.lastY=v};ca.prototype.arcTo=function(c,k,t,m,q,v,x){this.originalArcTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=x};ca.prototype.lineTo=function(c,k){if(null!=this.lastX&&null!=this.lastY){var t=function(N){return"number"=== -typeof N?N?0>N?-1:1:N===N?0:NaN:NaN},m=Math.abs(c-this.lastX),q=Math.abs(k-this.lastY),v=Math.sqrt(m*m+q*q);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=k;return}var x=Math.round(v/10),H=this.defaultVariation;5>x&&(x=5,H/=3);var y=t(c-this.lastX)*m/x;t=t(k-this.lastY)*q/x;m/=v;q/=v;for(v=0;vN?-1:1:N===N?0:NaN:NaN},m=Math.abs(c-this.lastX),q=Math.abs(k-this.lastY),v=Math.sqrt(m*m+q*q);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=k;return}var w=Math.round(v/10),H=this.defaultVariation;5>w&&(w=5,H/=3);var y=t(c-this.lastX)*m/w;t=t(k-this.lastY)*q/w;m/=v;q/=v;for(v=0;vx+y?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(H,c,t)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,k,t,m){var q="0"!=mxUtils.getValue(k.style,"fixedSize","0"),v=q?Z.prototype.fixedSize:Z.prototype.size;null!=k&&(v=mxUtils.getValue(k.style,"size",v));q&&(v*=k.view.scale); -var x=c.x,H=c.y,y=c.width,ba=c.height;k=null!=k?mxUtils.getValue(k.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;k==mxConstants.DIRECTION_EAST?(q=q?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x+q,H),new mxPoint(x+y-q,H),new mxPoint(x+y,H+ba),new mxPoint(x,H+ba),new mxPoint(x+q,H)]):k==mxConstants.DIRECTION_WEST?(q=q?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(x+y,H),new mxPoint(x+y-q,H+ -ba),new mxPoint(x+q,H+ba),new mxPoint(x,H)]):k==mxConstants.DIRECTION_NORTH?(q=q?Math.max(0,Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H+q),new mxPoint(x+y,H),new mxPoint(x+y,H+ba),new mxPoint(x,H+ba-q),new mxPoint(x,H+q)]):(q=q?Math.max(0,Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(x+y,H+q),new mxPoint(x+y,H+ba-q),new mxPoint(x,H+ba),new mxPoint(x,H)]);ba=c.getCenterX();c=c.getCenterY();c=new mxPoint(ba,c);m&&(t.xx+y?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(H, -c,t)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,k,t,m){var q="0"!=mxUtils.getValue(k.style,"fixedSize","0"),v=q?ma.prototype.fixedSize:ma.prototype.size;null!=k&&(v=mxUtils.getValue(k.style,"size",v));q&&(v*=k.view.scale);var x=c.x,H=c.y,y=c.width,ba=c.height,N=c.getCenterX();c=c.getCenterY();k=null!=k?mxUtils.getValue(k.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;k==mxConstants.DIRECTION_EAST? -(q=q?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(x+y-q,H),new mxPoint(x+y,c),new mxPoint(x+y-q,H+ba),new mxPoint(x,H+ba),new mxPoint(x+q,c),new mxPoint(x,H)]):k==mxConstants.DIRECTION_WEST?(q=q?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x+q,H),new mxPoint(x+y,H),new mxPoint(x+y-q,c),new mxPoint(x+y,H+ba),new mxPoint(x+q,H+ba),new mxPoint(x,c),new mxPoint(x+q,H)]):k==mxConstants.DIRECTION_NORTH?(q=q?Math.max(0,Math.min(ba,v)):ba*Math.max(0, -Math.min(1,v)),H=[new mxPoint(x,H+q),new mxPoint(N,H),new mxPoint(x+y,H+q),new mxPoint(x+y,H+ba),new mxPoint(N,H+ba-q),new mxPoint(x,H+ba),new mxPoint(x,H+q)]):(q=q?Math.max(0,Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(N,H+q),new mxPoint(x+y,H),new mxPoint(x+y,H+ba-q),new mxPoint(N,H+ba),new mxPoint(x,H+ba-q),new mxPoint(x,H)]);N=new mxPoint(N,c);m&&(t.xx+y?N.y=t.y:N.x=t.x);return mxUtils.getPerimeterPoint(H,N,t)};mxStyleRegistry.putValue("stepPerimeter", -mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,k,t,m){var q="0"!=mxUtils.getValue(k.style,"fixedSize","0"),v=q?la.prototype.fixedSize:la.prototype.size;null!=k&&(v=mxUtils.getValue(k.style,"size",v));q&&(v*=k.view.scale);var x=c.x,H=c.y,y=c.width,ba=c.height,N=c.getCenterX();c=c.getCenterY();k=null!=k?mxUtils.getValue(k.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;k==mxConstants.DIRECTION_NORTH||k==mxConstants.DIRECTION_SOUTH?(q=q?Math.max(0, -Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),H=[new mxPoint(N,H),new mxPoint(x+y,H+q),new mxPoint(x+y,H+ba-q),new mxPoint(N,H+ba),new mxPoint(x,H+ba-q),new mxPoint(x,H+q),new mxPoint(N,H)]):(q=q?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x+q,H),new mxPoint(x+y-q,H),new mxPoint(x+y,c),new mxPoint(x+y-q,H+ba),new mxPoint(x+q,H+ba),new mxPoint(x,c),new mxPoint(x+q,H)]);N=new mxPoint(N,c);m&&(t.xx+y?N.y=t.y:N.x=t.x);return mxUtils.getPerimeterPoint(H,N,t)};mxStyleRegistry.putValue("hexagonPerimeter2", -mxPerimeter.HexagonPerimeter2);mxUtils.extend(va,mxShape);va.prototype.size=10;va.prototype.paintBackground=function(c,k,t,m,q){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(k,t);c.ellipse((m-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(m/2,v);c.lineTo(m/2,q);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",va);mxUtils.extend(Ca,mxShape);Ca.prototype.size=10;Ca.prototype.inset=2;Ca.prototype.paintBackground=function(c,k,t,m,q){var v=parseFloat(mxUtils.getValue(this.style, -"size",this.size)),x=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(k,t);c.begin();c.moveTo(m/2,v+x);c.lineTo(m/2,q);c.end();c.stroke();c.begin();c.moveTo((m-v)/2-x,v/2);c.quadTo((m-v)/2-x,v+x,m/2,v+x);c.quadTo((m+v)/2+x,v+x,(m+v)/2+x,v/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",Ca);mxUtils.extend(Qa,mxShape);Qa.prototype.paintBackground=function(c,k,t,m,q){c.translate(k,t);c.begin();c.moveTo(0,0);c.quadTo(m,0,m,q/2);c.quadTo(m,q,0,q); -c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Qa);mxUtils.extend(Na,mxShape);Na.prototype.inset=2;Na.prototype.paintBackground=function(c,k,t,m,q){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(k,t);c.ellipse(0,v,m-2*v,q-2*v);c.fillAndStroke();c.begin();c.moveTo(m/2,0);c.quadTo(m,0,m,q/2);c.quadTo(m,q,m/2,q);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",Na);mxUtils.extend(Fa,mxCylinder);Fa.prototype.jettyWidth= -20;Fa.prototype.jettyHeight=10;Fa.prototype.redrawPath=function(c,k,t,m,q,v){var x=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));k=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=x/2;x=t+x/2;var H=Math.min(k,q-k),y=Math.min(H+2*k,q-k);v?(c.moveTo(t,H),c.lineTo(x,H),c.lineTo(x,H+k),c.lineTo(t,H+k),c.moveTo(t,y),c.lineTo(x,y),c.lineTo(x,y+k),c.lineTo(t,y+k)):(c.moveTo(t,0),c.lineTo(m,0),c.lineTo(m,q),c.lineTo(t,q),c.lineTo(t,y+k),c.lineTo(0,y+k),c.lineTo(0, -y),c.lineTo(t,y),c.lineTo(t,H+k),c.lineTo(0,H+k),c.lineTo(0,H),c.lineTo(t,H),c.close());c.end()};mxCellRenderer.registerShape("module",Fa);mxUtils.extend(La,mxCylinder);La.prototype.jettyWidth=32;La.prototype.jettyHeight=12;La.prototype.redrawPath=function(c,k,t,m,q,v){var x=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));k=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=x/2;x=t+x/2;var H=.3*q-k/2,y=.7*q-k/2;v?(c.moveTo(t,H),c.lineTo(x,H),c.lineTo(x, -H+k),c.lineTo(t,H+k),c.moveTo(t,y),c.lineTo(x,y),c.lineTo(x,y+k),c.lineTo(t,y+k)):(c.moveTo(t,0),c.lineTo(m,0),c.lineTo(m,q),c.lineTo(t,q),c.lineTo(t,y+k),c.lineTo(0,y+k),c.lineTo(0,y),c.lineTo(t,y),c.lineTo(t,H+k),c.lineTo(0,H+k),c.lineTo(0,H),c.lineTo(t,H),c.close());c.end()};mxCellRenderer.registerShape("component",La);mxUtils.extend(ta,mxRectangleShape);ta.prototype.paintForeground=function(c,k,t,m,q){var v=m/2,x=q/2,H=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ -2;c.begin();this.addPoints(c,[new mxPoint(k+v,t),new mxPoint(k+m,t+x),new mxPoint(k+v,t+q),new mxPoint(k,t+x)],this.isRounded,H,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",ta);mxUtils.extend(Ma,mxDoubleEllipse);Ma.prototype.outerStroke=!0;Ma.prototype.paintVertexShape=function(c,k,t,m,q){var v=Math.min(4,Math.min(m/5,q/5));0w+y?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(H,c,t)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,k,t,m){var q="0"!=mxUtils.getValue(k.style,"fixedSize","0"),v=q?Z.prototype.fixedSize:Z.prototype.size;null!=k&&(v=mxUtils.getValue(k.style,"size",v));q&&(v*=k.view.scale); +var w=c.x,H=c.y,y=c.width,ba=c.height;k=null!=k?mxUtils.getValue(k.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;k==mxConstants.DIRECTION_EAST?(q=q?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+q,H),new mxPoint(w+y-q,H),new mxPoint(w+y,H+ba),new mxPoint(w,H+ba),new mxPoint(w+q,H)]):k==mxConstants.DIRECTION_WEST?(q=q?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y,H),new mxPoint(w+y-q,H+ +ba),new mxPoint(w+q,H+ba),new mxPoint(w,H)]):k==mxConstants.DIRECTION_NORTH?(q=q?Math.max(0,Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H+q),new mxPoint(w+y,H),new mxPoint(w+y,H+ba),new mxPoint(w,H+ba-q),new mxPoint(w,H+q)]):(q=q?Math.max(0,Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y,H+q),new mxPoint(w+y,H+ba-q),new mxPoint(w,H+ba),new mxPoint(w,H)]);ba=c.getCenterX();c=c.getCenterY();c=new mxPoint(ba,c);m&&(t.xw+y?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(H, +c,t)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,k,t,m){var q="0"!=mxUtils.getValue(k.style,"fixedSize","0"),v=q?ma.prototype.fixedSize:ma.prototype.size;null!=k&&(v=mxUtils.getValue(k.style,"size",v));q&&(v*=k.view.scale);var w=c.x,H=c.y,y=c.width,ba=c.height,N=c.getCenterX();c=c.getCenterY();k=null!=k?mxUtils.getValue(k.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;k==mxConstants.DIRECTION_EAST? +(q=q?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y-q,H),new mxPoint(w+y,c),new mxPoint(w+y-q,H+ba),new mxPoint(w,H+ba),new mxPoint(w+q,c),new mxPoint(w,H)]):k==mxConstants.DIRECTION_WEST?(q=q?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+q,H),new mxPoint(w+y,H),new mxPoint(w+y-q,c),new mxPoint(w+y,H+ba),new mxPoint(w+q,H+ba),new mxPoint(w,c),new mxPoint(w+q,H)]):k==mxConstants.DIRECTION_NORTH?(q=q?Math.max(0,Math.min(ba,v)):ba*Math.max(0, +Math.min(1,v)),H=[new mxPoint(w,H+q),new mxPoint(N,H),new mxPoint(w+y,H+q),new mxPoint(w+y,H+ba),new mxPoint(N,H+ba-q),new mxPoint(w,H+ba),new mxPoint(w,H+q)]):(q=q?Math.max(0,Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(N,H+q),new mxPoint(w+y,H),new mxPoint(w+y,H+ba-q),new mxPoint(N,H+ba),new mxPoint(w,H+ba-q),new mxPoint(w,H)]);N=new mxPoint(N,c);m&&(t.xw+y?N.y=t.y:N.x=t.x);return mxUtils.getPerimeterPoint(H,N,t)};mxStyleRegistry.putValue("stepPerimeter", +mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,k,t,m){var q="0"!=mxUtils.getValue(k.style,"fixedSize","0"),v=q?la.prototype.fixedSize:la.prototype.size;null!=k&&(v=mxUtils.getValue(k.style,"size",v));q&&(v*=k.view.scale);var w=c.x,H=c.y,y=c.width,ba=c.height,N=c.getCenterX();c=c.getCenterY();k=null!=k?mxUtils.getValue(k.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;k==mxConstants.DIRECTION_NORTH||k==mxConstants.DIRECTION_SOUTH?(q=q?Math.max(0, +Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),H=[new mxPoint(N,H),new mxPoint(w+y,H+q),new mxPoint(w+y,H+ba-q),new mxPoint(N,H+ba),new mxPoint(w,H+ba-q),new mxPoint(w,H+q),new mxPoint(N,H)]):(q=q?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+q,H),new mxPoint(w+y-q,H),new mxPoint(w+y,c),new mxPoint(w+y-q,H+ba),new mxPoint(w+q,H+ba),new mxPoint(w,c),new mxPoint(w+q,H)]);N=new mxPoint(N,c);m&&(t.xw+y?N.y=t.y:N.x=t.x);return mxUtils.getPerimeterPoint(H,N,t)};mxStyleRegistry.putValue("hexagonPerimeter2", +mxPerimeter.HexagonPerimeter2);mxUtils.extend(va,mxShape);va.prototype.size=10;va.prototype.paintBackground=function(c,k,t,m,q){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(k,t);c.ellipse((m-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(m/2,v);c.lineTo(m/2,q);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",va);mxUtils.extend(Ba,mxShape);Ba.prototype.size=10;Ba.prototype.inset=2;Ba.prototype.paintBackground=function(c,k,t,m,q){var v=parseFloat(mxUtils.getValue(this.style, +"size",this.size)),w=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(k,t);c.begin();c.moveTo(m/2,v+w);c.lineTo(m/2,q);c.end();c.stroke();c.begin();c.moveTo((m-v)/2-w,v/2);c.quadTo((m-v)/2-w,v+w,m/2,v+w);c.quadTo((m+v)/2+w,v+w,(m+v)/2+w,v/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",Ba);mxUtils.extend(Sa,mxShape);Sa.prototype.paintBackground=function(c,k,t,m,q){c.translate(k,t);c.begin();c.moveTo(0,0);c.quadTo(m,0,m,q/2);c.quadTo(m,q,0,q); +c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Sa);mxUtils.extend(Na,mxShape);Na.prototype.inset=2;Na.prototype.paintBackground=function(c,k,t,m,q){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(k,t);c.ellipse(0,v,m-2*v,q-2*v);c.fillAndStroke();c.begin();c.moveTo(m/2,0);c.quadTo(m,0,m,q/2);c.quadTo(m,q,m/2,q);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",Na);mxUtils.extend(Fa,mxCylinder);Fa.prototype.jettyWidth= +20;Fa.prototype.jettyHeight=10;Fa.prototype.redrawPath=function(c,k,t,m,q,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));k=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=w/2;w=t+w/2;var H=Math.min(k,q-k),y=Math.min(H+2*k,q-k);v?(c.moveTo(t,H),c.lineTo(w,H),c.lineTo(w,H+k),c.lineTo(t,H+k),c.moveTo(t,y),c.lineTo(w,y),c.lineTo(w,y+k),c.lineTo(t,y+k)):(c.moveTo(t,0),c.lineTo(m,0),c.lineTo(m,q),c.lineTo(t,q),c.lineTo(t,y+k),c.lineTo(0,y+k),c.lineTo(0, +y),c.lineTo(t,y),c.lineTo(t,H+k),c.lineTo(0,H+k),c.lineTo(0,H),c.lineTo(t,H),c.close());c.end()};mxCellRenderer.registerShape("module",Fa);mxUtils.extend(La,mxCylinder);La.prototype.jettyWidth=32;La.prototype.jettyHeight=12;La.prototype.redrawPath=function(c,k,t,m,q,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));k=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=w/2;w=t+w/2;var H=.3*q-k/2,y=.7*q-k/2;v?(c.moveTo(t,H),c.lineTo(w,H),c.lineTo(w, +H+k),c.lineTo(t,H+k),c.moveTo(t,y),c.lineTo(w,y),c.lineTo(w,y+k),c.lineTo(t,y+k)):(c.moveTo(t,0),c.lineTo(m,0),c.lineTo(m,q),c.lineTo(t,q),c.lineTo(t,y+k),c.lineTo(0,y+k),c.lineTo(0,y),c.lineTo(t,y),c.lineTo(t,H+k),c.lineTo(0,H+k),c.lineTo(0,H),c.lineTo(t,H),c.close());c.end()};mxCellRenderer.registerShape("component",La);mxUtils.extend(ta,mxRectangleShape);ta.prototype.paintForeground=function(c,k,t,m,q){var v=m/2,w=q/2,H=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ +2;c.begin();this.addPoints(c,[new mxPoint(k+v,t),new mxPoint(k+m,t+w),new mxPoint(k+v,t+q),new mxPoint(k,t+w)],this.isRounded,H,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",ta);mxUtils.extend(Ma,mxDoubleEllipse);Ma.prototype.outerStroke=!0;Ma.prototype.paintVertexShape=function(c,k,t,m,q){var v=Math.min(4,Math.min(m/5,q/5));05*c&&m.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,k));t>8*c&&m.push(new mxConnectionConstraint(new mxPoint(0, @@ -3593,43 +3592,43 @@ W.prototype.constraints=mxEllipse.prototype.constraints;Ja.prototype.constraints function(c,k,t){c=[];var m=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),q=k*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));m=(t-m)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k-q),m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-q,0));c.push(new mxConnectionConstraint(new mxPoint(1, .5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-q,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k-q),t-m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-m));return c};Ia.prototype.getConstraints=function(c,k,t){c=[];var m=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",fa.prototype.arrowWidth)))),q=k*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",fa.prototype.arrowSize))));m=(t-m)/2;c.push(new mxConnectionConstraint(new mxPoint(0, .5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*k,m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-q,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-q,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*k,t-m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,t));return c};xa.prototype.getConstraints= -function(c,k,t){c=[];var m=Math.min(t,k),q=Math.max(0,Math.min(m,m*parseFloat(mxUtils.getValue(this.style,"size",this.size))));m=(t-q)/2;var v=m+q,x=(k-q)/2;q=x+q;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,.5*m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,.5*m));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,q,m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,t-.5*m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,t));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,t-.5*m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k+q),m));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,k,m));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k+q),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*x,m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*x,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,m));return c};ra.prototype.constraints=null;u.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7, -.9),!1)];A.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Qa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0, +function(c,k,t){c=[];var m=Math.min(t,k),q=Math.max(0,Math.min(m,m*parseFloat(mxUtils.getValue(this.style,"size",this.size))));m=(t-q)/2;var v=m+q,w=(k-q)/2;q=w+q;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,.5*m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,.5*m));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,q,m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,t-.5*m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,t));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,t-.5*m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k+q),m));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,k,m));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k+q),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,m));return c};ra.prototype.constraints=null;u.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7, +.9),!1)];A.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0, .5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()} -Actions.prototype.init=function(){function a(l){d.escape();l=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),l);null!=l&&d.setSelectionCells(l)}function b(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var l=d.getSelectionCells(),p=0;pMath.abs(l-d.view.scale)&&5>Math.abs(p-d.container.scrollLeft)&&5>Math.abs(w-d.container.scrollTop)&&z==d.view.translate.x&&C==d.view.translate.y&&f.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){d.isEnabled()&&(d.isSelectionEmpty()?f.actions.get("smartFit").funct(): -d.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){f.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(l,p){try{var w=mxUtils.parseXml(l);g.graph.setSelectionCells(g.graph.importGraphModel(w.documentElement))}catch(z){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+z.message)}}));f.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile= +function(){d.popupMenuHandler.hideMenu();var l=d.view.scale,p=d.container.scrollLeft,x=d.container.scrollTop,z=d.view.translate.x,C=d.view.translate.y;f.actions.get("resetView").funct();1E-5>Math.abs(l-d.view.scale)&&5>Math.abs(p-d.container.scrollLeft)&&5>Math.abs(x-d.container.scrollTop)&&z==d.view.translate.x&&C==d.view.translate.y&&f.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){d.isEnabled()&&(d.isSelectionEmpty()?f.actions.get("smartFit").funct(): +d.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){f.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(l,p){try{var x=mxUtils.parseXml(l);g.graph.setSelectionCells(g.graph.importGraphModel(x.documentElement))}catch(z){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+z.message)}}));f.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile= null})}).isEnabled=h;this.addAction("save",function(){f.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=h;this.addAction("saveAs...",function(){f.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=h;this.addAction("export...",function(){f.showDialog((new ExportDialog(f)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var l=new EditDiagramDialog(f);f.showDialog(l.container,620,420,!0,!1);l.init()}).isEnabled=h;this.addAction("pageSetup...",function(){f.showDialog((new PageSetupDialog(f)).container, 320,240,!0,!0)}).isEnabled=h;this.addAction("print...",function(){f.showDialog((new PrintDialog(f)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){f.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){f.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var l=null;try{l=f.copyXml(), null!=l&&d.removeCells(l,!1)}catch(p){}try{null==l&&mxClipboard.cut(d)}catch(p){f.handleError(p)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{f.copyXml()}catch(l){}try{mxClipboard.copy(d)}catch(l){f.handleError(l)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var l=!1;try{Editor.enableNativeCipboard&&(f.readGraphModelFromClipboard(function(p){if(null!=p){d.getModel().beginUpdate(); try{f.pasteXml(p,!0)}finally{d.getModel().endUpdate()}}else mxClipboard.paste(d)}),l=!0)}catch(p){}l||mxClipboard.paste(d)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(l){function p(z){if(null!=z){for(var C=!0,F=0;F"));d.cellLabelChanged(state.cell,Graph.sanitizeHtml(C));d.setCellStyles("html",l,[p[w]])}}f.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=l?l:"0"],"cells",p))}finally{d.getModel().endUpdate()}});this.addAction("wordWrap",function(){var l=d.getView().getState(d.getSelectionCell()),p="wrap";d.stopEditing();null!=l&&"wrap"==l.style[mxConstants.STYLE_WHITE_SPACE]&&(p=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE, -p)});this.addAction("rotation",function(){var l="0",p=d.getView().getState(d.getSelectionCell());null!=p&&(l=p.style[mxConstants.STYLE_ROTATION]||l);l=new FilenameDialog(f,l,mxResources.get("apply"),function(w){null!=w&&0"));d.cellLabelChanged(state.cell,Graph.sanitizeHtml(C));d.setCellStyles("html",l,[p[x]])}}f.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=l?l:"0"],"cells",p))}finally{d.getModel().endUpdate()}});this.addAction("wordWrap",function(){var l=d.getView().getState(d.getSelectionCell()),p="wrap";d.stopEditing();null!=l&&"wrap"==l.style[mxConstants.STYLE_WHITE_SPACE]&&(p=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE, +p)});this.addAction("rotation",function(){var l="0",p=d.getView().getState(d.getSelectionCell());null!=p&&(l=p.style[mxConstants.STYLE_ROTATION]||l);l=new FilenameDialog(f,l,mxResources.get("apply"),function(x){null!=x&&0mxUtils.indexOf(this.customFonts,n)&&(this.customFonts.push(n),this.editorUi.fireEvent(new mxEventObject("customFontsChanged")))}))})));this.put("formatBlock",new Menu(mxUtils.bind(this,function(f,g){function d(h,n){return f.addItem(h,null,mxUtils.bind(this,function(){null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),document.execCommand("formatBlock",!1,"<"+ n+">"))}),g)}d(mxResources.get("normal"),"p");d("","h1").firstChild.nextSibling.innerHTML='

'+mxResources.get("heading")+" 1

";d("","h2").firstChild.nextSibling.innerHTML='

'+mxResources.get("heading")+" 2

";d("","h3").firstChild.nextSibling.innerHTML='

'+mxResources.get("heading")+" 3

";d("","h4").firstChild.nextSibling.innerHTML='

'+mxResources.get("heading")+" 4

";d("","h5").firstChild.nextSibling.innerHTML= '
'+mxResources.get("heading")+" 5
";d("","h6").firstChild.nextSibling.innerHTML='
'+mxResources.get("heading")+" 6
";d("","pre").firstChild.nextSibling.innerHTML='
'+mxResources.get("formatted")+"
";d("","blockquote").firstChild.nextSibling.innerHTML='
'+mxResources.get("blockquote")+"
"})));this.put("fontSize",new Menu(mxUtils.bind(this,function(f,g){var d= -[6,8,9,10,11,12,14,18,24,36,48,72];0>mxUtils.indexOf(d,this.defaultFontSize)&&(d.push(this.defaultFontSize),d.sort(function(w,z){return w-z}));for(var h=mxUtils.bind(this,function(w){if(null!=b.cellEditor.textarea){document.execCommand("fontSize",!1,"3");for(var z=b.cellEditor.textarea.getElementsByTagName("font"),C=0;CmxUtils.indexOf(d,this.customFontSizes[r])&&(n(this.customFontSizes[r]),l++);0mxUtils.indexOf(d,this.defaultFontSize)&&(d.push(this.defaultFontSize),d.sort(function(x,z){return x-z}));for(var h=mxUtils.bind(this,function(x){if(null!=b.cellEditor.textarea){document.execCommand("fontSize",!1,"3");for(var z=b.cellEditor.textarea.getElementsByTagName("font"),C=0;CmxUtils.indexOf(d,this.customFontSizes[r])&&(n(this.customFontSizes[r]),l++);0"];for(var O=0;O");for(var K=0;K
");I.push("")}I.push("");F=I.join("");J.call(G,F);F=G.cellEditor.textarea.getElementsByTagName("table");if(F.length==C.length+1)for(J=F.length-1;0<=J;J--)if(0==J||F[J]!=C[J-1]){G.selectNode(F[J].rows[0].cells[0]);break}}});var d=this.editorUi.editor.graph,h=null,n=null;null==e&&(a.div.className+=" geToolbarMenu", a.labels=!1);a=a.addItem("",null,null,e,null,null,null,!0);a.firstChild.style.fontSize=Menus.prototype.defaultFontSize+"px";e=a.getElementsByTagName("td");1d.div.clientHeight&&(d.div.style.width="40px");d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d, arguments);this.editorUi.resetCurrentMenu();d.destroy()});var r=mxUtils.getOffset(a);d.popup(r.x,r.y+a.offsetHeight,null,n);this.editorUi.setCurrentMenu(d,a)}h=!0;mxEvent.consume(n)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){h=null==d||null==d.div||null==d.div.parentNode;n.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.style.maxWidth="100%";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=function(a,b,e,f,g,d){function h(K,Z,S){var X=K.toLowerCase();if(null!= g&&(""==K||"automatic"==X||X==z.toLowerCase()||X==mxResources.get("default").toLowerCase())||X==mxResources.get("automatic").toLowerCase())K="default";X==mxResources.get("none").toLowerCase()&&(K="none");if(null!=g&&"default"==K)Z?K=d:null!=S&&(K=S);else if("none"!=K&&"#"!=K.charAt(0))try{var ca=document.createElement("canvas").getContext("2d");ca.fillStyle="#"+K;ca.fillStyle!="#"+K.toLowerCase()&&(ca.fillStyle=K,K=ca.fillStyle.substring(1).toUpperCase())}catch(Q){}return K}function n(){var K=h(p.value, -!1);/(^#?[a-zA-Z0-9]*$)/.test(K)?("default"!=K&&("none"!=K&&"#"!=K.charAt(0)&&(K="#"+K),ColorDialog.addRecentColor("none"!=K?K.substring(1):K,12)),w(K),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function r(){mxClient.IS_TOUCH||(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null))}function l(){var K=D(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);K.style.marginBottom= -"8px";return K}this.editorUi=a;var p=document.createElement("input");p.style.marginBottom="10px";p.style.marginLeft="8px";mxClient.IS_IE&&(p.style.marginTop="10px",document.body.appendChild(p));var w=null!=e?e:this.createApplyFunction();null==d&&(d=Editor.isDarkMode()&&"default"==g?"#ffffff":"#000000");var z=d.substring(1).toUpperCase()+" ("+mxResources.get("automatic")+")";this.init=function(){r()};var C=new mxJSColor.color(p);C.pickerOnfocus=!1;C.showPicker();e=document.createElement("div");mxJSColor.picker.box.style.position= +!1);/(^#?[a-zA-Z0-9]*$)/.test(K)?("default"!=K&&("none"!=K&&"#"!=K.charAt(0)&&(K="#"+K),ColorDialog.addRecentColor("none"!=K?K.substring(1):K,12)),x(K),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function r(){mxClient.IS_TOUCH||(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null))}function l(){var K=D(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);K.style.marginBottom= +"8px";return K}this.editorUi=a;var p=document.createElement("input");p.style.marginBottom="10px";p.style.marginLeft="8px";mxClient.IS_IE&&(p.style.marginTop="10px",document.body.appendChild(p));var x=null!=e?e:this.createApplyFunction();null==d&&(d=Editor.isDarkMode()&&"default"==g?"#ffffff":"#000000");var z=d.substring(1).toUpperCase()+" ("+mxResources.get("automatic")+")";this.init=function(){r()};var C=new mxJSColor.color(p);C.pickerOnfocus=!1;C.showPicker();e=document.createElement("div");mxJSColor.picker.box.style.position= "relative";mxJSColor.picker.box.style.width="230px";mxJSColor.picker.box.style.height="100px";mxJSColor.picker.box.style.paddingBottom="10px";e.appendChild(mxJSColor.picker.box);var F=document.createElement("center"),D=mxUtils.bind(this,function(K,Z,S,X){Z=null!=Z?Z:12;var ca=document.createElement("table");ca.style.borderCollapse="collapse";ca.setAttribute("cellspacing","0");ca.style.marginBottom="20px";ca.style.cellSpacing="0px";ca.style.marginLeft="1px";var Q=document.createElement("tbody");ca.appendChild(Q); for(var aa=K.length/Z,da=0;da=b&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]}; var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("align","center");var e=document.createElement("h3");mxUtils.write(e,mxResources.get("about")+" GraphEditor");b.appendChild(e);e=document.createElement("img");e.style.border="0px";e.setAttribute("width","176");e.setAttribute("width","151");e.setAttribute("src",IMAGE_PATH+"/logo.png");b.appendChild(e);mxUtils.br(b);mxUtils.write(b,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(b);e=document.createElement("a");e.setAttribute("href", -"http://www.jgraph.com/");e.setAttribute("target","_blank");mxUtils.write(e,"www.jgraph.com");b.appendChild(e);mxUtils.br(b);mxUtils.br(b);e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn gePrimaryBtn";b.appendChild(e);this.container=b},TextareaDialog=function(a,b,e,f,g,d,h,n,r,l,p,w,z,C,F){l=null!=l?l:!1;h=document.createElement("div");h.style.position="absolute";h.style.top="20px";h.style.bottom="20px";h.style.left="20px";h.style.right="20px";n=document.createElement("div"); +"http://www.jgraph.com/");e.setAttribute("target","_blank");mxUtils.write(e,"www.jgraph.com");b.appendChild(e);mxUtils.br(b);mxUtils.br(b);e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn gePrimaryBtn";b.appendChild(e);this.container=b},TextareaDialog=function(a,b,e,f,g,d,h,n,r,l,p,x,z,C,F){l=null!=l?l:!1;h=document.createElement("div");h.style.position="absolute";h.style.top="20px";h.style.bottom="20px";h.style.left="20px";h.style.right="20px";n=document.createElement("div"); n.style.position="absolute";n.style.left="0px";n.style.right="0px";var D=n.cloneNode(!1),G=n.cloneNode(!1);n.style.top="0px";n.style.height="20px";D.style.top="20px";D.style.bottom="64px";G.style.bottom="0px";G.style.height="60px";G.style.textAlign="right";G.style.paddingTop="14px";G.style.boxSizing="border-box";mxUtils.write(n,b);h.appendChild(n);h.appendChild(D);h.appendChild(G);null!=F&&n.appendChild(F);var I=document.createElement("textarea");p&&I.setAttribute("wrap","off");I.setAttribute("spellcheck", "false");I.setAttribute("autocorrect","off");I.setAttribute("autocomplete","off");I.setAttribute("autocapitalize","off");mxUtils.write(I,e||"");I.style.resize="none";I.style.outline="none";I.style.position="absolute";I.style.boxSizing="border-box";I.style.top="0px";I.style.left="0px";I.style.height="100%";I.style.width="100%";this.textarea=I;this.init=function(){I.focus();I.scrollTop=0};D.appendChild(I);null==z||a.isOffline()||G.appendChild(a.createHelpIcon(z));if(null!=C)for(b=0;bMAX_AREA||0>=C.value?"red":"";F.style.backgroundColor=C.value*F.value>MAX_AREA||0>=F.value?"red":""}var f=a.editor.graph,g=f.getGraphBounds(),d=f.view.scale,h=Math.ceil(g.width/ +var ExportDialog=function(a){function b(){var X=p.value,ca=X.lastIndexOf(".");p.value=0MAX_AREA||0>=C.value?"red":"";F.style.backgroundColor=C.value*F.value>MAX_AREA||0>=F.value?"red":""}var f=a.editor.graph,g=f.getGraphBounds(),d=f.view.scale,h=Math.ceil(g.width/ d),n=Math.ceil(g.height/d);d=document.createElement("table");var r=document.createElement("tbody");d.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");g=document.createElement("tr");var l=document.createElement("td");l.style.fontSize="10pt";l.style.width="100px";mxUtils.write(l,mxResources.get("filename")+":");g.appendChild(l);var p=document.createElement("input");p.setAttribute("value",a.editor.getOrCreateFilename());p.style.width="180px";l=document.createElement("td");l.appendChild(p);g.appendChild(l); -r.appendChild(g);g=document.createElement("tr");l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("format")+":");g.appendChild(l);var w=document.createElement("select");w.style.width="180px";l=document.createElement("option");l.setAttribute("value","png");mxUtils.write(l,mxResources.get("formatPng"));w.appendChild(l);l=document.createElement("option");ExportDialog.showGifOption&&(l.setAttribute("value","gif"),mxUtils.write(l,mxResources.get("formatGif")),w.appendChild(l)); -l=document.createElement("option");l.setAttribute("value","jpg");mxUtils.write(l,mxResources.get("formatJpg"));w.appendChild(l);a.printPdfExport||(l=document.createElement("option"),l.setAttribute("value","pdf"),mxUtils.write(l,mxResources.get("formatPdf")),w.appendChild(l));l=document.createElement("option");l.setAttribute("value","svg");mxUtils.write(l,mxResources.get("formatSvg"));w.appendChild(l);ExportDialog.showXmlOption&&(l=document.createElement("option"),l.setAttribute("value","xml"),mxUtils.write(l, -mxResources.get("formatXml")),w.appendChild(l));l=document.createElement("td");l.appendChild(w);g.appendChild(l);r.appendChild(g);g=document.createElement("tr");l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("zoom")+" (%):");g.appendChild(l);var z=document.createElement("input");z.setAttribute("type","number");z.setAttribute("value","100");z.style.width="180px";l=document.createElement("td");l.appendChild(z);g.appendChild(l);r.appendChild(g);g=document.createElement("tr"); +r.appendChild(g);g=document.createElement("tr");l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("format")+":");g.appendChild(l);var x=document.createElement("select");x.style.width="180px";l=document.createElement("option");l.setAttribute("value","png");mxUtils.write(l,mxResources.get("formatPng"));x.appendChild(l);l=document.createElement("option");ExportDialog.showGifOption&&(l.setAttribute("value","gif"),mxUtils.write(l,mxResources.get("formatGif")),x.appendChild(l)); +l=document.createElement("option");l.setAttribute("value","jpg");mxUtils.write(l,mxResources.get("formatJpg"));x.appendChild(l);a.printPdfExport||(l=document.createElement("option"),l.setAttribute("value","pdf"),mxUtils.write(l,mxResources.get("formatPdf")),x.appendChild(l));l=document.createElement("option");l.setAttribute("value","svg");mxUtils.write(l,mxResources.get("formatSvg"));x.appendChild(l);ExportDialog.showXmlOption&&(l=document.createElement("option"),l.setAttribute("value","xml"),mxUtils.write(l, +mxResources.get("formatXml")),x.appendChild(l));l=document.createElement("td");l.appendChild(x);g.appendChild(l);r.appendChild(g);g=document.createElement("tr");l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("zoom")+" (%):");g.appendChild(l);var z=document.createElement("input");z.setAttribute("type","number");z.setAttribute("value","100");z.style.width="180px";l=document.createElement("td");l.appendChild(z);g.appendChild(l);r.appendChild(g);g=document.createElement("tr"); l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("width")+":");g.appendChild(l);var C=document.createElement("input");C.setAttribute("value",h);C.style.width="180px";l=document.createElement("td");l.appendChild(C);g.appendChild(l);r.appendChild(g);g=document.createElement("tr");l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("height")+":");g.appendChild(l);var F=document.createElement("input");F.setAttribute("value",n);F.style.width= "180px";l=document.createElement("td");l.appendChild(F);g.appendChild(l);r.appendChild(g);g=document.createElement("tr");l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("dpi")+":");g.appendChild(l);var D=document.createElement("select");D.style.width="180px";l=document.createElement("option");l.setAttribute("value","100");mxUtils.write(l,"100dpi");D.appendChild(l);l=document.createElement("option");l.setAttribute("value","200");mxUtils.write(l,"200dpi");D.appendChild(l); l=document.createElement("option");l.setAttribute("value","300");mxUtils.write(l,"300dpi");D.appendChild(l);l=document.createElement("option");l.setAttribute("value","400");mxUtils.write(l,"400dpi");D.appendChild(l);l=document.createElement("option");l.setAttribute("value","custom");mxUtils.write(l,mxResources.get("custom"));D.appendChild(l);var G=document.createElement("input");G.style.width="180px";G.style.display="none";G.setAttribute("value","100");G.setAttribute("type","number");G.setAttribute("min", "50");G.setAttribute("step","50");var I=!1;mxEvent.addListener(D,"change",function(){"custom"==this.value?(this.style.display="none",G.style.display="",G.focus()):(G.value=this.value,I||(z.value=this.value))});mxEvent.addListener(G,"change",function(){var X=parseInt(G.value);isNaN(X)||0>=X?G.style.backgroundColor="red":(G.style.backgroundColor="",I||(z.value=X))});l=document.createElement("td");l.appendChild(D);l.appendChild(G);g.appendChild(l);r.appendChild(g);g=document.createElement("tr");l=document.createElement("td"); l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("background")+":");g.appendChild(l);var J=document.createElement("input");J.setAttribute("type","checkbox");J.checked=null==f.background||f.background==mxConstants.NONE;l=document.createElement("td");l.appendChild(J);mxUtils.write(l,mxResources.get("transparent"));g.appendChild(l);r.appendChild(g);g=document.createElement("tr");l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("grid")+":");g.appendChild(l); var O=document.createElement("input");O.setAttribute("type","checkbox");O.checked=!1;l=document.createElement("td");l.appendChild(O);g.appendChild(l);r.appendChild(g);g=document.createElement("tr");l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("borderWidth")+":");g.appendChild(l);var K=document.createElement("input");K.setAttribute("type","number");K.setAttribute("value",ExportDialog.lastBorderValue);K.style.width="180px";l=document.createElement("td");l.appendChild(K); -g.appendChild(l);r.appendChild(g);d.appendChild(r);mxEvent.addListener(w,"change",b);b();mxEvent.addListener(z,"change",function(){I=!0;var X=Math.max(0,parseFloat(z.value)||100)/100;z.value=parseFloat((100*X).toFixed(2));0=parseInt(z.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var X=p.value,ca=w.value,Q=Math.max(0,parseFloat(z.value)||100)/ +g.appendChild(l);r.appendChild(g);d.appendChild(r);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(z,"change",function(){I=!0;var X=Math.max(0,parseFloat(z.value)||100)/100;z.value=parseFloat((100*X).toFixed(2));0=parseInt(z.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var X=p.value,ca=x.value,Q=Math.max(0,parseFloat(z.value)||100)/ 100,aa=Math.max(0,parseInt(K.value)),da=f.background,ma=Math.max(1,parseInt(G.value));if(("svg"==ca||"png"==ca||"pdf"==ca)&&J.checked)da=null;else if(null==da||da==mxConstants.NONE)da="#ffffff";ExportDialog.lastBorderValue=aa;ExportDialog.exportFile(a,X,ca,da,Q,aa,ma,O.checked)}}));Z.className="geBtn gePrimaryBtn";var S=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});S.className="geBtn";a.editor.cancelFirst?(l.appendChild(S),l.appendChild(Z)):(l.appendChild(Z),l.appendChild(S)); g.appendChild(l);r.appendChild(g);d.appendChild(r);this.container=d};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0; ExportDialog.exportFile=function(a,b,e,f,g,d,h,n){n=a.editor.graph;if("xml"==e)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,e);else if("svg"==e)ExportDialog.saveLocalFile(a,mxUtils.getXml(n.getSvg(f,g,d)),b,e);else{var r=n.getGraphBounds(),l=mxUtils.createXmlDocument(),p=l.createElement("output");l.appendChild(p);l=new mxXmlCanvas2D(p);l.translate(Math.floor((d/g-r.x)/n.view.scale),Math.floor((d/g-r.y)/n.view.scale));l.scale(g/n.view.scale);(new mxImageExport).drawState(n.getView().getState(n.model.root), l);p="xml="+encodeURIComponent(mxUtils.getXml(p));l=Math.ceil(r.width*g/n.view.scale+2*d);g=Math.ceil(r.height*g/n.view.scale+2*d);p.length<=MAX_REQUEST_SIZE&&l*gX.name?1:0});if(null!=F){p=document.createElement("div");p.style.width= "100%";p.style.fontSize="11px";p.style.textAlign="center";mxUtils.write(p,F);var J=l.addField(mxResources.get("id")+":",p);mxEvent.addListener(p,"dblclick",function(S){S=new FilenameDialog(a,F,mxResources.get("apply"),mxUtils.bind(this,function(X){if(null!=X&&0S.indexOf(":"))try{var X=mxUtils.indexOf(w,S);if(0<=X&&null!=z[X])z[X].focus();else{d.cloneNode(!1).setAttribute(S,"");0<=X&&(w.splice(X,1),z.splice(X,1));w.push(S);var ca=l.addTextarea(S+":","",2);ca.style.width="100%"; +"1px";O.style.borderStyle="solid";O.style.marginLeft="2px";O.style.padding="4px";O.style.width="100%";h.appendChild(O);r.appendChild(h);f.appendChild(r);var K=mxUtils.button(mxResources.get("addProperty"),function(){var S=O.value;if(0S.indexOf(":"))try{var X=mxUtils.indexOf(x,S);if(0<=X&&null!=z[X])z[X].focus();else{d.cloneNode(!1).setAttribute(S,"");0<=X&&(x.splice(X,1),z.splice(X,1));x.push(S);var ca=l.addTextarea(S+":","",2);ca.style.width="100%"; z.push(ca);D(ca,S);ca.focus()}K.setAttribute("disabled","disabled");O.value=""}catch(Q){mxUtils.alert(Q)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(O,"keypress",function(S){13==S.keyCode&&K.click()});this.init=function(){0")});mxEvent.addListener(U,"dragend",function(R){null!=z&&null!=C&&r.addCell(la,r.model.root,C);C=z=null;R.stopPropagation();R.preventDefault()});var Y=document.createElement("img");Y.setAttribute("draggable","false");Y.setAttribute("align","top");Y.setAttribute("border","0");Y.className="geAdaptiveAsset"; @@ -3860,9 +3859,9 @@ Y.style.width="16px";Y.style.padding="0px 6px 0 4px";Y.style.marginTop="2px";Y.s "52px";Y.style.right="8px";Y.style.top="8px";T.appendChild(Y);U.appendChild(T);if(r.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)ma=document.createElement("div"),ma.style.display="block",ma.style.textAlign="right",ma.style.whiteSpace="nowrap",ma.style.position="absolute",ma.style.right="16px",ma.style.top="6px",0";if(Ha||"undefined"===typeof mxMermaidToDrawio)la=aa=ua;ua=z.cloneNode(!0);pa.appendChild(ua);Ua=function(Ja){P=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};La=function(Ja){P||A(Sa,mxEvent.getClientX(Ja), -mxEvent.getClientY(Ja),Wa,Na)};mxEvent.addGestureListeners(Wa,Ua,null,La);mxEvent.addGestureListeners(ua,Ua,null,La)},function(ua){mxMermaidToDrawio.resetListeners();b.handleError(ua)})});Ra.setAttribute("disabled","disabled");Ra.className="geBtn gePrimaryBtn";va=function(){window.setTimeout(function(){""!=wa.value?Ra.removeAttribute("disabled"):Ra.setAttribute("disabled","disabled")},0)};sa=urlParams["smart-template"];null!=sa&&"1"!=sa&&(wa.value=decodeURIComponent(sa),va(),"1"==urlParams["smart-template-generate"]&& -window.setTimeout(function(){Ra.click()},0));mxEvent.addListener(wa,"change",va);mxEvent.addListener(wa,"keydown",va);mxEvent.addListener(wa,"cut",va);mxEvent.addListener(wa,"paste",va);mxEvent.addListener(wa,"keydown",function(Ta){13==Ta.keyCode&&Ra.click()});va=document.createElement("div");va.style.height="40px";va.style.marginTop="4px";va.style.marginBottom="4px";va.style.whiteSpace="nowrap";va.style.overflowX="auto";va.style.overflowY="hidden";va.appendChild(qa);va.appendChild(Ra);ia.appendChild(va); -ia.appendChild(pa);return ia}function L(){if(ma&&null!=d)f||b.hideDialog(),d(ma,ka,K.value);else if(c)f||b.hideDialog(),c(aa,K.value,ba,ca);else{var ia=K.value;null!=ia&&0=Qa.getStatus()&&(Ua=Qa.getText());Va(Ua,La)}))):Va(Ua,La)}function Na(Ka,Va){if(null== +e.appendChild(D);b.editor.cancelFirst||e.appendChild(E);this.container=e},NewDialog=function(b,e,f,c,k,p,q,u,E,D,B,M,J,d,g,m,t,v){function y(ia){null!=ia&&(xa=sa=ia?135:140);ia=!0;if(null!=Da)for(;Q";if(Ha||"undefined"===typeof mxMermaidToDrawio)na=aa=ua;ua=z.cloneNode(!0);pa.appendChild(ua);Ua=function(Ja){P=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};La=function(Ja){P||A(Sa,mxEvent.getClientX(Ja), +mxEvent.getClientY(Ja),Wa,Na)};mxEvent.addGestureListeners(Wa,Ua,null,La);mxEvent.addGestureListeners(ua,Ua,null,La)},function(ua){mxMermaidToDrawio.resetListeners();b.handleError(ua)})});Ra.setAttribute("disabled","disabled");Ra.className="geBtn gePrimaryBtn";va=function(){window.setTimeout(function(){""!=ya.value?Ra.removeAttribute("disabled"):Ra.setAttribute("disabled","disabled")},0)};ta=urlParams["smart-template"];null!=ta&&"1"!=ta&&(ya.value=decodeURIComponent(ta),va(),"1"==urlParams["smart-template-generate"]&& +window.setTimeout(function(){Ra.click()},0));mxEvent.addListener(ya,"change",va);mxEvent.addListener(ya,"keydown",va);mxEvent.addListener(ya,"cut",va);mxEvent.addListener(ya,"paste",va);mxEvent.addListener(ya,"keydown",function(Ta){13==Ta.keyCode&&Ra.click()});va=document.createElement("div");va.style.height="40px";va.style.marginTop="4px";va.style.marginBottom="4px";va.style.whiteSpace="nowrap";va.style.overflowX="auto";va.style.overflowY="hidden";va.appendChild(qa);va.appendChild(Ra);ia.appendChild(va); +ia.appendChild(pa);return ia}function L(){if(la&&null!=d)f||b.hideDialog(),d(la,ka,K.value);else if(c)f||b.hideDialog(),c(aa,K.value,ba,ca);else{var ia=K.value;null!=ia&&0=Qa.getStatus()&&(Ua=Qa.getText());Va(Ua,La)}))):Va(Ua,La)}function Na(Ka,Va){if(null== ia||F||b.sidebar.currentElt==ua)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=N){var Qa=""+Graph.compress('')+"";A(Qa,mxEvent.getClientX(Ka),mxEvent.getClientY(Ka),pa,ia)}else b.sidebar.currentElt= -ua,F=!0,Ha(ia,function(Za){if(F&&b.sidebar.currentElt==ua)try{A(Za,mxEvent.getClientX(Ka),mxEvent.getClientY(Ka),ua,Va)}catch($a){b.sidebar.currentElt=null,b.handleError($a)}F=!1})}var ua=document.createElement("div");ua.className="geTemplate geAdaptiveAsset";ua.style.position="relative";ua.style.height=ta+"px";ua.style.width=xa+"px";ua.style.border="1px solid transparent";var Ua=null,La=ia;null!=pa?ua.setAttribute("title",mxResources.get(pa,null,pa)):null!=va&&0= -ja.scrollHeight&&(y(),mxEvent.consume(Na))}));if(0= +ja.scrollHeight&&(y(),mxEvent.consume(Na))}));if(0(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;k=null!=k?k:!1;q=null!=q?q:Editor.isDarkMode()?Editor.darkColor:"#ebf2f9";u=null!=u?u:Editor.isDarkMode()?"#fff":"#e6eff8";E=null!=E?E:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";B=null!=B?B:EditorUi.templateFile;var x=document.createElement("div");x.style.userSelect="none";x.style.height="100%";var I=document.createElement("div");I.style.whiteSpace="nowrap";I.style.height= "46px";f&&x.appendChild(I);var C=document.createElement("img");C.setAttribute("border","0");C.setAttribute("align","absmiddle");C.style.width="40px";C.style.height="40px";C.style.marginRight="10px";C.style.paddingBottom="4px";C.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg": b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||n||!f||I.appendChild(C);f&&mxUtils.write(I,(n?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");C=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?C=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?C=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&& null!=b.oneDrive?C=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?C=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?C=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(C=b.trello.extension);var K=document.createElement("input");K.setAttribute("value",b.defaultFilename+C);K.style.marginLeft="10px";K.style.width=e||n?"144px":"244px";this.init=function(){f&&Editor.selectFilename(K);null!=ja.parentNode&&null!=ja.parentNode.parentNode&&mxEvent.addGestureListeners(ja.parentNode.parentNode, mxUtils.bind(this,function(ia){b.sidebar.hideTooltip()}),null,null)};f&&(I.appendChild(K),v?K.style.width=e||n?"350px":"450px":null!=b.editor.diagramFileTypes&&(v=FilenameDialog.createFileTypes(b,K,b.editor.diagramFileTypes),v.style.marginLeft="6px",v.style.width=e||n?"80px":"180px",I.appendChild(v)));n=!1;var Q=0,O=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),l=mxUtils.button(m||mxResources.get("create"),function(){l.setAttribute("disabled", "disabled");L();l.removeAttribute("disabled")});l.className="geBtn gePrimaryBtn";var z=document.createElement("img");z.setAttribute("src",Editor.magnifyImage);z.setAttribute("title",mxResources.get("preview"));z.className="geAdaptiveAsset geActiveButton";z.style.position="absolute";z.style.cursor="default";z.style.padding="6px";z.style.opacity="0.5";z.style.height="16px";z.style.right="0px";z.style.top="0px";var F=!1,N=null,P=!1;if(M||J){var T=[],S=null,V=null,W=null,X=function(ia){l.setAttribute("disabled", -"disabled");for(var wa=0;wamxUtils.indexOf(c,I))if(O=null!=O?O:b.getTitleForService(I),0<=mxUtils.indexOf(H,I)||null!=b.getServiceForName(I)){z=document.createElement("option");if("pick"==l)z.innerHTML=mxUtils.htmlEntities(O)+"  –  "+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"...",z.setAttribute("value","pickFolder-"+I),z.setAttribute("title",O+" - "+mxResources.get("pickFolder")+"...");else{var F=I+(null!= K?"-"+K:""),N=n[F];null!=N&&null!=N.option&&N.option.parentNode.removeChild(N.option);N=null;if(null!=C){"/"==C.charAt(C.length-1)&&(C=C.substring(0,C.length-1));"/"==C.charAt(0)&&(C=C.substring(1));N=C;if(I!=App.MODE_GITHUB&&I==App.MODE_GITLAB){var P=N.lastIndexOf("/");0<=P&&(N=N.substring(P+1))}40=ca.getStatus()){var ha=JSON.parse(ca.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",P,"response:",ha);var aa=mxUtils.trim(ha.choices[0].message.content);if("create"==t.value){var ea=b.extractMermaidDeclaration(aa);null!=ea?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ka){Y(ka)})),b.generateMermaidImage(ea,null,function(){}, -function(ka){mxMermaidToDrawio.resetListeners();Z(ka)})):(Y(aa),Q.appendChild(q(mxResources.get("tryAgain"),S)))}else Y(aa)}else{var ma="Error: "+ca.getStatus();try{var ba=JSON.parse(ca.getText());null!=ba&&null!=ba.error&&null!=ba.error.message&&(ma=ba.error.message)}catch(ka){}Q.innerHTML="";mxUtils.write(Q,ma);Q.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(ka){Z(ka)}}),Z)}),function(W){Q.innerHTML="";mxUtils.write(Q,W.message);Q.appendChild(q(mxResources.get("tryAgain"), +function(ca){var ha=E(ca),aa=null!=ha?b.stringToCells(ha[1]):null;if(null!=aa&&0=ca.getStatus()){var ha=JSON.parse(ca.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",P,"response:",ha);var aa=mxUtils.trim(ha.choices[0].message.content);if("create"==t.value){var fa=b.extractMermaidDeclaration(aa);null!=fa?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ka){Y(ka)})),b.generateMermaidImage(fa,null,function(){}, +function(ka){mxMermaidToDrawio.resetListeners();Z(ka)})):(Y(aa),Q.appendChild(q(mxResources.get("tryAgain"),S)))}else Y(aa)}else{var la="Error: "+ca.getStatus();try{var ba=JSON.parse(ca.getText());null!=ba&&null!=ba.error&&null!=ba.error.message&&(la=ba.error.message)}catch(ka){}Q.innerHTML="";mxUtils.write(Q,la);Q.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(ka){Z(ka)}}),Z)}),function(W){Q.innerHTML="";mxUtils.write(Q,W.message);Q.appendChild(q(mxResources.get("tryAgain"), S));Q.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});S()}function B(){""!=mxUtils.trim(R.value)&&(D(R.value),R.value="")}var M=b.editor.graph,J=document.createElement("div");J.style.textAlign="center";J.style.overflow="hidden";J.style.height="100%";var d=document.createElement("div");d.style.position="absolute";d.style.overflow="auto";d.style.top="0px";d.style.left="0px";d.style.right="0px";d.style.bottom="104px";J.appendChild(d);var g=document.createElement("div");g.style.position= "absolute";g.style.boxSizing="border-box";g.style.borderRadius="4px";g.style.border="1px solid lightgray";g.style.margin="8px 8px 16px 8px";g.style.padding="8px";g.style.left="0px";g.style.right="0px";g.style.bottom="0px";g.style.padding="6px";g.style.height="80px";var m=document.createElement("div");m.style.display="flex";m.style.gap="6px";m.style.marginBottom="6px";var t=document.createElement("select");t.style.textOverflow="ellipsis";t.style.flexGrow="1";t.style.padding="4px";t.style.minWidth= "0";g.appendChild(m);var v=document.createElement("option");v.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(v,mxResources.get("includeCopyOfMyDiagram"));t.appendChild(v);var y=document.createElement("option");y.setAttribute("value","selectionOnly");mxUtils.write(y,mxResources.get("selectionOnly"));t.appendChild(y);m.appendChild(t);if("undefined"!==typeof mxMermaidToDrawio){var A=document.createElement("option");A.setAttribute("value","create");mxUtils.write(A,mxResources.get("create")); @@ -11601,10 +11600,10 @@ f.setCellStyles(mxConstants.STYLE_ROTATION,Number(v.value),[e[A]])}}finally{f.ge R.clientY);null!=R&&R.parentNode!=g;)R=R.parentNode;var n=null;if(null!=R){var x=g.firstChild;for(n=0;null!=x&&x!=R;)x=x.nextSibling,n++}return n}function E(R,n,x,I,C,K,Q,O,l){try{if(b.spinner.stop(),null==n||"image/"==n.substring(0,6))if(null==R&&null!=Q||null==t[R]){var z=function(){X.innerText="";X.style.cursor="pointer";X.style.whiteSpace="nowrap";X.style.textOverflow="ellipsis";mxUtils.write(X,null!=Z.title&&0b.maxImageSize||K>b.maxImageSize){var P=Math.min(1,Math.min(b.maxImageSize/Math.max(1,C)),b.maxImageSize/Math.max(1,K));C*=P;K*=P}F>N?(N=Math.round(100*N/F),F=100):(F=Math.round(100*F/N),N=100);var T=document.createElement("div");T.setAttribute("draggable","true");T.style.display="inline-block";T.style.position="relative";T.style.padding="0 12px";T.style.cursor="move";mxUtils.setPrefixedStyle(T.style,"transition", "transform .1s ease-in-out");if(null!=R){var S=document.createElement("img");S.setAttribute("src",G.convert(R));S.style.width=F+"px";S.style.height=N+"px";S.style.margin="10px";S.style.paddingBottom=Math.floor((100-N)/2)+"px";S.style.paddingLeft=Math.floor((100-F)/2)+"px";T.appendChild(S)}else if(null!=Q){var V=b.stringToCells("<"==Q.xml.charAt(0)?Q.xml:Graph.decompress(Q.xml));0X.getStatus()||299>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P& +S[Y];null==ca?this.convertImageToDataUri(Y,function(ha){null!=ha&&(S[Y]=ha,Z.setAttribute(W,ha));P()},null,Editor.svgRasterScale):(Z.setAttribute(W,ca),P())}else null!=Y&&Z.setAttribute(W,Y),P()}}catch(ha){P()}}))})(V[X])});F("image","xlink:href");F("img","src");P()};Editor.base64Encode=function(l){for(var z="",F=0,N=l.length,P,T,S;F>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P& 3)<<4);z+="==";break}T=l.charCodeAt(F++);if(F==N){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(T&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2);z+="=";break}S=l.charCodeAt(F++);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P& 3)<<4|(T&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2|(S&192)>>6);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return z};Editor.prototype.loadUrl=function(l,z,F,N,P,T,S,V){try{var W=!S&&(N||/(\.png)($|\?)/i.test(l)||/(\.jpe?g)($|\?)/i.test(l)||/(\.gif)($|\?)/i.test(l)||/(\.pdf)($|\?)/i.test(l));P=null!=P?P:!0;var X=mxUtils.bind(this,function(){mxUtils.get(l,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&& 299>=Z.getStatus()){if(null!=z){var Y=Z.getText();if(W){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();Y=Array(Z.length);for(var ca=0;caN.indexOf("mxPageSelector")&&0k;k++)for(var p=k,q=0;8>q;q++)p=1==(p&1)? +(N=N.cloneNode(!1),mxUtils.setTextContent(N,z.join("\n")),F.appendChild(N))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(l,z,F){var N=mxClient.IS_FF?8192:16384;return Math.min(F,Math.min(N/l,N/z))};Editor.prototype.exportToCanvas=function(l,z,F,N,P,T,S,V,W,X,Z,Y,ca,ha,aa,fa,la,ba){try{T=null!=T?T:!0;S=null!=S?S:!0;Y=null!=Y?Y:this.graph;ca=null!=ca?ca:0;var ka=W?null:Y.background;ka==mxConstants.NONE&& +(ka=null);null==ka&&(ka=N);null==ka&&0==W&&(ka="dark"==fa?Editor.darkColor:"#ffffff");this.convertImages(Y.getSvg(null,null,ca,ha,null,S,null,null,null,X,null,fa,la,ba),mxUtils.bind(this,function(na){try{var ja=new Image;ja.onload=mxUtils.bind(this,function(){try{var ea=function(){mxClient.IS_SF?window.setTimeout(function(){sa.drawImage(ja,0,0);l(wa,na)},0):(sa.drawImage(ja,0,0),l(wa,na))},wa=document.createElement("canvas"),oa=parseInt(na.getAttribute("width")),xa=parseInt(na.getAttribute("height")); +V=null!=V?V:1;null!=z&&(V=T?Math.min(1,Math.min(3*z/(4*xa),z/oa)):z/oa);V=this.getMaxCanvasScale(oa,xa,V);oa=Math.ceil(V*oa);xa=Math.ceil(V*xa);wa.setAttribute("width",oa);wa.setAttribute("height",xa);var sa=wa.getContext("2d");null!=ka&&(sa.beginPath(),sa.rect(0,0,oa,xa),sa.fillStyle=ka,sa.fill());1!=V&&sa.scale(V,V);if(aa){var da=Y.view,ma=da.scale;da.scale=1;var Aa=btoa(unescape(encodeURIComponent(da.createSvgGrid(da.gridColor))));da.scale=ma;Aa="data:image/svg+xml;base64,"+Aa;var za=Y.gridSize* +da.gridSteps*V,Ia=Y.getGraphBounds(),Ba=da.translate.x*ma,Ga=da.translate.y*ma,Da=Ba+(Ia.x-Ba)/ma-ca,Pa=Ga+(Ia.y-Ga)/ma-ca,Oa=new Image;Oa.onload=function(){try{for(var Ea=-Math.round(za-mxUtils.mod((Ba-Da)*V,za)),ia=-Math.round(za-mxUtils.mod((Ga-Pa)*V,za));Eak;k++)for(var p=k,q=0;8>q;q++)p=1==(p&1)? 3988292384^p>>>1:p>>>1,Editor.crcTable[k]=p;Editor.updateCRC=function(l,z,F,N){for(var P=0;P>>8;return l};Editor.crc32=function(l){for(var z=-1,F=0;F>>8^Editor.crcTable[(z^l.charCodeAt(F))&255];return(z^-1)>>>0};Editor.writeGraphModelToPng=function(l,z,F,N,P){function T(Z,Y){var ca=W;W+=Y;return Z.substring(ca,W)}function S(Z){Z=T(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function V(Z){return String.fromCharCode(Z>> 24&255,Z>>16&255,Z>>8&255,Z&255)}l=l.substring(l.indexOf(",")+1);l=window.atob?atob(l):Base64.decode(l,!0);var W=0;if(T(l,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=P&&P();else if(T(l,4),"IHDR"!=T(l,4))null!=P&&P();else{T(l,17);P=l.substring(0,W);do{var X=S(l);if("IDAT"==T(l,4)){P=l.substring(0,W-8);"pHYs"==z&&"dpi"==F?(F=Math.round(N/.0254),F=V(F)+V(F)+String.fromCharCode(1)):F=F+String.fromCharCode(0)+("zTXt"==z?String.fromCharCode(0):"")+N;N=4294967295;N=Editor.updateCRC(N, z,0,4);N=Editor.updateCRC(N,F,0,F.length);P+=V(F.length)+z+F+V(N^4294967295);P+=l.substring(W-8,l.length);break}P+=l.substring(W-8,W-4+X);T(l,X);T(l,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(P):Base64.encode(P,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var u=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(l,z){u.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}; @@ -11865,33 +11864,34 @@ stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradien null!=P&&null!=P.shape&&(P.shape.commonCustomPropAdded||(P.shape.commonCustomPropAdded=!0,P.shape.customProperties=P.shape.customProperties||[],P.cell.vertex?Array.prototype.push.apply(P.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(P.shape.customProperties,Editor.commonEdgeProperties)),N(P.shape.customProperties));l=l.getAttribute("customProperties");if(null!=l)try{N(JSON.parse(l))}catch(T){}}};var J=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init= function(){var l=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0na.size&&(Ba=Ba.slice(0,na.size));da=Ba.join(",");null!=na.countProperty&&(ca.setCellStyles(na.countProperty,Ba.length, -ca.getSelectionCells()),za.push(na.countProperty),Ia.push(Ba.length))}ca.setCellStyles(xa,da,ca.getSelectionCells());za.push(xa);Ia.push(da);if(null!=na.dependentProps)for(xa=0;xada)Pa=Pa.slice(0,da);else for(var Oa=Pa.length;Oana.max&&(ia=na.max);var wa=null;try{wa="numbers"==Ba?ia.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==Ba?parseInt(ia):ia)+"")}catch(pa){}P(xa,wa,na,null,Ea)}var Ea=document.createElement("input");T(Da,Ea,!0);Ea.value=decodeURIComponent(da);Ea.className="gePropEditor";"int"!=Ba&&"float"!=Ba||na.allowAuto||(Ea.type="number",Ea.step="int"==Ba?"1":"any",null!=na.min&&(Ea.min=parseFloat(na.min)),null!=na.max&&(Ea.max=parseFloat(na.max)));l.appendChild(Ea); -mxEvent.addListener(Ea,"keypress",function(ia){13==ia.keyCode&&Oa()});Ea.focus();mxEvent.addListener(Ea,"blur",function(){Oa()})})));na.isDeletable&&(za=mxUtils.button("-",mxUtils.bind(Y,function(Oa){P(xa,"",na,na.index);mxEvent.consume(Oa)})),za.style.height="16px",za.style.width="25px",za.style.float="right",za.className="geColorBtn",Da.appendChild(za));Ga.appendChild(Da);return Ga}var Y=this,ca=this.editorUi.editor.graph,ha=[];l.style.position="relative";l.style.padding="0";var aa=document.createElement("table"); -aa.className="geProperties";aa.style.whiteSpace="nowrap";aa.style.width="100%";var ea=document.createElement("tr");ea.className="gePropHeader";var ma=document.createElement("th");ma.className="gePropHeaderCell";var ba=document.createElement("img");ba.src=Sidebar.prototype.expandedImage;ba.style.verticalAlign="middle";ma.appendChild(ba);mxUtils.write(ma,mxResources.get("property"));ea.style.cursor="pointer";var ka=function(){var xa=aa.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){ba.src= -Sidebar.prototype.collapsedImage;var da="none";for(var na=l.childNodes.length-1;0<=na;na--)try{var Aa=l.childNodes[na],za=Aa.nodeName.toUpperCase();"INPUT"!=za&&"SELECT"!=za||l.removeChild(Aa)}catch(Ia){}}else ba.src=Sidebar.prototype.expandedImage,da="";for(na=0;na=this.defaultColorSchemes.length?"24px":"30px";ka.style.margin="0px 6px 6px 0px";if(null!=ba){var la=Editor.isDarkMode()?"2px solid":"1px solid";null!=ba.border&&(la=ba.border);null!=ba.gradient?mxClient.IS_IE&&10>document.documentMode?ka.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+ba.fill+"', EndColorStr='"+ba.gradient+"', GradientType=0)":ka.style.backgroundImage="linear-gradient("+ba.fill+" 0px,"+ba.gradient+ -" 100%)":ba.fill==mxConstants.NONE?ka.style.background="url('"+Dialog.prototype.noColorImage+"')":ka.style.backgroundColor=""==ba.fill?mxUtils.getValue(N.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):ba.fill||mxUtils.getValue(N.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");ka.style.border=ba.stroke==mxConstants.NONE?la+" transparent":""==ba.stroke?la+" "+mxUtils.getValue(N.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR, -Editor.isDarkMode()?"#ffffff":Editor.darkColor):la+" "+(ba.stroke||mxUtils.getValue(N.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=ba.title&&ka.setAttribute("title",ba.title)}else{la=mxUtils.getValue(N.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var ja=mxUtils.getValue(N.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");ka.style.backgroundColor=la;ka.style.border="1px solid "+ja}ka.style.borderRadius="0";P.appendChild(ka)}); -P.innerText="";for(var ma=0;ma=this.defaultColorSchemes.length?28:8;var ca=document.createElement("div");ca.style.cssText="position:absolute;left:10px;top:8px;bottom:"+W+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; +z,F,N){function P(sa,da,ma,Aa,za){if(null!=ma.valueChanged)ma.valueChanged(da,za);else{ca.getModel().beginUpdate();try{za=[];var Ia=[];if(null!=ma.index){for(var Ba=[],Ga=ma.parentRow.nextSibling;Ga&&Ga.getAttribute("data-pName")==sa;)Ba.push(Ga.getAttribute("data-pValue")),Ga=Ga.nextSibling;ma.indexma.size&&(Ba=Ba.slice(0,ma.size));da=Ba.join(",");null!=ma.countProperty&&(ca.setCellStyles(ma.countProperty,Ba.length, +ca.getSelectionCells()),za.push(ma.countProperty),Ia.push(Ba.length))}ca.setCellStyles(sa,da,ca.getSelectionCells());za.push(sa);Ia.push(da);if(null!=ma.dependentProps)for(sa=0;sada)Pa=Pa.slice(0,da);else for(var Oa=Pa.length;Oama.max&&(ia=ma.max);var ya=null;try{ya="numbers"==Ba?ia.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==Ba?parseInt(ia):ia)+"")}catch(pa){}P(sa,ya,ma,null,Ea)}var Ea=document.createElement("input"); +T(Da,Ea,!0);Ea.value=decodeURIComponent(da);Ea.className="gePropEditor";"int"!=Ba&&"float"!=Ba||ma.allowAuto||(Ea.type="number",Ea.step="int"==Ba?"1":"any",null!=ma.min&&(Ea.min=parseFloat(ma.min)),null!=ma.max&&(Ea.max=parseFloat(ma.max)));l.appendChild(Ea);mxEvent.addListener(Ea,"keypress",function(ia){13==ia.keyCode&&Oa()});Ea.focus();mxEvent.addListener(Ea,"blur",function(){Oa()})})));ma.isDeletable&&(za=mxUtils.button("-",mxUtils.bind(Y,function(Oa){P(sa,"",ma,ma.index);mxEvent.consume(Oa)})), +za.style.height="16px",za.style.width="25px",za.style.float="right",za.className="geColorBtn",Da.appendChild(za));Ga.appendChild(Da);return Ga}var Y=this,ca=this.editorUi.editor.graph,ha=[];l.style.position="relative";l.style.padding="0";var aa=document.createElement("table");aa.className="geProperties";aa.style.whiteSpace="nowrap";aa.style.width="100%";var fa=document.createElement("tr");fa.className="gePropHeader";var la=document.createElement("th");la.className="gePropHeaderCell";var ba=document.createElement("img"); +ba.src=Sidebar.prototype.expandedImage;ba.style.verticalAlign="middle";la.appendChild(ba);mxUtils.write(la,mxResources.get("property"));fa.style.cursor="pointer";var ka=function(){var sa=aa.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){ba.src=Sidebar.prototype.collapsedImage;var da="none";for(var ma=l.childNodes.length-1;0<=ma;ma--)try{var Aa=l.childNodes[ma],za=Aa.nodeName.toUpperCase();"INPUT"!=za&&"SELECT"!=za||l.removeChild(Aa)}catch(Ia){}}else ba.src=Sidebar.prototype.expandedImage, +da="";for(ma=0;ma=this.defaultColorSchemes.length?"24px":"30px";ka.style.margin="0px 6px 6px 0px";if(null!=ba){var na=Editor.isDarkMode()?"2px solid":"1px solid";null!=ba.border&& +(na=ba.border);null!=ba.gradient?mxClient.IS_IE&&10>document.documentMode?ka.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+ba.fill+"', EndColorStr='"+ba.gradient+"', GradientType=0)":ka.style.backgroundImage="linear-gradient("+ba.fill+" 0px,"+ba.gradient+" 100%)":ba.fill==mxConstants.NONE?ka.style.background="url('"+Dialog.prototype.noColorImage+"')":ka.style.backgroundColor=""==ba.fill?mxUtils.getValue(N.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()? +Editor.darkColor:"#ffffff"):ba.fill||mxUtils.getValue(N.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");ka.style.border=ba.stroke==mxConstants.NONE?na+" transparent":""==ba.stroke?na+" "+mxUtils.getValue(N.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):na+" "+(ba.stroke||mxUtils.getValue(N.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=ba.title&& +ka.setAttribute("title",ba.title)}else{na=mxUtils.getValue(N.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var ja=mxUtils.getValue(N.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");ka.style.backgroundColor=na;ka.style.border="1px solid "+ja}ka.style.borderRadius="0";P.appendChild(ka)});P.innerText="";for(var la=0;la=this.defaultColorSchemes.length?28:8;var ca=document.createElement("div");ca.style.cssText="position:absolute;left:10px;top:8px;bottom:"+W+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; mxEvent.addListener(ca,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ha=document.createElement("div");ha.style.cssText="position:absolute;left:202px;top:8px;bottom:"+W+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; 1=this.defaultColorSchemes.length&&l.appendChild(S)}return l}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'}; Graph.customFontElements={};Graph.isGoogleFontUrl=function(l){return l.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||l.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(l){return Graph.isGoogleFontUrl(l)};Graph.rewriteGoogleFontUrl=function(l){null!=l&&l.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(l=Editor.GOOGLE_FONTS_CSS2+l.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return l};Graph.createFontElement= @@ -11902,26 +11902,26 @@ null);if(null!=z){var F=mxUtils.getValue(l,mxConstants.STYLE_FONTFAMILY,null);nu "1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var g=Graph.prototype.init;Graph.prototype.init=function(){function l(P){z=P}g.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var z=null;mxEvent.addListener(this.container,"mouseenter",l);mxEvent.addListener(this.container,"mousemove",l);mxEvent.addListener(this.container,"mouseleave",function(P){z=null});this.isMouseInsertPoint=function(){return null!= z};var F=this.getInsertPoint;this.getInsertPoint=function(){return null!=z?this.getPointForEvent(z):F.apply(this,arguments)};var N=this.layoutManager.getLayout;this.layoutManager.getLayout=function(P){var T=this.graph.getCellStyle(P);if(null!=T&&"rack"==T.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=T.rackUnitSize?parseFloat(T.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=T.marginLeft||0;S.marginRight=T.marginRight||0;S.marginTop= T.marginTop||0;S.marginBottom=T.marginBottom||0;S.allowGaps=T.allowGaps||0;S.horizontal="1"==mxUtils.getValue(T,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return N.apply(this,arguments)};this.updateGlobalUrlVariables()};var m=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(l,z){return Graph.processFontStyle(m.apply(this,arguments))};var t=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(l,z,F,N,P,T,S,V,W,X, -Z,Y){t.apply(this,arguments);Graph.processFontAttributes(Y)};var v=mxText.prototype.redraw;mxText.prototype.redraw=function(){v.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(l,z,F,N){function P(){for(var ea=V.getSelectionCells(),ma=[],ba=0;bamxUtils.indexOf(V.hiddenTags,ja),ya=document.createElement("tr"), -oa=document.createElement("td");oa.style.align="center";oa.style.width="16px";var ta=document.createElement("img");ta.setAttribute("src",fa?Editor.visibleImage:Editor.hiddenImage);ta.setAttribute("title",mxResources.get(fa?"hideIt":"show",[ja]));mxUtils.setOpacity(ta,fa?75:25);ta.className="geAdaptiveAsset";ta.style.verticalAlign="middle";ta.style.cursor="pointer";ta.style.width="16px";if(z||Editor.isDarkMode())ta.style.filter="invert(100%)";oa.appendChild(ta);mxEvent.addListener(ta,"click",function(da){mxEvent.isShiftDown(da)? -T(0<=mxUtils.indexOf(V.hiddenTags,ja)):(V.toggleHiddenTag(ja),P(),V.refresh());mxEvent.consume(da)});ya.appendChild(oa);oa=document.createElement("td");oa.style.align="center";oa.style.width="16px";ta=document.createElement("img");ta.setAttribute("src",Editor.selectImage);ta.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(ta,fa?75:25);ta.className="geAdaptiveAsset";ta.style.verticalAlign="middle";ta.style.cursor="pointer";ta.style.width="16px";if(z||Editor.isDarkMode())ta.style.filter= -"invert(100%)";mxEvent.addListener(ta,"click",function(da){T(!0);ra();mxEvent.consume(da)});oa.appendChild(ta);ya.appendChild(oa);oa=document.createElement("td");oa.style.overflow="hidden";oa.style.whiteSpace="nowrap";oa.style.textOverflow="ellipsis";oa.style.verticalAlign="middle";oa.style.cursor="pointer";oa.setAttribute("title",ja);a=document.createElement("a");mxUtils.write(a,ja);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,fa?100:40);oa.appendChild(a);mxEvent.addListener(oa, -"click",function(da){if(mxEvent.isShiftDown(da))T(!0),ra();else if(fa&&0mxUtils.indexOf(V.hiddenTags,ja),wa=document.createElement("tr"), +oa=document.createElement("td");oa.style.align="center";oa.style.width="16px";var xa=document.createElement("img");xa.setAttribute("src",ea?Editor.visibleImage:Editor.hiddenImage);xa.setAttribute("title",mxResources.get(ea?"hideIt":"show",[ja]));mxUtils.setOpacity(xa,ea?75:25);xa.className="geAdaptiveAsset";xa.style.verticalAlign="middle";xa.style.cursor="pointer";xa.style.width="16px";if(z||Editor.isDarkMode())xa.style.filter="invert(100%)";oa.appendChild(xa);mxEvent.addListener(xa,"click",function(da){mxEvent.isShiftDown(da)? +T(0<=mxUtils.indexOf(V.hiddenTags,ja)):(V.toggleHiddenTag(ja),P(),V.refresh());mxEvent.consume(da)});wa.appendChild(oa);oa=document.createElement("td");oa.style.align="center";oa.style.width="16px";xa=document.createElement("img");xa.setAttribute("src",Editor.selectImage);xa.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(xa,ea?75:25);xa.className="geAdaptiveAsset";xa.style.verticalAlign="middle";xa.style.cursor="pointer";xa.style.width="16px";if(z||Editor.isDarkMode())xa.style.filter= +"invert(100%)";mxEvent.addListener(xa,"click",function(da){T(!0);ra();mxEvent.consume(da)});oa.appendChild(xa);wa.appendChild(oa);oa=document.createElement("td");oa.style.overflow="hidden";oa.style.whiteSpace="nowrap";oa.style.textOverflow="ellipsis";oa.style.verticalAlign="middle";oa.style.cursor="pointer";oa.setAttribute("title",ja);a=document.createElement("a");mxUtils.write(a,ja);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,ea?100:40);oa.appendChild(a);mxEvent.addListener(oa, +"click",function(da){if(mxEvent.isShiftDown(da))T(!0),ra();else if(ea&&0mxUtils.indexOf(W,ea[ma])&&W.push(ea[ma]);W.sort();V.isSelectionEmpty()?S(W):S(W,V.getCommonTagsForCells(V.getSelectionCells()))}});V.selectionModel.addListener(mxEvent.CHANGE,ha);V.model.addListener(mxEvent.CHANGE,ha);V.addListener(mxEvent.REFRESH,ha);var aa=document.createElement("div");aa.style.display="flex";aa.style.alignItems="center";aa.style.boxSizing="border-box";aa.style.whiteSpace="nowrap";aa.style.position= +"10px";X.appendChild(Z);var Y=mxUtils.button(mxResources.get("reset"),function(fa){V.setHiddenTags([]);mxEvent.isShiftDown(fa)||(W=V.hiddenTags.slice());P();V.refresh()});Y.setAttribute("title",mxResources.get("reset"));Y.className="geBtn";Y.style.margin="0 4px 0 0";var ca=mxUtils.button(mxResources.get("add"),function(){null!=F&&F(W,function(fa){W=fa;ha()})});ca.setAttribute("title",mxResources.get("add"));ca.className="geBtn";ca.style.margin="0";V.addListener(mxEvent.ROOT,function(){W=V.hiddenTags.slice()}); +var ha=mxUtils.bind(this,function(fa,la){if(l()){fa=V.getAllTags();for(la=0;lamxUtils.indexOf(W,fa[la])&&W.push(fa[la]);W.sort();V.isSelectionEmpty()?S(W):S(W,V.getCommonTagsForCells(V.getSelectionCells()))}});V.selectionModel.addListener(mxEvent.CHANGE,ha);V.model.addListener(mxEvent.CHANGE,ha);V.addListener(mxEvent.REFRESH,ha);var aa=document.createElement("div");aa.style.display="flex";aa.style.alignItems="center";aa.style.boxSizing="border-box";aa.style.whiteSpace="nowrap";aa.style.position= "absolute";aa.style.overflow="hidden";aa.style.bottom="6px";aa.style.height="42px";aa.style.right="10px";aa.style.left="10px";V.isEnabled()&&(aa.appendChild(Y),aa.appendChild(ca),X.appendChild(aa));null!=N&&aa.appendChild(N);return{div:X,refresh:ha}};Graph.prototype.getCustomFonts=function(){var l=this.extFonts;l=null!=l?l.slice():[];for(var z in Graph.customFontElements){var F=Graph.customFontElements[z];l.push({name:F.name,url:F.url})}return l};Graph.prototype.setFont=function(l,z){Graph.addFont(l, z);var F=Editor.guid();document.execCommand("fontname",!1,F);for(var N=this.cellEditor.textarea.getElementsByTagName("font"),P=null,T=0;T'+mxUtils.htmlEntities(l)+""};mxGraphView.prototype.redrawEnumerationState=function(l){var z="1"==mxUtils.getValue(l.style,"enumerate",0);z&&null==l.secondLabel?(l.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),l.secondLabel.size=12,l.secondLabel.state=l,l.secondLabel.dialect= mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(l,l.secondLabel)):z||null==l.secondLabel||(l.secondLabel.destroy(),l.secondLabel=null);z=l.secondLabel;if(null!=z){var F=l.view.scale,N=this.createEnumerationValue(l);l=this.graph.model.isVertex(l.cell)?new mxRectangle(l.x+l.width-4*F,l.y+4*F,0,0):mxRectangle.fromPoint(l.view.getPoint(l));z.bounds.equals(l)&&z.value==N&&z.scale==F||(z.bounds=l,z.value=N,z.scale=F,z.redraw())}};var R=Graph.prototype.refresh;Graph.prototype.refresh= @@ -11931,8 +11931,8 @@ V=mxUtils.bind(this,function(){N&&(N=!1,this.model.endUpdate())}),W=mxUtils.bind window.setTimeout(this.pendingExecuteNextAction,""!=Y.wait?parseInt(Y.wait):1E3),V());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),Y.opacity.value);null!=Y.fadeIn&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,!0)),0,1,W,Z?0:Y.fadeIn.delay));null!=Y.fadeOut&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,!0)),1,0,W,Z?0:Y.fadeOut.delay));null!=Y.wipeIn&&(ca=ca.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeIn, !0),!0)));null!=Y.wipeOut&&(ca=ca.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeOut,!0),!1)));null!=Y.toggle&&(S(),this.toggleCells(this.getCellsForAction(Y.toggle,!0)));if(null!=Y.show){S();var ha=this.getCellsForAction(Y.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ha),1);this.setCellsVisible(ha,!0)}null!=Y.hide&&(S(),ha=this.getCellsForAction(Y.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ha),0),this.setCellsVisible(ha,!1));null!=Y.toggleStyle&&null!=Y.toggleStyle.key&& (S(),this.toggleCellStyles(Y.toggleStyle.key,null!=Y.toggleStyle.defaultValue?Y.toggleStyle.defaultValue:"0",this.getCellsForAction(Y.toggleStyle,!0)));null!=Y.style&&null!=Y.style.key&&(S(),this.setCellStyles(Y.style.key,Y.style.value,this.getCellsForAction(Y.style,!0)));ha=[];null!=Y.select&&this.isEnabled()&&(ha=this.getCellsForAction(Y.select),this.setSelectionCells(ha));null!=Y.highlight&&(ha=this.getCellsForAction(Y.highlight),this.highlightCells(ha,Y.highlight.color,Y.highlight.duration,Y.highlight.opacity)); -null!=Y.scroll&&(ha=this.getCellsForAction(Y.scroll));null!=Y.viewbox&&this.fitWindow(Y.viewbox,Y.viewbox.border);0mxUtils.indexOf(Y.tags.visible,ea[ha])&&0>mxUtils.indexOf(aa,ea[ha])&&aa.push(ea[ha])}null!=aa&&this.setHiddenTags(aa);this.refresh()}0mxUtils.indexOf(Y.tags.visible,fa[ha])&&0>mxUtils.indexOf(aa,fa[ha])&&aa.push(fa[ha])}null!=aa&&this.setHiddenTags(aa);this.refresh()}0l.excludeCells.indexOf(z[N].id)&&F.push(z[N]);z=F}return z};Graph.prototype.getCellsById=function(l){var z=[];if(null!=l)for(var F=0;F'), Ya.writeln("@media print {"),Ya.writeln(".MathJax svg { shape-rendering: crispEdges; }"),Ya.writeln("}"),Ya.writeln(""));null!=l.editor.fontCss&&(Ya.writeln('"));for(var bb=Ca.getCustomFonts(),ab=0;ab'): (Ya.writeln('"))}};if(Editor.enableCssDarkMode){var hb=Ha.getBackgroundImage;Ha.getBackgroundImage=function(){return P.adaptBackgroundPage(hb.apply(this,arguments))}}if("undefined"!==typeof MathJax){var ib=Ha.renderPage;Ha.renderPage=function(Ya,bb,ab,db,cb,kb){var jb=mxClient.NO_FO,eb=ib.apply(this,arguments);mxClient.NO_FO=jb;this.graph.mathEnabled? this.mathEnabled=this.mathEnabled||!0:eb.className="geDisableMathJax";return eb}}Ka=null;Va=P.shapeForegroundColor;$a=P.shapeBackgroundColor;Qa=P.enableFlowAnimation;P.enableFlowAnimation=!1;null!=P.themes&&"darkTheme"==P.defaultThemeName&&(Ka=P.stylesheet,P.stylesheet=P.getDefaultStylesheet(),P.shapeForegroundColor="#000000",P.shapeBackgroundColor="#ffffff",P.refresh());Ha.open(null,null,Na,!0,ua);P.enableFlowAnimation=Qa;null!=Ka&&(P.shapeForegroundColor=Va,P.shapeBackgroundColor=$a,P.stylesheet= Ka,P.refresh())}else{Qa=Ca.background;if(null==Qa||""==Qa||Qa==mxConstants.NONE)Qa="#ffffff";Ha.backgroundColor=Qa;Ha.autoOrigin=$a;Ha.appendGraph(Ca,Za,Ka,Va,Na,!0,ua);Na=Ca.getCustomFonts();if(null!=Ha.wnd)for(Ka=0;Ka'):(Ha.wnd.document.writeln('"))}Ua&&(Ca.useCssTransforms=Ua,Ca.currentTranslate=La,Ca.currentScale=Xa,Ca.view.translate=Wa,Ca.view.scale=Sa);return Ha}var Ga=parseInt(za.value)/100;isNaN(Ga)&&(Ga=1,za.value="100 %");mxClient.IS_SF&&(Ga*=.75);var Da=null,Pa=P.shapeForegroundColor,Oa=P.shapeBackgroundColor;null!=P.themes&&"darkTheme"==P.defaultThemeName&&(Da=P.stylesheet,P.stylesheet=P.getDefaultStylesheet(),P.shapeForegroundColor= -"#000000",P.shapeBackgroundColor="#ffffff",P.refresh());var Ea=Y.value,ia=ca.value,wa=!X.checked,pa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(l,X.checked,Ea,ia,ba.checked,da.value,na.value,parseInt(ma.value)/100,parseInt(za.value)/100,Aa.get());else{wa&&(wa=ha.checked||Ea==W&&ia==W);if(!wa&&null!=l.pages&&l.pages.length){var va=0;wa=l.pages.length-1;X.checked||(va=parseInt(Ea)-1,wa=parseInt(ia)-1);for(var qa=va;qa<=wa;qa++){var sa=l.pages[qa];Ea=sa==l.currentPage?P:null;if(null==Ea){Ea= -l.createTemporaryGraph(P.stylesheet);Ea.shapeForegroundColor=P.shapeForegroundColor;Ea.shapeBackgroundColor=P.shapeBackgroundColor;ia=!0;va=!1;var Ma=null,Fa=null;null==sa.viewState&&null==sa.root&&l.updatePageRoot(sa);null!=sa.viewState&&(ia=sa.viewState.pageVisible,va=sa.viewState.mathEnabled,Ma=sa.viewState.background,Fa=sa.viewState.backgroundImage,Ea.extFonts=sa.viewState.extFonts);null!=Fa&&null!=Fa.originalSrc&&(Fa=l.createImageForPageLink(Fa.originalSrc,sa));Ea.background=Ma;Ea.backgroundImage= +"#000000",P.shapeBackgroundColor="#ffffff",P.refresh());var Ea=Y.value,ia=ca.value,ya=!X.checked,pa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(l,X.checked,Ea,ia,ba.checked,da.value,ma.value,parseInt(la.value)/100,parseInt(za.value)/100,Aa.get());else{ya&&(ya=ha.checked||Ea==W&&ia==W);if(!ya&&null!=l.pages&&l.pages.length){var va=0;ya=l.pages.length-1;X.checked||(va=parseInt(Ea)-1,ya=parseInt(ia)-1);for(var qa=va;qa<=ya;qa++){var ta=l.pages[qa];Ea=ta==l.currentPage?P:null;if(null==Ea){Ea= +l.createTemporaryGraph(P.stylesheet);Ea.shapeForegroundColor=P.shapeForegroundColor;Ea.shapeBackgroundColor=P.shapeBackgroundColor;ia=!0;va=!1;var Ma=null,Fa=null;null==ta.viewState&&null==ta.root&&l.updatePageRoot(ta);null!=ta.viewState&&(ia=ta.viewState.pageVisible,va=ta.viewState.mathEnabled,Ma=ta.viewState.background,Fa=ta.viewState.backgroundImage,Ea.extFonts=ta.viewState.extFonts);null!=Fa&&null!=Fa.originalSrc&&(Fa=l.createImageForPageLink(Fa.originalSrc,ta));Ea.background=Ma;Ea.backgroundImage= null!=Fa?new mxImage(Fa.src,Fa.width,Fa.height,Fa.x,Fa.y):null;Ea.pageVisible=ia;Ea.mathEnabled=va;var Ra=Ea.getGraphBounds;Ea.getGraphBounds=function(){var Ca=Ra.apply(this,arguments),Ha=this.backgroundImage;if(null!=Ha&&null!=Ha.width&&null!=Ha.height){var Na=this.view.translate,ua=this.view.scale;Ca=mxRectangle.fromRectangle(Ca);Ca.add(new mxRectangle((Na.x+Ha.x)*ua,(Na.y+Ha.y)*ua,Ha.width*ua,Ha.height*ua))}return Ca};var Ta=Ea.getGlobalVariable;Ea.getGlobalVariable=function(Ca){return"page"== -Ca?sa.getName():"pagenumber"==Ca?qa+1:"pagecount"==Ca?null!=l.pages?l.pages.length:1:Ta.apply(this,arguments)};document.body.appendChild(Ea.container);l.updatePageRoot(sa);Ea.model.setRoot(sa.root)}pa=Ba(Ea,pa,qa!=wa,sa.getId());Ea!=P&&Ea.container.parentNode.removeChild(Ea.container)}}else pa=Ba(P);null==pa||null==pa.wnd?l.handleError({message:mxResources.get("errorUpdatingPreview")}):(pa.mathEnabled&&(wa=pa.wnd.document,Ia&&(pa.wnd.IMMEDIATE_PRINT=!0),wa.writeln('