Normal update

This commit is contained in:
DUOLabs333 committed 2022-10-24 14:17:53 -04:00
1 parent 64a966eddd
commit aebde3317e
85 files changed
+24241 -16438

No files matched your search

+4 -2
View File
@@ -190,10 +190,12 @@ var PIMG = {
"strg/gdrive" : "data:image/svg+xml;base64," + btoa('<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 208 208" width="208" height="208"><path fill-rule="evenodd" d="m136.4 15.7l70.6 116.2l-35 59.5l-143.3 0.1l-28.7-52.6l69.9-123.3zm-103.2 152.7l58-100.7l-17-29.6l-57.1 100.9zm42.7-44.1h47.7l-23.8-41.5zm109.3 15l-52.9 0.1v-0.1h-64.6l-21.6 37h117.4zm-0.3-15l-57-93.7l-40.7-0.1l2.9 5.1l50.8 88.7z"/></svg>'),
"strg/dropbox" : "data:image/svg+xml;base64," + btoa('<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240"><path d="m61 24.9c2.4-1.5 5.6-1.5 8 0l51 32.5l51-32.5c2.4-1.5 5.6-1.5 8 0l55 35.1c2.2 1.3 3.5 3.7 3.5 6.3c0 2.6-1.3 4.9-3.5 6.3l-45 28.7l45 28.7c2.2 1.4 3.5 3.8 3.5 6.4c0 2.5-1.3 4.9-3.5 6.3l-46 29.3l2.2 1.5c2 1.4 3.3 3.7 3.3 6.2c0 2.6-1.3 4.9-3.3 6.3l-66 44c-2.6 1.7-5.8 1.7-8.4 0l-66-44c-2-1.4-3.3-3.7-3.3-6.2c0-2.6 1.3-4.9 3.3-6.3l2.2-1.5l-46-29.3c-2.2-1.4-3.5-3.8-3.5-6.3c0-2.6 1.3-5 3.5-6.4l45-28.7l-45-28.7c-2.2-1.4-3.5-3.7-3.5-6.3c0-2.6 1.3-5 3.5-6.3zm44.8 111.2l-40.8-25.9l-41 26.1l41 26.2zm69.2 26.3l41.1-26.2l-41.1-26.1l-40.8 26zm-55-17.3l-52.5 34.5l52.5 35l52.5-35zm-41-44l41 26.2l41-26.2l-41-26.1zm-14-61.2l-41 26.2l41 26.1l41.1-26.1zm69 26.1l41 26.2l41-26.2l-41-26.1z"/></svg>'),
"strg/onedrive" : "data:image/svg+xml;base64," + btoa('<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><path d="m138.4 83.2c21.9-13.8 50 6.9 42.2 29.5 25.7-2.3 26.6 41.8-1.9 42.3h-108.6c-28.5-0.1-36.2-48.7 4.2-52 2-37.5 42.8-44.6 64.1-19.8z M151.4 72.2l-11.1 3.2c-19.9-21.9-65.6-22-72.2 20.1-28.4 3.2-37.5 29.3-26 49.6-46.5 12-56.5-45.1-16.5-53-8.7-31.1 25.5-49.1 45.3-34.2 6.6-20.6 52.6-41.7 80.5 14.3z"/></svg>'),
"strg/peadrive" : "data:image/svg+xml;base64," + btoa('<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 208 208" width="208" height="208"><style></style><path d="m55 28.3h101.6c13.5 0 26.1 4.5 28.3 10.5l21.9 59.3c4 10.7-8.7 19.9-28.5 19.9h-125.8l9.1-47.2q0-0.1 0.1-0.3c2.8-13.9 26.2-24.1 52.7-24.1 15.8 0 29.6 6 30.8 13.9 1.3 8.4-12.1 15.8-30.2 15.8-6 0-10.8-2.5-10.8-5.6 0.1-2.9 4.8-5.2 10.6-5.2 5.7 0 10.2-2.3 10-5-0.1-2.7-4.7-4.9-10.2-4.9-16.6 0-30.7 6.6-31.6 15.1-1.1 9.3 13.3 17.4 32.3 17.4 31.6 0 53.9-13.2 50.3-27.6-3.2-12.9-26-22.2-51.4-22.2-35.6 0-68.2 13.3-73.8 32.4q-0.1 0.2-0.1 0.4h-0.2l-13.5 47c-18.1-0.9-28.9-9.7-24.7-19.8l24.3-59.3c2.4-6 15.2-10.5 28.8-10.5z"/><path d="m0 116c0 0 0 15 27.6 15h155.3c25.1 0 25.1-15 25.1-15l-10 50c0 0 0 15-25.6 15h-134.5c-27.9 0-27.9-15-27.9-15"/></svg>'),
"logo" : "data:image/svg+xml;base64," + btoa('<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 200" width="900" height="200"><style>.A{fill:#e6e6e6}.B{fill:#18a497}</style><path class="A" d="m276.8 152h-19v-103.9h37q11.9 0 20.2 3.6q8.2 3.5 12.4 11q4.3 7.4 4.3 19q0 11.7-4.2 19.3q-4.2 7.6-12.4 11.3q-8.2 3.6-19.9 3.6h-18.4zm0-88v36.1h16.2q9.7 0 14.5-4.4q4.9-4.4 4.9-13.7q0-9.4-4.9-13.7q-4.9-4.3-15-4.3zm84.1 88h-18.5v-111.3h18.5v48l-4.2-3.3q4.7-3.3 10.2-6q5.5-2.7 13.1-2.7q9.8 0 16 4.3q6.1 4.3 9 12q2.9 7.7 2.9 17.8v41.2h-18.4v-39.9q0-10.4-3.3-15.3q-3.4-5-10.9-5q-6.5 0-10.7 3q-4 3-7.2 8.1l3.5-9.9zm97.2 1.5q-12.1 0-20.7-5.3q-8.5-5.3-13-14q-4.5-8.8-4.5-19.2q0-10.4 4.5-19.3q4.5-8.8 13-14.1q8.6-5.3 20.7-5.3q12.1 0 20.6 5.3q8.5 5.3 13 14.1q4.5 8.9 4.5 19.3q0 10.4-4.5 19.2q-4.5 8.7-13 14q-8.5 5.3-20.6 5.3zm0-15.2q9.3 0 14.2-6.4q5.1-6.6 5.1-16.9q0-10.4-5.1-17q-4.9-6.6-14.2-6.6q-9.2 0-14.3 6.6q-5 6.6-5 17q0 10.3 5 16.9q5.1 6.4 14.3 6.4zm87.4 15.2h-13.2q-7 0-11.4-2.9q-4.3-2.9-6.4-7.3q-2.1-4.5-2.1-9.3v-41.1h-10.5l1.6-15.1h8.9v-16.3l18.4-2v18.3h16.3v15.1h-16.3v33.5q0 5.7 0.7 8.2q0.6 2.5 3 3.1q2.4 0.6 7.6 0.6h5zm47.4 0q-12.1 0-20.6-5.2q-8.6-5.3-13.1-14.1q-4.5-8.7-4.5-19.1q0-10.5 4.5-19.3q4.5-8.8 13.1-14.1q8.5-5.3 20.6-5.3q12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8-3 10.4-4.7q5.6-1.8 11-2.6q5.5-0.8 9.7-1q-0.3-6.4-3.3-9.3q-3-2.9-10.1-2.9q-5 0-9.7 1.5q-4.7 1.3-10.6 4.2l-1.7-15q6.7-3.3 13.4-4.9q6.8-1.6 13.7-1.6q8.3 0 14.3 2.9q6 3 9.3 9.6q3.2 6.5 3.2 17.3v20q0 5.6 0.6 8.1q0.5 2.5 1.9 3.1q1.4 0.7 4.1 0.7h2.3l-1.6 15.1h-6.7q-4.1 0-7.4-1q-3.2-1.1-5.5-3q-2.3-2-3.7-4.6q-3.6 4.1-9.9 6.4q-6.1 2.2-12.8 2.2zm7.7-14.1q2.5 0 6.1-1.2q3.6-1.4 6.5-4.1v-16.9q-5.2 0.2-10.4 1.7q-5.2 1.5-8.6 4.4q-3.5 2.9-3.5 7.2q0 4.6 2.3 6.8q2.4 2.1 7.6 2.1z"/><path fill-rule="evenodd" class="B" d="m59 12.3h117.2c15.6 0 28.2 12.7 28.2 28.3v117.2c0 15.6-12.6 28.2-28.2 28.2h-99.2l-0.4-74.8q0-0.3 0-0.6c0-28.3 22.5-51.3 50.4-51.3c16.7 0 30.3 13.8 30.3 30.8c0 17-13.6 30.8-30.3 30.8c-5.6 0-10.1-4.6-10.1-10.3c0-5.6 4.5-10.2 10.1-10.2c5.6 0 10.1-4.6 10.1-10.3c0-5.6-4.5-10.2-10.1-10.2c-16.7 0-30.2 13.7-30.2 30.7c0 17.1 13.5 30.8 30.2 30.8c27.9 0 50.4-22.9 50.4-51.3c0-28.3-22.5-51.3-50.4-51.3c-39 0-70.6 32.1-70.6 71.8q0 0.4 0 0.7h-0.1l0.3 74.6c-14.5-1.2-25.9-13.3-25.9-28.1v-117.2c0-15.6 12.6-28.3 28.3-28.3z"/></svg>'),
"logo_cucumber" : "data:image/svg+xml;base64," + btoa('<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 200" width="900" height="200"><style>.a{fill:#e6e6e6}.b{fill:#34630f}</style><path class="a" d="m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11.4-12.2-3.8-7.6-3.8-16.6 0-8.7 3.6-16 3.6-7.4 10.5-11.8 6.9-4.5 16.9-4.5 9.1 0 15.2 3.7 6.1 3.8 9.1 10 3.1 6.2 3.1 13.8 0 2.1-0.3 4.2-0.2 2.1-0.7 4.4h-41q0.9 5.9 3.7 9.6 2.8 3.6 6.9 5.3 4.1 1.7 8.8 1.7 5.5 0 10.3-1.4 4.7-1.4 8.7-3.8l0.8 13.3q-3.6 1.9-9 3.4-5.4 1.5-12.2 1.5zm-17.6-40.2h25.6q0-2.9-1.1-5.7-1.1-3-3.6-4.9-2.5-2-6.7-2-6.1 0-9.6 3.6-3.5 3.5-4.6 9z"/><path fill-rule="evenodd" class="b" d="m51 13.3h117.2c15.6 0 28.2 12.7 28.2 28.3v117.2c0 15.6-12.6 28.2-28.2 28.2h-117.2c-15.7 0-28.3-12.6-28.3-28.2v-2.2c15.9 13.5 68.5 2.2 100.8-19.3 41-27.3 67.4-81.2 45-94.3-25-14.7-43.9 28.5-74.6 50.5-22.7 16.4-58.4 27.1-71.2 41.7v-93.6c0-15.6 12.6-28.3 28.3-28.3z"/></svg>'),
"bottom" : "data:image/svg+xml;base64," + btoa('<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 160" width="1000" height="160"><defs><filter x="-50%" y="-50%" width="200%" height="200%" id="f1"> <feGaussianBlur stdDeviation="9.5"/> </filter><linearGradient id="P" gradientUnits="userSpaceOnUse"/><radialGradient id="g1" cx="645.9" cy="55.8" r="58.8" href="#P"><stop stop-color="#857c63"/><stop offset="1" stop-color="#221f19"/></radialGradient><linearGradient id="g2" x1="671.1" y1="68.8" x2="647.7" y2="73.4" href="#P"><stop/><stop offset="1" stop-opacity="0"/></linearGradient><linearGradient id="g3" x1="642.5" y1="49" x2="694.4" y2="108" href="#P"><stop stop-color="#ffffff"/><stop offset="1" stop-color="#ffffff" stop-opacity="0"/></linearGradient><radialGradient id="g4" cx="639.8" cy="47.9" r="12.5" href="#P"><stop stop-color="#ffffff"/><stop offset="1" stop-color="#b9b9b0"/></radialGradient><radialGradient id="g5" cx="620.4" cy="58" r="9.4" href="#P"><stop stop-color="#5b676b"/><stop offset="1" stop-color="#141718"/></radialGradient><linearGradient id="g6" x1="621.6" y1="59.5" x2="626.1" y2="66.1" href="#P"><stop stop-color="#ffffff"/><stop offset="1" stop-color="#242424"/></linearGradient><radialGradient id="g7" cx="657.5" cy="47.7" r="14.7" href="#P"><stop stop-color="#ffffff"/><stop offset="1" stop-color="#b9b9b0"/></radialGradient><linearGradient id="g8" x1="683.5" y1="76.4" x2="679.1" y2="86" href="#P"><stop stop-color="#6e3d09"/><stop offset=".2" stop-color="#ea8113"/><stop offset=".6" stop-color="#5c3307"/><stop offset="1" stop-color="#e07c12"/></linearGradient><linearGradient id="g9" x1="692.9" y1="86.8" x2="694.8" y2="82.9" href="#P"><stop stop-color="#bdbdbd"/><stop offset=".3" stop-color="#e2e2e2"/><stop offset=".7" stop-color="#a3a3a3"/><stop offset="1" stop-color="#dddddd"/></linearGradient><radialGradient id="g10" cx="697.7" cy="89" r="10.2" href="#P"><stop stop-color="#696969"/><stop offset="1"/></radialGradient><linearGradient id="g11" x1="703.7" y1="87" x2="706.2" y2="91.6" href="#P"><stop stop-color="#ffffff"/><stop offset="1" stop-color="#ffffff" stop-opacity="0"/></linearGradient><linearGradient id="g12" x1="666.2" y1="73.2" x2="662.3" y2="74.1" href="#P"><stop/><stop offset="1" stop-opacity="0"/></linearGradient></defs><style>.A{fill:#000211}.B{fill:#00ccff}.C{fill:#000000}.D{fill:#ff9900}.E{fill:#ff00c4}.F{fill:#fdb300}.G{fill:#ea6c00}.H{fill:#fdad00}.I{fill:#fdd231}.J{fill:#feeeb7}.K{fill:#ffffff}.L{fill:#ea4c3a}.M{fill:none;stroke:#ea4c3a;stroke-linejoin:round;stroke-width:3.5}.N{filter:url(#f1);fill:#000000}.O{fill:url(#g1);stroke:#2e3436;stroke-width:2.1}.P{fill:url(#g2)}.Q{opacity: .2;fill:none;stroke:url(#g3);stroke-width:2.1}.R{fill:url(#g4);stroke:#888a85;stroke-width:2.1}.S{fill:url(#g5);stroke:#000000;stroke-width:2.1}.T{fill:#2e3436;stroke:#000000;stroke-width:2.1}.U{opacity: .3;fill:none;stroke:url(#g6);stroke-width:2.1}.V{fill:url(#g7);stroke:#888a85;stroke-width:2.1}.W{fill:url(#g8);stroke:#673907;stroke-linecap:round;stroke-width:2.1}.X{fill:url(#g9);stroke:#888a85;stroke-linecap:round;stroke-width:2.1}.Y{fill:none;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-width:2.1}.Z{fill:url(#g10)}.a{opacity: .5;fill:#ffffff}.b{opacity: .4;fill:url(#g11)}.c{fill:url(#g12)}.d{fill:#706d6d}.e{fill:#bfbfbf}.f{fill:#414141}.g{fill:#e8e6e6}.h{fill:#1c1c1c}.i{fill:#686868}.j{fill:#da0100}</style><rect class="A" x="44.8" y="22.7" width="60" height="68" rx="8"></rect><path fill-rule="evenodd" class="B" d="m52.8 22.7h44c4.5 0 8 3.5 8 8v52c0 4.4-3.5 8-8 8h-44c-4.4 0-8-3.6-8-8v-10.7h-8.6c-3.4 0-6.2-2.8-6.2-6.2v-16.6c0-3.4 2.8-6.2 6.2-6.2h8.6v-12.3c0-4.5 3.6-8 8-8zm-1.8 62.3h48v-56h-48v14h25.8c3.4 0 6.2 2.8 6.2 6.2v16.6c0 3.4-2.8 6.2-6.2 6.2h-25.8z"/><path class="C" d="m38 49.3h5.1q3 0 4.4 1.3q1.4 1.3 1.4 3.6q0 1-0.3 2q-0.3 0.9-1 1.6q-0.7 0.8-1.9 1.2q-1.2 0.4-2.9 0.4h-1.4v5.6h-3.4zm4.9 2.7h-1.5v4.7h1.1q0.9 0 1.6-0.3q0.7-0.2 1-0.7q0.4-0.6 0.4-1.4q0-1.1-0.6-1.7q-0.7-0.6-2-0.6zm18.2 8.6q0 1.4-0.7 2.5q-0.6 1-1.9 1.6q-1.3 0.5-3.2 0.5q-0.8 0-1.6-0.1q-0.7-0.1-1.5-0.3q-0.7-0.2-1.3-0.5v-3.1q1.1 0.5 2.3 0.9q1.2 0.4 2.4 0.4q0.8 0 1.3-0.2q0.5-0.3 0.7-0.6q0.3-0.4 0.3-0.9q0-0.6-0.4-1q-0.4-0.4-1.1-0.8q-0.7-0.4-1.6-0.8q-0.5-0.2-1.2-0.6q-0.6-0.4-1.2-0.9q-0.6-0.5-1-1.3q-0.3-0.8-0.3-1.9q0-1.4 0.6-2.4q0.7-1 1.8-1.5q1.2-0.5 2.9-0.5q1.2 0 2.3 0.3q1.1 0.2 2.3 0.8l-1 2.6q-1.1-0.5-2-0.7q-0.8-0.3-1.7-0.3q-0.6 0-1.1 0.3q-0.4 0.1-0.7 0.5q-0.2 0.4-0.2 0.8q0 0.6 0.3 1q0.4 0.4 1 0.7q0.7 0.4 1.7 0.8q1.2 0.6 2 1.2q0.9 0.6 1.4 1.5q0.4 0.8 0.4 2zm15.9-3.6q0 2.7-1 4.4q-1 1.8-3 2.7q-1.9 0.9-4.6 0.9h-4.4v-15.7h4.9q2.5 0 4.3 0.9q1.8 0.9 2.8 2.6q1 1.7 1 4.2zm-3.5 0.1q0-1.8-0.5-2.9q-0.5-1.1-1.5-1.6q-1-0.6-2.4-0.6h-1.8v10.3h1.4q2.5 0 3.6-1.3q1.2-1.3 1.2-3.9z"/><rect class="A" x="159.8" y="22.7" width="60" height="68" rx="8"></rect><path fill-rule="evenodd" class="D" d="m167.8 22.7h44c4.5 0 8 3.5 8 8v52c0 4.4-3.5 8-8 8h-44c-4.4 0-8-3.6-8-8v-10.7h-8.6c-3.4 0-6.2-2.8-6.2-6.2v-16.6c0-3.4 2.8-6.2 Line truncated
"cross" : "data:image/svg+xml;base64," + btoa('<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="256" height="256"><path d="m32 0l224 224-32 32-224-224zm224 32l-224 224-32-32 224-224z"/></svg>')
"cross" : "data:image/svg+xml;base64," + btoa('<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="256" height="256"><path d="m32 0l224 224-32 32-224-224zm224 32l-224 224-32-32 224-224z"/></svg>'),
"kb" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAACgCAMAAAC8EZcfAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAADxQTFRFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0C8mMAAAABR0Uk5TAP/wHnfBzIj7JQ+wCpjR1husoKVqXXVGAAAA/ElEQVR4nO3by27CQAxA0SFAgAClj///1wJiA1KmSBYZp5yzzOpqFFneuBQAAAAA4K0tV+tukUy3Xi1vecO+dcyYr+H6fKfWHeNOn+fAn9YVNd+l7LatI2q2u7Jp3VC3KX3rhLq+pJsv97rSuuAvAqMERgmMml/g46449XeBAgUKFChQoECBbQOzERglMEpg1PwCHwfpVAP76UEtUKBAgQIFChQo8KWB2QiMEhglMOr/BY4N2GcJFChQoECBAgUKnHfg1ARGCYwSGJU/MP3By0frhLo+/9FV+rO1cmwdUXM8rxeHxH9hf7gsQHmPT/fDbUdLfr4LAAAAALypX48ILd8OI6DrAAAAAElFTkSuQmCC"
};
/** A Database of fonts. More at <a href="https://www.photopea.com/api/fonts">Photopea.com/api/fonts</a>. */
@@ -7008,7 +7010,7 @@ var LNG = {
}
],
"tables": [
"[File;Edit;Image;Layer;Folder;Select;Filter;View::noun (Top Menu);Window;Language;Log In;Log Out;Create translation::Click it to get to www.Photopea.com/translate;[Account;Terms of Service;Back;About::\"About a program\" - the orange button at the top;Report a bug;Learn];More;Theme;Use WebGL;[Photopea: advanced image editor::The header at the top of the page;Free online editor supporting PSD, XCF, Sketch, XD and CDR formats.::Will be at the top of the page;Create a new image or open existing files from your computer. Save your work as PSD (File - Save as PSD) or as JPG / PNG / SVG (File - Export as).::Will be at the top of the page;Suggest new features at our <GitHub> or <Facebook>. Our goal is to create <the most advanced and affordable photo editor>.::Parts between < and > will become links.;Sponsor links open in a new window.;This feature is not available.;Install Photopea]];[Open::verb;Publish online;Save::verb;Save as PSD;Print::Press to print on a printer;Open from URL;Open From Computer;Connect With Google Drive;Export as;Export Layers;Script;Open & Place::Open a document and insert it into a current document;[Close;OK::if you keep it empty, \"OK\" will be used;Reset::if you keep it empty, \"Reset\" will be used];Local Storage;File Info;Preset Manager;[Artboard;Artboards;New Artboard;Artboard from Layers]];[Step Forward::In history of changes;Step Backward::In history of changes;Clear::Verb, press to clear the selected area;Fill::Verb, press to fill the selected area;Transform::Transform the image;Rotate;Flip VAR0::VAR0 will be replaced with Horizontally/Vertically;Scale VAR0::VAR0 will be replaced with Horizontally/Vertically;Undo / Redo;Perspective;[Auto-Blend::Auto-Blend layers together;Auto-Align::Auto-Align layers against each other];Fade;Apply Image];Adjustments;[Brightness/Contrast;Levels::Levels adjustment;Curves::Curves adjustment;Exposure;Vibrance;Hue/Saturation;Color Balance;Black & White;Photo Filter;Channel Mixer;Color Lookup;Invert;Posterize;Threshold;Gradient Map;Selective Color;[Auto Tone;Auto Contrast;Auto Color];Replace Color;Match Color];[Cut;Copy;Paste::like \"insert\", not like \"toothpaste\";New;Delete;Enable;Disable;Copy Merged::Copy not from a layer, but from all layers (all merged together);Apply::Apply Mask - \"combine\" it with a layer;Again::Repeat the same aciton one more time;Update::A verb];[Duplicate Layer;New Adjustment Layer;Raster Mask;Vector Mask;Add (Reveal All)::Add a mask;[Add (Hide All)::Add a mask;Reveal Selection;Hide Selection;From Transparency];[Clipping Mask;Quick Mask Mode];[Convert to Smart Object;Smart Object];Rasterize::Convert Text layer/vector layer to pixels;Group Layers::Put selected layers into a new group;Merge Down::Merge a layer with one below it;Merge Up::Merge a layer with one above it;[Merge Layers::Merge selected layers;Flatten Image::Merge all layers in a document into one];New Layer;Enable Raster Mask;Disable Raster Mask;Enable Vector Mask;Disable Vector Mask;Enable Clipping Mask;Disable Clipping Mask;New Folder;Add Raster Mask;Delete Raster Mask;Add Vector Mask;Delete Vector Mask;Link Raster Mask;Unlink Raster Mask;Link Vector Mask;Unlink Vector Mask;Enable Layer Effects;Disable Layer Effects;Delete Layer;Layer Opacity Change;Blending Change;Rasterize Layer Style;Layer Order::Name of the step, when reordering layers;[Creating Smart Object;Updating Smart Object;Placing Smart Object;Source (Smart Object);Stack Mode::the mode of combining (stacking) multiple images into one];Name Change;Color Change;Edit Adjustment Layer;Convert to Shape;Enable Filter Mask;Disable Filter Mask;Enable Smart Filters;Disable Smart Filters;Add Filter Mask;Delete Filter Mask;Clear Smart Filters;[[Color Fill;Gradient Fill;Pattern Fill;Content Aware];New Fill Layer;Modify Fill Layer];[Layer Via Copy;Layer Via Cut];Filter Mask;Delete Layer Style;Move Smart Filter;Delete Smart Filter;[Link Layers;Unlink Layers];Arrange::Arrange layers;[Bring to Front;Bring Forward;Send Backward;Send to Back];[This layer is Locked.;Lock Change;Lock::noun - a lock on a layer];Animation];[All::As in Select - All;Deselect;Inverse;Modify;Expand::Expand Selection;Contract;Feather::Feather (blur) a Selection;Move Selection;Color Range;Border::The border of a Selection;Transform Selection;Refine Edge::A tool for improving the edge of a selection;Heal Selection;Magic Cut];[Zoom In;Zoom Out;Guides::Vertical and horizontal lines over the image, to help us be more precise;Rulers;Grid;Snap::When moving objects, they will \"stick\" to other objects, guides, etc.;Snap To;Document Bounds;Pixel Grid;Paths::Elements of vector graphics;Snap to Pixels;[Slices;Slice Options;Clear Slices;Slices from Guides];Show::A verb: to show.;Extras::Visual elements, that are not printed (guides, grid, selections ...)];[History::History of steps;Layers;Properties;Brush::A brush tool;Character::= a Letter (like a, b, c, ...);Paragraph;Info;Layer Comps::Compositions of layers;Swatches::Gallery of colors;Actions;HistLine truncated
"[File;Edit;Image;Layer;Folder;Select;Filter;View::noun (Top Menu);Window;Language;Log In;Log Out;Create translation::Click it to get to www.Photopea.com/translate;[Account;Terms of Service;Back;About::\"About a program\" - the orange button at the top;Report a bug;Learn];More;Theme;Use WebGL;[Photopea: advanced image editor::The header at the top of the page;Free online editor supporting PSD, XCF, Sketch, XD and CDR formats.::Will be at the top of the page;Create a new image or open existing files from your computer. Save your work as PSD (File - Save as PSD) or as JPG / PNG / SVG (File - Export as).::Will be at the top of the page;Suggest new features at our <GitHub> or <Facebook>. Our goal is to create <the most advanced and affordable photo editor>.::Parts between < and > will become links.;Sponsor links open in a new window.;This feature is not available.;Install Photopea]];[Open::verb;Publish online;Save::verb;Save as PSD;Print::Press to print on a printer;Open from URL;Open From Computer;Connect With Google Drive;Export as;Export Layers;Script;Open & Place::Open a document and insert it into a current document;[Close;OK::if you keep it empty, \"OK\" will be used;Reset::if you keep it empty, \"Reset\" will be used];Local Storage;File Info;Preset Manager;[Artboard;Artboards;New Artboard;Artboard from Layers];Automate;Share];[Step Forward::In history of changes;Step Backward::In history of changes;Clear::Verb, press to clear the selected area;Fill::Verb, press to fill the selected area;Transform::Transform the image;Rotate;Flip VAR0::VAR0 will be replaced with Horizontally/Vertically;Scale VAR0::VAR0 will be replaced with Horizontally/Vertically;Undo / Redo;Perspective;[Auto-Blend::Auto-Blend layers together;Auto-Align::Auto-Align layers against each other];Fade;Apply Image;Defringe;Variables];Adjustments;[Brightness/Contrast;Levels::Levels adjustment;Curves::Curves adjustment;Exposure;Vibrance;Hue/Saturation;Color Balance;Black & White;Photo Filter;Channel Mixer;Color Lookup;Invert;Posterize;Threshold;Gradient Map;Selective Color;[Auto Tone;Auto Contrast;Auto Color];Replace Color;Match Color];[Cut;Copy;Paste::like \"insert\", not like \"toothpaste\";New;Delete;Enable;Disable;Copy Merged::Copy not from a layer, but from all layers (all merged together);Apply::Apply Mask - \"combine\" it with a layer;Again::Repeat the same aciton one more time;Update::A verb];[Duplicate Layer;New Adjustment Layer;Raster Mask;Vector Mask;Add (Reveal All)::Add a mask;[Add (Hide All)::Add a mask;Reveal Selection;Hide Selection;From Transparency];[Clipping Mask;Quick Mask Mode];[Convert to Smart Object;Smart Object];Rasterize::Convert Text layer/vector layer to pixels;Group Layers::Put selected layers into a new group;Merge Down::Merge a layer with one below it;Merge Up::Merge a layer with one above it;[Merge Layers::Merge selected layers;Flatten Image::Merge all layers in a document into one];New Layer;Enable Raster Mask;Disable Raster Mask;Enable Vector Mask;Disable Vector Mask;Enable Clipping Mask;Disable Clipping Mask;New Folder;Add Raster Mask;Delete Raster Mask;Add Vector Mask;Delete Vector Mask;Link Raster Mask;Unlink Raster Mask;Link Vector Mask;Unlink Vector Mask;Enable Layer Effects;[Disable Layer Effects;Scale Effects];Delete Layer;Layer Opacity Change;Blending Change;Rasterize Layer Style;Layer Order::Name of the step, when reordering layers;[Creating Smart Object;Updating Smart Object;Placing Smart Object;Source (Smart Object);Stack Mode::the mode of combining (stacking) multiple images into one];Name Change;Color Change;Edit Adjustment Layer;Convert to Shape;Enable Filter Mask;Disable Filter Mask;Enable Smart Filters;Disable Smart Filters;Add Filter Mask;Delete Filter Mask;Clear Smart Filters;[[Color Fill;Gradient Fill;Pattern Fill;Content Aware];New Fill Layer;Modify Fill Layer];[Layer Via Copy;Layer Via Cut];Filter Mask;Delete Layer Style;Move Smart Filter;Delete Smart Filter;[Link Layers;Unlink Layers];Arrange::Arrange layers;[Bring to Front;Bring Forward;Send Backward;Send to Back];[This layer is Locked.;Lock Change;Lock::noun - a lock on a layer];Animation];[All::As in Select - All;Deselect;Inverse;Modify;Expand::Expand Selection;Contract;Feather::Feather (blur) a Selection;Move Selection;Color Range;Border::The border of a Selection;Transform Selection;Refine Edge::A tool for improving the edge of a selection;Heal Selection;Magic Cut];[Zoom In;Zoom Out;Guides::Vertical and horizontal lines over the image, to help us be more precise;Rulers;Grid;Snap::When moving objects, they will \"stick\" to other objects, guides, etc.;Snap To;[Document Bounds;All Documents];Pixel Grid;Paths::Elements of vector graphics;Snap to Pixels;[Slices;Slice Options;Clear Slices;Slices from Guides];Show::A verb: to show.;Extras::Visual elements, that are not printed (guides, grid, selections ...);Pattern Preview];[History::History of steps;Layers;Properties;Brush::A brush tool;Character::= a Letter (like a, b, c, ...);ParagraphLine truncated
]
}
/** Database of RAW cameras (name, color transform matrix, bayer pattern, black level, white level). */
File diff suppressed because it is too large. Load diff
+14576 -13893
View File
File diff suppressed because it is too large. Load diff
@@ -3,7 +3,7 @@
<html>
<head>
<script>
var lastMsg, allowed=false, dir=null;
var lastMsg, allowed=false, dir=null, noThumbs=null;
var locStor = {};
@@ -117,6 +117,8 @@
if(ext=="jpeg") ext="jpg";
if(ext=="tiff") ext="tif";
if(["dng","cr2","nef","arw","3fr","fff","gpr"].indexOf(ext)!=-1) ext="tif";
if(noThumbs) ext="---";
var thmb=null;
if(thmb==null && (ext=="jpg" || ext=="tif")) { // || ext=="--psd"
var lim = 130000;
@@ -202,10 +204,11 @@
async function askPermissions() {
if(dir) {
if(await dir.requestPermission({mode:"readwrite"})!="granted") return;
if(await dir.requestPermission({mode:"readwrite"})!="granted") { send("1","You must give Photopea access to some folder."); return; }
}
else {
dir = await window.showDirectoryPicker();
try { dir = await window.showDirectoryPicker(); }
catch(e) { send("1","You must give Photopea access to some folder."); return; }
locStor.fset = dir;
var os = locStor.db["transaction"](["rsrc"], "readwrite")["objectStore"]("rsrc");
@@ -229,7 +232,8 @@
if(msg.code=="show") {
printFolder(msg.prm);
noThumbs=msg.nothumbs;
printFolder(msg.prm);
}
else if(msg.code=="load") {
printFile(msg.prm);
@@ -10,28 +10,47 @@
<script type="text/javascript">
var sentFalse = false;
var clientId = '463342976776-04ub3ijsr7i5qobn8ha32ap6vsaae75a.apps.googleusercontent.com';
var scope = 'https://www.googleapis.com/auth/drive';
var discoveryDocs = 'https://www.googleapis.com/discovery/v1/apis/drive/v3/rest';
var clientId = "463342976776-04ub3ijsr7i5qobn8ha32ap6vsaae75a.apps.googleusercontent.com";
var scope = "https://www.googleapis.com/auth/drive";
var discoveryDocs = "https://www.googleapis.com/discovery/v1/apis/drive/v3/rest";
var mode3dir = "Photopea";
var client;
var isShared = false;
//var isShared = false;
var sharedDrives = null;
var mode = 0; //0 = normal, 1 = shared drives, 2 = application folder, 3 = PP folder
function go()
{
var queryString = window.location.search;
var urlParams = new URLSearchParams(queryString);
if(urlParams.get('sharedDrive') == 'true') isShared = true;
if(urlParams.get('mode')) mode = urlParams.get('mode');
if(mode == 2) { scope = "https://www.googleapis.com/auth/drive.appdata"; }
else if(mode == 3) { scope = "https://www.googleapis.com/auth/drive.file"; }
else { scope = "https://www.googleapis.com/auth/drive"; }
window.addEventListener("message", onMessage, false);
gapi.load('client', gapiInit);
}
function saveToken(e)
{
localStorage.setItem("googledriveAccessToken", e.access_token);
localStorage.setItem("googledriveAccessTokenValidUntil", Date.now() + e.expires_in * 1000);
if(mode == 2)
{
localStorage.setItem("googledriveAppFolderAccessToken", e.access_token);
localStorage.setItem("googledriveAppFolderAccessTokenValidUntil", Date.now() + e.expires_in * 1000);
}
else if(mode == 3)
{
localStorage.setItem("googledriveFileAccessToken", e.access_token);
localStorage.setItem("googledriveFileAccessTokenValidUntil", Date.now() + e.expires_in * 1000);
}
else
{
localStorage.setItem("googledriveAccessToken", e.access_token);
localStorage.setItem("googledriveAccessTokenValidUntil", Date.now() + e.expires_in * 1000);
}
send("ready", true);
}
@@ -45,6 +64,24 @@
scope: scope,
callback: saveToken,
});
if(mode == 2)
{
if(Date.now() < localStorage.getItem("googledriveAppFolderAccessTokenValidUntil"))
{
gapi.client.setToken({ "access_token" : localStorage.getItem("googledriveAppFolderAccessToken") });
send("ready", true);
return;
}
}
else if(mode == 3)
{
if(Date.now() < localStorage.getItem("googledriveFileAccessTokenValidUntil"))
{
gapi.client.setToken({ "access_token" : localStorage.getItem("googledriveFileAccessToken") });
send("ready", true);
return;
}
}
if(Date.now() < localStorage.getItem("googledriveAccessTokenValidUntil"))
{
gapi.client.setToken({ "access_token" : localStorage.getItem("googledriveAccessToken") });
@@ -97,7 +134,20 @@
{
if(!id)
{
if(!isShared) id = "root";
if(mode == 0) id = "root";
else if(mode == 3 )
{
if(path.length == 2 && path[1] == "")
{
checkFile("root", path[0], null, null);
return;
}
else
{
id = "root";
}
}
else if(mode == 2) id = "appDataFolder";
else if(path.length == 1 && path[0] == "")
{
listDrives(null, []);
@@ -147,11 +197,15 @@
'pageToken' : pageToken,
'pageSize': 1000,
'fields': "nextPageToken, files(id, name, size, modifiedTime, kind, mimeType, trashed)",};
if(isShared)
if(mode == 1)
{
req['supportsAllDrives'] = true;
req['includeItemsFromAllDrives'] = true;
}
else if(mode == 2)
{
req['spaces'] = "appDataFolder";
}
gapi.client.drive.files.list(req)
.then(function(response) {
var files = response.result.files;
@@ -189,7 +243,7 @@
{
out.push([drives[i].name, -1, Math.round(Date.parse(drives[i].createdTime)/1000)])
}
if(pageToken) listDir(pageToken,query,out);
if(pageToken) listDrives(pageToken,out);
else { send(0,out); }
})
.catch(handleError);
@@ -202,11 +256,15 @@
'pageToken' : pageToken,
'pageSize': 1000,
'fields': "nextPageToken, files(id, name, size, modifiedTime, kind, mimeType, thumbnailLink, trashed)",};
if(isShared)
if(mode == 1)
{
req['supportsAllDrives'] = true;
req['includeItemsFromAllDrives'] = true;
}
else if(mode == 2)
{
req['spaces'] = "appDataFolder";
}
gapi.client.drive.files.list(req)
.then(function(response) {
var files = response.result.files;
@@ -233,7 +291,7 @@
{
var xhr = new XMLHttpRequest();
var shared = "";
if(isShared) shared = "&supportsAllDrives=true";
if(mode == 1) shared = "&supportsAllDrives=true";
xhr.open('GET', "https://www.googleapis.com/drive/v3/files/" + fileId + "?alt=media" + shared);
xhr.responseType = "arraybuffer";
xhr.setRequestHeader('Authorization', 'Bearer ' + gapi.client.getToken().access_token);
@@ -246,7 +304,7 @@
{
var xhr = new XMLHttpRequest();
var shared = "";
if(isShared) shared = "&supportsAllDrives=true";
if(mode == 1) shared = "&supportsAllDrives=true";
xhr.open('GET', "https://www.googleapis.com/drive/v3/files/" + fileId + "?fields=thumbnailLink" + shared);
xhr.setRequestHeader('Authorization', 'Bearer ' + gapi.client.getToken().access_token);
xhr.onload = function(e)
@@ -270,9 +328,9 @@
function deleteFile(fileId)
{
if(isShared) { trashFile(fileId); return; }
if(mode == 1) { trashFile(fileId); return; }
var req = { 'fileId' : fileId, };
if(isShared) req['supportsAllDrives'] = true;
//if(isShared) req['supportsAllDrives'] = true;
gapi.client.drive.files.delete(req)
.then(function(response) {
send(0,"");
@@ -292,7 +350,7 @@
'trashed' : true,
}
};
if(isShared) req['supportsAllDrives'] = true;
if(mode == 1) req['supportsAllDrives'] = true;
gapi.client.drive.files.update(req)
.then(function(response) {
send(0,"");
@@ -313,9 +371,15 @@
'mimeType': 'application/vnd.google-apps.folder',
}
}
if(isShared) req['supportsAllDrives'] = true;
if(mode == 1) req['supportsAllDrives'] = true;
gapi.client.drive.files.create( req )
.then(function(response) {
.then(function(response) {
if(response.result.name == mode3dir)
{
var query = "'" + response.result.id + "' in parents";
listDir(null, query, [])
return;
}
send(0,"");
})
.catch(function(response) {
@@ -333,7 +397,7 @@
'name' : newName,
}
};
if(isShared) req['supportsAllDrives'] = true;
if(mode == 1) req['supportsAllDrives'] = true;
gapi.client.drive.files.update(req)
.then(function(response) {
send(0,"");
@@ -345,6 +409,7 @@
}
//check if file exists, then overwrite, otherwise create new file.
//if buffer is null, we check whether direcory exist and if not, we create it
function checkFile(parentId, name, pageToken, buffer)
{
var query = "'" + parentId + "' in parents";
@@ -353,11 +418,15 @@
'pageToken' : pageToken,
'pageSize': 1000,
'fields': "nextPageToken, files(id, name, trashed)",};
if(isShared)
if(mode == 1)
{
req['supportsAllDrives'] = true;
req['includeItemsFromAllDrives'] = true;
}
else if(mode == 2)
{
req['spaces'] = "appDataFolder";
}
gapi.client.drive.files.list(req)
.then(function(response) {
var files = response.result.files;
@@ -369,12 +438,18 @@
if(files[i].name == name)
{
found = true;
uploadFile(files[i].id,parentId,name,buffer);
if(buffer) { uploadFile(files[i].id,parentId,name,buffer); }
else
{
query = "'" + files[i].id + "' in parents";
listDir(null, query, []);
}
return;
}
}
if(!found && pageToken) checkFile(parentId, name, pageToken, buffer);
else uploadFile(null,parentId,name,buffer);
else if(buffer) uploadFile(null,parentId,name,buffer);
else { createDir('root', name)}
})
.catch(handleError);
}
@@ -392,7 +467,7 @@
metadata['Content-Type'] = contentType;
metadata['Content-Length'] = file.size;
var shared = "";
if(isShared) shared = "&supportsAllDrives=true";
if(mode == 1) shared = "&supportsAllDrives=true";
if(!fileId) xhr.open("POST", "https://www.googleapis.com/upload/drive/v3/files?uploadType=resumable" + shared);
else xhr.open("PATCH", "https://www.googleapis.com/upload/drive/v3/files/" + fileId + "?uploadType=resumable" + shared);
xhr.setRequestHeader('Authorization', 'Bearer ' + gapi.client.getToken().access_token);
@@ -430,7 +505,7 @@
form.append('metadata', new Blob([JSON.stringify(metadata)], { type: 'application/json' }));
form.append('file', file);
var shared = "";
if(isShared) shared = "&supportsAllDrives=true";
if(mode == 1) shared = "&supportsAllDrives=true";
if(!fileId) xhr.open('POST', 'https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart&fields=id' + shared);
else xhr.open('PATCH', 'https://www.googleapis.com/upload/drive/v3/files/' + fileId + '?uploadType=multipart&fields=id' + shared);
xhr.setRequestHeader('Authorization', 'Bearer ' + gapi.client.getToken().access_token);
@@ -442,12 +517,27 @@
function signOutUser()
{
localStorage.removeItem("googledriveAccessToken");
localStorage.removeItem("googledriveAccessTokenValidUntil");
if(mode == 2)
{
localStorage.removeItem("googledriveAppFolderAccessToken");
localStorage.removeItem("googledriveAppFolderAccessTokenValidUntil");
}
if(mode == 3)
{
localStorage.removeItem("googledriveFileAccessToken");
localStorage.removeItem("googledriveFileAccessTokenValidUntil");
}
else
{
localStorage.removeItem("googledriveAccessToken");
localStorage.removeItem("googledriveAccessTokenValidUntil");
}
gapi.client.setToken('');
send("ready", false);
var cred = gapi.client.getToken();
if (cred !== null) {
google.accounts.oauth2.revoke(cred.access_token, () => {console.log('Revoked: ' + cred.access_token)});
gapi.client.setToken('');
gapi.client.setToken("");
}
}
@@ -463,17 +553,21 @@
if(e.origin && (e.origin == "https://accounts.google.com" || e.origin == "https://content.googleapis.com")) { return; }
if((typeof e.data) == "string") {
var msg = JSON.parse(e.data);
if(mode == 3 && msg.code != "forget")
{
msg.prm = "/" + mode3dir + msg.prm;
}
console.log(msg);
//TODO: cannot list directory if name contains forwardslash
if(msg.code=="show") { doAction(listDir, { "path" : msg.prm }) }
else if(msg.code=="load") { doAction(downloadFile, { "path" : msg.prm }); }
else if(msg.code=="delete") { doAction(deleteFile, { "path" : msg.prm }); }
else if(msg.code=="save" && msg.prm.endsWith("/")) { doAction(createDir, { "path" : msg.prm.slice(0, -1) }); }
//TODO: will not work if filename contains colon(s)
else if(msg.code=="rename") { doAction(renameFile, {"path" : msg.prm }); }
else if(msg.code=="forget") { doAction(signOutUser); }
lastMsg=msg;
}
//TODO: cannot list directory if name contains forwardslash
if(msg.code=="show") { doAction(listDir, { "path" : msg.prm }) }
else if(msg.code=="load") { doAction(downloadFile, { "path" : msg.prm }); }
else if(msg.code=="delete") { doAction(deleteFile, { "path" : msg.prm }); }
else if(msg.code=="save" && msg.prm.endsWith("/")) { doAction(createDir, { "path" : msg.prm.slice(0, -1) }); }
//TODO: will not work if filename contains colon(s)
else if(msg.code=="rename") { doAction(renameFile, {"path" : msg.prm }); }
else if(msg.code=="forget") { doAction(signOutUser); }
lastMsg=msg;
}
else {
if(lastMsg.code=="save") doAction(checkFile, { "path": lastMsg.prm, "buffer" : e.data });
}