var DriverVersion="5.2.1303.0",xsiNs="http://www.w3.org/2001/XMLSchema-instance",pskNs="http://schemas.microsoft.com/windows/2003/08/printing/printschemakeywords",psfNs="http://schemas.microsoft.com/windows/2003/08/printing/printschemaframework",kxPrivNs="http://schemas.kyocera.com/printers/KxDriver/v_1_0_",xsdNs="http://www.w3.org/2001/XMLSchema",xsiPrefix="xsi",pskPrefix="psk",psfPrefix="psf",kxPrivPrefix="ns0000",xsdPrefix="xsd",featuresEnum={PageOrder:0,Poster:1,NUp:2,Binding:3,Staple:4,Punch:5,
Negative:6,Mirror:7,Watermark:8,CarbonCopy:9,PrintMediaSize:10,PageOrientationReverse:11,CustomPaperList:12,SelectedPrintSize:13,Scaling:14,Fold:15,Separation:16,PrintGraysWithBlackToner:17,BlackText:18,BlackGraphics:19,ColorCorrection:20,ICMRenderingIntent:21,ColorAdjustment:22,EcoPrint:23,UserLogin:24,NetManager:25,JobStorage:26,Cover:27,PageInsert:28,Trapping:29,OutputColor:30,TransparencyInterleaving:31,SaveAndPrint:32,OutputOptimization:33,PatternScaling:34,ScreenMode:35,Profile:36,PrintQuality:37,
Resolution:38,JobName:39,SendTelemetry:40,UPDPrintSettings:41,GPDPrintSettings:42,TwoColor:43,JobEmailNotification:44,JobEmailNotificationSuspend:45,LockBWModeApp:46,LockSettingsInApp:47,DuplexLockValue:48,JobAccountingPrompt:49,MAX:49},JobOutputDocumentTypeEnum=[{Id:0,Value:"Auto"},{Id:1,Value:"XPS"},{Id:2,Value:"OpenXPS"},{Id:3,Value:"PCLXL"}];
function validatePrintTicket(a,b){if(null!=a&&null!=b){var c=a.XmlNode;setSelectionNamespace(c);var d=c.selectSingleNode("//psf:PrintTicket"),e=b.DriverProperties,f=b.QueueProperties;if(null!=c&&null!=d){var h=getPdlIdFromPTPC(c,d),f=getMSO(e,f,h);validatePrintTicket_JobStorage(c,d,f);validatePrintTicket_Scaling(c,d);validatePrintTicket_Duplex(c,d,f,e);validatePrintTicket_Source(c,d,f)}}return 1}
function completePrintCapabilities(a,b,c){if(null!=b&&null!=c){a=c.XmlNode;setSelectionNamespace(a);c=a.selectSingleNode("//psf:PrintCapabilities");var d=b.DriverProperties;b=b.QueueProperties;if(null!=a&&null!=c&&null!=d&&null!=b){var e=getPdlIdFromPTPC(a,c);b=getMSO(d,b,e);d=!1;"PCLXL"==getOptionFromPT(c,addPrivatePrefix("JobOutputDocumentType"))&&(d=!0);completePC_DriverVersion(a,c);completePC_PageMediaSize(a,c);completePC_PrintMediaSize(a,c,b);completePC_CustomPaperList(a,c);completePC_SelectedPrintSize(a,
c);completePC_JobOutputBin(a,c,b);completePC_JobPageOrder(a,c);completePC_PageOrientationReverse(a,c);completePC_CarbonCopy(a,c,b);completePC_JobSaveAndPrint(a,c);completePC_Profile(a,c);completePC_SendTelemetry(a,c);completePC_JobBindAllDocuments(a,c,b);completePC_NUp(a,c);completePC_Poster(a,c);completePC_Scaling(a,c);completePC_JobFold(a,c,b);completePC_JobSeparation(a,c,b);completePC_JobStapleAllDocuments(a,c,b);completePC_JobHolePunch(a,c,b);completePC_JobPrintGraysWithBlackToner(a,c,b);completePC_JobBlackText(a,
c);completePC_JobBlackGraphics(a,c);completePC_JobColorCorrection(a,c,b);completePC_PageICMRenderingIntent(a,c);completePC_JobColorAdjustment(a,c);completePC_JobEcoPrint(a,c,b);completePC_NegativeImage(a,c);completePC_MirrorImage(a,c);completePC_PrintQuality(a,c,b);completePC_PagePatternScaling(a,c);completePC_Trapping(a,c,b);completePC_JobScreenMode(a,c,b);completePC_Watermark(a,c);completePC_UserLogin(a,c,b);completePC_JobStorage(a,c,b);completePC_JobName(a,c,b);completePC_CoverMode(a,c);completePC_PageInsert(a,
c);completePC_TransparencyInterleaving(a,c);completePC_JobEmailNotification(a,c,b);completePC_LockBWModeApp(a,c,b);completePC_LockSettingsInApp(a,c,b);completePC_DuplexLockValue(a,c);0==d?(completePC_PageOutputColor(a,c,b),completePC_JobOutputOptimization(a,c)):(completePC_JobNetManager(a,c),completePC_PageTwoColor(a,c,b))}}}
function convertPrintTicketToDevMode(a,b,c){if(null!=a&&null!=b&&null!=c){a=a.XmlNode;setSelectionNamespace(a);var d=a.selectSingleNode("//psf:PrintTicket"),e=b.DriverProperties,f=b.QueueProperties,h=null;try{h=b.UserProperties}catch(g){h=null}if(null!=a&&null!=d&&null!=e&&null!=f){b=new DevModeWriter(c);b.initialize();var k=getPdlIdFromPTPC(a,d),e=getMSO(e,f,k),f=!1,k=getOptionFromPT(d,addPrivatePrefix("JobOutputDocumentType"));"PCLXL"==k?f=!0:null==k&&"PCLXL"==getEnumFromDevMode(c,"PDL",JobOutputDocumentTypeEnum)&&
(f=!0);convertPTToDevMode_PrintMediaSize(a,d,b);convertPTToDevMode_CustomPaperList(a,d,b);convertPTToDevMode_SelectedPrintSize(a,d,b);convertPTToDevMode_JobPageOrder(a,d,b);convertPTToDevMode_PageOrientationReverse(a,d,b);convertPTToDevMode_CarbonCopy(a,d,b);convertPTToDevMode_JobSaveAndPrint(a,d,b);convertPTToDevMode_Profile(a,d,b);convertPTToDevMode_SendTelemetry(a,d,b,h);convertPTToDevMode_JobBindAllDocuments(a,d,b);convertPTToDevMode_NUp(a,d,b);convertPTToDevMode_Poster(a,d,b);convertPTToDevMode_Scaling(a,
d,b);convertPTToDevMode_JobFold(a,d,b);convertPTToDevMode_JobSeparation(a,d,b);convertPTToDevMode_JobStapleAllDocuments(a,d,b);convertPTToDevMode_JobHolePunch(a,d,b);convertPTToDevMode_JobPrintGraysWithBlackToner(a,d,b);convertPTToDevMode_JobBlackText(a,d,b);convertPTToDevMode_JobBlackGraphics(a,d,b);convertPTToDevMode_JobColorCorrection(a,d,b);convertPTToDevMode_PageICMRenderingIntent(a,d,b);convertPTToDevMode_JobColorAdjustment(a,d,b);convertPTToDevMode_JobEcoPrint(a,d,b);convertPTToDevMode_NegativeImage(a,
d,b);convertPTToDevMode_MirrorImage(a,d,b);convertPTToDevMode_PrintQuality(a,d,b);convertPTToDevMode_PagePatternScaling(a,d,b);convertPTToDevMode_Trapping(a,d,b);convertPTToDevMode_JobScreenMode(a,d,b);convertPTToDevMode_Watermark(a,d,b);convertPTToDevMode_UserLogin(a,d,b);convertPTToDevMode_JobStorage(a,d,b);convertPTToDevMode_JobName(a,d,b);convertPTToDevMode_CoverMode(a,d,b);convertPTToDevMode_PageInsert(a,d,b);convertPTToDevMode_TransparencyInterleaving(a,d,b);convertPTToDevMode_JobEmailNotification(a,
d,b,e);convertPTToDevMode_LockBWModeApp(a,d,b);convertPTToDevMode_LockSettingsInApp(a,d,b);convertPTToDevMode_DuplexLockValue(a,d,b);0==f?(convertPTToDevMode_PageOutputColor(a,d,b),convertPTToDevMode_JobOutputOptimization(a,d,b)):(convertPTToDevMode_JobNetManager(a,d,b),convertPTToDevMode_PageTwoColor(a,d,b));b.finalize()}}}
function convertDevModeToPrintTicket(a,b,c){if(null!=a&&null!=b&&null!=c){c=c.XmlNode;setSelectionNamespace(c);var d=c.selectSingleNode("//psf:PrintTicket"),e=b.DriverProperties,f=b.QueueProperties,h=null;try{h=b.UserProperties}catch(g){h=null}if(null!=c&&null!=d&&null!=e&&null!=f){b=new DevModeReader(a);b.initialize();var k=getPdlIdFromPTPC(c,d),e=getMSO(e,f,k),f=!1;a=getEnumFromDevMode(a,"PDL",JobOutputDocumentTypeEnum);"PCLXL"==a?f=!0:null==a&&"PCLXL"==getOptionFromPT(d,addPrivatePrefix("JobOutputDocumentType"))&&
(f=!0);convertDevModeToPT_PrintMediaSize(c,d,b);convertDevModeToPT_CustomPaperList(c,d,b);convertDevModeToPT_SelectedPrintSize(c,d,b);convertDevModeToPT_JobPageOrder(c,d,b);convertDevModeToPT_PageOrientationReverse(c,d,b);convertDevModeToPT_CarbonCopy(c,d,b);convertDevModeToPT_JobSaveAndPrint(c,d,b);convertDevModeToPT_Profile(c,d,b);convertDevModeToPT_SendTelemetry(c,d,b,h);convertDevModeToPT_JobBindAllDocuments(c,d,b);convertDevModeToPT_NUp(c,d,b);convertDevModeToPT_Poster(c,d,b);convertDevModeToPT_Scaling(c,
d,b);convertDevModeToPT_JobFold(c,d,b,e);convertDevModeToPT_JobSeparation(c,d,b,e);convertDevModeToPT_JobStapleAllDocuments(c,d,b,e);convertDevModeToPT_JobHolePunch(c,d,b,e);convertDevModeToPT_JobPrintGraysWithBlackToner(c,d,b,e);convertDevModeToPT_JobBlackText(c,d,b);convertDevModeToPT_JobBlackGraphics(c,d,b);convertDevModeToPT_JobColorCorrection(c,d,b,e);convertDevModeToPT_PageICMRenderingIntent(c,d,b);convertDevModeToPT_JobColorAdjustment(c,d,b);convertDevModeToPT_JobEcoPrint(c,d,b,e);convertDevModeToPT_NegativeImage(c,
d,b);convertDevModeToPT_MirrorImage(c,d,b);convertDevModeToPT_PrintQuality(c,d,b,e);convertDevModeToPT_PagePatternScaling(c,d,b);convertDevModeToPT_Trapping(c,d,b,e);convertDevModeToPT_JobScreenMode(c,d,b,e);convertDevModeToPT_Watermark(c,d,b);convertDevModeToPT_UserLogin(c,d,b,e);convertDevModeToPT_JobStorage(c,d,b,e);convertDevModeToPT_JobName(c,d,b,e);convertDevModeToPT_CoverMode(c,d,b);convertDevModeToPT_PageInsert(c,d,b);convertDevModeToPT_TransparencyInterleaving(c,d,b);convertDevModeToPT_JobEmailNotification(c,
d,b,e);convertDevModeToPT_LockBWModeApp(c,d,b,e);convertDevModeToPT_LockSettingsInApp(c,d,b,e);convertDevModeToPT_DuplexLockValue(c,d,b,e);0==f?(convertDevModeToPT_PageOutputColor(c,d,b,e),convertDevModeToPT_JobOutputOptimization(c,d,b)):(convertDevModeToPT_JobNetManager(c,d,b),convertDevModeToPT_PageTwoColor(c,d,b,e));b.finalize()}}}
function getMSO(a,b,c){var d=getIntFromPropertyBag(a,"Vendor"),e=getIntFromPropertyBag(a,"GroupID"),f=getBoolFromPropertyBag(a,"ExtGroupIDFlag"),h=getIntFromPropertyBag(a,"ExtGroupIDValue"),k=e;f&&(k=h);f=getIntFromPropertyBag(a,"MaxCopy");null==f&&(f=999);var g=getBoolFromPropertyBag(a,"ColorPrinter"),l=getBoolFromPropertyBag(a,"TwoColorSupport"),p=getBoolFromPropertyBag(a,"SupportScreenSetting"),n=getBoolFromPropertyBag(a,"PrintGrayBlackToner"),m=getBoolFromPropertyBag(a,"SupportTrapping"),w=getIntFromPropertyBag(a,
"HideEcoPrint"),B=getIntFromPropertyBag(a,"ColorEcoprint_OnOff"),u=getIntFromPropertyBag(a,"EcoPrintLevel"),q=getBoolFromPropertyBag(a,"SupportBiFold");null==q&&(q=!1);var y=getBoolFromPropertyBag(a,"SupportTriFold");null==y&&(y=!1);var r=getBoolFromPropertyBag(a,"RotateCollate");null==r&&(r=!1);var A=getBoolFromPropertyBag(a,"PunchSupport"),C=getBoolFromPropertyBag(a,"FeedingEdgeSupport"),H=getBoolFromPropertyBag(a,"RAMDiskStandard"),z=getBoolFromPropertyBag(a,"HardDiskStandard"),D=getBoolFromPropertyBag(a,
"HardDiskSupport");null==D&&(D=!1);var E=getBoolFromPropertyBag(a,"RamDiskSupport");null==E&&(E=!1);var F=getBoolFromPropertyBag(a,"NewEMPS");null==F&&(F=!1);var G=getBoolFromPropertyBag(a,"JOBSupport");null==G&&(G=!1);var x=getBoolFromPropertyBag(a,"JOBRetentionSupport");null==x&&(x=!1);var I=getBoolFromPropertyBag(a,"SupportUserBox");null==I&&(I=!1);var J=getIntFromPropertyBag(a,"NewResolutionGroupID");null==J&&(J=0);var Q=getBoolFromPropertyBag(a,"JobStorageAlphaNumeric");null==Q&&(Q=2==d&&96<=
k&&99>=k||3==d&&(36<=k&&40>=k||42<=k&&47>=k)?!0:!1);var k=getBoolFromPropertyBag(a,"UserLoginSupport"),ca=getBoolFromPropertyBag(a,"A3Machine"),t=getJSONObjectFromPropertyBag(a,"PrinterSetUp"),K=getJSONObjectFromPropertyBag(a,"MediaType"),L=getJSONObjectFromPropertyBag(a,"MediaSize"),R=getJSONObjectFromPropertyBag(a,"MediaSource"),S=getJSONObjectFromPropertyBag(a,"Finisher"),M=getJSONObjectFromPropertyBag(a,"OutputBin"),N=getJSONObjectFromPropertyBag(a,"Default_Resolution"),da=getJSONObjectFromPropertyBag(a,
"Resolution"),O=getBoolFromPropertyBag(a,"PrintCompletedEmail");null==O&&(O=!1);var P=getBoolFromPropertyBag(a,"PrintSuspendEmail");null==P&&(P=!1);if(null!=d&&null!=e&&null!=h){t=getPrintSetUp(t,b);K=getMediaTypes(K);L=getMediaSizes(L);R=getMediaSources(R,null,t,L,K,a);S=getOutputBins(M,null,S,t,L,K,a);c=getDefaultResolution(c,N,b);for(var T=M=N=null,U=null,V=null,W=null,X=null,Y=null,v=0;v<t.length;v++)"FoldingUnit"==t[v].DeviceName?N=t[v].IsInstalled:"RAMDisk"==t[v].DeviceName?M=t[v].IsInstalled:
"HardDisk"==t[v].DeviceName?T=t[v].IsInstalled:"PrinterSSD"==t[v].DeviceName?U=t[v].IsInstalled:"PrinterSDCard"==t[v].DeviceName&&(V=t[v].IsInstalled);1==A&&(W="True"==getStringFromPropertyBag(b,"Config:Punch23Unit"),X="True"==getStringFromPropertyBag(b,"Config:Punch2Unit"),Y="True"==getStringFromPropertyBag(b,"Config:Punch24Unit"));var Z=v=null,aa=null;1==O&&(v=getBoolFromPropertyBag(b,"NotifyPrintCompleted"),aa=getStringFromPropertyBag(b,"EmailAddress"),1==P&&(Z=getBoolFromPropertyBag(b,"NotifyPrintSuspended")));
var ea="True"==getBoolFromPropertyBag(b,"SendTelemetry"),fa=getBoolFromPropertyBag(b,"ChinaRedInstalled"),ga=getBoolFromPropertyBag(b,"LockBWMode");b=getBoolFromPropertyBag(b,"LockDuplex");var ba=!1,ha=getBoolFromPropertyBag(a,"DuplexStandard");a=getBoolFromPropertyBag(a,"DuplexSupport");if(1==ha||1==a)ba=!0;return{vendor:d,groupID:e,maxCopy:f,isColorModel:g,isSupportTwoColor:l,isSupportScreenSetting:p,isPrintGrayBlackToner:n,isSupportTrapping:m,hideEcoPrint:w,colorEcoPrint:B,ecoPrintLevel:u,isSupportBiFold:q,
isSupportTriFold:y,isRotateCollate:r,isPunchSupport:A,isFeedingEdgeSupport:C,isRAMDiskStandard:H,isHardDiskStandard:z,isHardDiskSupport:D,isRamDiskSupport:E,isNewEMPS:F,isJOBSupport:G,isJOBRetentionSupport:x,isUserBoxSupport:I,isUserLoginSupport:k,isA3Machine:ca,extGroupID:h,newResolutionGroupID:J,isJobStorageAccessCodeNumericOnly:0==Q,isFoldingUnitInstalled:N,isRAMDiskInstalled:M,isHardDiskInstalled:T,isPrinterSSDInstalled:U,isPrinterSDCardInstalled:V,isPunch23UnitInstalled:W,isPunch2UnitInstalled:X,
isPunch24UnitInstalled:Y,sendTelemetry:ea,PrintSetUp:t,MediaTypes:K,MediaSizes:L,MediaSources:R,OutputBins:S,DefaultResolution:c,Resolution:da,isJobEmailNotificationSupport:O,isJobEmailNotificationSuspendSupport:P,isJobEmailNotificationOn:v,isJobEmailNotificationSuspendedOn:Z,jobEmailAddress:aa,isChinaRedSupported:fa,isLockBWMode:ga,isLockDuplex:b,isDuplexerSupport:ba}}return null}
function getPdlIdFromPTPC(a,b){if(null!=getFeatureFromPT(b,addPrivatePrefix("JobOutputDocumentType"))){var c=getOptionFromPT(b,addPrivatePrefix("JobOutputDocumentType"));if(null!=c&&"XPS"!=c&&"OpenXPS"!=c&&"PCLXL"==c)return 0}return 11}function isJobAvailable(a){return 1==a.isHardDiskSupport||1==a.isRamDiskSupport&&1==a.isNewEMPS?!0:!1}
function getPrintSetUp(a,b){for(var c=[],d=[{Id:330,Value:"BulkFeeder"},{Id:1002,Value:"EnvelopeFeeder"},{Id:1023,Value:"HardDisk"},{Id:1024,Value:"RAMDisk"},{Id:1031,Value:"Cassette1"},{Id:1032,Value:"Cassette2"},{Id:1033,Value:"Cassette3"},{Id:1034,Value:"Cassette4"},{Id:1035,Value:"Cassette12"},{Id:1036,Value:"Cassette34"},{Id:1049,Value:"Cassette5"},{Id:1060,Value:"1000SheetFinisher"},{Id:1061,Value:"3000SheetFinisher"},{Id:1062,Value:"500SheetFinisher"},{Id:1078,Value:"Mailbox"},{Id:1080,Value:"LargeCapacityFeeder"},
{Id:1086,Value:"InternalFinisher"},{Id:1089,Value:"JobSeparator"},{Id:1095,Value:"FoldingUnit"},{Id:1135,Value:"InternalFinisher"},{Id:1136,Value:"InnerFinisher"},{Id:6802,Value:"MultipurposeFeeder2"},{Id:6803,Value:"MultipurposeFeeder3"},{Id:6804,Value:"MultipurposeFeeder4"},{Id:6805,Value:"MultipurposeFeeder5"},{Id:6806,Value:"SideFeeder567"},{Id:6807,Value:"LargeCapacityFeeder34"},{Id:6808,Value:"LargeCapacitySideFeeder567"},{Id:6809,Value:"RightJobSeparator"},{Id:6810,Value:"InnerJobSeparator"},
{Id:6811,Value:"4000SheetFinisher"},{Id:6812,Value:"SideFeeder5"},{Id:6813,Value:"PrinterSSD"},{Id:6814,Value:"PrinterSDCard"},{Id:6815,Value:"MailboxMainUnit"},{Id:6816,Value:"MailboxFinisher"}],e=0;e<a.length;e++)for(var f=0;f<d.length;f++)if(d[f].Id==a[e].StringID){c[e]={};c[e].DeviceName=d[f].Value;c[e].IsInstalled="True"==getStringFromPropertyBag(b,"Config:"+c[e].DeviceName);break}return c}
function getDefaultResolution(a,b,c){var d;for(c=0;c<b.length;c++)if(a==b[c].PDLID){d=b[c];break}return d}
function getMediaTypes(a){for(var b=[],c=[{Id:1,Value:"Plain"},{Id:2,Value:"Transparency"},{Id:3,Value:"AutoSelect"},{Id:256,Value:"AutoSelect"},{Id:277,Value:"PrePrinted"},{Id:276,Value:"Label"},{Id:257,Value:"Bond"},{Id:258,Value:"Recycled"},{Id:259,Value:"Vellum"},{Id:260,Value:"Rough"},{Id:261,Value:"Letterhead"},{Id:262,Value:"Color"},{Id:263,Value:"PrePunched"},{Id:264,Value:"EnvelopePlain"},{Id:265,Value:"CardStock"},{Id:266,Value:"Custom1"},{Id:267,Value:"Custom2"},{Id:268,Value:"Custom3"},
{Id:269,Value:"Custom4"},{Id:270,Value:"Custom5"},{Id:271,Value:"Custom6"},{Id:272,Value:"Custom7"},{Id:273,Value:"Custom8"},{Id:284,Value:"AutoSelect"},{Id:285,Value:"AutoSelect"},{Id:286,Value:"Coated"},{Id:287,Value:"AutoSelect"},{Id:288,Value:"Thick"},{Id:289,Value:"FinePaper"},{Id:290,Value:"Unspecified"}],d=0;d<a.length;d++)for(var e=0;e<c.length;e++)if(c[e].Id==a[d].ValueID){b[d]={};b[d].Value=c[e].Value;b[d].IsSupportDuplex=a[d].bDuplex;b[d].IsSupportStaple=a[d].bStaple;b[d].SupportedFold=
a[d].Fold;b[d].IsSupportPunch=a[d].bPunch;break}return b}
function getMediaSizes(a){for(var b=[],c=[{Id:1,Value:"NorthAmericaLetter"},{Id:2,Value:"NorthAmericaLetter"},{Id:3,Value:"NorthAmericaTabloid"},{Id:4,Value:"NorthAmericaLetter"},{Id:5,Value:"NorthAmericaLegal"},{Id:6,Value:"NorthAmericaStatement"},{Id:7,Value:"NorthAmericaExecutive"},{Id:8,Value:"ISOA3"},{Id:9,Value:"ISOA4"},{Id:10,Value:"NorthAmericaLetter"},{Id:11,Value:"ISOA5"},{Id:12,Value:"JISB4"},{Id:13,Value:"JISB5"},{Id:14,Value:"OtherMetricFolio"},{Id:15,Value:"NorthAmericaLetter"},{Id:16,
Value:"NorthAmericaLetter"},{Id:17,Value:"NorthAmericaLetter"},{Id:18,Value:"NorthAmericaLetter"},{Id:19,Value:"NorthAmericaNumber9Envelope"},{Id:20,Value:"NorthAmericaNumber10Envelope"},{Id:21,Value:"NorthAmericaLetter"},{Id:22,Value:"NorthAmericaLetter"},{Id:23,Value:"NorthAmericaLetter"},{Id:24,Value:"NorthAmericaLetter"},{Id:25,Value:"NorthAmericaLetter"},{Id:26,Value:"NorthAmericaLetter"},{Id:27,Value:"ISODLEnvelope"},{Id:28,Value:"ISOC5Envelope"},{Id:29,Value:"NorthAmericaLetter"},{Id:30,Value:"ISOC4Envelope"},
{Id:31,Value:"JapanYou2Envelope"},{Id:32,Value:"NorthAmericaLetter"},{Id:33,Value:"NorthAmericaLetter"},{Id:34,Value:"NorthAmericaLetter"},{Id:35,Value:"NorthAmericaLetter"},{Id:36,Value:"NorthAmericaLetter"},{Id:37,Value:"NorthAmericaMonarchEnvelope"},{Id:38,Value:"NorthAmericaLetter"},{Id:39,Value:"NorthAmericaLetter"},{Id:40,Value:"NorthAmericaLetter"},{Id:41,Value:"NorthAmericaLetter"},{Id:42,Value:"NorthAmericaLetter"},{Id:43,Value:"JapanHagakiPostcard"},{Id:44,Value:"NorthAmericaLetter"},{Id:45,
Value:"NorthAmericaLetter"},{Id:46,Value:"NorthAmericaLetter"},{Id:47,Value:"NorthAmericaLetter"},{Id:48,Value:"NorthAmericaLetter"},{Id:49,Value:"NorthAmericaLetter"},{Id:50,Value:"NorthAmericaLetter"},{Id:51,Value:"NorthAmericaLetter"},{Id:52,Value:"NorthAmericaLetter"},{Id:53,Value:"NorthAmericaLetter"},{Id:54,Value:"NorthAmericaLetter"},{Id:55,Value:"NorthAmericaLetter"},{Id:56,Value:"NorthAmericaLetter"},{Id:57,Value:"NorthAmericaLetter"},{Id:58,Value:"NorthAmericaLetter"},{Id:59,Value:"NorthAmericaLetter"},
{Id:60,Value:"NorthAmericaLetter"},{Id:61,Value:"NorthAmericaLetter"},{Id:62,Value:"NorthAmericaLetter"},{Id:63,Value:"NorthAmericaLetter"},{Id:64,Value:"NorthAmericaLetter"},{Id:65,Value:"NorthAmericaLetter"},{Id:66,Value:"NorthAmericaLetter"},{Id:67,Value:"NorthAmericaLetter"},{Id:68,Value:"NorthAmericaLetter"},{Id:69,Value:"NorthAmericaLetter"},{Id:70,Value:"NorthAmericaLetter"},{Id:71,Value:"JapanKaku2Envelope"},{Id:72,Value:"NorthAmericaLetter"},{Id:73,Value:"JapanChou3Envelope"},{Id:74,Value:"JapanChou4Envelope"},
{Id:75,Value:"NorthAmericaLetter"},{Id:76,Value:"NorthAmericaLetter"},{Id:77,Value:"NorthAmericaLetter"},{Id:78,Value:"NorthAmericaLetter"},{Id:79,Value:"NorthAmericaLetter"},{Id:80,Value:"NorthAmericaLetter"},{Id:81,Value:"NorthAmericaLetter"},{Id:82,Value:"JapanDoubleHagakiPostcardRotated"},{Id:83,Value:"NorthAmericaLetter"},{Id:84,Value:"NorthAmericaLetter"},{Id:85,Value:"NorthAmericaLetter"},{Id:86,Value:"NorthAmericaLetter"},{Id:87,Value:"NorthAmericaLetter"},{Id:88,Value:"NorthAmericaLetter"},
{Id:89,Value:"NorthAmericaLetter"},{Id:90,Value:"NorthAmericaLetter"},{Id:91,Value:"JapanYou4Envelope"},{Id:92,Value:"NorthAmericaLetter"},{Id:93,Value:"NorthAmericaLetter"},{Id:94,Value:"NorthAmericaLetter"},{Id:95,Value:"NorthAmericaLetter"},{Id:96,Value:"NorthAmericaLetter"},{Id:97,Value:"NorthAmericaLetter"},{Id:98,Value:"NorthAmericaLetter"},{Id:99,Value:"NorthAmericaLetter"},{Id:100,Value:"NorthAmericaLetter"},{Id:101,Value:"NorthAmericaLetter"},{Id:102,Value:"NorthAmericaLetter"},{Id:103,Value:"NorthAmericaLetter"},
{Id:104,Value:"NorthAmericaLetter"},{Id:105,Value:"NorthAmericaLetter"},{Id:106,Value:"NorthAmericaLetter"},{Id:107,Value:"NorthAmericaLetter"},{Id:108,Value:"NorthAmericaLetter"},{Id:109,Value:"NorthAmericaLetter"},{Id:110,Value:"NorthAmericaLetter"},{Id:111,Value:"NorthAmericaLetter"},{Id:112,Value:"NorthAmericaLetter"},{Id:113,Value:"NorthAmericaLetter"},{Id:114,Value:"NorthAmericaLetter"},{Id:115,Value:"NorthAmericaLetter"},{Id:116,Value:"NorthAmericaLetter"},{Id:117,Value:"NorthAmericaLetter"},
{Id:118,Value:"NorthAmericaLetter"},{Id:256,Value:"NorthAmericaLetter"},{Id:257,Value:"ISOA6"},{Id:258,Value:"JISB6"},{Id:259,Value:"ISOB5Envelope"},{Id:260,Value:"NorthAmericaPersonalEnvelope"},{Id:265,Value:"NorthAmericaLetter"},{Id:266,Value:"Stockform"},{Id:267,Value:"JapanHagakiPostcard"},{Id:268,Value:"JapanDoubleHagakiPostcardRotated"},{Id:269,Value:"NorthAmericaLetter"},{Id:270,Value:"NorthAmericaLetter"},{Id:271,Value:"NorthAmericaLetter"},{Id:272,Value:"NorthAmericaLetter"},{Id:273,Value:"NorthAmericaLetter"},
{Id:274,Value:"NorthAmericaLetter"},{Id:275,Value:"NorthAmericaLetter"},{Id:276,Value:"NorthAmericaLetter"},{Id:277,Value:"NorthAmericaLetter"},{Id:278,Value:"NorthAmericaLetter"},{Id:279,Value:"JapanYou2Envelope"},{Id:280,Value:"JapanYou4Envelope"},{Id:281,Value:"Oficio2"},{Id:283,Value:"NorthAmericaLetter"},{Id:284,Value:"NorthAmericaLetter"},{Id:285,Value:"LedgerFull"},{Id:286,Value:"PRC8K"},{Id:287,Value:"PRC16K"},{Id:288,Value:"Oficio"},{Id:289,Value:"Oficio"},{Id:290,Value:"Oficio"},{Id:291,
Value:"NorthAmericaLetter"},{Id:292,Value:"Foolscap"},{Id:293,Value:"ISOA0"},{Id:294,Value:"ISOA1"},{Id:295,Value:"ISOA2"},{Id:296,Value:"JISB1"},{Id:297,Value:"JISB2"},{Id:298,Value:"JISB3"},{Id:299,Value:"ISOSRA3"},{Id:396,Value:"NorthAmericaLetter"},{Id:540,Value:"Younaga3"}],d=0;d<a.length;d++)for(var e=0;e<c.length;e++)if(c[e].Id==a[d].ValueID){b[d]={};b[d].Value=c[e].Value;b[d].PaperSize={Width:100*a[d].PageSizeMmX,Height:100*a[d].PageSizeMmY};b[d].PrintableAreaPortrait=[];for(e=0;e<a[d].PageOffsetPortMmX.length;e++){var f=
a[d].PageOffsetPortMmX[e],h=a[d].PageOffsetPortMmY[e],k=254*a[d].PrintablePortX[e]/6,g=254*a[d].PrintablePortY[e]/6;b[d].PrintableAreaPortrait[e]={X:f,Y:h,Width:k,Height:g}}b[d].PrintableAreaLandscape=[];for(e=0;e<a[d].PageOffsetLandMmX.length;e++)f=a[d].PageOffsetLandMmX[e],h=a[d].PageOffsetLandMmY[e],k=254*a[d].PrintableLandX[e]/6,g=254*a[d].PrintableLandY[e]/6,b[d].PrintableAreaLandscape[e]={X:f,Y:h,Width:k,Height:g};b[d].IsSupportDuplex=a[d].bDuplex;b[d].IsSupportStaple=a[d].bStaple;b[d].SupportedFold=
a[d].Fold;b[d].SupportedPunch=a[d].Punch;break}return b}
function getMediaSources(a,b,c,d,e,f){for(var h=0,k=[{Id:1,Value:"Manual"},{Id:1,Value:"Manual"},{Id:1,Value:"Manual"},{Id:2,Value:"Cassette3"},{Id:3,Value:"Cassette2"},{Id:4,Value:"Manual"},{Id:5,Value:"Envelope"},{Id:6,Value:"Manual"},{Id:7,Value:"AutoSelect"},{Id:8,Value:"Manual"},{Id:9,Value:"Manual"},{Id:10,Value:"Manual"},{Id:11,Value:"Manual"},{Id:14,Value:"Cassette"},{Id:15,Value:"Manual"},{Id:15,Value:"Manual"},{Id:256,Value:"Manual"},{Id:257,Value:"Cassette4"},{Id:258,Value:"Cassette5"},
{Id:259,Value:"Cassette6"},{Id:260,Value:"Manual"},{Id:261,Value:"SideDeck"},{Id:262,Value:"BulkFeeder"},{Id:263,Value:"LargeCapacityFeeder"},{Id:264,Value:"Manual"},{Id:265,Value:"Manual"},{Id:266,Value:"Manual"},{Id:267,Value:"Manual"},{Id:268,Value:"UniversalFeeder2"},{Id:269,Value:"UniversalFeeder3"},{Id:270,Value:"UniversalFeeder4"},{Id:271,Value:"UniversalFeeder5"},{Id:272,Value:"Cassette7"},{Id:273,Value:"LargeCapacity3_PF740"},{Id:274,Value:"LargeCapacity4"},{Id:275,Value:"LargeCapacity6"},
{Id:276,Value:"LargeCapacity7"}],g=c.length-1;0<=g;g--)h<<=1,c[g].IsInstalled&&(h|=1);c=null;null==c&&(c=getEntryCodeFromEntryCodeMap(h,f));null==c&&(c=null!=b?b[h]:getJSONObjectFromPropertyBag(f,"EntryCode "+h));b=[];for(g=0;g<a.length;g++)for(f=0;f<k.length;f++)if(k[f].Id==a[g].ValueID){b[g]={};b[g].Value=k[f].Value;b[g].IsAvailable=0!=(c.MediaSource&1<<g);b[g].ISupportStandardPaper=a[g].bStandSize;b[g].IsSupportEnvelope=a[g].bEnvSize;b[g].IsSupportCustomPaperSize=a[g].bCustomPaper;b[g].IsSupportCustomEnvelopeSize=
a[g].bCustomEnv;b[g].IsSupportDuplex=a[g].bDuplex;b[g].IsSupportStaple=a[g].bStaple;f=a[g].WidthMax/10;h=a[g].HeightMax/10;b[g].MinimumPaperSize={Width:a[g].WidthMin/10,Height:a[g].HeightMin/10};b[g].MaximumPaperSize={Width:f,Height:h};b[g].MediaTypes=[];for(var l=a[g].MediaType,h=f=0;0<l;f++,l>>>=1)1==(l&1)&&(b[g].MediaTypes[h]=e[f],h++);b[g].MediaSizes=[];l=a[g].MediaSize;for(h=f=0;0<l;f++,l>>>=1)1==(l&1)&&(b[g].MediaSizes[h]=d[f],h++);break}return b}
function getOutputBins(a,b,c,d,e,f,h){var k=0;f=[{Id:0,Value:"DestPrinterDefault"},{Id:1,Value:"DestTopTray"},{Id:2,Value:"DestSideTray"},{Id:3,Value:"DestRearTray"},{Id:4,Value:"DestFinisher"},{Id:5,Value:"DestPrinterDefault"},{Id:6,Value:"DestDocumentFinisher"},{Id:7,Value:"DestFaceDownTracker"},{Id:8,Value:"DestSorterStacker"},{Id:9,Value:"DestOffsetStacker"},{Id:10,Value:"DestBulkStacker"},{Id:11,Value:"DestBookletStitcher"},{Id:12,Value:"DestPrinterDefault"},{Id:13,Value:"DestPrinterDefault"},
{Id:14,Value:"DestPrinterDefault"},{Id:15,Value:"DestPrinterDefault"},{Id:16,Value:"DestMainTray"},{Id:17,Value:"DestSubTray"},{Id:18,Value:"DestMailbox"},{Id:19,Value:"DestBulkTray"},{Id:20,Value:"DestInnerTray"},{Id:21,Value:"DestJobSeparator"},{Id:22,Value:"DestSideTrayFD"},{Id:23,Value:"DestBulkTrayFU"},{Id:24,Value:"DestBookletStitcher2FU"},{Id:25,Value:"DestBookletStitcher2FD"},{Id:26,Value:"DestMailboxFU"},{Id:27,Value:"DestMailboxFD"},{Id:28,Value:"DestMainMultiFinisherFU"},{Id:29,Value:"DestMainMultiFinisherFD"},
{Id:30,Value:"DestSubMultiFinisherFU"},{Id:31,Value:"DestSubMultiFinisherFD"},{Id:32,Value:"DestSimpleFinisherFU"},{Id:33,Value:"DestSimpleFinisherFD"},{Id:34,Value:"DestFoldingTrayEagle"},{Id:35,Value:"DestMultiTray1FU"},{Id:36,Value:"DestMultiTray2FU"},{Id:37,Value:"DestMultiTray3FU"},{Id:38,Value:"DestMultiTray4FU"},{Id:39,Value:"DestMultiTray5FU"},{Id:40,Value:"DestMultiTray1FD"},{Id:41,Value:"DestMultiTray2FD"},{Id:42,Value:"DestMultiTray3FD"},{Id:43,Value:"DestMultiTray4FD"},{Id:44,Value:"DestMultiTray5FD"},
{Id:45,Value:"DestSideTray2FU"},{Id:46,Value:"DestSideTray2FD"},{Id:47,Value:"DestBulkTraySO60"},{Id:48,Value:"DestSubMultiFInisherFU2"},{Id:49,Value:"DestMultiTray1FU2"},{Id:50,Value:"DestMultiTray2FU2"},{Id:51,Value:"DestMultiTray3FU2"},{Id:52,Value:"DestMultiTray4FU2"},{Id:53,Value:"DestMultiTray5FU2"},{Id:54,Value:"DestMultiTray1FD2"},{Id:55,Value:"DestMultiTray2FD2"},{Id:56,Value:"DestMultiTray3FD2"},{Id:57,Value:"DestMultiTray4FD2"},{Id:58,Value:"DestMultiTray5FD2"},{Id:59,Value:"DestMainMultiFinisherFD2"},
{Id:60,Value:"DestSimpleFinisherFD2"},{Id:61,Value:"DestMailbox2FU"},{Id:62,Value:"DestMailbox2FD"},{Id:63,Value:"DestFinisherDF73FD"},{Id:64,Value:"DestMultiTray1FD3"},{Id:65,Value:"DestMultiTray2FD3"},{Id:66,Value:"DestMultiTray3FD3"},{Id:67,Value:"DestMultiTray4FD3"},{Id:68,Value:"DestMultiTray5FD3"},{Id:69,Value:"DestFoldingTray"},{Id:70,Value:"DestSubTray2FU"},{Id:71,Value:"DestSubTray2FD"},{Id:72,Value:"DestSubTrayFD"},{Id:73,Value:"DestJobSeparator2FD"},{Id:74,Value:"DestFinisherTopFD"},{Id:75,
Value:"DestUpperLeftFD"},{Id:22,Value:"DestSideTrayFD"},{Id:23,Value:"DestBulkTrayFU"},{Id:24,Value:"DestBookletStitcher2FU"},{Id:25,Value:"DestBookletStitcher2FD"}];for(var g=d.length-1;0<=g;g--)k<<=1,d[g].IsInstalled&&(k|=1);d=null;null==d&&(d=getEntryCodeFromEntryCodeMap(k,h));null==d&&(d=null!=b?b[k]:getJSONObjectFromPropertyBag(h,"EntryCode "+k));b=getIntFromPropertyBag(h,"TrayAToMailbox");null==b&&(b=0);h=[];for(var k=0,l=[],g=0;g<a.length;g++)for(var p=0;p<f.length;p++)if(f[p].Id==a[g].ValueID){l[g]=
{};l[g].Value=f[p].Value;l[g].IsAvailable=0!=(d.OutputBin&1<<g);l[g].Direction=a[g].Direction;l[g].Mailbox=a[g].Mailbox;l[g].IsSupportStaple=c[a[g].Finisher].bStaple;l[g].IsSupportCollate=c[a[g].Finisher].bCollate;l[g].IsSupportSort=c[a[g].Finisher].bSort;l[g].PunchHoleCount=c[a[g].Finisher].Punch;l[g].IsSupportOffset=c[a[g].Finisher].bOffset;l[g].IsSupportBookletStitch=c[a[g].Finisher].bBookletStitch;l[g].IsUseStapleCountMax=c[a[g].Finisher].bStapleCount;l[g].StapleCountMaxA=c[a[g].Finisher].MAXStapleA;
l[g].StapleCountMaxB=c[a[g].Finisher].MAXStapleB;l[g].MediaSizesFaceDown=[];for(var p=c[a[g].Finisher].MediaSize_FD,n=0,m=0;0<p;n++,p>>>=1)1==(p&1)&&(l[g].MediaSizesFaceDown[m]=e[n],m++);l[g].MediaSizesFaceUp=[];p=c[a[g].Finisher].MediaSize_FU;for(m=n=0;0<p;n++,p>>>=1)1==(p&1)&&(l[g].MediaSizesFaceUp[m]=e[n],m++);if("DestMailbox2FD"==l[g].Value||"DestMailbox2FU"==l[g].Value){if(0!=b)for(p=0;p<g;p++)"DestMainTray"==l[p].Value&&l[p].IsAvailable==l[g].IsAvailable&&(l[p].Value=l[g].Value+b.toString());
for(m=n=2;0!=(m&l[g].Mailbox);n++,m<<=1,k++)h[k]={},"DestMailbox2FD"==l[g].Value?2==n?h[k].Value="DestMailbox2FD2":3==n?h[k].Value="DestMailbox2FD3":4==n?h[k].Value="DestMailbox2FD4":5==n?h[k].Value="DestMailbox2FD5":6==n?h[k].Value="DestMailbox2FD6":7==n&&(h[k].Value="DestMailbox2FD7"):"DestMailbox2FU"==l[g].Value&&(2==n?h[k].Value="DestMailbox2FU2":3==n?h[k].Value="DestMailbox2FU3":4==n?h[k].Value="DestMailbox2FU4":5==n?h[k].Value="DestMailbox2FU5":6==n?h[k].Value="DestMailbox2FU6":7==n&&(h[k].Value=
"DestMailbox2FU7")),h[k].IsAvailable=l[g].IsAvailable,h[k].Direction=l[g].Direction,h[k].IsSupportStaple=l[g].IsSupportStaple,h[k].IsSupportCollate=l[g].IsSupportCollate,h[k].IsSupportSort=l[g].IsSupportSort,h[k].PunchHoleCount=l[g].PunchHoleCount,h[k].IsSupportOffset=l[g].IsSupportOffset,h[k].IsSupportBookletStitch=l[g].IsSupportBookletStitch,h[k].IsUseStapleCountMax=l[g].IsUseStapleCountMax,h[k].StapleCountMaxA=l[g].StapleCountMaxA,h[k].StapleCountMaxB=l[g].StapleCountMaxB,h[k].MediaSizesFaceDown=
l[g].MediaSizesFaceDown,h[k].MediaSizesFaceUp=l[g].MediaSizesFaceUp}break}for(g=0;g<h.length;g++)l[l.length]=h[g];return l}
function getEntryCodeFromEntryCodeMap(a,b){var c=getJSONObjectFromPropertyBag(b,"EntryCodeMediaSource"),d=getJSONObjectFromPropertyBag(b,"EntryCodeOutputBin");if(null!=c&&null!=d){for(var e=0,f=0,h=[],k=1,g=0;k<a;k<<=1,g++)h[g]=0!=(a&k);k=0;for(g=1;k<c.length;k++,g<<=1)1==evaluateReversePolishFormula(h,c[k].split(","))&&(e|=g);k=0;for(g=1;k<d.length;k++,g<<=1)1==evaluateReversePolishFormula(h,d[k].split(","))&&(f|=g);return{Choice:a,MediaSource:e,OutputBin:f}}return null}
function evaluateReversePolishFormula(a,b){for(var c=[],d=-1,e=0;e<b.length;e++)switch(b[e]){case "!":0<=d?c[d]=!c[d]:(d++,c[d]=!1);break;case "|":if(1<=d)d--,c[d]=c[d]||c[d+1];else return null;break;case "&":if(1<=d)d--,c[d]=c[d]&&c[d+1];else return null;break;case "":-1==d&&(d++,c[d]=!0);break;default:d++,c[d]=b[e]<a.length?a[b[e]]:!1}return 0==d?c[0]:null}
function setSelectionNamespace(a){a.setProperty("SelectionNamespaces","xmlns:"+psfPrefix+"='"+psfNs+"' xmlns:"+kxPrivPrefix+"='"+kxPrivNs+"' xmlns:"+xsiPrefix+"='"+xsiNs+"' xmlns:"+xsdPrefix+"='"+xsdNs+"' xmlns:"+pskPrefix+"='"+pskNs+"'")}function addXsiPrefix(a){return xsiPrefix+":"+a}function addPsfPrefix(a){return psfPrefix+":"+a}function addPrivatePrefix(a){return kxPrivPrefix+":"+a}function addXsdPrefix(a){return xsdPrefix+":"+a}function addPskPrefix(a){return pskPrefix+":"+a}
function checkFeatureNode(a,b){var c=getFeatureFromPT(a,b);null!=c&&a.removeChild(c)}function checkParameterInitNode(a,b){var c=getParameterInitFromPT(a,b);null!=c&&a.removeChild(c)}function checkPropertyNode(a,b){var c=getPropertyFromPT(a,b);null!=c&&a.removeChild(c)}function getStringFromDevMode(a,b){try{return a.GetString(b)}catch(c){return null}}function setStringInDevMode(a,b,c){try{null!=c&&a.SetString(b,c)}catch(d){}}
function getIntFromDevMode(a,b){try{return a.GetInt32(b)}catch(c){return null}}function setIntInDevMode(a,b,c){try{a.SetInt32(b,c)}catch(d){}}function getEnumFromDevMode(a,b,c){a=getIntFromDevMode(a,b);b=null;if(null!=a&&null!=c)for(var d=0;d<c.length;d++)if(c[d].Id==a){b=c[d].Value;break}return b}function setEnumInDevMode(a,b,c,d){if(null!=c&&null!=d)for(var e=0;e<d.length;e++)if(d[e].Value==c){setIntInDevMode(a,b,d[e].Id);break}}
function getStringFromPropertyBag(a,b){try{return a.GetString(b)}catch(c){return null}}function setStringInPropertyBag(a,b,c){null!=c&&a.SetString(b,c)}function getIntFromPropertyBag(a,b){try{return a.GetInt32(b)}catch(c){return null}}function setIntInPropertyBag(a,b,c){null!=c&&a.SetInt32(b,c)}function getBoolFromPropertyBag(a,b){try{return a.GetBool(b)}catch(c){return null}}function setBoolInPropertyBag(a,b,c){null!=c&&a.SetBool(b,c)}
function getBytesFromPropertyBag(a,b){try{return a.GetBytes(b)}catch(c){return null}}function setBytesInPropertyBag(a,b,c){a.SetBytes(b,c)}function getJSONObjectFromPropertyBag(a,b){var c="",d=getBytesFromPropertyBag(a,b);if(null!=d){for(var e=0;e<d.length;e++)c+=String.fromCharCode(d[e]);return eval("("+c+")")}d=getStringFromPropertyBag(a,b);return null!=d?eval("("+d+")"):null}
function createFeatureNodePC(a,b,c,d){d=a.createNode("element","psf:Feature",psfNs);d.setAttribute("name",c);b.appendChild(d);createPropertyNodePC(a,d,"psf:SelectionType","psk:PickOne","xsd:QName");return d}function createOptionNodePC(a,b,c,d){if(null==b)return null;a=a.createNode("element","psf:Option",psfNs);null!=c&&a.setAttribute("name",c);null!=d&&a.setAttribute("constrained",d);b.appendChild(a);return a}
function createPropertyNodePC(a,b,c,d,e){var f=a.createNode("element","psf:Property",psfNs);f.setAttribute("name",c);b.appendChild(f);b=a.createNode("element","psf:Value",psfNs);b.text=d;a=a.createNode("attribute","xsi:type",xsiNs);a.value=e;b.attributes.setNamedItem(a);f.appendChild(b);return f}
function createScoredPropertyWithValueNodePC(a,b,c,d,e){if(null==b)return null;var f=a.createNode("element","psf:ScoredProperty",psfNs);f.setAttribute("name",c);b.appendChild(f);b=a.createNode("element","psf:Value",psfNs);b.text=d;a=a.createNode("attribute","xsi:type",xsiNs);a.value=e;b.attributes.setNamedItem(a);f.appendChild(b);return f}
function createScoredPropertyWithParameterRefPC(a,b,c,d){var e=a.createNode("element","psf:ScoredProperty",psfNs);e.setAttribute("name",c);b.appendChild(e);a=a.createNode("element","psf:ParameterRef",psfNs);a.setAttribute("name",d);e.appendChild(a);return e}
function createParameterDefIntNodePC(a,b,c,d,e,f,h,k){var g=a.createNode("element","psf:ParameterDef",psfNs);g.setAttribute("name",c);b.appendChild(g);createPropertyNodePC(a,g,"psf:DataType","xsd:integer","xsd:QName");createPropertyNodePC(a,g,"psf:DefaultValue",d,"xsd:integer");createPropertyNodePC(a,g,"psf:UnitType",h,k);createPropertyNodePC(a,g,"psf:MinValue",e,"xsd:integer");createPropertyNodePC(a,g,"psf:MaxValue",f,"xsd:integer");createPropertyNodePC(a,g,"psf:Multiple","1","xsd:integer");createPropertyNodePC(a,
g,"psf:Mandatory","psk:Conditional","xsd:QName");return g}
function createParameterDefIntNodeWithCustomeMultiplePC(a,b,c,d,e,f,h,k,g){var l=a.createNode("element","psf:ParameterDef",psfNs);l.setAttribute("name",c);b.appendChild(l);createPropertyNodePC(a,l,"psf:DataType","xsd:integer","xsd:QName");createPropertyNodePC(a,l,"psf:DefaultValue",d,"xsd:integer");createPropertyNodePC(a,l,"psf:UnitType",k,g);createPropertyNodePC(a,l,"psf:MinValue",e,"xsd:integer");createPropertyNodePC(a,l,"psf:MaxValue",f,"xsd:integer");createPropertyNodePC(a,l,"psf:Multiple",h,
"xsd:integer");createPropertyNodePC(a,l,"psf:Mandatory","psk:Conditional","xsd:QName");return l}
function createParameterDefDecimalNodePC(a,b,c,d,e,f,h,k,g){var l=a.createNode("element","psf:ParameterDef",psfNs);l.setAttribute("name",c);b.appendChild(l);createPropertyNodePC(a,l,"psf:DataType","xsd:decimal","xsd:QName");createPropertyNodePC(a,l,"psf:DefaultValue",d,"xsd:decimal");createPropertyNodePC(a,l,"psf:UnitType",k,g);createPropertyNodePC(a,l,"psf:MinValue",e,"xsd:decimal");createPropertyNodePC(a,l,"psf:MaxValue",f,"xsd:decimal");createPropertyNodePC(a,l,"psf:Multiple",h,"xsd:decimal");
createPropertyNodePC(a,l,"psf:Mandatory","psk:Conditional","xsd:QName");return l}
function createParameterDefStringNodePC(a,b,c,d,e,f,h,k){var g=a.createNode("element","psf:ParameterDef",psfNs);g.setAttribute("name",c);b.appendChild(g);createPropertyNodePC(a,g,"psf:DataType","xsd:string","xsd:QName");createPropertyNodePC(a,g,"psf:DefaultValue",d,"xsd:string");createPropertyNodePC(a,g,"psf:MinLength",e,"xsd:integer");createPropertyNodePC(a,g,"psf:MaxLength",f,"xsd:integer");createPropertyNodePC(a,g,"psf:Mandatory","psk:Conditional","xsd:QName");createPropertyNodePC(a,g,"psf:UnitType",
h,k);return g}
function createParameterDefStringNodePCWithOptional(a,b,c,d,e,f,h,k){var g=a.createNode("element","psf:ParameterDef",psfNs);g.setAttribute("name",c);b.appendChild(g);createPropertyNodePC(a,g,"psf:DataType","xsd:string","xsd:QName");createPropertyNodePC(a,g,"psf:DefaultValue",d,"xsd:string");createPropertyNodePC(a,g,"psf:MinLength",e,"xsd:integer");createPropertyNodePC(a,g,"psf:MaxLength",f,"xsd:integer");createPropertyNodePC(a,g,"psf:Mandatory","psk:Optional","xsd:QName");createPropertyNodePC(a,g,
"psf:UnitType",h,k);return g}function getFeatureFromPC(a,b){return a.selectSingleNode("psf:Feature[@name='"+b+"']")}function getOptionNodePC(a,b,c){return a.selectSingleNode("psf:Feature[@name='"+b+"']/psf:Option[@name='"+c+"']")}function getOptionListFromPC(a,b){return a.selectNodes("psf:Feature[@name='"+b+"']/psf:Option")}function createFeatureNodePT(a,b,c){a=a.createNode("element","psf:Feature",psfNs);a.setAttribute("name",c);b.appendChild(a);return a}
function createOptionNodePT(a,b,c){if(null==b)return null;a=a.createNode("element","psf:Option",psfNs);null!=c&&a.setAttribute("name",c);b.appendChild(a);return a}function createPropertyNodePT(a,b,c,d,e){var f=a.createNode("element","psf:Property",psfNs);f.setAttribute("name",c);b.appendChild(f);b=a.createNode("element","psf:Value",psfNs);b.text=d;a=a.createNode("attribute","xsi:type",xsiNs);a.value=e;b.attributes.setNamedItem(a);f.appendChild(b);return f}
function createParamterInitStringNodePT(a,b,c,d){var e=a.createNode("element","psf:ParameterInit",psfNs);e.setAttribute("name",c);b.appendChild(e);b=a.createNode("element","psf:Value",psfNs);b.text=d;a=a.createNode("attribute","xsi:type",xsiNs);a.value="xsd:string";b.attributes.setNamedItem(a);e.appendChild(b);return e}
function createParamterInitDecimalNodePT(a,b,c,d){var e=a.createNode("element","psf:ParameterInit",psfNs);e.setAttribute("name",c);b.appendChild(e);b=a.createNode("element","psf:Value",psfNs);b.text=d;a=a.createNode("attribute","xsi:type",xsiNs);a.value="xsd:decimal";b.attributes.setNamedItem(a);e.appendChild(b);return e}
function createParamterInitIntNodePT(a,b,c,d){var e=a.createNode("element","psf:ParameterInit",psfNs);e.setAttribute("name",c);b.appendChild(e);b=a.createNode("element","psf:Value",psfNs);b.text=d;a=a.createNode("attribute","xsi:type",xsiNs);a.value="xsd:integer";b.attributes.setNamedItem(a);e.appendChild(b);return e}function getFeatureFromPT(a,b){return a.selectSingleNode("psf:Feature[@name='"+b+"']")}
function getParameterInitFromPT(a,b){return a.selectSingleNode("psf:ParameterInit[@name='"+b+"']")}function getPropertyFromPT(a,b){return a.selectSingleNode("psf:Property[@name='"+b+"']")}function getOptionFromPT(a,b){var c=a.selectSingleNode("psf:Feature[@name='"+b+"']/psf:Option");return null!=c&&(c=c.attributes.getNamedItem("name"),null!=c)?c.value.split(":")[1]:null}
function getOptionScoredPropertyFromPT(a,b){var c=a.selectSingleNode("psf:Option/psf:ScoredProperty[@name='"+b+"']/psf:Value");return null!=c?c.text:null}function getParameterInitStringValuePT(a,b){var c=a.selectSingleNode("psf:ParameterInit[@name='"+b+"']/psf:Value[@xsi:type='xsd:string']");return null!=c?c.text:null}function getParameterInitIntValuePT(a,b){var c=a.selectSingleNode("psf:ParameterInit[@name='"+b+"']/psf:Value[@xsi:type='xsd:integer']");return null!=c?c.text:null}
function getParameterInitDecimalValuePT(a,b){var c=a.selectSingleNode("psf:ParameterInit[@name='"+b+"']/psf:Value[@xsi:type='xsd:decimal']");return null!=c?c.text:null}
function createScoredPropertyWithValueNodePT(a,b,c,d,e){if(null==b)return null;var f=a.createNode("element","psf:ScoredProperty",psfNs);f.setAttribute("name",c);b.appendChild(f);b=a.createNode("element","psf:Value",psfNs);b.text=d;a=a.createNode("attribute","xsi:type",xsiNs);a.value=e;b.attributes.setNamedItem(a);f.appendChild(b);return f}
function createScoredPropertyWithParameterRefPT(a,b,c,d){var e=a.createNode("element","psf:ScoredProperty",psfNs);e.setAttribute("name",c);b.appendChild(e);a=a.createNode("element","psf:ParameterRef",psfNs);a.setAttribute("name",d);e.appendChild(a);return e}function getNamedOptionScoredPropertyFromPT(a,b,c){a=a.selectSingleNode("psf:Feature[@name='"+b+"']/psf:Option").selectSingleNode("psf:ScoredProperty[@name='"+c+"']/psf:Value");return null!=a?a.text:null}
function getPropertyStringValuePT(a,b){var c=a.selectSingleNode("psf:Property[@name='"+b+"']/psf:Value[@xsi:type='xsd:string']");return null!=c?c.text:null}
var enumOffOn=["Off","On"],enumMediaType="Unspecified AutoSelect Plain Transparency PrePrinted Label Bond Recycled Vellum Rough Letterhead Color PrePunched EnvelopePlain CardStock Coated Thick FinePaper Custom1 Custom2 Custom3 Custom4 Custom5 Custom6 Custom7 Custom8".split(" "),enumMediaSource="AutoSelect Manual Cassette Cassette2 Cassette3 Cassette4 Cassette5 Cassette6 Envelope LargeCapacityTray LargeCapacityFeeder BulkFeeder SideDeck LargeCapacity1 LargeCapacity2 LargeCapacity3 UniversalFeeder2 UniversalFeeder3 UniversalFeeder4 UniversalFeeder5 Cassette7 LargeCapacity3_PF740 LargeCapacity4 LargeCapacity6 LargeCapacity7".split(" "),enumMediaTypeAndSource=
"Unspecified AutoSelect Plain Transparency PrePrinted Label Bond Recycled Vellum Rough Letterhead Color PrePunched EnvelopePlain CardStock Coated Thick FinePaper Custom1 Custom2 Custom3 Custom4 Custom5 Custom6 Custom7 Custom8 AutoSelect Manual Cassette Cassette2 Cassette3 Cassette4 Cassette5 Cassette6 Envelope LargeCapacityTray LargeCapacityFeeder BulkFeeder SideDeck LargeCapacity1 LargeCapacity2 LargeCapacity3 UniversalFeeder2 UniversalFeeder3 UniversalFeeder4 UniversalFeeder5 Cassette7 LargeCapacity3_PF740 LargeCapacity4 LargeCapacity6 LargeCapacity7".split(" ");
function completePC_DriverVersion(a,b){createPropertyNodePC(a,b,addPrivatePrefix("JobDriverVersion"),DriverVersion,"xsd:string")}var enumMediaSize="AutoSelect NorthAmericaLetter NorthAmericaTabloid NorthAmericaLegal NorthAmericaStatement NorthAmericaExecutive ISOA3 ISOA4 ISOA5 JISB4 JISB5 OtherMetricFolio NorthAmericaNumber9Envelope NorthAmericaNumber10Envelope ISODLEnvelope ISOC5Envelope ISOC4Envelope NorthAmericaMonarchEnvelope ISOA6 JISB6 ISOB5Envelope NorthAmericaPersonalEnvelope Stockform JapanHagakiPostcard JapanDoubleHagakiPostcardRotated JapanYou2Envelope JapanYou4Envelope Oficio2 LedgerFull PRC8K PRC16K Oficio Foolscap CustomMediaSize ISOA0 ISOA1 ISOA2 JISB1 JISB2 JISB3 ISOSRA3 JapanKaku2Envelope JapanChou3Envelope JapanChou4Envelope Younaga3".split(" ");
function completePC_PageMediaSize(a,b){var c=getFeatureFromPT(b,addPskPrefix("PageMediaSize"));if(null!=c){var d=getOptionNodePC(b,addPskPrefix("PageMediaSize"),addPskPrefix("CustomMediaSize"));null==d&&(d=createOptionNodePC(a,c,addPskPrefix("CustomMediaSize"),addPskPrefix("None")),createPropertyNodePC(a,d,"psk:DisplayName","User Defined Size","xsd:string"),createScoredPropertyWithParameterRefPC(a,d,addPskPrefix("MediaSizeWidth"),addPskPrefix("PageMediaSizeMediaSizeWidth")),createScoredPropertyWithParameterRefPC(a,
d,addPskPrefix("MediaSizeHeight"),addPskPrefix("PageMediaSizeMediaSizeHeight")),createParameterDefIntNodePC(a,b,addPskPrefix("PageMediaSizeMediaSizeWidth"),104986,104986,304800,"microns","xsd:string"),createParameterDefIntNodePC(a,b,addPskPrefix("PageMediaSizeMediaSizeHeight"),148082,148082,457200,"microns","xsd:string"))}}
function completePC_PrintMediaSize(a,b,c){for(var d=createFeatureNodePC(a,b,addPrivatePrefix("PagePrintMediaSize"),"Print size"),e,f=0;f<c.MediaSizes.length;f++)switch(c.MediaSizes[f].Value){case "NorthAmericaLetter":case "NorthAmericaLegal":case "NorthAmericaStatement":case "NorthAmericaExecutive":case "ISOA3":case "ISOA4":case "ISOA5":case "ISOA6":case "OtherMetricFolio":case "JISB4":case "JISB5":case "JISB6":case "ISOB5Envelope":case "NorthAmericaNumber10Envelope":case "NorthAmericaNumber9Envelope":case "NorthAmericaMonarchEnvelope":case "NorthAmericaPersonalEnvelope":case "ISOC4Envelope":case "ISOC5Envelope":case "ISODLEnvelope":case "JapanHagakiPostcard":case "JapanDoubleHagakiPostcardRotated":case "JapanYou4Envelope":case "NorthAmericaTabloid":case "ISOSRA3":case "JapanKaku2Envelope":case "JapanChou3Envelope":case "JapanChou4Envelope":e=createOptionNodePC(a,
d,addPskPrefix(c.MediaSizes[f].Value),addPskPrefix("None"));createScoredPropertyWithValueNodePC(a,e,addPrivatePrefix("PagePrintMediaSizeWidth"),c.MediaSizes[f].PaperSize.Width,addXsdPrefix("integer"));createScoredPropertyWithValueNodePC(a,e,addPrivatePrefix("PagePrintMediaSizeHeight"),c.MediaSizes[f].PaperSize.Height,addXsdPrefix("integer"));break;case "Ledger":case "Oficio2":case "PRC8K":case "PRC16K":case "JapanYou2Envelope":case "Foolscap":case "LedgerFull":case "Stockform":case "Younaga3":e=createOptionNodePC(a,
d,addPrivatePrefix(c.MediaSizes[f].Value),addPskPrefix("None")),createScoredPropertyWithValueNodePC(a,e,addPrivatePrefix("PagePrintMediaSizeWidth"),c.MediaSizes[f].PaperSize.Width,addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,e,addPrivatePrefix("PagePrintMediaSizeHeight"),c.MediaSizes[f].PaperSize.Height,addXsdPrefix("integer"))}e=createOptionNodePC(a,d,addPskPrefix("CustomMediaSize"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,e,addPrivatePrefix("PagePrintMediaSizeWidth"),
addPrivatePrefix("PagePrintMediaSizeMediaSizeWidth"));createScoredPropertyWithParameterRefPC(a,e,addPrivatePrefix("PagePrintMediaSizeHeight"),addPrivatePrefix("PagePrintMediaSizeMediaSizeHeight"));createParameterDefIntNodePC(a,b,addPrivatePrefix("PagePrintMediaSizeMediaSizeWidth"),104986,104986,304800,"microns","xsd:string");createParameterDefIntNodePC(a,b,addPrivatePrefix("PagePrintMediaSizeMediaSizeHeight"),148082,148082,457200,"microns","xsd:string");createOptionNodePC(a,d,addPskPrefix("AutoSelect"),
addPskPrefix("None"))}
function convertPTToDevMode_PrintMediaSize(a,b,c){var d=getOptionFromPT(b,addPrivatePrefix("PagePrintMediaSize"));if(null!=d){var e=0,f=0;"AutoSelect"!=d&&("CustomMediaSize"==d?(e=getParameterInitIntValuePT(b,addPrivatePrefix("PagePrintMediaSizeMediaSizeWidth")),f=getParameterInitIntValuePT(b,addPrivatePrefix("PagePrintMediaSizeMediaSizeHeight"))):(e=getNamedOptionScoredPropertyFromPT(b,addPrivatePrefix("PagePrintMediaSize"),addPrivatePrefix("PagePrintMediaSizeWidth")),f=getNamedOptionScoredPropertyFromPT(b,addPrivatePrefix("PagePrintMediaSize"),
addPrivatePrefix("PagePrintMediaSizeHeight"))));c.privateFeatureWriter.write(featuresEnum.PrintMediaSize,5,function(a){if(5==a.length){a[0]=0;a[1]=0;a[2]=0;a[3]=0;for(var b=a[4]=0;b<enumMediaSize.length;b++)if(enumMediaSize[b]==d){a[0]=b;break}null!=e&&(a[1]=e&65535,a[2]=e>>16);null!=f&&(a[3]=f&65535,a[4]=f>>16)}})}}
function convertDevModeToPT_PrintMediaSize(a,b,c){checkFeatureNode(b,addPrivatePrefix("PagePrintMediaSize"));c=c.privateFeatureReader.read(featuresEnum.PrintMediaSize,function(a){return 5==a.length?{mediaSize:enumMediaSize[a[0]<enumMediaSize.length?a[0]:0],width:a[2]<<16|a[1],height:a[4]<<16|a[3]}:null},function(){return{mediaSize:enumMediaSize[0],width:0,height:0}});if("AutoSelect"==c.mediaSize)var d=createFeatureNodePT(a,b,addPrivatePrefix("PagePrintMediaSize")),d=createOptionNodePT(a,d,addPskPrefix(c.mediaSize));
else if("CustomMediaSize"==c.mediaSize)checkParameterInitNode(b,addPrivatePrefix("PagePrintMediaSizeMediaSizeWidth")),checkParameterInitNode(b,addPrivatePrefix("PagePrintMediaSizeMediaSizeHeight")),d=createFeatureNodePT(a,b,addPrivatePrefix("PagePrintMediaSize")),d=createOptionNodePT(a,d,addPskPrefix(c.mediaSize)),createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("PagePrintMediaSizeWidth"),addPrivatePrefix("PagePrintMediaSizeMediaSizeWidth")),createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("PagePrintMediaSizeHeight"),
addPrivatePrefix("PagePrintMediaSizeMediaSizeHeight")),createParamterInitIntNodePT(a,b,addPrivatePrefix("PagePrintMediaSizeMediaSizeWidth"),c.width),createParamterInitIntNodePT(a,b,addPrivatePrefix("PagePrintMediaSizeMediaSizeHeight"),c.height);else{d=createFeatureNodePT(a,b,addPrivatePrefix("PagePrintMediaSize"));switch(c.mediaSize){case "Oficio2":case "PRC8K":case "PRC16K":case "Foolscap":case "JapanYou2Envelope":case "Stockform":case "LedgerFull":case "Younaga3":d=createOptionNodePT(a,d,addPrivatePrefix(c.mediaSize));
break;default:d=createOptionNodePT(a,d,addPskPrefix(c.mediaSize))}createScoredPropertyWithValueNodePT(a,d,addPrivatePrefix("PagePrintMediaSizeWidth"),c.width,addXsdPrefix("integer"));createScoredPropertyWithValueNodePT(a,d,addPrivatePrefix("PagePrintMediaSizeHeight"),c.height,addXsdPrefix("integer"))}}function completePC_CustomPaperList(a,b){createParameterDefStringNodePCWithOptional(a,b,addPrivatePrefix("PageCustomPaperList"),"",0,65535,"characters","xsd:string")}
function convertPTToDevMode_CustomPaperList(a,b,c){var d=getParameterInitStringValuePT(b,addPrivatePrefix("PageCustomPaperList"));if(null!=d){var e=(d.length+1>>1)+1;c.privateFeatureWriter.write(featuresEnum.CustomPaperList,e,function(a){a.length==e&&(a[0]=d.length,asciiStringToBin(d,a,1,d.length))})}}
function convertDevModeToPT_CustomPaperList(a,b,c){checkParameterInitNode(b,addPrivatePrefix("PageCustomPaperList"));c=c.privateFeatureReader.read(featuresEnum.CustomPaperList,function(a){return 0<a.length&&a.length==(a[0]+1>>1)+1?asciiBinToString(a,1,a[0]):null},function(){return""});null!=c&&createParamterInitStringNodePT(a,b,addPrivatePrefix("PageCustomPaperList"),c)}
function completePC_SelectedPrintSize(a,b){createParameterDefStringNodePCWithOptional(a,b,addPrivatePrefix("PageSelectedPrintSize"),"",0,65535,"characters","xsd:string")}function convertPTToDevMode_SelectedPrintSize(a,b,c){a=getParameterInitStringValuePT(b,addPrivatePrefix("PageSelectedPrintSize"));if(null!=a){var d=base64StringToArray(a);c.privateFeatureWriter.write(featuresEnum.SelectedPrintSize,d.length+1,function(a){a.length==d.length+1&&(a[0]=d.length,binCopy(d,a,1,d.length))})}}
function convertDevModeToPT_SelectedPrintSize(a,b,c){checkParameterInitNode(b,addPrivatePrefix("PageSelectedPrintSize"));c=c.privateFeatureReader.read(featuresEnum.SelectedPrintSize,function(a){return 0<a.length&&a.length==a[0]+1?arraySectionToBase64String(a,1,a[0]):null},function(){return""});null!=c&&createParamterInitStringNodePT(a,b,addPrivatePrefix("PageSelectedPrintSize"),c)}
function completePC_JobOutputBin(a,b,c){b=getOptionListFromPC(b,addPskPrefix("JobOutputBin"));for(var d="FaceDown",e=0;e<b.length;e++){for(var f=0;f<c.OutputBins.length;f++)if(b[e].attributes.getNamedItem("name").value.split(":")[1]==c.OutputBins[f].Value){var h="FaceDown";if(2==c.OutputBins[f].Direction||3==c.OutputBins[f].Direction)h="FaceUp";0!=c.OutputBins[f].Mailbox&&(d=h);createPropertyNodePC(a,b[e],addPskPrefix("FeedFace"),addPskPrefix(h),"xsd:QName");break}f>=c.OutputBins.length&&createPropertyNodePC(a,
b[e],addPskPrefix("FeedFace"),addPskPrefix(d),"xsd:QName")}}var enumPageOrder=["Standard","Reverse"];function completePC_JobPageOrder(a,b){var c=createFeatureNodePC(a,b,addPskPrefix("JobPageOrder"),"Page order");createOptionNodePC(a,c,addPskPrefix("Standard"),addPskPrefix("None"));createOptionNodePC(a,c,addPskPrefix("Reverse"),addPskPrefix("None"))}
function convertPTToDevMode_JobPageOrder(a,b,c){var d=getOptionFromPT(b,addPskPrefix("JobPageOrder"));null!=d&&c.publicFeatureWriter.write(featuresEnum.PageOrder,1,function(a){if(1==a.length)for(var b=a[0]=0;b<enumPageOrder.length;b++)if(enumPageOrder[b]==d){a[0]=b;break}})}
function convertDevModeToPT_JobPageOrder(a,b,c){checkFeatureNode(b,addPskPrefix("JobPageOrder"));c=c.publicFeatureReader.read(featuresEnum.PageOrder,function(a){return 1==a.length?enumPageOrder[a[0]<enumPageOrder.length?a[0]:0]:null},function(){return enumPageOrder[0]});b=createFeatureNodePT(a,b,addPskPrefix("JobPageOrder"));createOptionNodePT(a,b,addPskPrefix(c))}
function completePC_PageOrientationReverse(a,b){var c=createFeatureNodePC(a,b,addPrivatePrefix("PageOrientationReverse"),"Reverse Orientation");createOptionNodePC(a,c,addPskPrefix("Off"),addPskPrefix("None"));createOptionNodePC(a,c,addPskPrefix("On"),addPskPrefix("None"))}
function convertPTToDevMode_PageOrientationReverse(a,b,c){var d=getOptionFromPT(b,addPrivatePrefix("PageOrientationReverse"));null!=d&&c.privateFeatureWriter.write(featuresEnum.PageOrientationReverse,1,function(a){if(1==a.length)for(var b=a[0]=0;b<enumOffOn.length;b++)if(enumOffOn[b]==d){a[0]=b;break}})}
function convertDevModeToPT_PageOrientationReverse(a,b,c){checkFeatureNode(b,addPrivatePrefix("PageOrientationReverse"));c=c.privateFeatureReader.read(featuresEnum.PageOrientationReverse,function(a){return 1==a.length?enumOffOn[a[0]<enumOffOn.length?a[0]:0]:null},function(){return enumOffOn[0]});b=createFeatureNodePT(a,b,addPrivatePrefix("PageOrientationReverse"));createOptionNodePT(a,b,addPskPrefix(c))}
function completePC_CarbonCopy(a,b,c){var d=createFeatureNodePC(a,b,addPrivatePrefix("JobCarbonCopy"),"Carbon Copy");createOptionNodePC(a,d,addPskPrefix("Off"),addPskPrefix("None"));d=createOptionNodePC(a,d,addPskPrefix("On"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("OriginalCopyCount"),addPrivatePrefix("JobCarbonCopyOriginalCopyCount"));var e;for(e=1;16>=e;e++)10>e?(createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("CarbonCopy0"+e+"CopyCount"),addPrivatePrefix("JobCarbonCopy0"+
e+"CopyCount")),createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("CarbonCopy0"+e+"MediaType"),addPrivatePrefix("JobCarbonCopy0"+e+"MediaType")),createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("CarbonCopy0"+e+"MediaSource"),addPrivatePrefix("JobCarbonCopy0"+e+"MediaSource"))):(createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("CarbonCopy"+e+"CopyCount"),addPrivatePrefix("JobCarbonCopy"+e+"CopyCount")),createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("CarbonCopy"+
e+"MediaType"),addPrivatePrefix("JobCarbonCopy"+e+"MediaType")),createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("CarbonCopy"+e+"MediaSource"),addPrivatePrefix("JobCarbonCopy"+e+"MediaSource")));createParameterDefIntNodePC(a,b,addPrivatePrefix("JobCarbonCopyOriginalCopyCount"),1,1,c.maxCopy,"copies","xsd:string");for(e=1;16>=e;e++)10>e?(createParameterDefIntNodePC(a,b,addPrivatePrefix("JobCarbonCopy0"+e+"CopyCount"),0,0,c.maxCopy,"copies","xsd:string"),createParameterDefStringNodePC(a,
b,addPrivatePrefix("JobCarbonCopy0"+e+"MediaType"),0,1,32,"characters","xsd:string"),createParameterDefStringNodePC(a,b,addPrivatePrefix("JobCarbonCopy0"+e+"MediaSource"),0,1,32,"characters","xsd:string")):(createParameterDefIntNodePC(a,b,addPrivatePrefix("JobCarbonCopy"+e+"CopyCount"),0,0,c.maxCopy,"copies","xsd:string"),createParameterDefStringNodePC(a,b,addPrivatePrefix("JobCarbonCopy"+e+"MediaType"),0,1,32,"characters","xsd:string"),createParameterDefStringNodePC(a,b,addPrivatePrefix("JobCarbonCopy"+
e+"MediaSource"),0,1,32,"characters","xsd:string"))}
function convertPTToDevMode_CarbonCopy(a,b,c){var d=getOptionFromPT(b,addPrivatePrefix("JobCarbonCopy"));if(null!=d){var e=0,f=[];if("On"==d){e=getParameterInitIntValuePT(b,addPrivatePrefix("JobCarbonCopyOriginalCopyCount"));a=1;for(var h=0;16>=a;a++,h++){var k,g,l;10>a?(k=getParameterInitIntValuePT(b,addPrivatePrefix("JobCarbonCopy0"+a+"CopyCount")),g=getParameterInitStringValuePT(b,addPrivatePrefix("JobCarbonCopy0"+a+"MediaType")),l=getParameterInitStringValuePT(b,addPrivatePrefix("JobCarbonCopy0"+
a+"MediaSource"))):(copyCountValue=getParameterInitIntValuePT(b,addPrivatePrefix("JobCarbonCopy"+a+"CopyCount")),g=getParameterInitStringValuePT(b,addPrivatePrefix("JobCarbonCopy"+a+"MediaType")),l=getParameterInitStringValuePT(b,addPrivatePrefix("JobCarbonCopy"+a+"MediaSource")));f[h]={count:k,type:g,source:l}}}c.privateFeatureWriter.write(featuresEnum.CarbonCopy,34,function(a){if(34==a.length){for(var b=0;b<a.length;b++)a[b]=0;for(b=0;b<enumOffOn.length;b++)if(enumOffOn[b]==d){a[0]=b;break}null!=
e&&(a[1]=e);for(b=0;b<f.length;b++){a[2+2*b]=f[b].count;for(var c=0;c<enumMediaType.length;c++)if(enumMediaType[c]==f[b].type){a[3+2*b]|=c;break}for(c=0;c<enumMediaSource.length;c++)if(enumMediaSource[c]==f[b].source){a[3+2*b]|=c<<8;break}}}})}}
function convertDevModeToPT_CarbonCopy(a,b,c){checkFeatureNode(b,addPrivatePrefix("JobCarbonCopy"));checkParameterInitNode(b,addPrivatePrefix("JobCarbonCopyOriginalCopyCount"));for(var d=1;16>=d;d++)10>d?(checkParameterInitNode(b,addPrivatePrefix("JobCarbonCopy0"+d+"CopyCount")),checkParameterInitNode(b,addPrivatePrefix("JobCarbonCopy0"+d+"MediaType")),checkParameterInitNode(b,addPrivatePrefix("JobCarbonCopy0"+d+"MediaSource"))):(checkParameterInitNode(b,addPrivatePrefix("JobCarbonCopy"+d+"CopyCount")),
checkParameterInitNode(b,addPrivatePrefix("JobCarbonCopy"+d+"MediaType")),checkParameterInitNode(b,addPrivatePrefix("JobCarbonCopy"+d+"MediaSource")));c=c.privateFeatureReader.read(featuresEnum.CarbonCopy,function(a){if(34==a.length){for(var b={carbonCopy:enumOffOn[a[0]<enumOffOn.length?a[0]:0],originalCopyCount:a[1],copies:[]},c=0;16>c;c++)b.copies[c]={count:a[2+2*c],type:enumMediaType[(a[3+2*c]&255)<enumMediaType.length?a[3+2*c]&255:0],source:enumMediaSource[a[3+2*c]>>8<enumMediaSource.length?a[3+
2*c]>>8:0]};return b}return null},function(){for(var a={carbonCopy:enumOffOn[0],originalCopyCount:0,copies:[]},b=0;16>b;b++)a.copies[b]={count:0,type:enumMediaType[0],source:enumMediaSource[0]};return a});var d=createFeatureNodePT(a,b,addPrivatePrefix("JobCarbonCopy")),e=createOptionNodePT(a,d,addPskPrefix(c.carbonCopy));if("On"==c.carbonCopy)for(createScoredPropertyWithParameterRefPT(a,e,addPrivatePrefix("OriginalCopyCount"),addPrivatePrefix("JobCarbonCopyOriginalCopyCount")),createParamterInitIntNodePT(a,
b,addPrivatePrefix("JobCarbonCopyOriginalCopyCount"),c.originalCopyCount),d=1,j=0;16>=d;d++,j++)10>d?(createScoredPropertyWithParameterRefPT(a,e,addPrivatePrefix("CarbonCopy0"+d+"CopyCount"),addPrivatePrefix("JobCarbonCopy0"+d+"CopyCount")),createParamterInitIntNodePT(a,b,addPrivatePrefix("JobCarbonCopy0"+d+"CopyCount"),c.copies[j].count),createScoredPropertyWithParameterRefPT(a,e,addPrivatePrefix("CarbonCopy0"+d+"MediaType"),addPrivatePrefix("JobCarbonCopy0"+d+"MediaType")),createParamterInitStringNodePT(a,
b,addPrivatePrefix("JobCarbonCopy0"+d+"MediaType"),c.copies[j].type),createScoredPropertyWithParameterRefPT(a,e,addPrivatePrefix("CarbonCopy0"+d+"MediaSource"),addPrivatePrefix("JobCarbonCopy0"+d+"MediaSource")),createParamterInitStringNodePT(a,b,addPrivatePrefix("JobCarbonCopy0"+d+"MediaSource"),c.copies[j].source)):(createScoredPropertyWithParameterRefPT(a,e,addPrivatePrefix("CarbonCopy"+d+"CopyCount"),addPrivatePrefix("JobCarbonCopy"+d+"CopyCount")),createParamterInitIntNodePT(a,b,addPrivatePrefix("JobCarbonCopy"+
d+"CopyCount"),c.copies[j].count),createScoredPropertyWithParameterRefPT(a,e,addPrivatePrefix("CarbonCopy"+d+"MediaType"),addPrivatePrefix("JobCarbonCopy"+d+"MediaType")),createParamterInitStringNodePT(a,b,addPrivatePrefix("JobCarbonCopy"+d+"MediaType"),c.copies[j].type),createScoredPropertyWithParameterRefPT(a,e,addPrivatePrefix("CarbonCopy"+d+"MediaSource"),addPrivatePrefix("JobCarbonCopy"+d+"MediaSource")),createParamterInitStringNodePT(a,b,addPrivatePrefix("JobCarbonCopy"+d+"MediaSource"),c.copies[j].source))}
var enumSaveAndPrint=["Print","Save","SaveAndPrint"],enumSavePathType=["File","Folder"],enumSaveNamingMode=["None","AppendDateTime"];
function completePC_JobSaveAndPrint(a,b){var c=createFeatureNodePC(a,b,addPrivatePrefix("JobSaveAndPrint"),"Save and Print"),d;createOptionNodePC(a,c,addPrivatePrefix("Print"),addPskPrefix("None"));d=createOptionNodePC(a,c,addPrivatePrefix("Save"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("SavePathType"),addPrivatePrefix("JobSavePathType"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("SavePath"),addPrivatePrefix("JobSavePath"));createScoredPropertyWithParameterRefPC(a,
d,addPrivatePrefix("NamingMode"),addPrivatePrefix("JobSaveNamingMode"));d=createOptionNodePC(a,c,addPrivatePrefix("SaveAndPrint"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("SavePathType"),addPrivatePrefix("JobSavePathType"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("SavePath"),addPrivatePrefix("JobSavePath"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("NamingMode"),addPrivatePrefix("JobSaveNamingMode"));createParameterDefStringNodePC(a,
b,addPrivatePrefix("JobSavePathType"),"File",1,32,"characters","xsd:string");createParameterDefStringNodePC(a,b,addPrivatePrefix("JobSavePath"),"0",1,1387,"characters","xsd:string");createParameterDefStringNodePC(a,b,addPrivatePrefix("JobSaveNamingMode"),"None",1,32,"characters","xsd:string")}
function convertPTToDevMode_JobSaveAndPrint(a,b,c){var d=getOptionFromPT(b,addPrivatePrefix("JobSaveAndPrint"));if(null!=d){if("Print"!=d){var e=getParameterInitStringValuePT(b,addPrivatePrefix("JobSavePathType"));a=getParameterInitStringValuePT(b,addPrivatePrefix("JobSavePath"));var f=getParameterInitStringValuePT(b,addPrivatePrefix("JobSaveNamingMode")),h=null;null!=a&&(h=base64StringToArray(a))}var k=2+(null!=h?h.length:0);c.privateFeatureWriter.write(featuresEnum.SaveAndPrint,k,function(a){if(a.length==
k){for(var b=0;b<a.length;b++)a[b]=0;for(b=0;b<enumSaveAndPrint.length;b++)if(enumSaveAndPrint[b]==d){a[0]|=b&255;break}if(null!=e)for(b=0;b<enumSavePathType.length;b++)if(enumSavePathType[b]==e){a[0]|=b<<12&61440;break}if(null!=f)for(b=0;b<enumSaveNamingMode.length;b++)if(enumSaveNamingMode[b]==f){a[0]|=b<<8&3840;break}null!=h&&(a[1]=h.length,binCopy(h,a,2,h.length))}})}}
function convertDevModeToPT_JobSaveAndPrint(a,b,c){checkFeatureNode(b,addPrivatePrefix("JobSaveAndPrint"));checkParameterInitNode(b,addPrivatePrefix("JobSavePathType"));checkParameterInitNode(b,addPrivatePrefix("JobSavePath"));checkParameterInitNode(b,addPrivatePrefix("JobSaveNamingMode"));c=c.privateFeatureReader.read(featuresEnum.SaveAndPrint,function(a){return 2<=a.length&&a.length==2+a[1]?{saveAndPrint:enumSaveAndPrint[(a[0]&255)<enumSaveAndPrint.length?a[0]&255:0],savePathType:enumSavePathType[(a[0]>>
12&15)<enumSavePathType.length?a[0]>>12&15:0],savePath:arraySectionToBase64String(a,2,a[1]),saveNamingMode:enumSaveNamingMode[(a[0]>>8&15)<enumSaveNamingMode.length?a[0]>>8&15:0]}:null},function(){return{saveAndPrint:enumSaveAndPrint[0],savePathType:enumSavePathType[0],savePath:"",saveNamingMode:enumSaveNamingMode[0]}});var d=createFeatureNodePT(a,b,addPrivatePrefix("JobSaveAndPrint")),d=createOptionNodePT(a,d,addPrivatePrefix(c.saveAndPrint));"Print"!=c.saveAndPrint&&(createScoredPropertyWithParameterRefPT(a,
d,addPrivatePrefix("SavePathType"),addPrivatePrefix("JobSavePathType")),createScoredPropertyWithParameterRefPT(a,d,addPrivatePrefix("SavePath"),addPrivatePrefix("JobSavePath")),createScoredPropertyWithParameterRefPT(a,d,addPrivatePrefix("NamingMode"),addPrivatePrefix("JobSaveNamingMode")),createParamterInitStringNodePT(a,b,addPrivatePrefix("JobSavePathType"),c.savePathType),createParamterInitStringNodePT(a,b,addPrivatePrefix("JobSavePath"),c.savePath),createParamterInitStringNodePT(a,b,addPrivatePrefix("JobSaveNamingMode"),
c.saveNamingMode))}function completePC_Profile(a,b){createPropertyNodePC(a,b,addPrivatePrefix("JobProfileName"),"","xsd:string")}function convertPTToDevMode_Profile(a,b,c){a=getPropertyStringValuePT(b,addPrivatePrefix("JobProfileName"));if(null!=a){var d=base64StringToArray(a);c.privateFeatureWriter.write(featuresEnum.Profile,d.length+1,function(a){a.length==d.length+1&&(a[0]=d.length,binCopy(d,a,1,d.length))})}}
function convertDevModeToPT_Profile(a,b,c){checkPropertyNode(b,addPrivatePrefix("JobProfileName"));c=c.privateFeatureReader.read(featuresEnum.Profile,function(a){return 0<a.length&&a.length==a[0]+1?arraySectionToBase64String(a,1,a[0]):null},function(){return""});null!=c&&createPropertyNodePT(a,b,addPrivatePrefix("JobProfileName"),c,"xsd:string")}
function completePC_SendTelemetry(a,b){var c=createFeatureNodePC(a,b,addPrivatePrefix("JobSendTelemetry"),"Send Telemetry");createOptionNodePC(a,c,addPskPrefix("Off"),addPskPrefix("None"));createOptionNodePC(a,c,addPskPrefix("On"),addPskPrefix("None"))}
function convertPTToDevMode_SendTelemetry(a,b,c,d){var e=null;null!=d&&(e=getBoolFromPropertyBag(d,"SendTelemetry"));null!=e&&c.privateFeatureWriter.write(featuresEnum.SendTelemetry,1,function(a){if(1==a.length)for(var b=a[0]=0;b<enumOffOn.length;b++)if(enumOffOn[b]==e){a[0]=b;break}})}
function convertDevModeToPT_SendTelemetry(a,b,c,d){checkFeatureNode(b,addPrivatePrefix("JobSendTelemetry"));var e=null;null!=d?(e=getBoolFromPropertyBag(d,"SendTelemetry"),null!=e&&(1==e?e=enumOffOn[1]:0==e&&(e=enumOffOn[0]))):e=c.privateFeatureReader.read(featuresEnum.SendTelemetry,function(a){return 1==a.length?enumOffOn[a[0]<enumOffOn.length?a[0]:0]:null},function(){return null});null!=e&&(b=createFeatureNodePT(a,b,addPrivatePrefix("JobSendTelemetry")),createOptionNodePT(a,b,addPskPrefix(e)))}
var enumBindAllDocuments=["None","BindLeft","Booklet"],enumBindAllDocumentsFeedingEdge="None BindLeft BindRight BindTop BindBottom MixedFeeding".split(" "),enumOrientation=["Portrait","Landscape"],enumBindingEdgeBooklet=["Off","BindLeft","BindRight"];
function completePC_JobBindAllDocuments(a,b,c){var d=createFeatureNodePC(a,b,addPskPrefix("JobBindAllDocuments"),"JobBindAllDocuments"),e;createOptionNodePC(a,d,addPskPrefix("None"),addPskPrefix("None"));e=createOptionNodePC(a,d,addPskPrefix("BindLeft"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,e,addPskPrefix("BindingGutter"),addPskPrefix("JobBindAllDocumentsGutter"));createScoredPropertyWithParameterRefPC(a,e,addPrivatePrefix("BindingGutterY"),addPrivatePrefix("JobBindAllDocumentsGutterY"));
createScoredPropertyWithParameterRefPC(a,e,addPrivatePrefix("ScaleToFit"),addPrivatePrefix("JobScaleToFit"));e=createOptionNodePC(a,d,addPskPrefix("Booklet"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,e,addPskPrefix("BindingGutter"),addPskPrefix("JobBindAllDocumentsGutter"));createScoredPropertyWithParameterRefPC(a,e,addPrivatePrefix("BookletBinding"),addPrivatePrefix("JobBindAllDocumentsBookletBinding"));d=createFeatureNodePC(a,d,addPrivatePrefix("JobBindAllDocumentsFeedingEdge"),
"Feeding Edge");createOptionNodePC(a,d,addPskPrefix("None"),addPskPrefix("None"));e=createOptionNodePC(a,d,addPskPrefix("BindLeft"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,e,addPskPrefix("BindingGutter"),addPskPrefix("JobBindAllDocumentsGutter"));createScoredPropertyWithParameterRefPC(a,e,addPrivatePrefix("BindingGutterY"),addPrivatePrefix("JobBindAllDocumentsGutterY"));createScoredPropertyWithParameterRefPC(a,e,addPrivatePrefix("BaseOrientation"),addPrivatePrefix("JobBindAllDocumentsBaseOrientation"));
createScoredPropertyWithParameterRefPC(a,e,addPrivatePrefix("ScaleToFit"),addPrivatePrefix("JobScaleToFit"));e=createOptionNodePC(a,d,addPskPrefix("BindRight"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,e,addPskPrefix("BindingGutter"),addPskPrefix("JobBindAllDocumentsGutter"));createScoredPropertyWithParameterRefPC(a,e,addPrivatePrefix("BindingGutterY"),addPrivatePrefix("JobBindAllDocumentsGutterY"));createScoredPropertyWithParameterRefPC(a,e,addPrivatePrefix("BaseOrientation"),
addPrivatePrefix("JobBindAllDocumentsBaseOrientation"));createScoredPropertyWithParameterRefPC(a,e,addPrivatePrefix("ScaleToFit"),addPrivatePrefix("JobScaleToFit"));e=createOptionNodePC(a,d,addPskPrefix("BindTop"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,e,addPskPrefix("BindingGutter"),addPskPrefix("JobBindAllDocumentsGutter"));createScoredPropertyWithParameterRefPC(a,e,addPrivatePrefix("BindingGutterY"),addPrivatePrefix("JobBindAllDocumentsGutterY"));createScoredPropertyWithParameterRefPC(a,
e,addPrivatePrefix("BaseOrientation"),addPrivatePrefix("JobBindAllDocumentsBaseOrientation"));createScoredPropertyWithParameterRefPC(a,e,addPrivatePrefix("ScaleToFit"),addPrivatePrefix("JobScaleToFit"));e=createOptionNodePC(a,d,addPskPrefix("BindBottom"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,e,addPskPrefix("BindingGutter"),addPskPrefix("JobBindAllDocumentsGutter"));createScoredPropertyWithParameterRefPC(a,e,addPrivatePrefix("BindingGutterY"),addPrivatePrefix("JobBindAllDocumentsGutterY"));
createScoredPropertyWithParameterRefPC(a,e,addPrivatePrefix("BaseOrientation"),addPrivatePrefix("JobBindAllDocumentsBaseOrientation"));createScoredPropertyWithParameterRefPC(a,e,addPrivatePrefix("ScaleToFit"),addPrivatePrefix("JobScaleToFit"));e=createOptionNodePC(a,d,addPrivatePrefix("MixedFeeding"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,e,addPskPrefix("BindingGutter"),addPskPrefix("JobBindAllDocumentsGutter"));createScoredPropertyWithParameterRefPC(a,e,addPrivatePrefix("BindingGutterY"),
addPrivatePrefix("JobBindAllDocumentsGutterY"));createScoredPropertyWithParameterRefPC(a,e,addPrivatePrefix("BaseOrientation"),addPrivatePrefix("JobBindAllDocumentsBaseOrientation"));createScoredPropertyWithParameterRefPC(a,e,addPrivatePrefix("BindingSmallPaperPortrait"),addPrivatePrefix("JobBindAllDocumentsSP"));createScoredPropertyWithParameterRefPC(a,e,addPrivatePrefix("BindingSmallPaperLandscape"),addPrivatePrefix("JobBindAllDocumentsSL"));createScoredPropertyWithParameterRefPC(a,e,addPrivatePrefix("BindingLargePaperPortrait"),
addPrivatePrefix("JobBindAllDocumentsLP"));createScoredPropertyWithParameterRefPC(a,e,addPrivatePrefix("BindingLargePaperLandscape"),addPrivatePrefix("JobBindAllDocumentsLL"));createScoredPropertyWithParameterRefPC(a,e,addPrivatePrefix("ScaleToFit"),addPrivatePrefix("JobScaleToFit"));createParameterDefIntNodeWithCustomeMultiplePC(a,b,addPskPrefix("JobBindAllDocumentsGutter"),5E3,5E3,25400,1,"microns","xsd:string");createParameterDefIntNodeWithCustomeMultiplePC(a,b,addPrivatePrefix("JobBindAllDocumentsGutterY"),
5E3,5E3,25400,1,"microns","xsd:string");createParameterDefStringNodePC(a,b,addPrivatePrefix("JobBindAllDocumentsBaseOrientation"),"Portrait",1,32,"characters","xsd:string");c.isA3Machine?(createParameterDefStringNodePC(a,b,addPrivatePrefix("JobBindAllDocumentsSP"),"BindLeft",1,32,"characters","xsd:string"),createParameterDefStringNodePC(a,b,addPrivatePrefix("JobBindAllDocumentsSL"),"BindTop",1,32,"characters","xsd:string")):(createParameterDefStringNodePC(a,b,addPrivatePrefix("JobBindAllDocumentsSP"),
"BindTop",1,32,"characters","xsd:string"),createParameterDefStringNodePC(a,b,addPrivatePrefix("JobBindAllDocumentsSL"),"BindLeft",1,32,"characters","xsd:string"));createParameterDefStringNodePC(a,b,addPrivatePrefix("JobBindAllDocumentsLP"),"BindTop",1,32,"characters","xsd:string");createParameterDefStringNodePC(a,b,addPrivatePrefix("JobBindAllDocumentsLL"),"BindLeft",1,32,"characters","xsd:string");createParameterDefStringNodePC(a,b,addPrivatePrefix("JobBindAllDocumentsBookletBinding"),"BindLeft",
1,32,"characters","xsd:string");createParameterDefStringNodePC(a,b,addPrivatePrefix("JobScaleToFit"),"True",4,5,"characters","xsd:string")}
function convertPTToDevMode_JobBindAllDocuments(a,b,c){a=getFeatureFromPT(b,addPskPrefix("JobBindAllDocuments"));var d=getOptionFromPT(b,addPskPrefix("JobBindAllDocuments"));if(null!=a&&null!=d){var e=!1,f=null,h=0,k=0,g=null,l=null,p=null,n=null,m=null,w=null;"BindLeft"==d?(h=getParameterInitIntValuePT(b,addPskPrefix("JobBindAllDocumentsGutter")),k=getParameterInitIntValuePT(b,addPrivatePrefix("JobBindAllDocumentsGutterY")),e=getParameterInitStringValuePT(b,addPrivatePrefix("JobScaleToFit"))):"Booklet"==
d&&(h=getParameterInitIntValuePT(b,addPskPrefix("JobBindAllDocumentsGutter")),f=getParameterInitStringValuePT(b,addPrivatePrefix("JobBindAllDocumentsBookletBinding")));g=getOptionFromPT(a,addPrivatePrefix("JobBindAllDocumentsFeedingEdge"));null!=g&&("BindLeft"==g||"BindRight"==g||"BindTop"==g||"BindBottom"==g?(h=getParameterInitIntValuePT(b,addPskPrefix("JobBindAllDocumentsGutter")),k=getParameterInitIntValuePT(b,addPrivatePrefix("JobBindAllDocumentsGutterY")),l=getParameterInitStringValuePT(b,addPrivatePrefix("JobBindAllDocumentsBaseOrientation")),
e=getParameterInitStringValuePT(b,addPrivatePrefix("JobScaleToFit"))):"MixedFeeding"==g&&(h=getParameterInitIntValuePT(b,addPskPrefix("JobBindAllDocumentsGutter")),k=getParameterInitIntValuePT(b,addPrivatePrefix("JobBindAllDocumentsGutterY")),l=getParameterInitStringValuePT(b,addPrivatePrefix("JobBindAllDocumentsBaseOrientation")),p=getParameterInitStringValuePT(b,addPrivatePrefix("JobBindAllDocumentsSP")),n=getParameterInitStringValuePT(b,addPrivatePrefix("JobBindAllDocumentsSL")),m=getParameterInitStringValuePT(b,
addPrivatePrefix("JobBindAllDocumentsLP")),w=getParameterInitStringValuePT(b,addPrivatePrefix("JobBindAllDocumentsLL")),e=getParameterInitStringValuePT(b,addPrivatePrefix("JobScaleToFit"))),c.publicFeatureWriter.write(featuresEnum.Binding,5,function(a){if(5==a.length){a[0]=0;a[1]=0;a[2]=0;a[3]=0;a[4]=0;if(null!=d)for(var b=0;b<enumBindAllDocuments.length;b++)if(enumBindAllDocuments[b]==d){a[0]|=b;break}if(null==e||"True"==e)a[0]|=4096;if(null!=f)for(b=0;b<enumBindingEdgeBooklet.length;b++)if(enumBindingEdgeBooklet[b]==
f){a[0]|=b<<8;break}null!=h&&(a[1]=h);null!=k&&(a[2]=k);if(null!=g)for(b=0;b<enumBindAllDocumentsFeedingEdge.length;b++)if(enumBindAllDocumentsFeedingEdge[b]==g){a[3]|=b;break}if(null!=l)for(b=0;b<enumOrientation.length;b++)if(enumOrientation[b]==l){a[3]|=b<<8;break}if(null!=p)for(b=0;b<enumBindAllDocumentsFeedingEdge.length;b++)if(enumBindAllDocumentsFeedingEdge[b]==p){a[4]|=b<<4;break}if(null!=n)for(b=0;b<enumBindAllDocumentsFeedingEdge.length;b++)if(enumBindAllDocumentsFeedingEdge[b]==n){a[4]|=
b;break}if(null!=m)for(b=0;b<enumBindAllDocumentsFeedingEdge.length;b++)if(enumBindAllDocumentsFeedingEdge[b]==m){a[4]|=b<<12;break}if(null!=w)for(b=0;b<enumBindAllDocumentsFeedingEdge.length;b++)if(enumBindAllDocumentsFeedingEdge[b]==w){a[4]|=b<<8;break}}}))}}
function convertDevModeToPT_JobBindAllDocuments(a,b,c){checkFeatureNode(b,addPskPrefix("JobBindAllDocuments"));checkParameterInitNode(b,addPskPrefix("JobBindAllDocumentsGutter"));checkParameterInitNode(b,addPrivatePrefix("JobBindAllDocumentsGutterY"));checkParameterInitNode(b,addPrivatePrefix("JobBindAllDocumentsBaseOrientation"));checkParameterInitNode(b,addPrivatePrefix("JobBindAllDocumentsSP"));checkParameterInitNode(b,addPrivatePrefix("JobBindAllDocumentsSL"));checkParameterInitNode(b,addPrivatePrefix("JobBindAllDocumentsLP"));
checkParameterInitNode(b,addPrivatePrefix("JobBindAllDocumentsLL"));checkParameterInitNode(b,addPrivatePrefix("JobBindAllDocumentsBookletBinding"));checkParameterInitNode(b,addPrivatePrefix("JobScaleToFit"));var d=!1,e=!1,f=!1,h=!1;c=c.publicFeatureReader.read(featuresEnum.Binding,function(a){return 5==a.length?{bindAllDocuments:enumBindAllDocuments[(a[0]&255)<enumBindAllDocuments.length?a[0]&255:0],scaleToFit:0==(a[0]&61440)?"False":"True",bookletBinding:enumBindingEdgeBooklet[(a[0]>>8&15)<enumBindingEdgeBooklet.length?
a[0]>>8&15:0],gutterX:a[1],gutterY:a[2],feedingEdge:enumBindAllDocumentsFeedingEdge[(a[3]&255)<enumBindAllDocumentsFeedingEdge.length?a[3]&255:0],baseOrientation:enumOrientation[(a[3]>>8&15)<enumOrientation.length?a[3]>>8&15:0],feedingEdgeSmallPortrait:enumBindAllDocumentsFeedingEdge[(a[4]>>4&15)<enumBindAllDocumentsFeedingEdge.length-1?a[4]>>4&15:0],feedingEdgeSmallLandscape:enumBindAllDocumentsFeedingEdge[(a[4]&15)<enumBindAllDocumentsFeedingEdge.length-1?a[4]&15:0],feedingEdgeLargePortrait:enumBindAllDocumentsFeedingEdge[(a[4]>>
12&15)<enumBindAllDocumentsFeedingEdge.length-1?a[4]>>12&15:0],feedingEdgeLargeLandscape:enumBindAllDocumentsFeedingEdge[(a[4]>>8&15)<enumBindAllDocumentsFeedingEdge.length-1?a[4]>>8&15:0]}:null},function(){return{bindAllDocuments:enumBindAllDocuments[0],scaleToFit:"True",bookletBinding:enumBindingEdgeBooklet[0],gutterX:0,gutterY:0,feedingEdge:enumBindAllDocumentsFeedingEdge[0],baseOrientation:enumOrientation[0],feedingEdgeSmallPortrait:enumBindAllDocumentsFeedingEdge[0],feedingEdgeSmallLandscape:enumBindAllDocumentsFeedingEdge[0],
feedingEdgeLargePortrait:enumBindAllDocumentsFeedingEdge[0],feedingEdgeLargeLandscape:enumBindAllDocumentsFeedingEdge[0]}});var k=createFeatureNodePT(a,b,addPskPrefix("JobBindAllDocuments")),g=createOptionNodePT(a,k,addPskPrefix(c.bindAllDocuments));"BindLeft"==c.bindAllDocuments?(createScoredPropertyWithParameterRefPT(a,g,addPskPrefix("BindingGutter"),addPskPrefix("JobBindAllDocumentsGutter")),createScoredPropertyWithParameterRefPT(a,g,addPrivatePrefix("BindingGutterY"),addPrivatePrefix("JobBindAllDocumentsGutterY")),
createScoredPropertyWithParameterRefPT(a,g,addPrivatePrefix("ScaleToFit"),addPrivatePrefix("JobScaleToFit")),h=e=d=!0):"Booklet"==c.bindAllDocuments&&(createScoredPropertyWithParameterRefPT(a,g,addPskPrefix("BindingGutter"),addPskPrefix("JobBindAllDocumentsGutter")),createScoredPropertyWithParameterRefPT(a,g,addPrivatePrefix("BookletBinding"),addPrivatePrefix("JobBindAllDocumentsBookletBinding")),d=!0);k=createFeatureNodePT(a,k,addPrivatePrefix("JobBindAllDocumentsFeedingEdge"));"None"==c.feedingEdge?
g=createOptionNodePT(a,k,addPskPrefix(c.feedingEdge)):("MixedFeeding"==c.feedingEdge?(g=createOptionNodePT(a,k,addPrivatePrefix(c.feedingEdge)),createScoredPropertyWithParameterRefPT(a,g,addPskPrefix("BindingGutter"),addPskPrefix("JobBindAllDocumentsGutter")),createScoredPropertyWithParameterRefPT(a,g,addPrivatePrefix("BindingGutterY"),addPrivatePrefix("JobBindAllDocumentsGutterY")),createScoredPropertyWithParameterRefPT(a,g,addPrivatePrefix("BaseOrientation"),addPrivatePrefix("JobBindAllDocumentsBaseOrientation")),
createScoredPropertyWithParameterRefPT(a,g,addPrivatePrefix("BindingSmallPaperPortrait"),addPrivatePrefix("JobBindAllDocumentsSP")),createScoredPropertyWithParameterRefPT(a,g,addPrivatePrefix("BindingSmallPaperLandscape"),addPrivatePrefix("JobBindAllDocumentsSL")),createScoredPropertyWithParameterRefPT(a,g,addPrivatePrefix("BindingLargePaperPortrait"),addPrivatePrefix("JobBindAllDocumentsLP")),createScoredPropertyWithParameterRefPT(a,g,addPrivatePrefix("BindingLargePaperLandscape"),addPrivatePrefix("JobBindAllDocumentsLL"))):
(g=createOptionNodePT(a,k,addPskPrefix(c.feedingEdge)),createScoredPropertyWithParameterRefPT(a,g,addPskPrefix("BindingGutter"),addPskPrefix("JobBindAllDocumentsGutter")),createScoredPropertyWithParameterRefPT(a,g,addPrivatePrefix("BindingGutterY"),addPrivatePrefix("JobBindAllDocumentsGutterY")),createScoredPropertyWithParameterRefPT(a,g,addPrivatePrefix("BaseOrientation"),addPrivatePrefix("JobBindAllDocumentsBaseOrientation"))),createScoredPropertyWithParameterRefPT(a,g,addPrivatePrefix("ScaleToFit"),
addPrivatePrefix("JobScaleToFit")),h=f=e=d=!0);1==d&&createParamterInitIntNodePT(a,b,addPskPrefix("JobBindAllDocumentsGutter"),c.gutterX);1==e&&createParamterInitIntNodePT(a,b,addPrivatePrefix("JobBindAllDocumentsGutterY"),c.gutterY);1==f&&createParamterInitStringNodePT(a,b,addPrivatePrefix("JobBindAllDocumentsBaseOrientation"),c.baseOrientation);"MixedFeeding"==c.feedingEdge&&(createParamterInitStringNodePT(a,b,addPrivatePrefix("JobBindAllDocumentsSP"),c.feedingEdgeSmallPortrait),createParamterInitStringNodePT(a,
b,addPrivatePrefix("JobBindAllDocumentsSL"),c.feedingEdgeSmallLandscape),createParamterInitStringNodePT(a,b,addPrivatePrefix("JobBindAllDocumentsLP"),c.feedingEdgeLargePortrait),createParamterInitStringNodePT(a,b,addPrivatePrefix("JobBindAllDocumentsLL"),c.feedingEdgeLargeLandscape));"Booklet"==c.bindAllDocuments&&createParamterInitStringNodePT(a,b,addPrivatePrefix("JobBindAllDocumentsBookletBinding"),c.bookletBinding);1==h&&createParamterInitStringNodePT(a,b,addPrivatePrefix("JobScaleToFit"),c.scaleToFit)}
var enumNUpPresentationDirection="Auto BottomRight BottomLeft TopRight TopLeft RightBottom RightTop LeftBottom LeftTop".split(" "),enumNUpBorderStyle=["None","Line"];
function completePC_NUp(a,b){var c=createFeatureNodePC(a,b,addPskPrefix("JobNUpAllDocumentsContiguously"),"NUp"),d=createOptionNodePC(a,c,null,addPskPrefix("None"));createScoredPropertyWithValueNodePC(a,d,addPskPrefix("PagesPerSheet"),"1",addXsdPrefix("integer"));d=createOptionNodePC(a,c,null,addPskPrefix("None"));createScoredPropertyWithValueNodePC(a,d,addPskPrefix("PagesPerSheet"),"2",addXsdPrefix("integer"));d=createOptionNodePC(a,c,null,addPskPrefix("None"));createScoredPropertyWithValueNodePC(a,
d,addPskPrefix("PagesPerSheet"),"4",addXsdPrefix("integer"));d=createOptionNodePC(a,c,null,addPskPrefix("None"));createScoredPropertyWithValueNodePC(a,d,addPskPrefix("PagesPerSheet"),"6",addXsdPrefix("integer"));d=createOptionNodePC(a,c,null,addPskPrefix("None"));createScoredPropertyWithValueNodePC(a,d,addPskPrefix("PagesPerSheet"),"9",addXsdPrefix("integer"));d=createOptionNodePC(a,c,null,addPskPrefix("None"));createScoredPropertyWithValueNodePC(a,d,addPskPrefix("PagesPerSheet"),"12",addXsdPrefix("integer"));
d=createOptionNodePC(a,c,null,addPskPrefix("None"));createScoredPropertyWithValueNodePC(a,d,addPskPrefix("PagesPerSheet"),"16",addXsdPrefix("integer"));d=createOptionNodePC(a,c,null,addPskPrefix("None"));createScoredPropertyWithValueNodePC(a,d,addPskPrefix("PagesPerSheet"),"25",addXsdPrefix("integer"));d=createFeatureNodePC(a,c,addPskPrefix("PresentationDirection"),"PresentationDirection");createOptionNodePC(a,d,addPrivatePrefix("Auto"),addPskPrefix("None"));createOptionNodePC(a,d,addPskPrefix("BottomRight"),
addPskPrefix("None"));createOptionNodePC(a,d,addPskPrefix("BottomLeft"),addPskPrefix("None"));createOptionNodePC(a,d,addPskPrefix("TopRight"),addPskPrefix("None"));createOptionNodePC(a,d,addPskPrefix("TopLeft"),addPskPrefix("None"));createOptionNodePC(a,d,addPskPrefix("RightBottom"),addPskPrefix("None"));createOptionNodePC(a,d,addPskPrefix("RightTop"),addPskPrefix("None"));createOptionNodePC(a,d,addPskPrefix("LeftBottom"),addPskPrefix("None"));createOptionNodePC(a,d,addPskPrefix("LeftTop"),addPskPrefix("None"));
d=createFeatureNodePC(a,c,addPrivatePrefix("BorderStyle"),"Border Drawing");createOptionNodePC(a,d,addPskPrefix("None"),addPskPrefix("None"));createOptionNodePC(a,d,addPrivatePrefix("Line"),addPskPrefix("None"))}
function convertPTToDevMode_NUp(a,b,c){a=getFeatureFromPT(b,addPskPrefix("JobNUpAllDocumentsContiguously"));if(null!=a){var d=getOptionScoredPropertyFromPT(a,addPskPrefix("PagesPerSheet")),e=getOptionFromPT(a,addPskPrefix("PresentationDirection")),f=getOptionFromPT(a,addPrivatePrefix("BorderStyle"));c.publicFeatureWriter.write(featuresEnum.NUp,2,function(a){if(2==a.length){a[0]=0;a[1]=0;null!=d&&(a[0]=d);for(var b=0;b<enumNUpPresentationDirection.length;b++)if(enumNUpPresentationDirection[b]==e){a[1]|=
b;break}for(b=0;b<enumNUpBorderStyle.length;b++)if(enumNUpBorderStyle[b]==f){a[1]|=b<<8;break}}})}}
function convertDevModeToPT_NUp(a,b,c){checkFeatureNode(b,addPskPrefix("JobNUpAllDocumentsContiguously"));c=c.publicFeatureReader.read(featuresEnum.NUp,function(a){return 2==a.length?{pagesPerSheet:a[0],presentationDirection:enumNUpPresentationDirection[(a[1]&255)<enumNUpPresentationDirection.length?a[1]&255:0],borderStyle:enumNUpBorderStyle[a[1]>>8<enumNUpBorderStyle.length?a[1]>>8:0]}:null},function(){return{pagesPerSheet:1,presentationDirection:enumNUpPresentationDirection[0],borderStyle:enumNUpBorderStyle[0]}});
if(null!=c){b=createFeatureNodePT(a,b,addPskPrefix("JobNUpAllDocumentsContiguously"));var d=createOptionNodePT(a,b,null);createScoredPropertyWithValueNodePT(a,d,addPskPrefix("PagesPerSheet"),c.pagesPerSheet,addXsdPrefix("integer"));d=createFeatureNodePT(a,b,addPskPrefix("PresentationDirection"));d="Auto"==c.presentationDirection?createOptionNodePT(a,d,addPrivatePrefix(c.presentationDirection)):createOptionNodePT(a,d,addPskPrefix(c.presentationDirection));d=createFeatureNodePT(a,b,addPrivatePrefix("BorderStyle"));
d="None"==c.borderStyle?createOptionNodePT(a,d,addPskPrefix(c.borderStyle)):createOptionNodePT(a,d,addPrivatePrefix(c.borderStyle))}}var enumPosterPrintFormat=["PosterPages","ProofSheet","PosterAndProof"];
function completePC_Poster(a,b){var c=createFeatureNodePC(a,b,addPskPrefix("PagePoster"),"Poster"),d=createOptionNodePC(a,c,null,addPskPrefix("None"));createScoredPropertyWithValueNodePC(a,d,addPskPrefix("SheetsPerPage"),"1",addXsdPrefix("integer"));d=createOptionNodePC(a,c,null,addPskPrefix("None"));createScoredPropertyWithValueNodePC(a,d,addPskPrefix("SheetsPerPage"),"4",addXsdPrefix("integer"));d=createOptionNodePC(a,c,null,addPskPrefix("None"));createScoredPropertyWithValueNodePC(a,d,addPskPrefix("SheetsPerPage"),
"9",addXsdPrefix("integer"));d=createOptionNodePC(a,c,null,addPskPrefix("None"));createScoredPropertyWithValueNodePC(a,d,addPskPrefix("SheetsPerPage"),"16",addXsdPrefix("integer"));d=createOptionNodePC(a,c,null,addPskPrefix("None"));createScoredPropertyWithValueNodePC(a,d,addPskPrefix("SheetsPerPage"),"25",addXsdPrefix("integer"));d=createFeatureNodePC(a,c,addPrivatePrefix("PrintFormat"),"Print Format");createOptionNodePC(a,d,addPrivatePrefix("PosterPages"),addPskPrefix("None"));createOptionNodePC(a,
d,addPrivatePrefix("ProofSheet"),addPskPrefix("None"));createOptionNodePC(a,d,addPrivatePrefix("PosterAndProof"),addPskPrefix("None"));d=createFeatureNodePC(a,c,addPrivatePrefix("CropMarks"),"Crop Marks");createOptionNodePC(a,d,addPskPrefix("Off"),addPskPrefix("None"));createOptionNodePC(a,d,addPskPrefix("On"),addPskPrefix("None"));d=createFeatureNodePC(a,c,addPrivatePrefix("AssemblyMarks"),"Assembly Marks");createOptionNodePC(a,d,addPskPrefix("Off"),addPskPrefix("None"));createOptionNodePC(a,d,addPskPrefix("On"),
addPskPrefix("None"));c=createFeatureNodePC(a,b,addPrivatePrefix("PagePosterOverlapEdges"),"Overlap Edges");createOptionNodePC(a,c,addPskPrefix("Off"),addPskPrefix("None"));d=createOptionNodePC(a,c,addPskPrefix("On"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("OverlapEdgesSize"),addPrivatePrefix("PagePosterOverlapEdgesSize"));createParameterDefIntNodePC(a,b,addPrivatePrefix("PagePosterOverlapEdgesSize"),0,0,1200,"thousandths of an inch","xsd:string")}
function convertPTToDevMode_Poster(a,b,c){a=getFeatureFromPT(b,addPskPrefix("PagePoster"));if(null!=a){var d=getOptionScoredPropertyFromPT(a,addPskPrefix("SheetsPerPage")),e=getOptionFromPT(a,addPrivatePrefix("PrintFormat")),f=getOptionFromPT(b,addPrivatePrefix("PagePosterOverlapEdges")),h=getOptionFromPT(a,addPrivatePrefix("CropMarks")),k=getOptionFromPT(a,addPrivatePrefix("AssemblyMarks")),g=getParameterInitIntValuePT(b,addPrivatePrefix("PagePosterOverlapEdgesSize"));c.publicFeatureWriter.write(featuresEnum.Poster,
3,function(a){if(3==a.length){a[0]=d;a[1]=0;a[2]=0;if(null!=e)for(var b=0;b<enumPosterPrintFormat.length;b++)if(enumPosterPrintFormat[b]==e){a[0]|=b<<8;break}if(null!=f)for(b=0;b<enumOffOn.length;b++)if(enumOffOn[b]==f){a[1]|=b<<4;break}if(null!=h)for(b=0;b<enumOffOn.length;b++)if(enumOffOn[b]==h){a[1]|=b;break}if(null!=k)for(b=0;b<enumOffOn.length;b++)if(enumOffOn[b]==k){a[1]|=b<<12;break}null!=g&&(a[2]=g)}})}}
function convertDevModeToPT_Poster(a,b,c){checkFeatureNode(b,addPskPrefix("PagePoster"));checkFeatureNode(b,addPrivatePrefix("PagePosterOverlapEdges"));checkParameterInitNode(b,addPrivatePrefix("PagePosterOverlapEdgesSize"));c=c.publicFeatureReader.read(featuresEnum.Poster,function(a){return 3==a.length?{sheetsPerPageValue:a[0]&255,printFormatValue:enumPosterPrintFormat[a[0]>>8<enumPosterPrintFormat.length?a[0]>>8:0],overlapEdgesValue:enumOffOn[(a[1]>>4&15)<enumOffOn.length?a[1]>>4&15:0],cropMarksValue:enumOffOn[(a[1]&
15)<enumOffOn.length?a[1]&15:0],assemblyMarksValue:enumOffOn[(a[1]>>12&15)<enumOffOn.length?a[1]>>12&15:0],overlapEdgesSizeValue:a[2]}:null},function(){return{sheetsPerPageValue:1,printFormatValue:enumPosterPrintFormat[0],overlapEdgesValue:enumOffOn[0],cropMarksValue:enumOffOn[0],assemblyMarksValue:enumOffOn[0],overlapEdgesSizeValue:0}});var d=createFeatureNodePT(a,b,addPskPrefix("PagePoster")),e=createOptionNodePT(a,d,null);createScoredPropertyWithValueNodePT(a,e,addPskPrefix("SheetsPerPage"),c.sheetsPerPageValue,
addXsdPrefix("integer"));e=createFeatureNodePT(a,d,addPrivatePrefix("PrintFormat"));e=createOptionNodePT(a,e,addPrivatePrefix(c.printFormatValue));e=createFeatureNodePT(a,d,addPrivatePrefix("CropMarks"));e=createOptionNodePT(a,e,addPskPrefix(c.cropMarksValue));e=createFeatureNodePT(a,d,addPrivatePrefix("AssemblyMarks"));e=createOptionNodePT(a,e,addPskPrefix(c.assemblyMarksValue));d=createFeatureNodePT(a,b,addPrivatePrefix("PagePosterOverlapEdges"));e=createOptionNodePT(a,d,addPskPrefix(c.overlapEdgesValue));
"On"==c.overlapEdgesValue&&(createScoredPropertyWithParameterRefPT(a,e,addPrivatePrefix("OverlapEdgesSize"),addPrivatePrefix("PagePosterOverlapEdgesSize")),createParamterInitIntNodePT(a,b,addPrivatePrefix("PagePosterOverlapEdgesSize"),c.overlapEdgesSizeValue))}
function completePC_Scaling(a,b){var c=createFeatureNodePC(a,b,addPrivatePrefix("PageScaling"),"Scaling"),d=createOptionNodePC(a,c,addPrivatePrefix("CustomSquare"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("OffsetWidth"),addPrivatePrefix("PageScalingOffsetWidth"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("OffsetHeight"),addPrivatePrefix("PageScalingOffsetHeight"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("Scale"),addPrivatePrefix("PageScalingScale"));
createOptionNodePC(a,c,addPrivatePrefix("FitApplicationMediaSizeToPageMediaSize"),null);createOptionNodePC(a,c,addPskPrefix("None"),null);createParameterDefIntNodePC(a,b,addPrivatePrefix("PageScalingOffsetWidth"),5080,5080,25400,"microns","xsd:string");createParameterDefIntNodePC(a,b,addPrivatePrefix("PageScalingOffsetHeight"),5080,5080,25400,"microns","xsd:string");createParameterDefIntNodePC(a,b,addPrivatePrefix("PageScalingScale"),100,20,500,"percent","xsd:string");d=createOptionNodePC(a,c,addPrivatePrefix("Custom"),
null);createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("OffsetWidth"),addPrivatePrefix("PageScalingOffsetWidth"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("OffsetHeight"),addPrivatePrefix("PageScalingOffsetHeight"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("ScaleWidth"),addPrivatePrefix("PageScalingScaleWidth"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("ScaleHeight"),addPrivatePrefix("PageScalingScaleHeight"));createScoredPropertyWithParameterRefPC(a,
d,addPrivatePrefix("ScalingValue"),addPrivatePrefix("PageScalingValue"));createParameterDefIntNodePC(a,b,addPrivatePrefix("PageScalingScaleWidth"),100,20,500,"percent","xsd:string");createParameterDefIntNodePC(a,b,addPrivatePrefix("PageScalingScaleHeight"),100,20,500,"percent","xsd:string");createParameterDefIntNodePC(a,b,addPrivatePrefix("PageScalingValue"),100,20,500,"percent","xsd:string")}
function convertPTToDevMode_Scaling(a,b,c){a=getOptionFromPT(b,addPrivatePrefix("PageScaling"));var d=100;if("Custom"==a||"CustomSquare"==a){var e=getParameterInitIntValuePT(b,addPrivatePrefix("PageScalingScale"));a=getParameterInitIntValuePT(b,addPrivatePrefix("PageScalingValue"));null!=a?d=a:null!=e&&(d=e)}c.privateFeatureWriter.write(featuresEnum.Scaling,1,function(a){1==a.length&&(a[0]=0,null!=d&&(a[0]=d))})}
function convertDevModeToPT_Scaling(a,b,c){checkFeatureNode(b,addPrivatePrefix("PageScaling"));checkParameterInitNode(b,addPrivatePrefix("PageScalingOffsetWidth"));checkParameterInitNode(b,addPrivatePrefix("PageScalingOffsetHeight"));checkParameterInitNode(b,addPrivatePrefix("PageScalingScaleWidth"));checkParameterInitNode(b,addPrivatePrefix("PageScalingScaleHeight"));checkParameterInitNode(b,addPrivatePrefix("PageScalingScale"));checkParameterInitNode(b,addPrivatePrefix("PageScalingValue"));c=c.privateFeatureReader.read(featuresEnum.Scaling,
function(a){return 1==a.length?a[0]:null},function(){return 100});var d;d=getOptionFromPT(b,addPskPrefix("PageMediaSize"));var e=getOptionFromPT(b,addPrivatePrefix("PagePrintMediaSize"));100==c?d==e?(d=createFeatureNodePT(a,b,addPrivatePrefix("PageScaling")),optionNode=createOptionNodePT(a,d,addPskPrefix("None"))):(d=createFeatureNodePT(a,b,addPrivatePrefix("PageScaling")),optionNode=createOptionNodePT(a,d,addPrivatePrefix("FitApplicationMediaSizeToPageMediaSize"))):(d=createFeatureNodePT(a,b,addPrivatePrefix("PageScaling")),
optionNode=createOptionNodePT(a,d,addPrivatePrefix("Custom")),createScoredPropertyWithParameterRefPT(a,optionNode,addPrivatePrefix("OffsetWidth"),addPrivatePrefix("PageScalingOffsetWidth")),createScoredPropertyWithParameterRefPT(a,optionNode,addPrivatePrefix("OffsetHeight"),addPrivatePrefix("PageScalingOffsetHeight")),createScoredPropertyWithParameterRefPT(a,optionNode,addPrivatePrefix("ScaleWidth"),addPrivatePrefix("PageScalingScaleWidth")),createScoredPropertyWithParameterRefPT(a,optionNode,addPrivatePrefix("ScaleHeight"),
addPrivatePrefix("PageScalingScaleHeight")),createScoredPropertyWithParameterRefPT(a,optionNode,addPrivatePrefix("ScalingValue"),addPrivatePrefix("PageScalingValue")),createParamterInitIntNodePT(a,b,addPrivatePrefix("PageScalingOffsetWidth"),0),createParamterInitIntNodePT(a,b,addPrivatePrefix("PageScalingOffsetHeight"),0),createParamterInitIntNodePT(a,b,addPrivatePrefix("PageScalingScaleWidth"),100),createParamterInitIntNodePT(a,b,addPrivatePrefix("PageScalingScaleHeight"),100),createParamterInitIntNodePT(a,
b,addPrivatePrefix("PageScalingValue"),c))}
function validatePrintTicket_Scaling(a,b){var c=getFeatureFromPT(b,addPrivatePrefix("PageScaling")),d=getFeatureFromPT(b,addPskPrefix("PageMediaSize")),e=getFeatureFromPT(b,addPrivatePrefix("PagePrintMediaSize"));if(null!=c&&null!=d&&null!=e&&"Custom"==getOptionFromPT(b,addPrivatePrefix("PageScaling"))){var c=getOptionFromPT(b,addPskPrefix("PageMediaSize")),f=getOptionFromPT(b,addPrivatePrefix("PagePrintMediaSize"));if("AutoSelect"!=f&&f!=c){var c=getOptionScoredPropertyFromPT(d,addPskPrefix("MediaSizeWidth")),
d=getOptionScoredPropertyFromPT(d,addPskPrefix("MediaSizeHeight")),f=getOptionScoredPropertyFromPT(e,addPskPrefix("MediaSizeWidth")),h=getOptionScoredPropertyFromPT(e,addPskPrefix("MediaSizeHeight"));if(null!=c&&null!=d&&null!=f&&null!=h){var k=f/c,g=h/d;k<g?(e=100*k,c=0,d=(h-d*k)/2):(e=100*g,c=(f-c*g)/2,d=0);checkParameterInitNode(b,addPrivatePrefix("PageScalingOffsetWidth"));checkParameterInitNode(b,addPrivatePrefix("PageScalingOffsetHeight"));checkParameterInitNode(b,addPrivatePrefix("PageScalingScaleWidth"));
checkParameterInitNode(b,addPrivatePrefix("PageScalingScaleHeight"));createParamterInitIntNodePT(a,b,addPrivatePrefix("PageScalingOffsetWidth"),c.toFixed(0));createParamterInitIntNodePT(a,b,addPrivatePrefix("PageScalingOffsetHeight"),d.toFixed(0));createParamterInitIntNodePT(a,b,addPrivatePrefix("PageScalingScaleWidth"),e.toFixed(0));createParamterInitIntNodePT(a,b,addPrivatePrefix("PageScalingScaleHeight"),e.toFixed(0))}}}}
var enumFold=["Off","BiFold","TriFold"],enumFoldFace=["Off","FaceOutside","FaceInside"],enumFoldOrder=["Off","LeftUp","RightUp"];
function completePC_JobFold(a,b,c){if((1==c.isSupportBiFold||1==c.isSupportTriFold)&&null!=c.isFoldingUnitInstalled){var d=addPskPrefix("DeviceSettings");1==c.isFoldingUnitInstalled&&(d=addPskPrefix("None"));var e=createFeatureNodePC(a,b,addPrivatePrefix("JobFold"),"Fold");createOptionNodePC(a,e,addPskPrefix("Off"),d);if(1==c.isSupportBiFold){var f=createOptionNodePC(a,e,addPrivatePrefix("BiFold"),d);createScoredPropertyWithValueNodePC(a,f,addPrivatePrefix("FoldCount"),"2",addXsdPrefix("integer"));
createScoredPropertyWithParameterRefPC(a,f,addPrivatePrefix("FoldSheetCount"),addPrivatePrefix("JobFoldSheetCount"))}1==c.isSupportTriFold&&(f=createOptionNodePC(a,e,addPrivatePrefix("TriFold"),d),createScoredPropertyWithValueNodePC(a,f,addPrivatePrefix("FoldCount"),"3",addXsdPrefix("integer")),createScoredPropertyWithParameterRefPC(a,f,addPrivatePrefix("FoldSheetCount"),addPrivatePrefix("JobFoldSheetCount")));c=createFeatureNodePC(a,e,addPrivatePrefix("JobFoldFace"),"Folding Side");createOptionNodePC(a,
c,addPskPrefix("Off"),addPskPrefix("None"));createOptionNodePC(a,c,addPrivatePrefix("FaceInside"),addPskPrefix("None"));createOptionNodePC(a,c,addPrivatePrefix("FaceOutside"),addPskPrefix("None"));c=createFeatureNodePC(a,e,addPrivatePrefix("JobFoldOrder"),"Folding order");createOptionNodePC(a,c,addPskPrefix("Off"),addPskPrefix("None"));createOptionNodePC(a,c,addPrivatePrefix("RightUp"),addPskPrefix("None"));createOptionNodePC(a,c,addPrivatePrefix("LeftUp"),addPskPrefix("None"));createParameterDefIntNodePC(a,
b,addPrivatePrefix("JobFoldSheetCount"),0,0,5,"number","xsd:string")}}
function convertPTToDevMode_JobFold(a,b,c){a=getFeatureFromPT(b,addPrivatePrefix("JobFold"));if(null!=a){var d=getOptionFromPT(b,addPrivatePrefix("JobFold")),e=getOptionFromPT(a,addPrivatePrefix("JobFoldFace")),f=getOptionFromPT(a,addPrivatePrefix("JobFoldOrder")),h=getParameterInitIntValuePT(b,addPrivatePrefix("JobFoldSheetCount"));c.privateFeatureWriter.write(featuresEnum.Fold,2,function(a){if(2==a.length){a[0]=0;a[1]=0;if(null!=d)for(var b=0;b<enumFold.length;b++)if(enumFold[b]==d){a[0]|=b;break}if(null!=
e)for(b=0;b<enumFoldFace.length;b++)if(enumFoldFace[b]==e){a[0]|=b<<8;break}if(null!=f)for(b=0;b<enumFoldOrder.length;b++)if(enumFoldOrder[b]==f){a[1]|=b;break}null!=h&&(a[1]|=h<<8)}})}}
function convertDevModeToPT_JobFold(a,b,c,d){if(1==d.isSupportBiFold||1==d.isSupportTriFold)if(checkFeatureNode(b,addPrivatePrefix("JobFold")),checkParameterInitNode(b,addPrivatePrefix("JobFoldSheetCount")),c=c.privateFeatureReader.read(featuresEnum.Fold,function(a){return 2==a.length?{fold:enumFold[(a[0]&255)<enumFold.length?a[0]&255:0],face:enumFoldFace[a[0]>>8<enumFoldFace.length?a[0]>>8:0],order:enumFoldOrder[(a[1]&255)<enumFoldOrder.length?a[1]&255:0],sheetCount:a[1]>>8}:null},function(){return{fold:enumFold[0],
face:enumFoldFace[0],order:enumFoldOrder[0],sheetCount:1}}),null!=c){d=createFeatureNodePT(a,b,addPrivatePrefix("JobFold"));if("Off"==c.fold)createOptionNodePT(a,d,addPskPrefix(c.fold));else{var e=createOptionNodePT(a,d,addPrivatePrefix(c.fold)),f=2;"TriFold"==c.fold&&(f=3);createScoredPropertyWithValueNodePT(a,e,addPrivatePrefix("FoldCount"),f,addXsdPrefix("integer"));createScoredPropertyWithParameterRefPT(a,e,addPrivatePrefix("FoldSheetCount"),addPrivatePrefix("JobFoldSheetCount"));createParamterInitIntNodePT(a,
b,addPrivatePrefix("JobFoldSheetCount"),c.sheetCount)}b=createFeatureNodePT(a,d,addPrivatePrefix("JobFoldFace"));"Off"==c.face?createOptionNodePT(a,b,addPskPrefix(c.face)):createOptionNodePT(a,b,addPrivatePrefix(c.face));b=createFeatureNodePT(a,d,addPrivatePrefix("JobFoldOrder"));"Off"==c.order?createOptionNodePT(a,b,addPskPrefix(c.order)):createOptionNodePT(a,b,addPrivatePrefix(c.order))}}var enumSeparation=["Off","Offset","Rotate"];
function completePC_JobSeparation(a,b,c){if(1==c.isRotateCollate||1==isOffestSupportedByModel(c))b=createFeatureNodePC(a,b,addPrivatePrefix("JobSeparation"),"Separation"),createOptionNodePC(a,b,addPskPrefix("Off"),addPskPrefix("None")),1==isOffestSupportedByModel(c)&&(isOffestSupportedByConfig(c)?createOptionNodePC(a,b,addPrivatePrefix("Offset"),addPskPrefix("None")):createOptionNodePC(a,b,addPrivatePrefix("Offset"),addPskPrefix("DeviceSettings"))),1==c.isRotateCollate&&(1==c.isRAMDiskStandard||1==
c.isHardDiskStandard||1==c.isRAMDiskInstalled||1==c.isHardDiskInstalled||1==c.isPrinterSSDInstalled||1==c.isPrinterSDCardInstalled?createOptionNodePC(a,b,addPrivatePrefix("Rotate"),addPskPrefix("None")):createOptionNodePC(a,b,addPrivatePrefix("Rotate"),addPskPrefix("DeviceSettings")))}
function convertPTToDevMode_JobSeparation(a,b,c){var d=getOptionFromPT(b,addPrivatePrefix("JobSeparation"));null!=d&&c.privateFeatureWriter.write(featuresEnum.Separation,1,function(a){if(1==a.length)for(var b=a[0]=0;b<enumSeparation.length;b++)if(enumSeparation[b]==d){a[0]=b;break}})}
function convertDevModeToPT_JobSeparation(a,b,c,d){if(1==d.isRotateCollate||1==isOffestSupportedByModel(d))checkFeatureNode(b,addPrivatePrefix("JobSeparation")),c=c.privateFeatureReader.read(featuresEnum.Separation,function(a){return 1==a.length?enumSeparation[a[0]<enumSeparation.length?a[0]:0]:null},function(){return enumSeparation[0]}),b=createFeatureNodePT(a,b,addPrivatePrefix("JobSeparation")),"Off"==c?createOptionNodePT(a,b,addPskPrefix(c)):createOptionNodePT(a,b,addPrivatePrefix(c))}
function isOffestSupportedByModel(a){for(var b=0;b<a.OutputBins.length;b++)if(1==a.OutputBins[b].IsSupportOffset)return!0;return!1}function isOffestSupportedByConfig(a){for(var b=0;b<a.OutputBins.length;b++)if(1==a.OutputBins[b].IsAvailable&&1==a.OutputBins[b].IsSupportOffset)return!0;return!1}var enumStapleAllDocuments="None SaddleStitch StapleDualLeft StapleDualRight StapleTopLeft StapleTopRight StapleBottomLeft StapleBottomRight StapleDual StapleDualTop StapleDualBottom".split(" ");
function completePC_JobStapleAllDocuments(a,b,c){if(isStapleSupportedByModel(c)){var d=getMaximumStapleCount(c),e=addPskPrefix("DeviceSettings");isStapleSupportedByConfig(c)&&(e=addPskPrefix("None"));var f=createFeatureNodePC(a,b,addPskPrefix("JobStapleAllDocuments"),"Staple"),h;createOptionNodePC(a,f,addPskPrefix("None"),e);h=createOptionNodePC(a,f,addPskPrefix("StapleDualLeft"),e);createScoredPropertyWithValueNodePC(a,h,addPskPrefix("Angle"),"0",addXsdPrefix("integer"));createScoredPropertyWithValueNodePC(a,
h,addPskPrefix("SheetCapacity"),"20",addXsdPrefix("integer"));createScoredPropertyWithParameterRefPC(a,h,addPrivatePrefix("Count"),addPrivatePrefix("JobStapleCount"));h=createOptionNodePC(a,f,addPskPrefix("StapleDualRight"),e);createScoredPropertyWithValueNodePC(a,h,addPskPrefix("Angle"),"0",addXsdPrefix("integer"));createScoredPropertyWithValueNodePC(a,h,addPskPrefix("SheetCapacity"),"20",addXsdPrefix("integer"));createScoredPropertyWithParameterRefPC(a,h,addPrivatePrefix("Count"),addPrivatePrefix("JobStapleCount"));
h=createOptionNodePC(a,f,addPskPrefix("StapleTopLeft"),e);createScoredPropertyWithValueNodePC(a,h,addPskPrefix("Angle"),"0",addXsdPrefix("integer"));createScoredPropertyWithValueNodePC(a,h,addPskPrefix("SheetCapacity"),"20",addXsdPrefix("integer"));createScoredPropertyWithParameterRefPC(a,h,addPrivatePrefix("Count"),addPrivatePrefix("JobStapleCount"));h=createOptionNodePC(a,f,addPskPrefix("StapleTopRight"),e);createScoredPropertyWithValueNodePC(a,h,addPskPrefix("Angle"),"0",addXsdPrefix("integer"));
createScoredPropertyWithValueNodePC(a,h,addPskPrefix("SheetCapacity"),"20",addXsdPrefix("integer"));createScoredPropertyWithParameterRefPC(a,h,addPrivatePrefix("Count"),addPrivatePrefix("JobStapleCount"));h=createOptionNodePC(a,f,addPskPrefix("StapleBottomLeft"),e);createScoredPropertyWithValueNodePC(a,h,addPskPrefix("Angle"),"0",addXsdPrefix("integer"));createScoredPropertyWithValueNodePC(a,h,addPskPrefix("SheetCapacity"),"20",addXsdPrefix("integer"));createScoredPropertyWithParameterRefPC(a,h,addPrivatePrefix("Count"),
addPrivatePrefix("JobStapleCount"));h=createOptionNodePC(a,f,addPskPrefix("StapleBottomRight"),e);createScoredPropertyWithValueNodePC(a,h,addPskPrefix("Angle"),"0",addXsdPrefix("integer"));createScoredPropertyWithValueNodePC(a,h,addPskPrefix("SheetCapacity"),"20",addXsdPrefix("integer"));createScoredPropertyWithParameterRefPC(a,h,addPrivatePrefix("Count"),addPrivatePrefix("JobStapleCount"));h=createOptionNodePC(a,f,addPrivatePrefix("StapleDual"),e);createScoredPropertyWithValueNodePC(a,h,addPskPrefix("Angle"),
"0",addXsdPrefix("integer"));createScoredPropertyWithValueNodePC(a,h,addPskPrefix("SheetCapacity"),"20",addXsdPrefix("integer"));createScoredPropertyWithParameterRefPC(a,h,addPrivatePrefix("Count"),addPrivatePrefix("JobStapleCount"));h=createOptionNodePC(a,f,addPskPrefix("StapleDualTop"),e);createScoredPropertyWithValueNodePC(a,h,addPskPrefix("Angle"),"0",addXsdPrefix("integer"));createScoredPropertyWithValueNodePC(a,h,addPskPrefix("SheetCapacity"),"20",addXsdPrefix("integer"));createScoredPropertyWithParameterRefPC(a,
h,addPrivatePrefix("Count"),addPrivatePrefix("JobStapleCount"));h=createOptionNodePC(a,f,addPskPrefix("StapleDualBottom"),e);createScoredPropertyWithValueNodePC(a,h,addPskPrefix("Angle"),"0",addXsdPrefix("integer"));createScoredPropertyWithValueNodePC(a,h,addPskPrefix("SheetCapacity"),"20",addXsdPrefix("integer"));createScoredPropertyWithParameterRefPC(a,h,addPrivatePrefix("Count"),addPrivatePrefix("JobStapleCount"));isStapleSaddleStitchSupportedByModel(c)&&(h=isStapleSaddleStitchSupportedByConfig(c)?
createOptionNodePC(a,f,addPskPrefix("SaddleStitch"),addPskPrefix("None")):createOptionNodePC(a,f,addPskPrefix("SaddleStitch"),addPskPrefix("DeviceSettings")),createScoredPropertyWithValueNodePC(a,h,addPskPrefix("Angle"),"0",addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,h,addPskPrefix("SheetCapacity"),"20",addXsdPrefix("integer")));createParameterDefIntNodePC(a,b,addPrivatePrefix("JobStapleCount"),0,0,d,"count","xsd:string")}}
function convertPTToDevMode_JobStapleAllDocuments(a,b,c){var d=getOptionFromPT(b,addPskPrefix("JobStapleAllDocuments"));if(null!=d){var e=getParameterInitIntValuePT(b,addPrivatePrefix("JobStapleCount"));c.publicFeatureWriter.write(featuresEnum.Staple,2,function(a){if(2==a.length){a[0]=0;for(var b=a[1]=0;b<enumStapleAllDocuments.length;b++)if(enumStapleAllDocuments[b]==d){a[0]=b;break}null!=e&&(a[1]=e)}})}}
function convertDevModeToPT_JobStapleAllDocuments(a,b,c,d){isStapleSupportedByModel(d)&&(checkFeatureNode(b,addPskPrefix("JobStapleAllDocuments")),checkParameterInitNode(b,addPrivatePrefix("JobStapleCount")),isStapleSupportedByConfig(d)?(stapleOptionConstraints=addPskPrefix("None"),c=c.publicFeatureReader.read(featuresEnum.Staple,function(a){return 2==a.length?{stapleAllDocuments:enumStapleAllDocuments[a[0]<enumStapleAllDocuments.length?a[0]:0],stapleCount:a[1]}:null},function(){return{stapleAllDocuments:enumStapleAllDocuments[0],
stapleCount:0}}),d=createFeatureNodePT(a,b,addPskPrefix("JobStapleAllDocuments")),"None"==c.stapleAllDocuments?createOptionNodePT(a,d,addPskPrefix(c.stapleAllDocuments)):"SaddleStitch"==c.stapleAllDocuments?(d=createOptionNodePT(a,d,addPrivatePrefix(c.stapleAllDocuments)),createScoredPropertyWithValueNodePT(a,d,addPskPrefix("Angle"),"0",addXsdPrefix("integer")),createScoredPropertyWithValueNodePT(a,d,addPskPrefix("SheetCapacity"),"20",addXsdPrefix("integer"))):(d="StapleDual"==c.stapleAllDocuments?
createOptionNodePT(a,d,addPrivatePrefix(c.stapleAllDocuments)):createOptionNodePT(a,d,addPskPrefix(c.stapleAllDocuments)),createScoredPropertyWithValueNodePT(a,d,addPskPrefix("Angle"),"0",addXsdPrefix("integer")),createScoredPropertyWithValueNodePT(a,d,addPskPrefix("SheetCapacity"),"20",addXsdPrefix("integer")),createScoredPropertyWithParameterRefPT(a,d,addPrivatePrefix("Count"),addPrivatePrefix("JobStapleCount")),createParamterInitIntNodePT(a,b,addPrivatePrefix("JobStapleCount"),c.stapleCount))):
(d=createFeatureNodePT(a,b,addPskPrefix("JobStapleAllDocuments")),createOptionNodePT(a,d,addPskPrefix("None"))))}function isStapleSupportedByModel(a){for(var b=0;b<a.OutputBins.length;b++)if(1==a.OutputBins[b].IsSupportStaple)return!0;return!1}function isStapleSupportedByConfig(a){for(var b=0;b<a.OutputBins.length;b++)if(1==a.OutputBins[b].IsAvailable&&1==a.OutputBins[b].IsSupportStaple)return!0;return!1}
function isStapleSaddleStitchSupportedByModel(a){for(var b=0;b<a.OutputBins.length;b++)if(1==a.OutputBins[b].IsSupportStaple&&1==a.OutputBins[b].IsSupportBookletStitch)return!0;return!1}function isStapleSaddleStitchSupportedByConfig(a){for(var b=0;b<a.OutputBins.length;b++)if(1==a.OutputBins[b].IsAvailable&&1==a.OutputBins[b].IsSupportStaple&&1==a.OutputBins[b].IsSupportBookletStitch)return!0;return!1}
function getMaximumStapleCount(a){for(var b=0,c=0;c<a.OutputBins.length;c++)1==a.OutputBins[c].IsSupportStaple&&a.OutputBins[c].IsUseStapleCountMax&&(b=Math.max(b,a.OutputBins[c].StapleCountMaxA,a.OutputBins[c].StapleCountMaxB));return b}var enumHolePunch="None BottomEdge LeftEdge RightEdge TopEdge On".split(" "),enumHoleCount=["None","TwoHole","ThreeHole","FourHole"];
function completePC_JobHolePunch(a,b,c){if(1==c.isPunchSupport){var d=addPskPrefix("DeviceSettings"),e=addPskPrefix("DeviceSettings"),f=addPskPrefix("DeviceSettings"),h=addPskPrefix("DeviceSettings");1==c.isPunch23UnitInstalled?(d=addPskPrefix("None"),e=addPskPrefix("None"),f=addPskPrefix("None")):1==c.isPunch2UnitInstalled?(d=addPskPrefix("None"),e=addPskPrefix("None")):1==c.isPunch24UnitInstalled&&(d=addPskPrefix("None"),e=addPskPrefix("None"),h=addPskPrefix("None"));b=createFeatureNodePC(a,b,addPskPrefix("JobHolePunch"),
"Hole Punch");createOptionNodePC(a,b,addPskPrefix("None"),d);createOptionNodePC(a,b,addPrivatePrefix("On"),d);1==c.isFeedingEdgeSupport&&(createOptionNodePC(a,b,addPskPrefix("BottomEdge"),d),createOptionNodePC(a,b,addPskPrefix("LeftEdge"),d),createOptionNodePC(a,b,addPskPrefix("RightEdge"),d),createOptionNodePC(a,b,addPskPrefix("TopEdge"),d));c=createFeatureNodePC(a,b,addPrivatePrefix("HoleCount"),"Hole Count");createOptionNodePC(a,c,addPskPrefix("None"),d);createOptionNodePC(a,c,addPrivatePrefix("TwoHole"),
e);createOptionNodePC(a,c,addPrivatePrefix("ThreeHole"),f);createOptionNodePC(a,c,addPrivatePrefix("FourHole"),h)}}
function convertPTToDevMode_JobHolePunch(a,b,c){a=getFeatureFromPT(b,addPskPrefix("JobHolePunch"));var d=getOptionFromPT(b,addPskPrefix("JobHolePunch"));if(null!=a&&null!=d){var e=getOptionFromPT(a,addPrivatePrefix("HoleCount"));c.publicFeatureWriter.write(featuresEnum.Punch,1,function(a){if(1==a.length){for(var b=a[0]=0;b<enumHolePunch.length;b++)if(enumHolePunch[b]==d){a[0]|=b&255;break}if(null!=e)for(b=0;b<enumHoleCount.length;b++)if(enumHoleCount[b]==e){a[0]|=b<<8&65280;break}}})}}
function convertDevModeToPT_JobHolePunch(a,b,c,d){1==d.isPunchSupport&&(checkFeatureNode(b,addPskPrefix("JobHolePunch")),c=c.publicFeatureReader.read(featuresEnum.Punch,function(a){return 1==a.length?{punch:enumHolePunch[(a[0]&255)<enumHolePunch.length?a[0]&255:0],holeCount:enumHoleCount[(a[0]>>8&255)<enumHoleCount.length?a[0]>>8&255:0]}:null},function(){return{punch:enumHolePunch[0],holeCount:enumHoleCount[0]}}),b=createFeatureNodePT(a,b,addPskPrefix("JobHolePunch")),"On"==c.punch?createOptionNodePT(a,
b,addPrivatePrefix(c.punch)):createOptionNodePT(a,b,addPskPrefix(c.punch)),b=createFeatureNodePT(a,b,addPrivatePrefix("HoleCount")),"None"==c.holeCount?createOptionNodePT(a,b,addPskPrefix(c.holeCount)):createOptionNodePT(a,b,addPrivatePrefix(c.holeCount)))}
function completePC_JobPrintGraysWithBlackToner(a,b,c){1==c.isColorModel&&1==c.isPrintGrayBlackToner&&(b=createFeatureNodePC(a,b,addPrivatePrefix("JobPrintGraysWithBlackToner"),"Print grays with black toner"),createOptionNodePC(a,b,addPskPrefix("Off"),addPskPrefix("None")),createOptionNodePC(a,b,addPskPrefix("On"),addPskPrefix("None")))}
function convertPTToDevMode_JobPrintGraysWithBlackToner(a,b,c){var d=getOptionFromPT(b,addPrivatePrefix("JobPrintGraysWithBlackToner"));null!=d&&c.privateFeatureWriter.write(featuresEnum.PrintGraysWithBlackToner,1,function(a){if(1==a.length)for(var b=a[0]=0;b<enumOffOn.length;b++)if(enumOffOn[b]==d){a[0]=b;break}})}
function convertDevModeToPT_JobPrintGraysWithBlackToner(a,b,c,d){1==d.isColorModel&&1==d.isPrintGrayBlackToner&&(checkFeatureNode(b,addPrivatePrefix("JobPrintGraysWithBlackToner")),c=c.privateFeatureReader.read(featuresEnum.PrintGraysWithBlackToner,function(a){return 1==a.length?enumOffOn[a[0]<enumOffOn.length?a[0]:0]:null},function(){return enumOffOn[0]}),b=createFeatureNodePT(a,b,addPrivatePrefix("JobPrintGraysWithBlackToner")),createOptionNodePT(a,b,addPskPrefix(c)))}
function completePC_JobBlackText(a,b){var c=createFeatureNodePC(a,b,addPrivatePrefix("JobBlackText"),"Print text as black");createOptionNodePC(a,c,addPskPrefix("Off"),addPskPrefix("None"));createOptionNodePC(a,c,addPskPrefix("On"),addPskPrefix("None"))}
function convertPTToDevMode_JobBlackText(a,b,c){var d=getOptionFromPT(b,addPrivatePrefix("JobBlackText"));null!=d&&c.privateFeatureWriter.write(featuresEnum.BlackText,1,function(a){if(1==a.length)for(var b=a[0]=0;b<enumOffOn.length;b++)if(enumOffOn[b]==d){a[0]=b;break}})}
function convertDevModeToPT_JobBlackText(a,b,c){checkFeatureNode(b,addPrivatePrefix("JobBlackText"));c=c.privateFeatureReader.read(featuresEnum.BlackText,function(a){return 1==a.length?enumOffOn[a[0]<enumOffOn.length?a[0]:0]:null},function(){return enumOffOn[0]});b=createFeatureNodePT(a,b,addPrivatePrefix("JobBlackText"));createOptionNodePT(a,b,addPskPrefix(c))}
function completePC_JobBlackGraphics(a,b){var c=createFeatureNodePC(a,b,addPrivatePrefix("JobBlackGraphics"),"Print graphics as black");createOptionNodePC(a,c,addPskPrefix("Off"),addPskPrefix("None"));createOptionNodePC(a,c,addPskPrefix("On"),addPskPrefix("None"))}
function convertPTToDevMode_JobBlackGraphics(a,b,c){var d=getOptionFromPT(b,addPrivatePrefix("JobBlackGraphics"));null!=d&&c.privateFeatureWriter.write(featuresEnum.BlackGraphics,1,function(a){if(1==a.length)for(var b=a[0]=0;b<enumOffOn.length;b++)if(enumOffOn[b]==d){a[0]=b;break}})}
function convertDevModeToPT_JobBlackGraphics(a,b,c){checkFeatureNode(b,addPrivatePrefix("JobBlackGraphics"));c=c.privateFeatureReader.read(featuresEnum.BlackGraphics,function(a){return 1==a.length?enumOffOn[a[0]<enumOffOn.length?a[0]:0]:null},function(){return enumOffOn[0]});b=createFeatureNodePT(a,b,addPrivatePrefix("JobBlackGraphics"));createOptionNodePT(a,b,addPskPrefix(c))}var enumColorCorrection="PrinterSettings TextGraphics TextPhotos VividColors Publications LineArt CustomTable None ICM ChinaRed".split(" ");
function completePC_JobColorCorrection(a,b,c){1==c.isColorModel&&(b=createFeatureNodePC(a,b,addPrivatePrefix("JobColorCorrection"),"Color Correction"),createOptionNodePC(a,b,addPrivatePrefix("PrinterSettings"),addPskPrefix("None")),createOptionNodePC(a,b,addPrivatePrefix("TextGraphics"),addPskPrefix("None")),createOptionNodePC(a,b,addPrivatePrefix("TextPhotos"),addPskPrefix("None")),createOptionNodePC(a,b,addPrivatePrefix("VividColors"),addPskPrefix("None")),createOptionNodePC(a,b,addPrivatePrefix("Publications"),
addPskPrefix("None")),createOptionNodePC(a,b,addPrivatePrefix("LineArt"),addPskPrefix("None")),createOptionNodePC(a,b,addPrivatePrefix("CustomTable"),addPskPrefix("None")),createOptionNodePC(a,b,addPskPrefix("None"),addPskPrefix("None")),createOptionNodePC(a,b,addPrivatePrefix("ICM"),addPskPrefix("None")),1==c.isChinaRedSupported&&createOptionNodePC(a,b,addPrivatePrefix("ChinaRed"),addPskPrefix("None")))}
function convertPTToDevMode_JobColorCorrection(a,b,c){var d=getOptionFromPT(b,addPrivatePrefix("JobColorCorrection"));null!=d&&c.privateFeatureWriter.write(featuresEnum.ColorCorrection,1,function(a){if(1==a.length)for(var b=a[0]=0;b<enumColorCorrection.length;b++)if(enumColorCorrection[b]==d){a[0]=b;break}})}
function convertDevModeToPT_JobColorCorrection(a,b,c,d){1==d.isColorModel&&(checkFeatureNode(b,addPrivatePrefix("JobColorCorrection")),c=c.privateFeatureReader.read(featuresEnum.ColorCorrection,function(a){return 1==a.length?enumColorCorrection[a[0]<enumColorCorrection.length?a[0]:0]:null},function(){return enumColorCorrection[0]}),b=createFeatureNodePT(a,b,addPrivatePrefix("JobColorCorrection")),"None"==c?createOptionNodePT(a,b,addPskPrefix(c)):createOptionNodePT(a,b,addPrivatePrefix(c)))}
var enumICMRenderingIntent=["AbsoluteColorimetric","RelativeColorimetric","Photographs","BusinessGraphics"];
function completePC_PageICMRenderingIntent(a,b){var c=createFeatureNodePC(a,b,addPskPrefix("PageICMRenderingIntent"),"Color correction");createOptionNodePC(a,c,addPskPrefix("AbsoluteColorimetric"),addPskPrefix("None"));createOptionNodePC(a,c,addPskPrefix("RelativeColorimetric"),addPskPrefix("None"));createOptionNodePC(a,c,addPskPrefix("Photographs"),addPskPrefix("None"));createOptionNodePC(a,c,addPskPrefix("BusinessGraphics"),addPskPrefix("None"))}
function convertPTToDevMode_PageICMRenderingIntent(a,b,c){var d=getOptionFromPT(b,addPskPrefix("PageICMRenderingIntent"));null!=d&&c.publicFeatureWriter.write(featuresEnum.ICMRenderingIntent,1,function(a){if(1==a.length)for(var b=a[0]=0;b<enumICMRenderingIntent.length;b++)if(enumICMRenderingIntent[b]==d){a[0]=b;break}})}
function convertDevModeToPT_PageICMRenderingIntent(a,b,c){checkFeatureNode(b,addPskPrefix("PageICMRenderingIntent"));c=c.publicFeatureReader.read(featuresEnum.ICMRenderingIntent,function(a){return 1==a.length?enumICMRenderingIntent[a[0]<enumICMRenderingIntent.length?a[0]:0]:null},function(){return enumICMRenderingIntent[0]});b=createFeatureNodePT(a,b,addPskPrefix("PageICMRenderingIntent"));createOptionNodePT(a,b,addPskPrefix(c))}
var enumColorAdjustment=["None","Monochrome","RGB","HSL"],enumHueSetting="HueMaster Red Yellow Green Cyan Blue Magenta".split(" ");
function completePC_JobColorAdjustment(a,b){var c=createFeatureNodePC(a,b,addPrivatePrefix("JobColorAdjustment"),"Custom color adjustment"),d;createOptionNodePC(a,c,addPskPrefix("None"),addPskPrefix("None"));d=createOptionNodePC(a,c,addPrivatePrefix("Monochrome"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("Brightness"),addPrivatePrefix("JobMonochromeBrightness"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("Contrast"),addPrivatePrefix("JobMonochromeContrast"));
d=createOptionNodePC(a,c,addPrivatePrefix("RGB"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("ColorAdjustmentID"),addPrivatePrefix("JobColorAdjustmentID"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("RedLevel"),addPrivatePrefix("JobRedLevel"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("GreenLevel"),addPrivatePrefix("JobGreenLevel"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("BlueLevel"),addPrivatePrefix("JobBlueLevel"));
d=createOptionNodePC(a,c,addPrivatePrefix("HSL"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("ColorAdjustmentID"),addPrivatePrefix("JobColorAdjustmentID"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("HueMaster"),addPrivatePrefix("JobHueMaster"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("HueRed"),addPrivatePrefix("JobHueRed"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("HueGreen"),addPrivatePrefix("JobHueGreen"));
createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("HueBlue"),addPrivatePrefix("JobHueBlue"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("HueCyan"),addPrivatePrefix("JobHueCyan"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("HueMagenta"),addPrivatePrefix("JobHueMagenta"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("HueYellow"),addPrivatePrefix("JobHueYellow"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("Saturation"),addPrivatePrefix("JobSaturation"));
createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("Lightness"),addPrivatePrefix("JobLightness"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("Contrast"),addPrivatePrefix("JobContrast"));createParameterDefIntNodePC(a,b,addPrivatePrefix("JobMonochromeBrightness"),0,-100,100,"value","xsd:string");createParameterDefIntNodePC(a,b,addPrivatePrefix("JobMonochromeContrast"),0,-100,100,"value","xsd:string");createParameterDefIntNodePC(a,b,addPrivatePrefix("JobColorAdjustmentID"),
0,0,3,"ID","xsd:string");createParameterDefDecimalNodePC(a,b,addPrivatePrefix("JobRedLevel"),0,-10,10,"0.01","value","xsd:string");createParameterDefDecimalNodePC(a,b,addPrivatePrefix("JobGreenLevel"),0,-10,10,"0.01","value","xsd:string");createParameterDefDecimalNodePC(a,b,addPrivatePrefix("JobBlueLevel"),0,-10,10,"0.01","value","xsd:string");createParameterDefIntNodePC(a,b,addPrivatePrefix("JobHueMaster"),0,-180,180,"value","xsd:string");createParameterDefDecimalNodePC(a,b,addPrivatePrefix("JobHueRed"),
0,-10,10,"0.01","value","xsd:string");createParameterDefDecimalNodePC(a,b,addPrivatePrefix("JobHueGreen"),0,-10,10,"0.01","value","xsd:string");createParameterDefDecimalNodePC(a,b,addPrivatePrefix("JobHueBlue"),0,-10,10,"0.01","value","xsd:string");createParameterDefDecimalNodePC(a,b,addPrivatePrefix("JobHueCyan"),0,-10,10,"0.01","value","xsd:string");createParameterDefDecimalNodePC(a,b,addPrivatePrefix("JobHueMagenta"),0,-10,10,"0.01","value","xsd:string");createParameterDefDecimalNodePC(a,b,addPrivatePrefix("JobHueYellow"),
0,-10,10,"0.01","value","xsd:string");createParameterDefDecimalNodePC(a,b,addPrivatePrefix("JobSaturation"),0,-10,10,"0.01","value","xsd:string");createParameterDefDecimalNodePC(a,b,addPrivatePrefix("JobLightness"),0,-10,10,"0.01","value","xsd:string");createParameterDefDecimalNodePC(a,b,addPrivatePrefix("JobContrast"),0,-10,10,"0.01","value","xsd:string");c=createFeatureNodePC(a,b,addPrivatePrefix("JobColorAdjustmentHueSetting"),"Custom color adjustment hue setting");createOptionNodePC(a,c,addPrivatePrefix("HueMaster"),
addPskPrefix("None"));createOptionNodePC(a,c,addPrivatePrefix("Red"),addPskPrefix("None"));createOptionNodePC(a,c,addPrivatePrefix("Yellow"),addPskPrefix("None"));createOptionNodePC(a,c,addPrivatePrefix("Green"),addPskPrefix("None"));createOptionNodePC(a,c,addPrivatePrefix("Cyan"),addPskPrefix("None"));createOptionNodePC(a,c,addPrivatePrefix("Blue"),addPskPrefix("None"));createOptionNodePC(a,c,addPrivatePrefix("Magenta"),addPskPrefix("None"))}
function convertPTToDevMode_JobColorAdjustment(a,b,c){var d=getOptionFromPT(b,addPrivatePrefix("JobColorAdjustment"));if(null!=d){var e=0,f=0,h=0,k=0,g=0,l=0,p=0,n=0,m=0,w=0,B=0,u=0,q=0,y=0,r=0,A=0,C=null;"Monochrome"==d?(e=getParameterInitIntValuePT(b,addPrivatePrefix("JobMonochromeBrightness")),f=getParameterInitIntValuePT(b,addPrivatePrefix("JobMonochromeContrast"))):"RGB"==d?(h=getParameterInitIntValuePT(b,addPrivatePrefix("JobColorAdjustmentID")),k=getParameterInitDecimalValuePT(b,addPrivatePrefix("JobRedLevel")),
g=getParameterInitDecimalValuePT(b,addPrivatePrefix("JobGreenLevel")),l=getParameterInitDecimalValuePT(b,addPrivatePrefix("JobBlueLevel"))):"HSL"==d&&(h=getParameterInitIntValuePT(b,addPrivatePrefix("JobColorAdjustmentID")),p=getParameterInitIntValuePT(b,addPrivatePrefix("JobHueMaster")),n=getParameterInitDecimalValuePT(b,addPrivatePrefix("JobHueRed")),m=getParameterInitDecimalValuePT(b,addPrivatePrefix("JobHueGreen")),w=getParameterInitDecimalValuePT(b,addPrivatePrefix("JobHueBlue")),B=getParameterInitDecimalValuePT(b,
addPrivatePrefix("JobHueCyan")),u=getParameterInitDecimalValuePT(b,addPrivatePrefix("JobHueMagenta")),q=getParameterInitDecimalValuePT(b,addPrivatePrefix("JobHueYellow")),y=getParameterInitDecimalValuePT(b,addPrivatePrefix("JobSaturation")),r=getParameterInitDecimalValuePT(b,addPrivatePrefix("JobLightness")),A=getParameterInitDecimalValuePT(b,addPrivatePrefix("JobContrast")));C=getOptionFromPT(b,addPrivatePrefix("JobColorAdjustmentHueSetting"));c.privateFeatureWriter.write(featuresEnum.ColorAdjustment,
16,function(a){if(16==a.length){for(var b=0;b<a.length;b++)a[b]=0;if(null!=d)for(b=0;b<enumColorAdjustment.length;b++)if(enumColorAdjustment[b]==d){a[0]|=b<<4&240;break}null!=h&&(a[0]|=h<<8&65280);if(null!=C)for(b=0;b<enumHueSetting.length;b++)if(enumHueSetting[b]==C){a[0]|=b&15;break}null!=e&&(a[1]=e&65535);null!=f&&(a[2]=f&65535);null!=k&&(a[3]=Math.round(100*k)&65535);null!=g&&(a[4]=Math.round(100*g)&65535);null!=l&&(a[5]=Math.round(100*l)&65535);null!=p&&(a[6]=p&65535);null!=n&&(a[7]=Math.round(100*
n)&65535);null!=m&&(a[8]=Math.round(100*m)&65535);null!=w&&(a[9]=Math.round(100*w)&65535);null!=B&&(a[10]=Math.round(100*B)&65535);null!=u&&(a[11]=Math.round(100*u)&65535);null!=q&&(a[12]=Math.round(100*q)&65535);null!=y&&(a[13]=Math.round(100*y)&65535);null!=r&&(a[14]=Math.round(100*r)&65535);null!=A&&(a[15]=Math.round(100*A)&65535)}})}}
function convertDevModeToPT_JobColorAdjustment(a,b,c){checkFeatureNode(b,addPrivatePrefix("JobColorAdjustment"));checkParameterInitNode(b,addPrivatePrefix("JobMonochromeBrightness"));checkParameterInitNode(b,addPrivatePrefix("JobMonochromeContrast"));checkParameterInitNode(b,addPrivatePrefix("JobColorAdjustmentID"));checkParameterInitNode(b,addPrivatePrefix("JobRedLevel"));checkParameterInitNode(b,addPrivatePrefix("JobGreenLevel"));checkParameterInitNode(b,addPrivatePrefix("JobBlueLevel"));checkParameterInitNode(b,
addPrivatePrefix("JobHueMaster"));checkParameterInitNode(b,addPrivatePrefix("JobHueRed"));checkParameterInitNode(b,addPrivatePrefix("JobHueGreen"));checkParameterInitNode(b,addPrivatePrefix("JobHueBlue"));checkParameterInitNode(b,addPrivatePrefix("JobHueCyan"));checkParameterInitNode(b,addPrivatePrefix("JobHueMagenta"));checkParameterInitNode(b,addPrivatePrefix("JobHueYellow"));checkParameterInitNode(b,addPrivatePrefix("JobSaturation"));checkParameterInitNode(b,addPrivatePrefix("JobLightness"));checkParameterInitNode(b,
addPrivatePrefix("JobContrast"));checkFeatureNode(b,addPrivatePrefix("JobColorAdjustmentHueSetting"));c=c.privateFeatureReader.read(featuresEnum.ColorAdjustment,function(a){return 16==a.length?{colorAdjustment:enumColorAdjustment[(a[0]>>4&15)<enumColorAdjustment.length?a[0]>>4&15:0],monochromeBrightness:0==(a[1]&32768)?a[1]:~(~a[1]&65535),monochromeContrast:0==(a[2]&32768)?a[2]:~(~a[2]&65535),colorAdjustmentID:a[0]>>8&255,rgbRed:(0==(a[3]&32768)?a[3]:~(~a[3]&65535))/100,rgbGreen:(0==(a[4]&32768)?
a[4]:~(~a[4]&65535))/100,rgbBlue:(0==(a[5]&32768)?a[5]:~(~a[5]&65535))/100,hueMaster:0==(a[6]&32768)?a[6]:~(~a[6]&65535),hueRed:(0==(a[7]&32768)?a[7]:~(~a[7]&65535))/100,hueGreen:(0==(a[8]&32768)?a[8]:~(~a[8]&65535))/100,hueBlue:(0==(a[9]&32768)?a[9]:~(~a[9]&65535))/100,hueCyan:(0==(a[10]&32768)?a[10]:~(~a[10]&65535))/100,hueMagenta:(0==(a[11]&32768)?a[11]:~(~a[11]&65535))/100,hueYellow:(0==(a[12]&32768)?a[12]:~(~a[12]&65535))/100,hueSaturation:(0==(a[13]&32768)?a[13]:~(~a[13]&65535))/100,hueLightness:(0==
(a[14]&32768)?a[14]:~(~a[14]&65535))/100,hueContrast:(0==(a[15]&32768)?a[15]:~(~a[15]&65535))/100,hueSetting:enumHueSetting[(a[0]&15)<enumHueSetting.length?a[0]&15:0]}:null},function(){return{colorAdjustment:enumColorAdjustment[0],monochromeBrightness:0,monochromeContrast:0,colorAdjustmentID:0,rgbRed:0,rgbGreen:0,rgbBlue:0,hueMaster:0,hueRed:0,hueGreen:0,hueBlue:0,hueCyan:0,hueMagenta:0,hueYellow:0,hueSaturation:0,hueLightness:0,hueContrast:0,hueSetting:enumHueSetting[0]}});var d=createFeatureNodePT(a,
b,addPrivatePrefix("JobColorAdjustment"));"None"==c.colorAdjustment?d=createOptionNodePT(a,d,addPskPrefix(c.colorAdjustment)):"Monochrome"==c.colorAdjustment?(d=createOptionNodePT(a,d,addPrivatePrefix(c.colorAdjustment)),createScoredPropertyWithParameterRefPT(a,d,addPrivatePrefix("Brightness"),addPrivatePrefix("JobMonochromeBrightness")),createScoredPropertyWithParameterRefPT(a,d,addPrivatePrefix("Contrast"),addPrivatePrefix("JobMonochromeContrast")),createParamterInitIntNodePT(a,b,addPrivatePrefix("JobMonochromeBrightness"),
c.monochromeBrightness),createParamterInitIntNodePT(a,b,addPrivatePrefix("JobMonochromeContrast"),c.monochromeContrast)):"RGB"==c.colorAdjustment?(d=createOptionNodePT(a,d,addPrivatePrefix(c.colorAdjustment)),createScoredPropertyWithParameterRefPT(a,d,addPrivatePrefix("ColorAdjustmentID"),addPrivatePrefix("JobColorAdjustmentID")),createScoredPropertyWithParameterRefPT(a,d,addPrivatePrefix("RedLevel"),addPrivatePrefix("JobRedLevel")),createScoredPropertyWithParameterRefPT(a,d,addPrivatePrefix("GreenLevel"),
addPrivatePrefix("JobGreenLevel")),createScoredPropertyWithParameterRefPT(a,d,addPrivatePrefix("BlueLevel"),addPrivatePrefix("JobBlueLevel")),createParamterInitIntNodePT(a,b,addPrivatePrefix("JobColorAdjustmentID"),c.colorAdjustmentID),createParamterInitDecimalNodePT(a,b,addPrivatePrefix("JobRedLevel"),c.rgbRed.toFixed(2)),createParamterInitDecimalNodePT(a,b,addPrivatePrefix("JobGreenLevel"),c.rgbGreen.toFixed(2)),createParamterInitDecimalNodePT(a,b,addPrivatePrefix("JobBlueLevel"),c.rgbBlue.toFixed(2))):
"HSL"==c.colorAdjustment&&(d=createOptionNodePT(a,d,addPrivatePrefix(c.colorAdjustment)),createScoredPropertyWithParameterRefPT(a,d,addPrivatePrefix("ColorAdjustmentID"),addPrivatePrefix("JobColorAdjustmentID")),createScoredPropertyWithParameterRefPT(a,d,addPrivatePrefix("HueMaster"),addPrivatePrefix("JobHueMaster")),createScoredPropertyWithParameterRefPT(a,d,addPrivatePrefix("HueRed"),addPrivatePrefix("JobHueRed")),createScoredPropertyWithParameterRefPT(a,d,addPrivatePrefix("HueGreen"),addPrivatePrefix("JobHueGreen")),
createScoredPropertyWithParameterRefPT(a,d,addPrivatePrefix("HueBlue"),addPrivatePrefix("JobHueBlue")),createScoredPropertyWithParameterRefPT(a,d,addPrivatePrefix("HueCyan"),addPrivatePrefix("JobHueCyan")),createScoredPropertyWithParameterRefPT(a,d,addPrivatePrefix("HueMagenta"),addPrivatePrefix("JobHueMagenta")),createScoredPropertyWithParameterRefPT(a,d,addPrivatePrefix("HueYellow"),addPrivatePrefix("JobHueYellow")),createScoredPropertyWithParameterRefPT(a,d,addPrivatePrefix("Saturation"),addPrivatePrefix("JobSaturation")),
createScoredPropertyWithParameterRefPT(a,d,addPrivatePrefix("Lightness"),addPrivatePrefix("JobLightness")),createScoredPropertyWithParameterRefPT(a,d,addPrivatePrefix("Contrast"),addPrivatePrefix("JobContrast")),createParamterInitIntNodePT(a,b,addPrivatePrefix("JobColorAdjustmentID"),c.colorAdjustmentID),createParamterInitIntNodePT(a,b,addPrivatePrefix("JobHueMaster"),c.hueMaster),createParamterInitDecimalNodePT(a,b,addPrivatePrefix("JobHueRed"),c.hueRed.toFixed(2)),createParamterInitDecimalNodePT(a,
b,addPrivatePrefix("JobHueGreen"),c.hueGreen.toFixed(2)),createParamterInitDecimalNodePT(a,b,addPrivatePrefix("JobHueBlue"),c.hueBlue.toFixed(2)),createParamterInitDecimalNodePT(a,b,addPrivatePrefix("JobHueCyan"),c.hueCyan.toFixed(2)),createParamterInitDecimalNodePT(a,b,addPrivatePrefix("JobHueMagenta"),c.hueMagenta.toFixed(2)),createParamterInitDecimalNodePT(a,b,addPrivatePrefix("JobHueYellow"),c.hueYellow.toFixed(2)),createParamterInitDecimalNodePT(a,b,addPrivatePrefix("JobSaturation"),c.hueSaturation.toFixed(2)),
createParamterInitDecimalNodePT(a,b,addPrivatePrefix("JobLightness"),c.hueLightness.toFixed(2)),createParamterInitDecimalNodePT(a,b,addPrivatePrefix("JobContrast"),c.hueContrast.toFixed(2)));d=createFeatureNodePT(a,b,addPrivatePrefix("JobColorAdjustmentHueSetting"));createOptionNodePT(a,d,addPrivatePrefix(c.hueSetting))}
function completePC_JobEcoPrint(a,b,c){5==c.ecoPrintLevel?(c=createFeatureNodePC(a,b,addPrivatePrefix("JobEcoPrint"),"EcoPrint"),createOptionNodePC(a,c,addPskPrefix("Off"),addPskPrefix("None")),c=createOptionNodePC(a,c,addPskPrefix("On"),addPskPrefix("None")),createScoredPropertyWithParameterRefPC(a,c,addPrivatePrefix("EcoPrintLevel"),addPrivatePrefix("JobEcoPrintLevel")),createParameterDefIntNodePC(a,b,addPrivatePrefix("JobEcoPrintLevel"),3,1,5,"number","xsd:string")):(c=createFeatureNodePC(a,b,
addPrivatePrefix("JobEcoPrint"),"EcoPrint"),createOptionNodePC(a,c,addPskPrefix("Off"),addPskPrefix("None")),createOptionNodePC(a,c,addPskPrefix("On"),addPskPrefix("None")))}
function convertPTToDevMode_JobEcoPrint(a,b,c){var d=getOptionFromPT(b,addPrivatePrefix("JobEcoPrint"));if(null!=d){var e=getParameterInitIntValuePT(b,addPrivatePrefix("JobEcoPrintLevel"));c.privateFeatureWriter.write(featuresEnum.EcoPrint,1,function(a){if(1==a.length){for(var b=a[0]=0;b<enumOffOn.length;b++)if(enumOffOn[b]==d){a[0]|=b&255;break}null!=e&&(a[0]|=e<<8&65280)}})}}
function convertDevModeToPT_JobEcoPrint(a,b,c,d){c=c.privateFeatureReader.read(featuresEnum.EcoPrint,function(a){return{ecoPrint:enumOffOn[(a[0]&255)<enumOffOn.length?a[0]&255:0],level:a[0]>>8&255}},function(){return{ecoPrint:enumOffOn[0],level:3}});5==d.ecoPrintLevel?(checkFeatureNode(b,addPrivatePrefix("JobEcoPrint")),checkParameterInitNode(b,addPrivatePrefix("JobEcoPrintLevel")),d=createFeatureNodePT(a,b,addPrivatePrefix("JobEcoPrint"),"EcoPrint"),d=createOptionNodePT(a,d,addPskPrefix(c.ecoPrint)),
"On"==c.ecoPrint&&(createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("EcoPrintLevel"),addPrivatePrefix("JobEcoPrintLevel")),createParamterInitIntNodePT(a,b,addPrivatePrefix("JobEcoPrintLevel"),c.level))):(checkFeatureNode(b,addPrivatePrefix("JobEcoPrint")),d=createFeatureNodePT(a,b,addPrivatePrefix("JobEcoPrint"),"EcoPrint"),d=createOptionNodePT(a,d,addPskPrefix(c.ecoPrint)))}var enumNegativeImage=["None","Negative"];
function completePC_NegativeImage(a,b){var c=createFeatureNodePC(a,b,addPskPrefix("PageNegativeImage"),"Negative Image");createOptionNodePC(a,c,addPskPrefix("Negative"),addPskPrefix("DeviceSettings"));createOptionNodePC(a,c,addPskPrefix("None"),null)}
function convertPTToDevMode_NegativeImage(a,b,c){var d=getOptionFromPT(b,addPskPrefix("PageNegativeImage"));null!=d&&c.publicFeatureWriter.write(featuresEnum.Negative,1,function(a){if(1==a.length)for(var b=a[0]=0;b<enumNegativeImage.length;b++)if(enumNegativeImage[b]==d){a[0]=b;break}})}
function convertDevModeToPT_NegativeImage(a,b,c){checkFeatureNode(b,addPskPrefix("PageNegativeImage"));c=c.publicFeatureReader.read(featuresEnum.Negative,function(a){return 1==a.length?enumNegativeImage[a[0]<enumNegativeImage.length?a[0]:0]:null},function(){return enumNegativeImage[0]});b=createFeatureNodePT(a,b,addPskPrefix("PageNegativeImage"));createOptionNodePT(a,b,addPskPrefix(c))}var enumMirrorImage=["None","MirrorImageWidth","MirrorImageHeight"];
function completePC_MirrorImage(a,b){var c=createFeatureNodePC(a,b,addPskPrefix("PageMirrorImage"),"Mirror Image");createOptionNodePC(a,c,addPskPrefix("MirrorImageWidth"),addPskPrefix("DeviceSettings"));createOptionNodePC(a,c,addPskPrefix("MirrorImageHeight"),addPskPrefix("DeviceSettings"));createOptionNodePC(a,c,addPskPrefix("None"),null)}
function convertPTToDevMode_MirrorImage(a,b,c){var d=getOptionFromPT(b,addPskPrefix("PageMirrorImage"));null!=d&&c.publicFeatureWriter.write(featuresEnum.Mirror,1,function(a){if(1==a.length)for(var b=a[0]=0;b<enumMirrorImage.length;b++)if(enumMirrorImage[b]==d){a[0]=b;break}})}
function convertDevModeToPT_MirrorImage(a,b,c){checkFeatureNode(b,addPskPrefix("PageMirrorImage"));c=c.publicFeatureReader.read(featuresEnum.Mirror,function(a){return 1==a.length?enumMirrorImage[a[0]<enumMirrorImage.length?a[0]:0]:null},function(){return enumMirrorImage[0]});b=createFeatureNodePT(a,b,addPskPrefix("PageMirrorImage"));createOptionNodePT(a,b,addPskPrefix(c))}
var enumWatermark=["None","Text","BitmapGraphic"],enumWatermarkTextFontStyle=["Regular","Bold","Italic","BoldItalic"],enumWatermarkBitmapColor=["Black","Color"],enumWatermarkScaleOption=["AutoFit","Manual"],enumWatermarkRotateAroundCenterOption=["Off","On"],enumWatermarkLayering=["Overlay","Underlay"],enumWatermarkPageSelection=["None","AllPages","FirstPageOnly","ExceptFirstPage","OnlyOnSpecifiedPages"];
function completePC_Watermark(a,b){var c=createFeatureNodePC(a,b,addPskPrefix("PageWatermark"),"Watermark"),d;createOptionNodePC(a,c,addPrivatePrefix("None"),addPskPrefix("None"));d=createOptionNodePC(a,c,addPskPrefix("Text"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPskPrefix("OriginWidth"),addPskPrefix("PageWatermarkOriginWidth"));createScoredPropertyWithParameterRefPC(a,d,addPskPrefix("OriginHeight"),addPskPrefix("PageWatermarkOriginHeight"));createScoredPropertyWithParameterRefPC(a,
d,addPrivatePrefix("OriginPositionX"),addPrivatePrefix("PageWatermarkOriginPositionX"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("OriginPositionY"),addPrivatePrefix("PageWatermarkOriginPositionY"));createScoredPropertyWithParameterRefPC(a,d,addPskPrefix("FontColor"),addPskPrefix("PageWatermarkTextColor"));createScoredPropertyWithParameterRefPC(a,d,addPskPrefix("FontSize"),addPskPrefix("PageWatermarkTextFontSize"));createScoredPropertyWithParameterRefPC(a,d,addPskPrefix("Text"),
addPskPrefix("PageWatermarkTextText"));createScoredPropertyWithParameterRefPC(a,d,addPskPrefix("Transparency"),addPskPrefix("PageWatermarkTransparency"));createScoredPropertyWithParameterRefPC(a,d,addPskPrefix("Angle"),addPskPrefix("PageWatermarkTextAngle"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("FontName"),addPrivatePrefix("PageWatermarkTextFontName"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("FontStyle"),addPrivatePrefix("PageWatermarkTextFontStyle"));createScoredPropertyWithParameterRefPC(a,
d,addPrivatePrefix("SeparationCount"),addPrivatePrefix("PageWatermarkTextCount"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("SeparationCountSize"),addPrivatePrefix("PageWatermarkTextCountSize"));d=createOptionNodePC(a,c,addPrivatePrefix("BitmapGraphic"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPskPrefix("OriginWidth"),addPskPrefix("PageWatermarkOriginWidth"));createScoredPropertyWithParameterRefPC(a,d,addPskPrefix("OriginHeight"),addPskPrefix("PageWatermarkOriginHeight"));
createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("OriginPositionX"),addPrivatePrefix("PageWatermarkOriginPositionX"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("OriginPositionY"),addPrivatePrefix("PageWatermarkOriginPositionY"));createScoredPropertyWithParameterRefPC(a,d,addPskPrefix("Transparency"),addPskPrefix("PageWatermarkTransparency"));createScoredPropertyWithParameterRefPC(a,d,addPskPrefix("Angle"),addPskPrefix("PageWatermarkTextAngle"));createScoredPropertyWithParameterRefPC(a,
d,addPrivatePrefix("BitmapFilePath"),addPrivatePrefix("PageWatermarkBitmapFilePath"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("BitmapColor"),addPrivatePrefix("PageWatermarkBitmapColor"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("ScaleOption"),addPrivatePrefix("PageWatermarkScaleOption"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("BitmapScaleValue"),addPrivatePrefix("PageWatermarkBitmapScaleValue"));createScoredPropertyWithParameterRefPC(a,d,
addPrivatePrefix("RotateOption"),addPrivatePrefix("PageWatermarkRotateAroundCenterOption"));d=createFeatureNodePC(a,c,addPskPrefix("Layering"),"Layering");createOptionNodePC(a,d,addPskPrefix("Overlay"),addPskPrefix("None"));createOptionNodePC(a,d,addPskPrefix("Underlay"),addPskPrefix("None"));d=createFeatureNodePC(a,c,addPrivatePrefix("PrintOnCover"),"Outside of front cover");createOptionNodePC(a,d,addPskPrefix("Off"),addPskPrefix("None"));createOptionNodePC(a,d,addPskPrefix("On"),addPskPrefix("None"));
d=createFeatureNodePC(a,c,addPrivatePrefix("PageWatermarkPageSelection"),"Print onto");createOptionNodePC(a,d,addPskPrefix("None"),addPskPrefix("None"));createOptionNodePC(a,d,addPrivatePrefix("AllPages"),addPskPrefix("None"));createOptionNodePC(a,d,addPrivatePrefix("FirstPageOnly"),addPskPrefix("None"));createOptionNodePC(a,d,addPrivatePrefix("ExceptFirstPage"),addPskPrefix("None"));c=createOptionNodePC(a,d,addPrivatePrefix("OnlyOnSpecifiedPages"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,
c,addPrivatePrefix("SpecificPages"),addPrivatePrefix("PageWatermarkPageRange"));createParameterDefIntNodePC(a,b,addPskPrefix("PageWatermarkOriginWidth"),0,0,207430,"microns","xsd:string");createParameterDefIntNodePC(a,b,addPskPrefix("PageWatermarkOriginHeight"),0,0,270930,"microns","xsd:string");createParameterDefIntNodePC(a,b,addPrivatePrefix("PageWatermarkOriginPositionX"),0,-150,150,"position","xsd:string");createParameterDefIntNodePC(a,b,addPrivatePrefix("PageWatermarkOriginPositionY"),0,-150,
150,"position","xsd:string");createParameterDefStringNodePC(a,b,addPskPrefix("PageWatermarkTextColor"),"#FF000000",0,9,"sRGB","xsd:string");createParameterDefIntNodePC(a,b,addPskPrefix("PageWatermarkTextFontSize"),150,1,300,"points","xsd:string");createParameterDefStringNodePC(a,b,addPskPrefix("PageWatermarkTextText"),"",0,215,"characters","xsd:string");createParameterDefIntNodePC(a,b,addPskPrefix("PageWatermarkTransparency"),75,0,100,"percent","xsd:string");createParameterDefIntNodePC(a,b,addPskPrefix("PageWatermarkTextAngle"),
55,0,359,"degrees","xsd:string");createParameterDefStringNodePC(a,b,addPrivatePrefix("PageWatermarkTextFontName"),"Arial",1,171,"characters","xsd:string");createParameterDefStringNodePC(a,b,addPrivatePrefix("PageWatermarkTextFontStyle"),"Regular",1,32,"characters","xsd:string");createParameterDefIntNodePC(a,b,addPrivatePrefix("PageWatermarkTextCount"),1,1,20,"count","xsd:string");createParameterDefIntNodePC(a,b,addPrivatePrefix("PageWatermarkTextCountSize"),0,0,508E3,"microns","xsd:string");createParameterDefStringNodePC(a,
b,addPrivatePrefix("PageWatermarkBitmapFilePath"),"",0,1387,"characters","xsd:string");createParameterDefStringNodePC(a,b,addPrivatePrefix("PageWatermarkBitmapColor"),"Color",1,32,"characters","xsd:string");createParameterDefStringNodePC(a,b,addPrivatePrefix("PageWatermarkScaleOption"),"Manual",1,32,"characters","xsd:string");createParameterDefIntNodePC(a,b,addPrivatePrefix("PageWatermarkBitmapScaleValue"),100,1,1E3,"percent","xsd:string");createParameterDefStringNodePC(a,b,addPrivatePrefix("PageWatermarkRotateAroundCenterOption"),
"On",1,32,"characters","xsd:string");createParameterDefStringNodePC(a,b,addPrivatePrefix("PageWatermarkPageRange")," ",1,40,"characters","xsd:string");createPropertyNodePC(a,b,addPrivatePrefix("PageWatermarkName"),"","xsd:string")}
function convertPTToDevMode_Watermark(a,b,c){a=getFeatureFromPT(b,addPskPrefix("PageWatermark"));var d=getOptionFromPT(b,addPskPrefix("PageWatermark")),e=getPropertyStringValuePT(b,addPrivatePrefix("PageWatermarkName"));if(null!=a&&null!=d){var f=null,h=null,k=null,g=null,l=null,p=null,n=null,m=null,w=null,B=null,u=null,q=null,y=null,r=null,A=null,C=null,H=null,z=null,D=null,E=null,F=null,G=null,x=null;null!=e&&(x=base64StringToArray(e));if("None"!=d)if(l=getParameterInitIntValuePT(b,addPskPrefix("PageWatermarkOriginWidth")),
p=getParameterInitIntValuePT(b,addPskPrefix("PageWatermarkOriginHeight")),n=getParameterInitIntValuePT(b,addPrivatePrefix("PageWatermarkOriginPositionX")),m=getParameterInitIntValuePT(b,addPrivatePrefix("PageWatermarkOriginPositionY")),w=getParameterInitIntValuePT(b,addPskPrefix("PageWatermarkTransparency")),B=getParameterInitIntValuePT(b,addPskPrefix("PageWatermarkTextAngle")),F=getParameterInitStringValuePT(b,addPrivatePrefix("PageWatermarkRotateAroundCenterOption")),"Text"==d){var e=getParameterInitStringValuePT(b,
addPskPrefix("PageWatermarkTextText")),q=getParameterInitStringValuePT(b,addPskPrefix("PageWatermarkTextColor")),y=getParameterInitIntValuePT(b,addPskPrefix("PageWatermarkTextFontSize")),I=getParameterInitStringValuePT(b,addPrivatePrefix("PageWatermarkTextFontName")),A=getParameterInitStringValuePT(b,addPrivatePrefix("PageWatermarkTextFontStyle")),C=getParameterInitIntValuePT(b,addPrivatePrefix("PageWatermarkTextCount")),H=getParameterInitIntValuePT(b,addPrivatePrefix("PageWatermarkTextCountSize"));
null!=e&&(u=base64StringToArray(e));null!=I&&(r=base64StringToArray(I))}else"BitmapGraphic"==d&&(e=getParameterInitStringValuePT(b,addPrivatePrefix("PageWatermarkBitmapFilePath")),D=getParameterInitStringValuePT(b,addPrivatePrefix("PageWatermarkBitmapColor")),E=getParameterInitStringValuePT(b,addPrivatePrefix("PageWatermarkScaleOption")),G=getParameterInitIntValuePT(b,addPrivatePrefix("PageWatermarkBitmapScaleValue")),null!=e&&(z=base64StringToArray(e)));var f=getOptionFromPT(a,addPskPrefix("Layering")),
h=getOptionFromPT(a,addPrivatePrefix("PrintOnCover")),k=getOptionFromPT(a,addPrivatePrefix("PageWatermarkPageSelection")),g=getParameterInitStringValuePT(b,addPrivatePrefix("PageWatermarkPageRange")),J=23+(null!=g?g.length+1:0)+(null!=u?u.length+1:0)+(null!=q?q.length+1:0)+(null!=r?r.length+1:0)+(null!=z?z.length+1:0)+(null!=x?x.length+1:0);c.publicFeatureWriter.write(featuresEnum.Watermark,J,function(a){if(a.length==J){for(var b=23,c=0;c<a.length;c++)a[c]=0;if(null!=d)for(c=0;c<enumWatermark.length;c++)if(enumWatermark[c]==
d){a[0]|=c&255;break}if(null!=f)for(c=0;c<enumWatermarkLayering.length;c++)if(enumWatermarkLayering[c]==f){a[0]|=c<<8&65280;break}if(null!=h)for(c=0;c<enumOffOn.length;c++)if(enumOffOn[c]==h){a[1]|=c&255;break}if(null!=k)for(c=0;c<enumWatermarkPageSelection.length;c++)if(enumWatermarkPageSelection[c]==k){a[1]|=c<<8&65280;break}null!=g&&b+g.length<a.length&&(a[2]=b,a[b]=g.length,stringToBin(g,a,b+1,g.length),b+=g.length+1);null!=l&&(a[3]=l&65535,a[4]=l>>16);null!=p&&(a[5]=p&65535,a[6]=p>>16);null!=
n&&(a[7]=n);null!=m&&(a[8]=m);null!=w&&(a[9]=w);null!=B&&(a[10]=B);null!=u&&b+u.length<a.length&&(a[11]=b,a[b]=u.length,binCopy(u,a,b+1,u.length),b+=u.length+1);null!=q&&b+q.length<a.length&&(a[12]=b,a[b]=q.length,stringToBin(q,a,b+1,q.length),b+=q.length+1);null!=y&&(a[13]=y);null!=r&&b+r.length<a.length&&(a[14]=b,a[b]=r.length,binCopy(r,a,b+1,r.length),b+=r.length+1);if(null!=A)for(c=0;c<enumWatermarkTextFontStyle.length;c++)if(enumWatermarkTextFontStyle[c]==A){a[15]|=c&255;break}null!=C&&(a[15]|=
C<<8&65280);null!=H&&(a[16]=H&65535,a[17]=H>>16);null!=z&&b+z.length<a.length&&(a[18]=b,a[b]=z.length,binCopy(z,a,b+1,z.length),b+=z.length+1);if(null!=D)for(c=0;c<enumWatermarkBitmapColor.length;c++)if(enumWatermarkBitmapColor[c]==D){a[19]|=c&255;break}if(null!=E)for(c=0;c<enumWatermarkScaleOption.length;c++)if(enumWatermarkScaleOption[c]==E){a[19]|=c<<8&65280;break}null!=G&&(a[20]=G);if(null!=F)for(c=0;c<enumWatermarkRotateAroundCenterOption.length;c++)if(enumWatermarkRotateAroundCenterOption[c]==
F){a[21]|=c&255;break}null!=x&&b+x.length<a.length&&(a[22]=b,a[b]=x.length,binCopy(x,a,b+1,x.length))}})}}
function convertDevModeToPT_Watermark(a,b,c){checkFeatureNode(b,addPskPrefix("PageWatermark"));checkParameterInitNode(b,addPskPrefix("PageWatermarkOriginWidth"));checkParameterInitNode(b,addPskPrefix("PageWatermarkOriginHeight"));checkParameterInitNode(b,addPrivatePrefix("PageWatermarkOriginPositionX"));checkParameterInitNode(b,addPrivatePrefix("PageWatermarkOriginPositionY"));checkParameterInitNode(b,addPskPrefix("PageWatermarkTransparency"));checkParameterInitNode(b,addPskPrefix("PageWatermarkTextAngle"));
checkParameterInitNode(b,addPskPrefix("PageWatermarkTextColor"));checkParameterInitNode(b,addPskPrefix("PageWatermarkTextFontSize"));checkParameterInitNode(b,addPskPrefix("PageWatermarkTextText"));checkParameterInitNode(b,addPrivatePrefix("PageWatermarkTextFontName"));checkParameterInitNode(b,addPrivatePrefix("PageWatermarkTextFontStyle"));checkParameterInitNode(b,addPrivatePrefix("PageWatermarkTextCount"));checkParameterInitNode(b,addPrivatePrefix("PageWatermarkTextCountSize"));checkParameterInitNode(b,
addPrivatePrefix("PageWatermarkBitmapFilePath"));checkParameterInitNode(b,addPrivatePrefix("PageWatermarkBitmapColor"));checkParameterInitNode(b,addPrivatePrefix("PageWatermarkScaleOption"));checkParameterInitNode(b,addPrivatePrefix("PageWatermarkBitmapScaleValue"));checkParameterInitNode(b,addPrivatePrefix("PageWatermarkPageRange"));checkParameterInitNode(b,addPrivatePrefix("PageWatermarkRotateAroundCenterOption"));checkPropertyNode(b,addPrivatePrefix("PageWatermarkName"));c=c.publicFeatureReader.read(featuresEnum.Watermark,
function(a){return 23<=a.length&&a.length==23+(0==a[2]?0:a[a[2]]+1)+(0==a[11]?0:a[a[11]]+1)+(0==a[12]?0:a[a[12]]+1)+(0==a[14]?0:a[a[14]]+1)+(0==a[18]?0:a[a[18]]+1)+(0==a[22]?0:a[a[22]]+1)?{watermark:enumWatermark[(a[0]&255)<enumWatermark.length?a[0]&255:0],layering:enumWatermarkLayering[(a[0]>>8&255)<enumWatermarkLayering.length?a[0]>>8&255:0],printOnCover:enumOffOn[(a[1]&255)<enumOffOn.length?a[1]&255:0],pageSelection:enumWatermarkPageSelection[(a[1]>>8&255)<enumWatermarkPageSelection.length?a[1]>>
8&255:0],selectedPages:0==a[2]?"":binToString(a,a[2]+1,a[a[2]]),originWidth:a[4]<<16|a[3],originHeight:a[6]<<16|a[5],originPostionX:0==(a[7]&32768)?a[7]:~(~a[7]&65535),originPostionY:0==(a[8]&32768)?a[8]:~(~a[8]&65535),transparency:a[9],angle:a[10],text:0==a[11]?"":arraySectionToBase64String(a,a[11]+1,a[a[11]]),textColor:0==a[12]?"":binToString(a,a[12]+1,a[a[12]]),textSize:a[13],textFontName:0==a[14]?"":arraySectionToBase64String(a,a[14]+1,a[a[14]]),textFontStyle:enumWatermarkTextFontStyle[(a[15]&
255)<enumWatermarkTextFontStyle.length?a[15]&255:0],textCount:a[15]>>8,textCountSize:a[17]<<16|a[16],bitmapFilePath:0==a[18]?"":arraySectionToBase64String(a,a[18]+1,a[a[18]]),bitmapColor:enumWatermarkBitmapColor[(a[19]&255)<enumWatermarkBitmapColor.length?a[19]&255:0],bitmapScaleOption:enumWatermarkScaleOption[(a[19]>>8&255)<enumWatermarkScaleOption.length?a[19]>>8&255:0],bitmapScaleValue:a[20],bitmapRotateOption:enumWatermarkRotateAroundCenterOption[(a[21]&255)<enumWatermarkRotateAroundCenterOption.length?
a[21]&255:0],watermarkName:0==a[22]?"":arraySectionToBase64String(a,a[22]+1,a[a[22]])}:null},function(){return{watermark:enumWatermark[0],layering:enumWatermarkLayering[0],printOnCover:enumOffOn[0],pageSelection:enumWatermarkPageSelection[0],selectedPages:null,originWidth:null,originHeight:null,originPostionX:null,originPostionY:null,transparency:null,angle:null,text:null,textColor:null,textSize:null,textFontName:null,textFontStyle:null,textCount:null,textCountSize:null,bitmapFilePath:null,bitmapColor:enumWatermarkBitmapColor[0],
bitmapScaleOption:null,bitmapRotateOption:null,bitmapScaleValue:null,watermarkName:""}});var d=createFeatureNodePT(a,b,addPskPrefix("PageWatermark")),e;e="Text"==c.watermark?createOptionNodePT(a,d,addPskPrefix(c.watermark)):createOptionNodePT(a,d,addPrivatePrefix(c.watermark));"None"!=c.watermark&&(createScoredPropertyWithParameterRefPT(a,e,addPskPrefix("OriginWidth"),addPskPrefix("PageWatermarkOriginWidth")),createScoredPropertyWithParameterRefPT(a,e,addPskPrefix("OriginHeight"),addPskPrefix("PageWatermarkOriginHeight")),
createScoredPropertyWithParameterRefPT(a,e,addPrivatePrefix("OriginPositionX"),addPrivatePrefix("PageWatermarkOriginPositionX")),createScoredPropertyWithParameterRefPT(a,e,addPrivatePrefix("OriginPositionY"),addPrivatePrefix("PageWatermarkOriginPositionY")),createScoredPropertyWithParameterRefPT(a,e,addPskPrefix("Transparency"),addPskPrefix("PageWatermarkTransparency")),createScoredPropertyWithParameterRefPT(a,e,addPskPrefix("Angle"),addPskPrefix("PageWatermarkTextAngle")),createScoredPropertyWithParameterRefPT(a,
e,addPrivatePrefix("RotateOption"),addPrivatePrefix("PageWatermarkRotateAroundCenterOption")),"Text"==c.watermark?(createScoredPropertyWithParameterRefPT(a,e,addPskPrefix("FontColor"),addPskPrefix("PageWatermarkTextColor")),createScoredPropertyWithParameterRefPT(a,e,addPskPrefix("FontSize"),addPskPrefix("PageWatermarkTextFontSize")),createScoredPropertyWithParameterRefPT(a,e,addPskPrefix("Text"),addPskPrefix("PageWatermarkTextText")),createScoredPropertyWithParameterRefPT(a,e,addPrivatePrefix("FontName"),
addPrivatePrefix("PageWatermarkTextFontName")),createScoredPropertyWithParameterRefPT(a,e,addPrivatePrefix("FontStyle"),addPrivatePrefix("PageWatermarkTextFontStyle")),createScoredPropertyWithParameterRefPT(a,e,addPrivatePrefix("SeparationCount"),addPrivatePrefix("PageWatermarkTextCount")),createScoredPropertyWithParameterRefPT(a,e,addPrivatePrefix("SeparationCountSize"),addPrivatePrefix("PageWatermarkTextCountSize"))):"BitmapGraphic"==c.watermark&&(createScoredPropertyWithParameterRefPT(a,e,addPrivatePrefix("BitmapFilePath"),
addPrivatePrefix("PageWatermarkBitmapFilePath")),createScoredPropertyWithParameterRefPT(a,e,addPrivatePrefix("BitmapColor"),addPrivatePrefix("PageWatermarkBitmapColor")),createScoredPropertyWithParameterRefPT(a,e,addPrivatePrefix("ScaleOption"),addPrivatePrefix("PageWatermarkScaleOption")),createScoredPropertyWithParameterRefPT(a,e,addPrivatePrefix("BitmapScaleValue"),addPrivatePrefix("PageWatermarkBitmapScaleValue"))),createParamterInitIntNodePT(a,b,addPskPrefix("PageWatermarkOriginWidth"),c.originWidth),
createParamterInitIntNodePT(a,b,addPskPrefix("PageWatermarkOriginHeight"),c.originHeight),createParamterInitIntNodePT(a,b,addPrivatePrefix("PageWatermarkOriginPositionX"),c.originPostionX),createParamterInitIntNodePT(a,b,addPrivatePrefix("PageWatermarkOriginPositionY"),c.originPostionY),createParamterInitIntNodePT(a,b,addPskPrefix("PageWatermarkTransparency"),c.transparency),createParamterInitIntNodePT(a,b,addPskPrefix("PageWatermarkTextAngle"),c.angle),createParamterInitStringNodePT(a,b,addPrivatePrefix("PageWatermarkRotateAroundCenterOption"),
c.bitmapRotateOption),"Text"==c.watermark?(createParamterInitStringNodePT(a,b,addPskPrefix("PageWatermarkTextText"),c.text),createParamterInitStringNodePT(a,b,addPskPrefix("PageWatermarkTextColor"),c.textColor),createParamterInitIntNodePT(a,b,addPskPrefix("PageWatermarkTextFontSize"),c.textSize),createParamterInitStringNodePT(a,b,addPrivatePrefix("PageWatermarkTextFontName"),c.textFontName),createParamterInitStringNodePT(a,b,addPrivatePrefix("PageWatermarkTextFontStyle"),c.textFontStyle),createParamterInitIntNodePT(a,
b,addPrivatePrefix("PageWatermarkTextCount"),c.textCount),createParamterInitIntNodePT(a,b,addPrivatePrefix("PageWatermarkTextCountSize"),c.textCountSize)):"BitmapGraphic"==c.watermark&&(createParamterInitStringNodePT(a,b,addPrivatePrefix("PageWatermarkBitmapFilePath"),c.bitmapFilePath),createParamterInitStringNodePT(a,b,addPrivatePrefix("PageWatermarkBitmapColor"),c.bitmapColor),createParamterInitStringNodePT(a,b,addPrivatePrefix("PageWatermarkScaleOption"),c.bitmapScaleOption),createParamterInitIntNodePT(a,
b,addPrivatePrefix("PageWatermarkBitmapScaleValue"),c.bitmapScaleValue)));e=createFeatureNodePT(a,d,addPskPrefix("Layering"));createOptionNodePT(a,e,addPskPrefix(c.layering));e=createFeatureNodePT(a,d,addPrivatePrefix("PrintOnCover"));createOptionNodePT(a,e,addPskPrefix(c.printOnCover));e=createFeatureNodePT(a,d,addPrivatePrefix("PageWatermarkPageSelection"));"None"==c.pageSelection?createOptionNodePT(a,e,addPskPrefix(c.pageSelection)):(d=createOptionNodePT(a,e,addPrivatePrefix(c.pageSelection)),
"OnlyOnSpecifiedPages"==c.pageSelection&&(createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("SpecificPages"),addPrivatePrefix("PageWatermarkPageRange")),createParamterInitStringNodePT(a,b,addPrivatePrefix("PageWatermarkPageRange"),c.selectedPages)));createPropertyNodePT(a,b,addPrivatePrefix("PageWatermarkName"),c.watermarkName,"xsd:string")}var enumUserLogin=["Off","UseSpecificUserID"];
function completePC_UserLogin(a,b,c){1==c.isUserLoginSupport&&(c=createFeatureNodePC(a,b,addPrivatePrefix("JobUserLogin"),"User login"),createOptionNodePC(a,c,addPskPrefix("Off"),addPskPrefix("None")),c=createOptionNodePC(a,c,addPrivatePrefix("UseSpecificUserID"),addPskPrefix("None")),createScoredPropertyWithParameterRefPC(a,c,addPrivatePrefix("UserID"),addPrivatePrefix("JobUserLoginID")),createScoredPropertyWithParameterRefPC(a,c,addPrivatePrefix("Password"),addPrivatePrefix("JobUserLoginPassword")),
createParameterDefStringNodePC(a,b,addPrivatePrefix("JobUserLoginID"),"",1,1760,"characters","xsd:string"),createParameterDefStringNodePC(a,b,addPrivatePrefix("JobUserLoginPassword"),"",0,354,"characters","xsd:string"))}
function convertPTToDevMode_UserLogin(a,b,c){getFeatureFromPT(b,addPrivatePrefix("JobUserLogin"));var d=getOptionFromPT(b,addPrivatePrefix("JobUserLogin"));if(null!=d){var e=null,f=null;"UseSpecificUserID"==d&&(a=getParameterInitStringValuePT(b,addPrivatePrefix("JobUserLoginID")),b=getParameterInitStringValuePT(b,addPrivatePrefix("JobUserLoginPassword")),null!=a&&(e=base64StringToArray(a)),null!=b&&(f=base64StringToArray(b)));var h=3+(null!=e?e.length+1:0)+(null!=f?f.length+1:0);c.privateFeatureWriter.write(featuresEnum.UserLogin,
h,function(a){if(a.length==h){for(var b=3,c=0;c<a.length;c++)a[c]=0;for(c=0;c<enumUserLogin.length;c++)if(enumUserLogin[c]==d){a[0]=c;break}null!=e&&(a[1]=b,a[b]=e.length,binCopy(e,a,b+1,e.length),b+=e.length+1);null!=f&&(a[2]=b,a[b]=f.length,binCopy(f,a,b+1,f.length))}})}}
function convertDevModeToPT_UserLogin(a,b,c,d){1==d.isUserLoginSupport&&(checkFeatureNode(b,addPrivatePrefix("JobUserLogin")),checkParameterInitNode(b,addPrivatePrefix("JobUserLoginID")),checkParameterInitNode(b,addPrivatePrefix("JobUserLoginPassword")),c=c.privateFeatureReader.read(featuresEnum.UserLogin,function(a){return 3<=a.length&&a.length==3+(0==a[1]?0:a[a[1]]+1)+(0==a[2]?0:a[a[2]]+1)?{userLogin:enumUserLogin[(a[0]&1)<enumUserLogin.length?a[0]&1:0],id:0==a[1]?"":arraySectionToBase64String(a,
a[1]+1,a[a[1]]),password:0==a[2]?"":arraySectionToBase64String(a,a[2]+1,a[a[2]])}:null},function(){return{userLogin:enumUserLogin[0],id:null,password:null}}),d=createFeatureNodePT(a,b,addPrivatePrefix("JobUserLogin")),"Off"==c.userLogin?createOptionNodePT(a,d,addPskPrefix(c.userLogin)):(d=createOptionNodePT(a,d,addPrivatePrefix(c.userLogin)),createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("UserID"),addPrivatePrefix("JobUserLoginID")),createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("Password"),
addPrivatePrefix("JobUserLoginPassword")),createParamterInitStringNodePT(a,b,addPrivatePrefix("JobUserLoginID"),c.id),createParamterInitStringNodePT(a,b,addPrivatePrefix("JobUserLoginPassword"),c.password)))}var enumJobEmailNotification=["Off","UseSpecificEmailAddress"];
function completePC_JobEmailNotification(a,b,c){if(1==c.isJobEmailNotificationSupport){var d=createFeatureNodePC(a,b,addPrivatePrefix("JobEmailNotification"),"JobEmailNotification");createOptionNodePC(a,d,addPskPrefix("Off"),addPskPrefix("None"));d=createOptionNodePC(a,d,addPrivatePrefix("UseSpecificEmailAddress"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("EmailAddress"),addPrivatePrefix("JobEmailNotificationAddress"));createParameterDefStringNodePC(a,b,addPrivatePrefix("JobEmailNotificationAddress"),
"",0,1760,"characters","xsd:string");1==c.isJobEmailNotificationSuspendSupport&&(b=createFeatureNodePC(a,b,addPrivatePrefix("JobSuspendMode"),"JobEmailNotificationSuspend"),createOptionNodePC(a,b,addPskPrefix("Off"),addPskPrefix("None")),createOptionNodePC(a,b,addPskPrefix("On"),addPskPrefix("None")))}}
function convertPTToDevMode_JobEmailNotification(a,b,c,d){var e=getOptionFromPT(b,addPrivatePrefix("JobEmailNotification"));if(null!=e){var f=null;"UseSpecificEmailAddress"==e&&(a=getParameterInitStringValuePT(b,addPrivatePrefix("JobEmailNotificationAddress")))&&(f=base64StringToArray(a));1!=d.isJobEmailNotificationOn||null!=f&&0!=f.length&&0!=f[0]||(f=Array(d.jobEmailAddress.length),stringToBin(d.jobEmailAddress,f,0,d.jobEmailAddress.length));var h=2+(null!=f?f.length+1:0);c.privateFeatureWriter.write(featuresEnum.JobEmailNotification,
h,function(a){if(a.length==h){for(var b=0;b<a.length;b++)a[b]=0;for(b=0;b<enumJobEmailNotification.length;b++)if(enumJobEmailNotification[b]==e){a[0]=b;break}null!=f&&(a[1]=2,a[2]=f.length,binCopy(f,a,3,f.length))}})}var k=getOptionFromPT(b,addPrivatePrefix("JobSuspendMode"));null!=k&&c.privateFeatureWriter.write(featuresEnum.JobEmailNotificationSuspend,1,function(a){if(1==a.length)for(var b=a[0]=0;b<enumOffOn.length;b++)if(enumOffOn[b]==k){a[0]=b;break}})}
function convertDevModeToPT_JobEmailNotification(a,b,c,d){if(1==d.isJobEmailNotificationSupport){checkFeatureNode(b,addPrivatePrefix("JobEmailNotification"));checkParameterInitNode(b,addPrivatePrefix("JobEmailNotificationAddress"));var e=createFeatureNodePT(a,b,addPrivatePrefix("JobEmailNotification"));1!=d.isJobEmailNotificationOn?createOptionNodePT(a,e,addPskPrefix(enumJobEmailNotification[0])):(c=c.privateFeatureReader.read(featuresEnum.JobEmailNotification,function(a){return 2<=a.length&&a.length==
2+(0==a[1]?0:a[a[1]]+1)?{emailNotification:enumJobEmailNotification[(a[0]&255)<enumJobEmailNotification.length?a[0]&255:0],emailAddr:0==a[1]?"":arraySectionToBase64String(a,a[1]+1,a[a[1]])}:null},function(){return{emailNotification:enumJobEmailNotification[0],emailAddr:null}}),e=createOptionNodePT(a,e,addPrivatePrefix(enumJobEmailNotification[1])),createScoredPropertyWithParameterRefPC(a,e,addPrivatePrefix("EmailAddress"),addPrivatePrefix("JobEmailNotificationAddress")),null!=c.emailAddr&&0<c.emailAddr.length?
createParamterInitStringNodePT(a,b,addPrivatePrefix("JobEmailNotificationAddress"),c.emailAddr):(e=Array(d.jobEmailAddress.length),stringToBin(d.jobEmailAddress,e,0,d.jobEmailAddress.length),e=arraySectionToBase64String(e,0,e.length),createParamterInitStringNodePT(a,b,addPrivatePrefix("JobEmailNotificationAddress"),e)),1==d.isJobEmailNotificationSuspendSupport&&(checkFeatureNode(b,addPrivatePrefix("JobSuspendMode")),b=createFeatureNodePT(a,b,addPrivatePrefix("JobSuspendMode")),1!=d.isJobEmailNotificationSuspendedOn?
createOptionNodePT(a,b,addPskPrefix(enumOffOn[0])):createOptionNodePT(a,b,addPskPrefix(enumOffOn[1]))))}}function completePC_LockBWModeApp(a,b,c){1==c.isColorModel&&c.isLockBWMode&&(b=createFeatureNodePC(a,b,addPrivatePrefix("JobLockBWModeApp"),"LockBWModeApp"),createOptionNodePC(a,b,addPskPrefix("Off"),addPskPrefix("None")),createOptionNodePC(a,b,addPskPrefix("On"),addPskPrefix("None")))}
function convertPTToDevMode_LockBWModeApp(a,b,c,d){var e=getOptionFromPT(b,addPrivatePrefix("JobLockBWModeApp"));null!=e&&c.privateFeatureWriter.write(featuresEnum.LockBWModeApp,1,function(a){if(1==a.length)for(var b=a[0]=0;b<enumOffOn.length;b++)if(enumOffOn[b]==e){a[0]=b;break}})}
function convertDevModeToPT_LockBWModeApp(a,b,c,d){1==d.isColorModel&&d.isLockBWMode&&(checkFeatureNode(b,addPrivatePrefix("JobLockBWModeApp")),c=c.privateFeatureReader.read(featuresEnum.LockBWModeApp,function(a){return 1==a.length?enumOffOn[a[0]<enumOffOn.length?a[0]:0]:null},function(){return enumOffOn[0]}),b=createFeatureNodePT(a,b,addPrivatePrefix("JobLockBWModeApp")),createOptionNodePT(a,b,addPskPrefix(c)))}
function completePC_LockSettingsInApp(a,b,c){c.isLockDuplex&&(b=createFeatureNodePC(a,b,addPrivatePrefix("JobLockSettingsInApp"),"LockSettingsInApp"),createOptionNodePC(a,b,addPskPrefix("Off"),addPskPrefix("None")),createOptionNodePC(a,b,addPskPrefix("On"),addPskPrefix("None")))}
function convertPTToDevMode_LockSettingsInApp(a,b,c,d){var e=getOptionFromPT(b,addPrivatePrefix("JobLockSettingsInApp"));null!=e&&c.privateFeatureWriter.write(featuresEnum.LockSettingsInApp,1,function(a){if(1==a.length)for(var b=a[0]=0;b<enumOffOn.length;b++)if(enumOffOn[b]==e){a[0]=b;break}})}
function convertDevModeToPT_LockSettingsInApp(a,b,c,d){d.isLockDuplex&&(checkFeatureNode(b,addPrivatePrefix("JobLockSettingsInApp")),c=c.privateFeatureReader.read(featuresEnum.LockSettingsInApp,function(a){return 1==a.length?enumOffOn[a[0]<enumOffOn.length?a[0]:0]:null},function(){return enumOffOn[1]}),b=createFeatureNodePT(a,b,addPrivatePrefix("JobLockSettingsInApp")),createOptionNodePT(a,b,addPskPrefix(c)))}var enumDuplexValue=["OneSided","TwoSidedShortEdge","TwoSidedLongEdge"];
function completePC_DuplexLockValue(a,b){createPropertyNodePC(a,b,addPrivatePrefix("JobDuplexLockValue"),"","xsd:string")}function convertPTToDevMode_DuplexLockValue(a,b,c){var d=getPropertyStringValuePT(b,addPrivatePrefix("JobDuplexLockValue"));null!=d&&c.privateFeatureWriter.write(featuresEnum.DuplexLockValue,1,function(a){if(1==a.length)for(var b=a[0]=0;b<enumDuplexValue.length;b++)if(enumDuplexValue[b]==d){a[0]=b;break}})}
function convertDevModeToPT_DuplexLockValue(a,b,c,d){d.isDuplexerSupport&&(checkPropertyNode(b,addPrivatePrefix("JobDuplexLockValue")),c=c.privateFeatureReader.read(featuresEnum.DuplexLockValue,function(a){return 1==a.length?enumDuplexValue[a[0]<enumDuplexValue.length?a[0]:0]:null},function(){return null}),null!=c&&createPropertyNodePT(a,b,addPrivatePrefix("JobDuplexLockValue"),c,"xsd:string"))}var enumSuppressNotifyActionValue=["ContinuePrinting","CancelPrinting"];
function completePC_JobNetManager(a,b,c){c=createFeatureNodePC(a,b,addPrivatePrefix("JobNetManager"),"Net Manager");createOptionNodePC(a,c,addPskPrefix("Off"),addPskPrefix("None"));c=createOptionNodePC(a,c,addPskPrefix("On"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,c,addPrivatePrefix("NetManagerServer"),addPrivatePrefix("JobNetManagerServer"));createScoredPropertyWithParameterRefPC(a,c,addPrivatePrefix("NetManagerPort"),addPrivatePrefix("JobNetManagerPort"));createScoredPropertyWithParameterRefPC(a,
c,addPrivatePrefix("NetManagerUserName"),addPrivatePrefix("JobNetManagerUserName"));createScoredPropertyWithParameterRefPC(a,c,addPrivatePrefix("NetManagerPassword"),addPrivatePrefix("JobNetManagerPassword"));createScoredPropertyWithParameterRefPC(a,c,addPrivatePrefix("NetManagerPasswordToken"),addPrivatePrefix("JobNetManagerPasswordToken"));createParameterDefStringNodePCWithOptional(a,b,addPrivatePrefix("JobNetManagerServer"),"",0,344,"characters","xsd:string");createParameterDefStringNodePCWithOptional(a,
b,addPrivatePrefix("JobNetManagerPort"),"9094",0,344,"characters","xsd:string");createParameterDefStringNodePCWithOptional(a,b,addPrivatePrefix("JobNetManagerUserName"),"",0,364,"characters","xsd:string");createParameterDefStringNodePCWithOptional(a,b,addPrivatePrefix("JobNetManagerPassword"),"",0,344,"characters","xsd:string");createParameterDefStringNodePCWithOptional(a,b,addPrivatePrefix("JobNetManagerPasswordToken"),"",0,348,"characters","xsd:string")}
function convertPTToDevMode_JobNetManager(a,b,c){var d=getOptionFromPT(b,addPrivatePrefix("JobNetManager"));if(null!=d){var e=null,f=null,h=null,k=null,g=null;if("On"==d){a=getParameterInitStringValuePT(b,addPrivatePrefix("JobNetManagerServer"));var l=getParameterInitStringValuePT(b,addPrivatePrefix("JobNetManagerPort")),p=getParameterInitStringValuePT(b,addPrivatePrefix("JobNetManagerUserName")),n=getParameterInitStringValuePT(b,addPrivatePrefix("JobNetManagerPassword"));b=getParameterInitStringValuePT(b,
addPrivatePrefix("JobNetManagerPasswordToken"));null!=a&&(e=base64StringToArray(a));null!=l&&(f=base64StringToArray(l));null!=p&&(h=base64StringToArray(p));null!=n&&(k=base64StringToArray(n));null!=b&&(g=base64StringToArray(b))}var m=6+(null!=e?e.length+1:0)+(null!=f?f.length+1:0)+(null!=h?h.length+1:0)+(null!=k?k.length+1:0)+(null!=g?g.length+1:0);c.privateFeatureWriter.write(featuresEnum.NetManager,m,function(a){if(a.length==m){for(var b=6,c=0;c<a.length;c++)a[c]=0;for(c=0;c<enumOffOn.length;c++)if(enumOffOn[c]==
d){a[0]=c;break}null!=e&&(a[1]=b,a[b]=e.length,binCopy(e,a,b+1,e.length),b+=e.length+1);null!=f&&(a[2]=b,a[b]=f.length,binCopy(f,a,b+1,f.length),b+=f.length+1);null!=h&&(a[3]=b,a[b]=h.length,binCopy(h,a,b+1,h.length),b+=h.length+1);null!=k&&(a[4]=b,a[b]=k.length,binCopy(k,a,b+1,k.length),b+=k.length+1);null!=g&&(a[5]=b,a[b]=g.length,binCopy(g,a,b+1,g.length))}})}}
function convertDevModeToPT_JobNetManager(a,b,c){checkFeatureNode(b,addPrivatePrefix("JobNetManager"));checkParameterInitNode(b,addPrivatePrefix("JobNetManagerServer"));checkParameterInitNode(b,addPrivatePrefix("JobNetManagerPort"));checkParameterInitNode(b,addPrivatePrefix("JobNetManagerUserName"));checkParameterInitNode(b,addPrivatePrefix("JobNetManagerPassword"));checkParameterInitNode(b,addPrivatePrefix("JobNetManagerPasswordToken"));c=c.privateFeatureReader.read(featuresEnum.NetManager,function(a){return 6<=
a.length&&a.length==6+(0==a[1]?0:a[a[1]]+1)+(0==a[2]?0:a[a[2]]+1)+(0==a[3]?0:a[a[3]]+1)+(0==a[4]?0:a[a[4]]+1)+(0==a[5]?0:a[a[5]]+1)?{netManager:enumOffOn[(a[0]&255)<enumOffOn.length?a[0]&255:0],server:0==a[1]?"":arraySectionToBase64String(a,a[1]+1,a[a[1]]),port:0==a[2]?"":arraySectionToBase64String(a,a[2]+1,a[a[2]]),userName:0==a[3]?"":arraySectionToBase64String(a,a[3]+1,a[a[3]]),password:0==a[4]?"":arraySectionToBase64String(a,a[4]+1,a[a[4]]),passwordToken:0==a[5]?"":arraySectionToBase64String(a,
a[5]+1,a[a[5]])}:null},function(){return{netManager:enumOffOn[0],server:"",port:"",userName:"",password:"",passwordToken:""}});var d=createFeatureNodePT(a,b,addPrivatePrefix("JobNetManager"));"Off"==c.netManager?createOptionNodePT(a,d,addPskPrefix("Off")):(d=createOptionNodePT(a,d,addPskPrefix("On")),createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("NetManagerServer"),addPrivatePrefix("JobNetManagerServer")),createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("NetManagerPort"),
addPrivatePrefix("JobNetManagerPort")),createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("NetManagerUserName"),addPrivatePrefix("JobNetManagerUserName")),createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("NetManagerPassword"),addPrivatePrefix("JobNetManagerPassword")),createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("NetManagerPasswordToken"),addPrivatePrefix("JobNetManagerPasswordToken")),createParamterInitStringNodePT(a,b,addPrivatePrefix("JobNetManagerServer"),c.server),
createParamterInitStringNodePT(a,b,addPrivatePrefix("JobNetManagerPort"),c.port),createParamterInitStringNodePT(a,b,addPrivatePrefix("JobNetManagerUserName"),c.userName),createParamterInitStringNodePT(a,b,addPrivatePrefix("JobNetManagerPassword"),c.password),createParamterInitStringNodePT(a,b,addPrivatePrefix("JobNetManagerPasswordToken"),c.passwordToken))}
var enumJobStorage="None QuickCopy ProofHold JobStorage PrivatePrint Temporary Permanent UserBox VirtualMailBox SynergyPrintBox FormGallery SharedDataBox".split(" "),enumUserBox=["Off","UseSpecificBox"];
function completePC_JobStorage(a,b,c){if(isJobAvailable(c)){var d=c.isRAMDiskInstalled,e=c.isHardDiskInstalled,f=c.isPrinterSSDInstalled,h=c.isPrinterSDCardInstalled;1==e||1!=c.isHardDiskStandard&&1!=f||(e=!0);f=!1;null==c.isHardDiskSupport||0==c.isHardDiskSupport?1==c.isNewEMPS&&1!=d&&(f=!0):1!=e&&1!=h&&1==c.isNewEMPS&&1==d&&(f=!0);d=createFeatureNodePC(a,b,addPrivatePrefix("JobStorage"),"Job storage (e-MPS)");createOptionNodePC(a,d,addPskPrefix("None"),addPskPrefix("None"));var k=!1;1==f?k=!0:1==
h?1!=e&&(k=!0):0==c.isUserBoxSupport&&(k=!0);0==k&&(createOptionNodePC(a,d,addPrivatePrefix("UserBox"),addPskPrefix("None")),f=createFeatureNodePC(a,d,addPrivatePrefix("JobUserBox"),"User box"),createOptionNodePC(a,f,addPskPrefix("Off"),addPskPrefix("None")),f=createOptionNodePC(a,f,addPrivatePrefix("UseSpecificBox"),addPskPrefix("None")),createScoredPropertyWithParameterRefPC(a,f,addPrivatePrefix("BoxNumber"),addPrivatePrefix("JobUserBoxNumber")),createScoredPropertyWithParameterRefPC(a,f,addPrivatePrefix("Password"),
addPrivatePrefix("JobUserBoxPassword")),createParameterDefIntNodePC(a,b,addPrivatePrefix("JobUserBoxNumber"),1,1,1E3,"number","xsd:string"),createParameterDefStringNodePC(a,b,addPrivatePrefix("JobUserBoxPassword"),"",0,90,"characters","xsd:string"));1!=e&&1!=h||createOptionNodePC(a,d,addPrivatePrefix("QuickCopy"),addPskPrefix("None"));k=!1;if(1==e&&(0==c.isJOBSupport||1==c.isJOBSupport&&1==c.isJOBRetentionSupport)||1==c.isNewEMPS||1==h)createOptionNodePC(a,d,addPrivatePrefix("ProofHold"),addPskPrefix("None")),
f=createOptionNodePC(a,d,addPrivatePrefix("PrivatePrint"),addPskPrefix("None")),createScoredPropertyWithParameterRefPC(a,f,addPrivatePrefix("AccessCode"),addPrivatePrefix("JobStorageAccessCode")),1==c.isJobStorageAccessCodeNumericOnly?createParameterDefStringNodePC(a,b,addPrivatePrefix("JobStorageAccessCode"),"0000",4,4,"number","xsd:string"):createParameterDefStringNodePC(a,b,addPrivatePrefix("JobStorageAccessCode"),"0000",4,32,"characters","xsd:string"),k=!0;if(1==e&&(0==c.isJOBSupport||1==c.isJOBSupport&&
1==c.isJOBRetentionSupport)||1==h)f=createOptionNodePC(a,d,addPrivatePrefix("JobStorage"),addPskPrefix("None")),createScoredPropertyWithParameterRefPC(a,f,addPrivatePrefix("AccessCode"),addPrivatePrefix("JobStorageAccessCode")),createScoredPropertyWithParameterRefPC(a,f,addPrivatePrefix("UseAccessCode"),addPrivatePrefix("JobStorageUseAccessCode")),0==k&&(1==c.isJobStorageAccessCodeNumericOnly?createParameterDefStringNodePC(a,b,addPrivatePrefix("JobStorageAccessCode"),"0000",4,4,"number","xsd:string"):
createParameterDefStringNodePC(a,b,addPrivatePrefix("JobStorageAccessCode"),"0000",4,32,"characters","xsd:string")),createParameterDefStringNodePC(a,b,addPrivatePrefix("JobStorageUseAccessCode"),"Off",2,3,"characters","xsd:string");1==e&&1==c.isJOBSupport&&(createOptionNodePC(a,d,addPrivatePrefix("Temporary"),addPskPrefix("None")),createOptionNodePC(a,d,addPrivatePrefix("Permanent"),addPskPrefix("None")))}}
function convertPTToDevMode_JobStorage(a,b,c){a=getFeatureFromPT(b,addPrivatePrefix("JobStorage"));var d=getOptionFromPT(b,addPrivatePrefix("JobStorage"));if(null!=a&&null!=d){var e=null,f=null,h=null,k=null,g=null,l=null,h=getOptionFromPT(a,addPrivatePrefix("JobUserBox"));"PrivatePrint"==d?f=getParameterInitStringValuePT(b,addPrivatePrefix("JobStorageAccessCode")):"JobStorage"==d?(e=getParameterInitStringValuePT(b,addPrivatePrefix("JobStorageUseAccessCode")),f=getParameterInitStringValuePT(b,addPrivatePrefix("JobStorageAccessCode"))):
"UserBox"==d&&null!=h&&"Off"!=h&&(k=getParameterInitIntValuePT(b,addPrivatePrefix("JobUserBoxNumber")),b=getParameterInitStringValuePT(b,addPrivatePrefix("JobUserBoxPassword")),null!=b&&(g=base64StringToArray(b)));var l="",p=5+(null!=f?f.length+1:0)+(null!=g?g.length+1:0)+(null!=l?l.length+1:0);c.privateFeatureWriter.write(featuresEnum.JobStorage,p,function(a){if(a.length==p){for(var b=5,c=0;c<a.length;c++)a[c]=0;for(c=0;c<enumJobStorage.length;c++)if(enumJobStorage[c]==d){a[0]|=c&255;break}if(null!=
e)for(c=0;c<enumOffOn.length;c++)if(enumOffOn[c]==e){a[0]|=c<<12&4096;break}null!=f&&(a[1]=b,a[b]=f.length,stringToBin(f,a,b+1,f.length),b+=f.length+1);if(null!=h)for(c=0;c<enumUserBox.length;c++)if(enumUserBox[c]==h){a[0]|=c<<8&3840;break}null!=k&&(a[2]=k);null!=g&&(a[3]=b,a[b]=g.length,binCopy(g,a,b+1,g.length),b+=g.length+1);null!=l&&(a[4]=b,a[b]=l.length,stringToBin(l,a,b+1,l.length))}})}}
function convertDevModeToPT_JobStorage(a,b,c,d){if(isJobAvailable(d)){checkFeatureNode(b,addPrivatePrefix("JobStorage"));checkParameterInitNode(b,addPrivatePrefix("JobStorageAccessCode"));checkParameterInitNode(b,addPrivatePrefix("JobStorageUseAccessCode"));checkParameterInitNode(b,addPrivatePrefix("JobUserBoxNumber"));checkParameterInitNode(b,addPrivatePrefix("JobUserBoxPassword"));c=c.privateFeatureReader.read(featuresEnum.JobStorage,function(a){return 5<=a.length&&a.length==5+(0==a[1]?0:a[a[1]]+
1)+(0==a[3]?0:a[a[3]]+1)+(0==a[4]?0:a[a[4]]+1)?{jobStorage:enumJobStorage[(a[0]&255)<enumJobStorage.length?a[0]&255:0],useAccessCode:enumOffOn[(a[0]>>12&1)<enumOffOn.length?a[0]>>12&1:0],accessCode:0==a[1]?"":binToString(a,a[1]+1,a[a[1]]),userBox:enumUserBox[(a[0]>>8&15)<enumUserBox.length?a[0]>>8&15:0],userBoxNumber:a[2],userBoxPassword:0==a[3]?"":arraySectionToBase64String(a,a[3]+1,a[a[3]]),userId:0==a[4]?"":binToString(a,a[4]+1,a[a[4]])}:null},function(){return{jobStorage:enumJobStorage[0],useAccessCode:enumOffOn[0],
accessCode:"",userBox:enumUserBox[0],userBoxNumber:0,userBoxPassword:"",userId:""}});var e=createFeatureNodePT(a,b,addPrivatePrefix("JobStorage"));if("None"==c.jobStorage)createOptionNodePT(a,e,addPskPrefix(c.jobStorage));else if("PrivatePrint"==c.jobStorage){var f=createOptionNodePT(a,e,addPrivatePrefix(c.jobStorage));createScoredPropertyWithParameterRefPC(a,f,addPrivatePrefix("AccessCode"),addPrivatePrefix("JobStorageAccessCode"));createParamterInitStringNodePT(a,b,addPrivatePrefix("JobStorageAccessCode"),
c.accessCode)}else"JobStorage"==c.jobStorage?(f=createOptionNodePT(a,e,addPrivatePrefix(c.jobStorage)),createScoredPropertyWithParameterRefPC(a,f,addPrivatePrefix("AccessCode"),addPrivatePrefix("JobStorageAccessCode")),createScoredPropertyWithParameterRefPC(a,f,addPrivatePrefix("UseAccessCode"),addPrivatePrefix("JobStorageUseAccessCode")),createParamterInitStringNodePT(a,b,addPrivatePrefix("JobStorageAccessCode"),c.accessCode),createParamterInitStringNodePT(a,b,addPrivatePrefix("JobStorageUseAccessCode"),
c.useAccessCode)):"UserBox"==c.jobStorage?(f=createOptionNodePT(a,e,addPrivatePrefix(c.jobStorage)),e=createFeatureNodePT(a,e,addPrivatePrefix("JobUserBox")),f=createOptionNodePT(a,e,addPrivatePrefix(c.userBox)),createScoredPropertyWithParameterRefPC(a,f,addPrivatePrefix("BoxNumber"),addPrivatePrefix("JobUserBoxNumber")),createScoredPropertyWithParameterRefPC(a,f,addPrivatePrefix("Password"),addPrivatePrefix("JobUserBoxPassword")),createParamterInitIntNodePT(a,b,addPrivatePrefix("JobUserBoxNumber"),
c.userBoxNumber),createParamterInitStringNodePT(a,b,addPrivatePrefix("JobUserBoxPassword"),c.userBoxPassword)):f=createOptionNodePT(a,e,addPrivatePrefix(c.jobStorage));validatePrintTicket_JobStorage(a,b,d)}}
function validatePrintTicket_JobStorage(a,b,c){var d=getFeatureFromPT(b,addPrivatePrefix("JobStorage"));if(null!=d){var e=getOptionFromPT(b,addPrivatePrefix("JobStorage"));if(null!=e&&"None"!=e){var f=c.iisRAMDiskInstalled,d=c.isHardDiskInstalled,h=c.isPrinterSSDInstalled,k=c.isPrinterSDCardInstalled;if(null==d||1!=d)if(1==c.isHardDiskStandard||1==h)d=!0;var g=!0;if(null==c.isHardDiskSupport||0==c.isHardDiskSupport)if(null==c.isRamDiskSupport||0==c.isRamDiskSupport)g=!1;else if(null==c.isNewEMPS||
0==c.isNewEMPS)g=!1;h=!1;if(1==g)if("UserBox"==e)e=!1,null==c.isHardDiskSupport||0==c.isHardDiskSupport?1==c.isNewEMPS&&1!=f&&(e=!0):1!=d&&1!=k&&1==c.isNewEMPS&&1==f&&(e=!0),f=!1,1==e?f=!0:1==k?1!=d&&(f=!0):0==c.isUserBoxSupport&&(f=!0),0==f&&(h=!0),0==h&&(g=!1);else if("QuickPrint"==e){c=!1;if(1==d||1==k)c=!0;0==c&&(g=!1)}else if("ProofHold"==e||"PrivatePrint"==e){f=!1;if(1==d&&(0==c.isJOBSupport||1==c.isJOBSupport&&1==c.isJOBRetentionSupport)||1==c.isNewEMPS||1==k)f=!0;0==f&&(g=!1)}else if("JobStorage"==
e){f=!1;if(1==d&&(0==c.isJOBSupport||1==c.isJOBSupport&&1==c.isJOBRetentionSupport)||1==k)f=!0;0==f&&(g=!1)}else if("Temporary"==e||"Permanent"==e)f=!1,1==d&&1==c.isJOBSupport&&(f=!0),0==f&&(g=!1);if(0==g&&(checkFeatureNode(b,addPrivatePrefix("JobStorage")),checkParameterInitNode(b,addPrivatePrefix("JobStorageAccessCode")),checkParameterInitNode(b,addPrivatePrefix("JobStorageUseAccessCode")),checkParameterInitNode(b,addPrivatePrefix("JobUserBoxNumber")),checkParameterInitNode(b,addPrivatePrefix("JobUserBoxPassword")),
d=createFeatureNodePT(a,b,addPrivatePrefix("JobStorage")),null!=d&&(createOptionNodePT(a,d,addPskPrefix("None")),1==h))){b=createFeatureNodePT(a,d,addPrivatePrefix("JobUserBox"));if(null==b)return null;createOptionNodePT(a,b,addPskPrefix("Off"))}}}}var enumJobName=["ApplicationDefined","CustomJobName"],enumJobNameOverwriteMode=["AppendDateTime","AllowOverwrite"];
function completePC_JobName(a,b,c){if(isJobAvailable(c)){c=createFeatureNodePC(a,b,addPrivatePrefix("JobJobName"),"Job name");var d=createOptionNodePC(a,c,addPrivatePrefix("ApplicationDefined"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("NoApplicationName"),addPrivatePrefix("JobNameNoApplicationName"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("OverwriteMode"),addPrivatePrefix("JobNameOverwriteMode"));d=createOptionNodePC(a,c,addPrivatePrefix("CustomJobName"),
addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("CustomName"),addPrivatePrefix("JobNameCustomName"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("OverwriteMode"),addPrivatePrefix("JobNameOverwriteMode"));createParameterDefStringNodePC(a,b,addPrivatePrefix("JobNameNoApplicationName"),"Off",2,3,"characters","xsd:string");createParameterDefStringNodePC(a,b,addPrivatePrefix("JobNameCustomName"),"_Undefined",1,427,"characters","xsd:string");createParameterDefStringNodePC(a,
b,addPrivatePrefix("JobNameOverwriteMode"),"AppendDateTime",1,32,"characters","xsd:string")}}
function convertPTToDevMode_JobName(a,b,c){var d=getOptionFromPT(b,addPrivatePrefix("JobJobName"));if(null!=d){var e=null,f=null,h=null,e=getParameterInitStringValuePT(b,addPrivatePrefix("JobNameOverwriteMode"));"ApplicationDefined"==d?f=getParameterInitStringValuePT(b,addPrivatePrefix("JobNameNoApplicationName")):"CustomJobName"==d&&(a=getParameterInitStringValuePT(b,addPrivatePrefix("JobNameCustomName")),null!=a&&(h=base64StringToArray(a)));var k=2+(null!=h?h.length:0);c.privateFeatureWriter.write(featuresEnum.JobName,
k,function(a){if(a.length==k){for(var b=0;b<a.length;b++)a[b]=0;for(b=0;b<enumJobName.length;b++)if(enumJobName[b]==d){a[0]|=b&255;break}if(null!=e)for(b=0;b<enumJobNameOverwriteMode.length;b++)if(enumJobNameOverwriteMode[b]==e){a[0]|=b<<12&61440;break}if(null!=f)for(b=0;b<enumOffOn.length;b++)if(enumOffOn[b]==f){a[0]|=b<<8&3840;break}null!=h&&(a[1]=h.length,binCopy(h,a,2,h.length))}})}}
function convertDevModeToPT_JobName(a,b,c,d){isJobAvailable(d)&&(checkFeatureNode(b,addPrivatePrefix("JobJobName")),checkParameterInitNode(b,addPrivatePrefix("JobNameNoApplicationName")),checkParameterInitNode(b,addPrivatePrefix("JobNameOverwriteMode")),checkParameterInitNode(b,addPrivatePrefix("JobNameCustomName")),c=c.privateFeatureReader.read(featuresEnum.JobName,function(a){return 2<=a.length&&a.length==2+a[1]?{jobName:enumJobName[(a[0]&255)<enumJobName.length?a[0]&255:0],overwriteMode:enumJobNameOverwriteMode[(a[0]>>
12&15)<enumJobNameOverwriteMode.length?a[0]>>12&15:0],noApplicationName:enumOffOn[(a[0]>>8&15)<enumOffOn.length?a[0]>>8&15:0],customName:arraySectionToBase64String(a,2,a[1])}:null},function(){return{jobName:enumJobName[0],overwriteMode:enumJobNameOverwriteMode[0],noApplicationName:enumOffOn[1],customName:""}}),d=createFeatureNodePT(a,b,addPrivatePrefix("JobJobName")),d=createOptionNodePT(a,d,addPrivatePrefix(c.jobName)),createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("OverwriteMode"),
addPrivatePrefix("JobNameOverwriteMode")),createParamterInitStringNodePT(a,b,addPrivatePrefix("JobNameOverwriteMode"),c.overwriteMode),"ApplicationDefined"==c.jobName?(createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("NoApplicationName"),addPrivatePrefix("JobNameNoApplicationName")),createParamterInitStringNodePT(a,b,addPrivatePrefix("JobNameNoApplicationName"),c.noApplicationName)):"CustomJobName"==c.jobName&&(createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("CustomName"),addPrivatePrefix("JobNameCustomName")),
createParamterInitStringNodePT(a,b,addPrivatePrefix("JobNameCustomName"),c.customName)))}var enumCoverMode=["NoCover","BlankCover","PrintFront","PrintBack","PrintBoth"];
function completePC_CoverMode(a,b){var c=createFeatureNodePC(a,b,addPskPrefix("JobPrimaryCoverFront"),"Front cover");createOptionNodePC(a,c,addPskPrefix("NoCover"),addPskPrefix("None"));var d=createOptionNodePC(a,c,addPskPrefix("BlankCover"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPskPrefix("CoverFrontSource"),addPskPrefix("JobPrimaryCoverFrontSource"));d=createOptionNodePC(a,c,addPskPrefix("PrintFront"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,
addPskPrefix("CoverFrontSource"),addPskPrefix("JobPrimaryCoverFrontSource"));d=createOptionNodePC(a,c,addPskPrefix("PrintBack"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPskPrefix("CoverFrontSource"),addPskPrefix("JobPrimaryCoverFrontSource"));d=createOptionNodePC(a,c,addPskPrefix("PrintBoth"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPskPrefix("CoverFrontSource"),addPskPrefix("JobPrimaryCoverFrontSource"));createParameterDefStringNodePC(a,b,addPskPrefix("JobPrimaryCoverFrontSource"),
"Unspecified",0,31,"characters","xsd:string");c=createFeatureNodePC(a,b,addPskPrefix("JobPrimaryCoverBack"),"Back cover");createOptionNodePC(a,c,addPskPrefix("NoCover"),addPskPrefix("None"));d=createOptionNodePC(a,c,addPskPrefix("BlankCover"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPskPrefix("CoverBackSource"),addPskPrefix("JobPrimaryCoverBackSource"));d=createOptionNodePC(a,c,addPskPrefix("PrintFront"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPskPrefix("CoverBackSource"),
addPskPrefix("JobPrimaryCoverBackSource"));d=createOptionNodePC(a,c,addPskPrefix("PrintBack"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPskPrefix("CoverBackSource"),addPskPrefix("JobPrimaryCoverBackSource"));d=createOptionNodePC(a,c,addPskPrefix("PrintBoth"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPskPrefix("CoverBackSource"),addPskPrefix("JobPrimaryCoverBackSource"));createParameterDefStringNodePC(a,b,addPskPrefix("JobPrimaryCoverBackSource"),
"Unspecified",0,31,"characters","xsd:string")}
function convertPTToDevMode_CoverMode(a,b,c){var d=getOptionFromPT(b,addPskPrefix("JobPrimaryCoverFront")),e=getParameterInitStringValuePT(b,addPskPrefix("JobPrimaryCoverFrontSource")),f=getOptionFromPT(b,addPskPrefix("JobPrimaryCoverBack")),h=getParameterInitStringValuePT(b,addPskPrefix("JobPrimaryCoverBackSource"));null==d&&null==f||c.publicFeatureWriter.write(featuresEnum.Cover,2,function(a){if(2==a.length){a[0]=0;a[1]=0;if(null!=d)for(var b=0;b<enumCoverMode.length;b++)if(enumCoverMode[b]==d){a[0]|=
b;break}if(null!=e)for(b=0;b<enumMediaTypeAndSource.length;b++)if(enumMediaTypeAndSource[b]==e){a[0]|=b<<8;break}if(null!=f)for(b=0;b<enumCoverMode.length;b++)if(enumCoverMode[b]==f){a[1]|=b;break}if(null!=h)for(b=0;b<enumMediaTypeAndSource.length;b++)if(enumMediaTypeAndSource[b]==h){a[1]|=b<<8;break}}})}
function convertDevModeToPT_CoverMode(a,b,c){checkFeatureNode(b,addPskPrefix("JobPrimaryCoverFront"));checkParameterInitNode(b,addPskPrefix("JobPrimaryCoverFrontSource"));checkFeatureNode(b,addPskPrefix("JobPrimaryCoverBack"));checkParameterInitNode(b,addPskPrefix("JobPrimaryCoverBackSource"));c=c.publicFeatureReader.read(featuresEnum.Cover,function(a){return 2==a.length?{front:enumCoverMode[(a[0]&255)<enumCoverMode.length?a[0]&255:0],frontSource:enumMediaTypeAndSource[a[0]>>8<enumMediaTypeAndSource.length?
a[0]>>8:0],back:enumCoverMode[(a[1]&255)<enumCoverMode.length?a[1]&255:0],backSource:enumMediaTypeAndSource[a[1]>>8<enumMediaTypeAndSource.length?a[1]>>8:0]}:null},function(){return{front:enumCoverMode[0],frontSouce:enumMediaTypeAndSource[0],back:enumCoverMode[0],backSource:enumMediaTypeAndSource[0]}});var d=createFeatureNodePT(a,b,addPskPrefix("JobPrimaryCoverFront")),d=createOptionNodePT(a,d,addPskPrefix(c.front));"NoCover"!=c.front&&(createScoredPropertyWithParameterRefPC(a,d,addPskPrefix("CoverFrontSource"),
addPskPrefix("JobPrimaryCoverFrontSource")),createParamterInitStringNodePT(a,b,addPskPrefix("JobPrimaryCoverFrontSource"),c.frontSource));d=createFeatureNodePT(a,b,addPskPrefix("JobPrimaryCoverBack"));d=createOptionNodePT(a,d,addPskPrefix(c.back));"NoCover"!=c.back&&(createScoredPropertyWithParameterRefPC(a,d,addPskPrefix("CoverBackSource"),addPskPrefix("JobPrimaryCoverBackSource")),createParamterInitStringNodePT(a,b,addPskPrefix("JobPrimaryCoverBackSource"),c.backSource))}
var enumPageInsert=["NoPageInsert","BlankPageInsert","PrintFront","PrintBack","PrintBoth"];
function completePC_PageInsert(a,b){var c=createFeatureNodePC(a,b,addPrivatePrefix("JobPageInsert"),"Page insert");createOptionNodePC(a,c,addPrivatePrefix("NoPageInsert"),addPskPrefix("None"));var d=createOptionNodePC(a,c,addPrivatePrefix("BlankPageInsert"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("PageInsertMedia"),addPrivatePrefix("JobPageInsertMedia"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("SpecificPages"),addPrivatePrefix("JobPageInsertPageDescription"));
d=createOptionNodePC(a,c,addPrivatePrefix("PrintFront"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("PageInsertMedia"),addPrivatePrefix("JobPageInsertMedia"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("SpecificPages"),addPrivatePrefix("JobPageInsertPageDescription"));d=createOptionNodePC(a,c,addPrivatePrefix("PrintBack"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("PageInsertMedia"),addPrivatePrefix("JobPageInsertMedia"));
createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("SpecificPages"),addPrivatePrefix("JobPageInsertPageDescription"));d=createOptionNodePC(a,c,addPrivatePrefix("PrintBoth"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("PageInsertMedia"),addPrivatePrefix("JobPageInsertMedia"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("SpecificPages"),addPrivatePrefix("JobPageInsertPageDescription"));createParameterDefStringNodePC(a,b,addPrivatePrefix("JobPageInsertMedia"),
"Unspecified",0,31,"characters","xsd:string");createParameterDefStringNodePC(a,b,addPrivatePrefix("JobPageInsertPageDescription"),"",0,300,"characters","xsd:string")}
function convertPTToDevMode_PageInsert(a,b,c){var d=getOptionFromPT(b,addPrivatePrefix("JobPageInsert"));if(null!=d){var e=getParameterInitStringValuePT(b,addPrivatePrefix("JobPageInsertMedia")),f=getParameterInitStringValuePT(b,addPrivatePrefix("JobPageInsertPageDescription"));c.privateFeatureWriter.write(featuresEnum.PageInsert,51,function(a){if(51==a.length){for(var b=0;b<a.length;b++)a[b]=0;for(b=0;b<enumPageInsert.length;b++)if(enumPageInsert[b]==d){a[0]|=b&255;break}if(null!=e)for(b=0;b<enumMediaTypeAndSource.length;b++)if(enumMediaTypeAndSource[b]==
e){a[0]|=b<<8;break}if(null!=f)for(var c=f.split(","),b=0;b<c.length;b++)a[b+1]=parseInt(c[b])}})}}
function convertDevModeToPT_PageInsert(a,b,c){checkFeatureNode(b,addPrivatePrefix("JobPageInsert"));checkParameterInitNode(b,addPrivatePrefix("JobPageInsertMedia"));checkParameterInitNode(b,addPrivatePrefix("JobPageInsertPageDescription"));c=c.privateFeatureReader.read(featuresEnum.PageInsert,function(a){if(51==a.length){for(var b="",c=1,d=0;c<a.length&&0!=a[c];c++,d++)b+=(0<b.length?",":"")+a[c].toString();return{pageInsert:enumPageInsert[(a[0]&255)<enumPageInsert.length?a[0]&255:0],source:enumMediaTypeAndSource[a[0]>>
8<enumMediaTypeAndSource.length?a[0]>>8:0],pages:b}}return null},function(){return{pageInsert:enumPageInsert[0],source:enumMediaTypeAndSource[0],pages:""}});var d=createFeatureNodePT(a,b,addPrivatePrefix("JobPageInsert")),d=createOptionNodePT(a,d,addPrivatePrefix(c.pageInsert));"NoPageInsert"!=c.pageInsert&&(createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("PageInsertMedia"),addPrivatePrefix("JobPageInsertMedia")),createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("SpecificPages"),
addPrivatePrefix("JobPageInsertPageDescription")),createParamterInitStringNodePT(a,b,addPrivatePrefix("JobPageInsertMedia"),c.source),createParamterInitStringNodePT(a,b,addPrivatePrefix("JobPageInsertPageDescription"),c.pages))}var enumTransparencyInterleaving=["NoInterleaving","BlankInterleaving","PrintBacking"];
function completePC_TransparencyInterleaving(a,b){var c=createFeatureNodePC(a,b,addPrivatePrefix("JobTransparencyInterleaving"),"Transparency Interleaving"),d;createOptionNodePC(a,c,addPrivatePrefix("NoInterleaving"),addPskPrefix("None"));d=createOptionNodePC(a,c,addPrivatePrefix("BlankInterleaving"),addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("TransparencyInterleavingMedia"),addPrivatePrefix("JobTransparencyInterleavingMedia"));d=createOptionNodePC(a,c,addPrivatePrefix("PrintBacking"),
addPskPrefix("None"));createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("TransparencyInterleavingMedia"),addPrivatePrefix("JobTransparencyInterleavingMedia"));createParameterDefStringNodePC(a,b,addPrivatePrefix("JobTransparencyInterleavingMedia"),"Plain",1,40,"characters","xsd:string")}
function convertPTToDevMode_TransparencyInterleaving(a,b,c){var d=getOptionFromPT(b,addPrivatePrefix("JobTransparencyInterleaving"));if(null!=d){if("NoInterleaving"!=d)var e=getParameterInitStringValuePT(b,addPrivatePrefix("JobTransparencyInterleavingMedia"));c.privateFeatureWriter.write(featuresEnum.TransparencyInterleaving,1,function(a){if(1==a.length){for(var b=a[0]=0;b<enumTransparencyInterleaving.length;b++)if(enumTransparencyInterleaving[b]==d){a[0]|=b&255;break}if(null!=e)for(b=0;b<enumMediaTypeAndSource.length;b++)if(enumMediaTypeAndSource[b]==
e){a[0]|=b<<8&65280;break}}})}}
function convertDevModeToPT_TransparencyInterleaving(a,b,c){checkFeatureNode(b,addPrivatePrefix("JobTransparencyInterleaving"));checkParameterInitNode(b,addPrivatePrefix("JobTransparencyInterleavingMedia"));c=c.privateFeatureReader.read(featuresEnum.TransparencyInterleaving,function(a){return 1==a.length?{transparencyInterleaving:enumTransparencyInterleaving[(a[0]&255)<enumTransparencyInterleaving.length?a[0]&255:0],source:enumMediaTypeAndSource[(a[0]>>8&255)<enumMediaTypeAndSource.length?a[0]>>8&
255:0]}:null},function(){return{transparencyInterleaving:enumTransparencyInterleaving[0],source:enumMediaTypeAndSource[0]}});var d=createFeatureNodePT(a,b,addPrivatePrefix("JobTransparencyInterleaving")),d=createOptionNodePT(a,d,addPrivatePrefix(c.transparencyInterleaving));"NoInterleaving"!=c.transparencyInterleaving&&(createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("TransparencyInterleavingMedia"),addPrivatePrefix("JobTransparencyInterleavingMedia")),createParamterInitStringNodePT(a,
b,addPrivatePrefix("JobTransparencyInterleavingMedia"),c.source))}var enumOutputColorMode=["CMYK"];function completePC_PageOutputColor(a,b,c){1==c.isColorModel&&(c=getOptionNodePC(b,addPskPrefix("PageOutputColor"),addPskPrefix("Color")),null!=c&&(createScoredPropertyWithParameterRefPC(a,c,addPrivatePrefix("ColorMode"),addPrivatePrefix("PageOutputColorMode")),createParameterDefStringNodePC(a,b,addPrivatePrefix("PageOutputColorMode"),"CMYK",1,32,"characters","xsd:string")))}
function convertPTToDevMode_PageOutputColor(a,b,c){if("Color"==getOptionFromPT(b,addPskPrefix("PageOutputColor"))){var d=getParameterInitStringValuePT(b,addPrivatePrefix("PageOutputColorMode"));c.publicFeatureWriter.write(featuresEnum.OutputColor,1,function(a){if(1==a.length)for(var b=a[0]=0;b<enumOutputColorMode.length;b++)if(enumOutputColorMode[b]==d){a[0]|=b;break}})}}
function convertDevModeToPT_PageOutputColor(a,b,c,d){if(1==d.isColorModel&&(checkParameterInitNode(b,addPrivatePrefix("PageOutputColorMode")),c=c.publicFeatureReader.read(featuresEnum.OutputColor,function(a){return 1==a.length?{mode:enumOutputColorMode[a[0]<enumOutputColorMode.length?a[0]:0]}:null},function(){return{mode:enumOutputColorMode[0]}}),"Color"==getOptionFromPT(b,addPskPrefix("PageOutputColor")))){var e=getFeatureFromPT(b,addPskPrefix("PageOutputColor")),f=getOptionNodePC(b,addPskPrefix("PageOutputColor"),
addPskPrefix("Color"));null!=f&&e.removeChild(f);2==d.newResolutionGroupID||3==d.newResolutionGroupID||4==d.newResolutionGroupID||5==d.newResolutionGroupID?(f=createOptionNodePT(a,e,addPskPrefix("Color")),createScoredPropertyWithValueNodePC(a,f,addPskPrefix("DriverBitsPerPixel"),"8",addXsdPrefix("integer"))):(f=createOptionNodePT(a,e,addPskPrefix("Color")),createScoredPropertyWithValueNodePC(a,f,addPskPrefix("DriverBitsPerPixel"),"4",addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,
f,addPskPrefix("DeviceBitsPerPixel"),"4",addXsdPrefix("integer")));createScoredPropertyWithParameterRefPC(a,f,addPrivatePrefix("ColorMode"),addPrivatePrefix("PageOutputColorMode"));createParamterInitStringNodePT(a,b,addPrivatePrefix("PageOutputColorMode"),c.mode)}}
function completePC_Trapping(a,b,c){1==c.isSupportTrapping&&(c=createFeatureNodePC(a,b,addPrivatePrefix("PageJobColorTrapping"),"Trapping"),createOptionNodePC(a,c,addPskPrefix("Off"),addPskPrefix("None")),c=createOptionNodePC(a,c,addPskPrefix("On"),addPskPrefix("None")),createScoredPropertyWithParameterRefPC(a,c,addPrivatePrefix("ColorTrappingLevel"),addPrivatePrefix("PageJobColorTrappingLevel")),createParameterDefIntNodePC(a,b,addPrivatePrefix("PageJobColorTrappingLevel"),2,1,4,"level","xsd:string"))}
function convertPTToDevMode_Trapping(a,b,c){var d=getOptionFromPT(b,addPrivatePrefix("PageJobColorTrapping"));if(null!=d){var e=getParameterInitIntValuePT(b,addPrivatePrefix("PageJobColorTrappingLevel"));c.privateFeatureWriter.write(featuresEnum.Trapping,1,function(a){if(1==a.length){for(var b=a[0]=0;b<enumOffOn.length;b++)if(enumOffOn[b]==d){a[0]|=b;break}null!=e&&(a[0]|=e<<8)}})}}
function convertDevModeToPT_Trapping(a,b,c,d){1==d.isSupportTrapping&&(checkFeatureNode(b,addPrivatePrefix("PageJobColorTrapping")),checkParameterInitNode(b,addPrivatePrefix("PageJobColorTrappingLevel")),c=c.privateFeatureReader.read(featuresEnum.Trapping,function(a){return 1==a.length?{trapping:enumOffOn[(a[0]&255)<enumOffOn.length?a[0]&255:0],level:a[0]>>8}:null},function(){return{trapping:enumOffOn[1],level:2}}),d=createFeatureNodePT(a,b,addPrivatePrefix("PageJobColorTrapping")),d=createOptionNodePT(a,
d,addPskPrefix(c.trapping)),"On"==c.trapping&&(createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("ColorTrappingLevel"),addPrivatePrefix("PageJobColorTrappingLevel")),createParamterInitIntNodePT(a,b,addPrivatePrefix("PageJobColorTrappingLevel"),c.level)))}var enumOutputOptimization=["OptimizeForSpeed","OptimizeForPortability"];
function completePC_JobOutputOptimization(a,b){var c=createFeatureNodePC(a,b,addPskPrefix("JobOutputOptimization"),"Optimization");createOptionNodePC(a,c,addPskPrefix("OptimizeForSpeed"),addPskPrefix("None"));createOptionNodePC(a,c,addPskPrefix("OptimizeForPortability"),addPskPrefix("None"))}
function convertPTToDevMode_JobOutputOptimization(a,b,c){var d=getOptionFromPT(b,addPskPrefix("JobOutputOptimization"));null!=d&&c.publicFeatureWriter.write(featuresEnum.OutputOptimization,1,function(a){if(1==a.length)for(var b=a[0]=0;b<enumOutputOptimization.length;b++)if(enumOutputOptimization[b]==d){a[0]=b;break}})}
function convertDevModeToPT_JobOutputOptimization(a,b,c){checkFeatureNode(b,addPskPrefix("JobOutputOptimization"));c=c.publicFeatureReader.read(featuresEnum.OutputOptimization,function(a){return 1==a.length?enumOutputOptimization[a[0]<enumOutputOptimization.length?a[0]:0]:null},function(){return enumOutputOptimization[0]});b=createFeatureNodePT(a,b,addPskPrefix("JobOutputOptimization"));createOptionNodePT(a,b,addPskPrefix(c))}var enumPatternScaling=["Auto","Coarse","Medium","Fine"];
function completePC_PagePatternScaling(a,b){var c=createFeatureNodePC(a,b,addPrivatePrefix("PagePatternScaling"),"Pattern scaling");createOptionNodePC(a,c,addPrivatePrefix("Auto"),addPskPrefix("None"));createOptionNodePC(a,c,addPrivatePrefix("Coarse"),addPskPrefix("None"));createOptionNodePC(a,c,addPrivatePrefix("Medium"),addPskPrefix("None"));createOptionNodePC(a,c,addPrivatePrefix("Fine"),addPskPrefix("None"))}
function convertPTToDevMode_PagePatternScaling(a,b,c){var d=getOptionFromPT(b,addPrivatePrefix("PagePatternScaling"));null!=d&&c.privateFeatureWriter.write(featuresEnum.PatternScaling,1,function(a){if(1==a.length)for(var b=a[0]=0;b<enumPatternScaling.length;b++)if(enumPatternScaling[b]==d){a[0]=b;break}})}
function convertDevModeToPT_PagePatternScaling(a,b,c){checkFeatureNode(b,addPrivatePrefix("PagePatternScaling"));c=c.privateFeatureReader.read(featuresEnum.PatternScaling,function(a){return 1==a.length?enumPatternScaling[a[0]<enumPatternScaling.length?a[0]:0]:null},function(){return enumPatternScaling[0]});b=createFeatureNodePT(a,b,addPrivatePrefix("PagePatternScaling"));createOptionNodePT(a,b,addPrivatePrefix(c))}var enumScreenMode=["Normal","Gradation","Resolution","HighDefinition"];
function completePC_JobScreenMode(a,b,c){1==c.isSupportScreenSetting&&1==c.isColorModel&&(b=createFeatureNodePC(a,b,addPrivatePrefix("JobScreenMode"),"Halftone screen"),createOptionNodePC(a,b,addPrivatePrefix("Normal"),addPskPrefix("None")),createOptionNodePC(a,b,addPrivatePrefix("Gradation"),addPskPrefix("None")),createOptionNodePC(a,b,addPrivatePrefix("Resolution"),addPskPrefix("None")),createOptionNodePC(a,b,addPrivatePrefix("HighDefinition"),addPskPrefix("None")))}
function convertPTToDevMode_JobScreenMode(a,b,c){var d=getOptionFromPT(b,addPrivatePrefix("JobScreenMode"));null!=d&&c.privateFeatureWriter.write(featuresEnum.ScreenMode,1,function(a){if(1==a.length)for(var b=a[0]=0;b<enumScreenMode.length;b++)if(enumScreenMode[b]==d){a[0]=b;break}})}
function convertDevModeToPT_JobScreenMode(a,b,c,d){1==d.isSupportScreenSetting&&1==d.isColorModel&&(checkFeatureNode(b,addPrivatePrefix("JobScreenMode")),c=c.privateFeatureReader.read(featuresEnum.ScreenMode,function(a){return 1==a.length?enumScreenMode[a[0]<enumScreenMode.length?a[0]:0]:null},function(){return enumScreenMode[0]}),b=createFeatureNodePT(a,b,addPrivatePrefix("JobScreenMode")),createOptionNodePT(a,b,addPrivatePrefix(c)))}
var enumPrintQuality=["Default","HighQuality","Proof","Draft","Custom"],enumResolution="Resolution1200Fine Resolution1200Fast Resolution600 Resolution300 Resolution1200Real Resolution600_4db Resolution1200".split(" "),enumQualitativeResolution=["psk:High","psk:Normal","psk:Draft","psk:Default","psk:Other"];
function completePC_PrintQuality(a,b,c){var d=isAvailableResolution1200Fine(c),e=isAvailableResolution1200Fast(c),f=isAvailableResolution600(c),h=isAvailableResolution300(c),k=isAvailablePrintQualityHighQuality(c),g=isAvailablePrintQualityProof(c),l=isAvailablePrintQualityDraft(c),p=isAvailablePrintQualityCustom(c);checkFeatureNode(b,addPskPrefix("PageResolution"));var n=createFeatureNodePC(a,b,addPskPrefix("PageResolution"),"Page Resolution");if(d)if(0==c.newResolutionGroupID||1==c.newResolutionGroupID){var m=
createOptionNodePC(a,n,addPrivatePrefix("Resolution1200Fine"),addPskPrefix("None"));createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionX"),"1200",addXsdPrefix("integer"));createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionY"),"1200",addXsdPrefix("integer"));createScoredPropertyWithValueNodePC(a,m,addPskPrefix("QualitativeResolution"),"psk:High",addXsdPrefix("string"))}else 2==c.newResolutionGroupID||5==c.newResolutionGroupID?(m=createOptionNodePC(a,n,addPrivatePrefix("Resolution1200"),
addPskPrefix("None")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionX"),"1200",addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionY"),"1200",addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,m,addPrivatePrefix("ResolutionConversion"),"Off",addXsdPrefix("string")),createScoredPropertyWithValueNodePC(a,m,addPrivatePrefix("BitsPerPixel"),"8",addXsdPrefix("integer"))):3==c.newResolutionGroupID?(m=createOptionNodePC(a,n,addPrivatePrefix("Resolution1200"),
addPskPrefix("None")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionX"),"600",addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionY"),"600",addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,m,addPrivatePrefix("ResolutionConversion"),"On",addXsdPrefix("string")),createScoredPropertyWithValueNodePC(a,m,addPrivatePrefix("BitsPerPixel"),"8",addXsdPrefix("integer"))):4==c.newResolutionGroupID?(m=createOptionNodePC(a,n,addPrivatePrefix("Resolution1200Fine"),
addPskPrefix("None")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionX"),"1200",addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionY"),"1200",addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,m,addPrivatePrefix("ResolutionConversion"),"On",addXsdPrefix("string")),createScoredPropertyWithValueNodePC(a,m,addPrivatePrefix("BitsPerPixel"),"8",addXsdPrefix("integer"))):6==c.newResolutionGroupID&&(m=createOptionNodePC(a,n,addPrivatePrefix("Resolution1200Fine"),
addPskPrefix("None")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionX"),"1200",addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionY"),"1200",addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,m,addPrivatePrefix("ResolutionConversion"),"On",addXsdPrefix("string")),createScoredPropertyWithValueNodePC(a,m,addPrivatePrefix("BitsPerPixel"),"1",addXsdPrefix("integer")));e&&(0==c.newResolutionGroupID||1==c.newResolutionGroupID?(m=createOptionNodePC(a,
n,addPrivatePrefix("Resolution1200Fast"),addPskPrefix("None")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionX"),"600",addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionY"),"600",addXsdPrefix("integer")),d?createScoredPropertyWithValueNodePC(a,m,addPskPrefix("QualitativeResolution"),"psk:Normal",addXsdPrefix("string")):createScoredPropertyWithValueNodePC(a,m,addPskPrefix("QualitativeResolution"),"psk:High",addXsdPrefix("string"))):6==c.newResolutionGroupID&&
(m=createOptionNodePC(a,n,addPrivatePrefix("Resolution1200Fast"),addPskPrefix("None")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionX"),"600",addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionY"),"600",addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,m,addPrivatePrefix("ResolutionConversion"),"Off",addXsdPrefix("string")),createScoredPropertyWithValueNodePC(a,m,addPrivatePrefix("BitsPerPixel"),"2",addXsdPrefix("integer"))));f&&
(0==c.newResolutionGroupID||1==c.newResolutionGroupID?(m=createOptionNodePC(a,n,addPrivatePrefix("Resolution600"),addPskPrefix("None")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionX"),"600",addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionY"),"600",addXsdPrefix("integer")),d||e?createScoredPropertyWithValueNodePC(a,m,addPskPrefix("QualitativeResolution"),"psk:Normal",addXsdPrefix("string")):createScoredPropertyWithValueNodePC(a,m,addPskPrefix("QualitativeResolution"),
"psk:High",addXsdPrefix("string"))):2==c.newResolutionGroupID?(m=createOptionNodePC(a,n,addPrivatePrefix("Resolution600"),addPskPrefix("None")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionX"),"600",addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionY"),"600",addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,m,addPrivatePrefix("ResolutionConversion"),"On",addXsdPrefix("string")),createScoredPropertyWithValueNodePC(a,m,addPrivatePrefix("BitsPerPixel"),
"8",addXsdPrefix("integer"))):3==c.newResolutionGroupID||4==c.newResolutionGroupID||5==c.newResolutionGroupID?(m=createOptionNodePC(a,n,addPrivatePrefix("Resolution600"),addPskPrefix("None")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionX"),"600",addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionY"),"600",addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,m,addPrivatePrefix("ResolutionConversion"),"Off",addXsdPrefix("string")),
createScoredPropertyWithValueNodePC(a,m,addPrivatePrefix("BitsPerPixel"),"8",addXsdPrefix("integer"))):6==c.newResolutionGroupID&&(m=createOptionNodePC(a,n,addPrivatePrefix("Resolution600"),addPskPrefix("None")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionX"),"600",addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionY"),"600",addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,m,addPrivatePrefix("ResolutionConversion"),"Off",addXsdPrefix("string")),
createScoredPropertyWithValueNodePC(a,m,addPrivatePrefix("BitsPerPixel"),"1",addXsdPrefix("integer"))));h&&(0==c.newResolutionGroupID||1==c.newResolutionGroupID?(m=createOptionNodePC(a,n,addPrivatePrefix("Resolution300"),addPskPrefix("None")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionX"),"300",addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionY"),"300",addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("QualitativeResolution"),
"psk:Draft",addXsdPrefix("string"))):6==c.newResolutionGroupID&&(m=createOptionNodePC(a,n,addPrivatePrefix("Resolution300"),addPskPrefix("None")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionX"),"300",addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,m,addPskPrefix("ResolutionY"),"300",addXsdPrefix("integer")),createScoredPropertyWithValueNodePC(a,m,addPrivatePrefix("ResolutionConversion"),"Off",addXsdPrefix("string")),createScoredPropertyWithValueNodePC(a,m,addPrivatePrefix("BitsPerPixel"),
"1",addXsdPrefix("integer"))));n=createFeatureNodePC(a,b,addPrivatePrefix("JobPrintQuality"),"Print Quality");k&&(m=createOptionNodePC(a,n,addPrivatePrefix("HighQuality"),addPskPrefix("None")),createScoredPropertyWithValueNodePC(a,m,addPrivatePrefix("DefaultResolution"),c.DefaultResolution.DefResHighQua,addXsdPrefix("integer")));g&&(m=createOptionNodePC(a,n,addPrivatePrefix("Proof"),addPskPrefix("None")),createScoredPropertyWithValueNodePC(a,m,addPrivatePrefix("DefaultResolution"),c.DefaultResolution.DefResProof,
addXsdPrefix("integer")));l&&(m=createOptionNodePC(a,n,addPrivatePrefix("Draft"),addPskPrefix("None")),createScoredPropertyWithValueNodePC(a,m,addPrivatePrefix("DefaultResolution"),c.DefaultResolution.DefResDraft,addXsdPrefix("integer")));p&&(m=createOptionNodePC(a,n,addPrivatePrefix("Custom"),addPskPrefix("None")),createScoredPropertyWithValueNodePC(a,m,addPrivatePrefix("DefaultResolution"),c.DefaultResolution.DefResCustom,addXsdPrefix("integer")));createParameterDefIntNodePC(a,b,addPrivatePrefix("JobDefaultPrintQuality"),
-1,-1,4,"number","xsd:string")}
function convertPTToDevMode_PrintQuality(a,b,c){var d=null,e=null;a=getFeatureFromPT(b,addPrivatePrefix("JobPrintQuality"));null!=a&&(d=getOptionFromPT(b,addPrivatePrefix("JobPrintQuality")),e=getOptionScoredPropertyFromPT(a,addPrivatePrefix("DefaultResolution")),c.privateFeatureWriter.write(featuresEnum.PrintQuality,2,function(a){if(2==a.length){a[0]=0;a[1]=0;if(null!=d)for(var b=0;b<enumPrintQuality.length;b++)if(enumPrintQuality[b]==d){a[0]=b;break}null!=e&&(a[1]=e)}}));var f=null,h=null,k=null,
g=null,l,p;a=getFeatureFromPT(b,addPskPrefix("PageResolution"));null!=a&&(f=getOptionFromPT(b,addPskPrefix("PageResolution")),h=getOptionScoredPropertyFromPT(a,addPskPrefix("QualitativeResolution")),k=getOptionScoredPropertyFromPT(a,addPskPrefix("ResolutionX")),g=getOptionScoredPropertyFromPT(a,addPskPrefix("ResolutionY")),l=getOptionScoredPropertyFromPT(a,addPrivatePrefix("ResolutionConversion")),p=getOptionScoredPropertyFromPT(a,addPrivatePrefix("BitsPerPixel")),"Resolution1200Fast"==f||"Resolution600"==
f||"Resolution1200"==f&&600==k&&600==g)&&(null!=h?c.publicFeatureWriter.write(featuresEnum.Resolution,3,function(a){if(3==a.length){a[0]=0;a[1]=0;a[2]=0;if(null!=f)for(var b=0;b<enumResolution.length;b++){if(enumResolution[b]==f){a[0]|=b&255;break}}else a[0]|=2;if(null!=h)for(b=0;b<enumQualitativeResolution.length;b++){if(enumQualitativeResolution[b]==h){a[0]|=b<<8&65280;break}}else a[0]|=256;a[1]=null!=k?k:600;a[2]=null!=g&&g==k?g:a[1]}}):c.publicFeatureWriter.write(featuresEnum.Resolution,4,function(a){if(4==
a.length){a[0]=0;a[1]=0;a[2]=0;a[3]=0;if(null!=f)for(var b=0;b<enumResolution.length;b++){if(enumResolution[b]==f){a[0]|=b&255;break}}else a[0]|=2;a[1]=null!=k?k:600;a[2]=null!=g&&g==k?g:a[1];if(null!=l)for(b=0;b<enumOffOn.length;b++)if(enumOffOn[b]==l){a[3]|=b&255;break}null!=p&&(a[3]|=p<<8&65280)}}))}
function convertDevModeToPT_PrintQuality(a,b,c,d){checkFeatureNode(b,addPrivatePrefix("JobPrintQuality"));var e=c.privateFeatureReader.read(featuresEnum.PrintQuality,function(a){return 2==a.length?{printQuality:enumPrintQuality[a[0]<enumPrintQuality.length?a[0]:0],defaultResolution:a[1]}:null},function(){return{printQuality:enumPrintQuality[0],defaultResolution:600}});"Default"==e.printQuality&&(e.printQuality=getPrintQualityStringFromInt(d.DefaultResolution.DefPrintQua));var f=createFeatureNodePT(a,
b,addPrivatePrefix("JobPrintQuality")),f=createOptionNodePT(a,f,addPrivatePrefix(e.printQuality));createScoredPropertyWithValueNodePT(a,f,addPrivatePrefix("DefaultResolution"),e.defaultResolution,addXsdPrefix("integer"));c=c.publicFeatureReader.read(featuresEnum.Resolution,function(a){return 3==a.length?{resolution:enumResolution[(a[0]&255)<enumResolution.length?a[0]&255:2],qualitativeResolution:enumQualitativeResolution[(a[0]>>8&255)<enumQualitativeResolution.length?a[0]>>8&255:1],dpiX:a[1],dpiY:a[2]}:
4==a.length?{resolution:enumResolution[(a[0]&255)<enumResolution.length?a[0]&255:2],dpiX:a[1],dpiY:a[2],resolutionConversion:enumOffOn[(a[3]&255)<enumOffOn.length?a[3]&255:1],bitsPerPixel:a[3]>>8}:null},function(){if(0==d.newResolutionGroupID)return isAvailableResolution1200Fine(d)&&isAvailableResolution1200Fast(d)?{resolution:enumResolution[1],qualitativeResolution:enumQualitativeResolution[1],dpiX:600,dpiY:600}:{resolution:enumResolution[2],qualitativeResolution:enumQualitativeResolution[1],dpiX:600,
dpiY:600};if(1==d.newResolutionGroupID)return{resolution:enumResolution[2],qualitativeResolution:enumQualitativeResolution[1],dpiX:600,dpiY:600};if(2==d.newResolutionGroupID)return{resolution:enumResolution[2],dpiX:600,dpiY:600,resolutionConversion:enumOffOn[1],bitsPerPixel:8};if(3==d.newResolutionGroupID||4==d.newResolutionGroupID||5==d.newResolutionGroupID)return{resolution:enumResolution[2],dpiX:600,dpiY:600,resolutionConversion:enumOffOn[0],bitsPerPixel:8};if(6==d.newResolutionGroupID)return{resolution:enumResolution[2],
dpiX:600,dpiY:600,resolutionConversion:enumOffOn[0],bitsPerPixel:1}});e=getOptionFromPT(b,addPskPrefix("PageResolution"));"Resolution1200"==e?null==c.qualitativeResolution&&(2==d.newResolutionGroupID||5==d.newResolutionGroupID?(c.resolution=e,c.dpiX=1200,c.dpiY=1200,c.resolutionConversion=enumOffOn[0],c.bitsPerPixel=8):4==d.newResolutionGroupID&&(c.resolution=enumResolution[0],c.dpiX=1200,c.dpiY=1200,c.resolutionConversion=enumOffOn[1],c.bitsPerPixel=8)):"Resolution1200Fine"==e?null==c.qualitativeResolution?
6==d.newResolutionGroupID?(c.resolution=e,c.dpiX=1200,c.dpiY=1200,c.resolutionConversion=enumOffOn[1],c.bitsPerPixel=1):4==d.newResolutionGroupID&&(c.resolution=e,c.dpiX=1200,c.dpiY=1200,c.resolutionConversion=enumOffOn[1],c.bitsPerPixel=8):(c.resolution=e,c.dpiX=1200,c.dpiY=1200,c.qualitativeResolution=enumQualitativeResolution[0],c.bitsPerPixel=1):"Resolution300"==e&&(null==c.qualitativeResolution?6==d.newResolutionGroupID&&(c.resolution=e,c.dpiX=300,c.dpiY=300,c.resolutionConversion=enumOffOn[0],
c.bitsPerPixel=1):(c.resolution=e,c.dpiX=300,c.dpiY=300,c.qualitativeResolution=enumQualitativeResolution[2],c.bitsPerPixel=1));checkFeatureNode(b,addPskPrefix("PageResolution"));f=createFeatureNodePT(a,b,addPskPrefix("PageResolution"));f=createOptionNodePT(a,f,addPrivatePrefix(c.resolution));null!=c.qualitativeResolution?(createScoredPropertyWithValueNodePT(a,f,addPskPrefix("ResolutionX"),c.dpiX,addXsdPrefix("integer")),createScoredPropertyWithValueNodePT(a,f,addPskPrefix("ResolutionY"),c.dpiY,addXsdPrefix("integer")),
createScoredPropertyWithValueNodePT(a,f,addPskPrefix("QualitativeResolution"),c.qualitativeResolution,addXsdPrefix("string"))):(createScoredPropertyWithValueNodePT(a,f,addPskPrefix("ResolutionX"),c.dpiX,addXsdPrefix("integer")),createScoredPropertyWithValueNodePT(a,f,addPskPrefix("ResolutionY"),c.dpiY,addXsdPrefix("integer")),createScoredPropertyWithValueNodePT(a,f,addPrivatePrefix("ResolutionConversion"),c.resolutionConversion,addXsdPrefix("string")),createScoredPropertyWithValueNodePT(a,f,addPrivatePrefix("BitsPerPixel"),
c.bitsPerPixel,addXsdPrefix("integer")));checkParameterInitNode(b,addPrivatePrefix("JobDefaultPrintQuality"));createParamterInitIntNodePT(a,b,addPrivatePrefix("JobDefaultPrintQuality"),d.DefaultResolution.DefPrintQua)}function isAvailableResolution1200Fine(a){for(var b=0;b<a.DefaultResolution.NumRes;b++)if(0==a.DefaultResolution.RangeRes[b])return!0;return!1}
function isAvailableResolution1200Fast(a){for(var b=0;b<a.DefaultResolution.NumRes;b++)if(1==a.DefaultResolution.RangeRes[b])return!0;return!1}function isAvailableResolution600(a){for(var b=0;b<a.DefaultResolution.NumRes;b++)if(2==a.DefaultResolution.RangeRes[b])return!0;return!1}function isAvailableResolution300(a){for(var b=0;b<a.DefaultResolution.NumRes;b++)if(3==a.DefaultResolution.RangeRes[b])return!0;return!1}
function isAvailablePrintQualityHighQuality(a){return a.DefaultResolution.MaskPrintQua&1?!0:!1}function isAvailablePrintQualityProof(a){return a.DefaultResolution.MaskPrintQua&2?!0:!1}function isAvailablePrintQualityDraft(a){return a.DefaultResolution.MaskPrintQua&4?!0:!1}function isAvailablePrintQualityCustom(a){return a.DefaultResolution.MaskPrintQua&8?!0:!1}
function getPrintQualityStringFromInt(a){switch(a){case 1:return"Proof";case 2:return"Draft";case 3:return"Custom";default:return"HighQuality"}}function completePC_JobOutputDocumentType(a,b,c){0==c&&(b=createFeatureNodePC(a,b,addPrivatePrefix("JobOutputDocumentType"),"Output Document Type"),createOptionNodePC(a,b,addPrivatePrefix("XPS"),addPskPrefix("None")),createOptionNodePC(a,b,addPrivatePrefix("OpenXPS"),addPskPrefix("None")))}
function convertPTToDevMode_JobOutputDocumentType(a,b,c){a=getOptionFromPT(b,addPrivatePrefix("JobOutputDocumentType"));null!=a&&"PCLXL"!=a&&setEnumInDevMode(c,"PDL",a,JobOutputDocumentTypeEnum)}
function convertDevModeToPT_JobOutputDocumentType(a,b,c){c=getEnumFromDevMode(c,"PDL",JobOutputDocumentTypeEnum);null!=c&&"PCLXL"!=c&&(checkFeatureNode(b,addPrivatePrefix("JobOutputDocumentType")),b=createFeatureNodePT(a,b,addPrivatePrefix("JobOutputDocumentType")),createOptionNodePT(a,b,addPrivatePrefix(c)))}
function completePC_PageTwoColor(a,b,c){1==c.isColorModel&&1==c.isSupportTwoColor&&(c=createFeatureNodePC(a,b,addPrivatePrefix("PageTwoColor"),"TwoColor"),createOptionNodePC(a,c,addPskPrefix("Off"),addPskPrefix("None")),c=createOptionNodePC(a,c,addPskPrefix("On"),addPskPrefix("None")),createScoredPropertyWithParameterRefPC(a,c,addPrivatePrefix("TwoColorMode"),addPrivatePrefix("PageTwoColorMode")),createParameterDefIntNodePC(a,b,addPrivatePrefix("PageTwoColorMode"),4,1,6,"level","xsd:string"))}
function convertPTToDevMode_PageTwoColor(a,b,c){var d=getOptionFromPT(b,addPrivatePrefix("PageTwoColor"));if(null!=d){var e=getParameterInitIntValuePT(b,addPrivatePrefix("PageTwoColorMode"));c.privateFeatureWriter.write(featuresEnum.TwoColor,1,function(a){if(1==a.length){for(var b=a[0]=0;b<enumOffOn.length;b++)if(enumOffOn[b]==d){a[0]|=b&255;break}null!=e&&(a[0]|=e<<8&65280)}})}}
function convertDevModeToPT_PageTwoColor(a,b,c,d){c=c.privateFeatureReader.read(featuresEnum.TwoColor,function(a){return 1==a.length?{twocolor:enumOffOn[(a[0]&255)<enumOffOn.length?a[0]&255:0],mode:a[0]>>8&255}:null},function(){return{twocolor:enumOffOn[0],mode:4}});1==d.isColorModel&&1==d.isSupportTwoColor?(checkFeatureNode(b,addPrivatePrefix("PageTwoColor")),checkParameterInitNode(b,addPrivatePrefix("PageTwoColorMode")),d=createFeatureNodePT(a,b,addPrivatePrefix("PageTwoColor"),"TwoColor"),d=createOptionNodePT(a,
d,addPskPrefix(c.twocolor)),"On"==c.twocolor&&(createScoredPropertyWithParameterRefPC(a,d,addPrivatePrefix("TwoColorMode"),addPrivatePrefix("PageTwoColorMode")),createParamterInitIntNodePT(a,b,addPrivatePrefix("PageTwoColorMode"),c.mode))):(checkFeatureNode(b,addPrivatePrefix("PageTwoColor")),d=createFeatureNodePT(a,b,addPrivatePrefix("PageTwoColor"),"TwoColor"),d=createOptionNodePT(a,d,addPskPrefix(c.twocolor)))}
function validatePrintTicket_Duplex(a,b,c,d){var e=!1,f=getFeatureFromPT(b,addPskPrefix("JobDuplexAllDocumentsContiguously"));if(null!=f&&(f=getOptionFromPT(b,addPskPrefix("JobDuplexAllDocumentsContiguously")),null!=f&&"OneSided"!=f)){f=getBoolFromPropertyBag(d,"DuplexStandard");d=getBoolFromPropertyBag(d,"DuplexSupport");if(0==f&&0==d)e=!0;else if(f=getFeatureFromPT(b,addPrivatePrefix("PagePrintMediaSize")),null!=f)for(d=getOptionFromPT(b,addPrivatePrefix("PagePrintMediaSize")),"AutoSelect"==d&&
(d=getOptionFromPT(b,addPskPrefix("PageMediaSize"))),f=0;f<c.MediaSizes.length;f++)if(c.MediaSizes[f].Value==d){0==c.MediaSizes[f].IsSupportDuplex&&(e=!0);break}1==e&&(checkFeatureNode(b,addPskPrefix("JobDuplexAllDocumentsContiguously")),f=createFeatureNodePT(a,b,addPskPrefix("JobDuplexAllDocumentsContiguously")),null!=f&&createOptionNodePT(a,f,addPskPrefix("OneSided")))}}
function validatePrintTicket_Source(a,b,c){var d=!0,e=getFeatureFromPT(b,addPskPrefix("JobInputBin"));if(null!=e){var f=getOptionFromPT(b,addPskPrefix("JobInputBin"));if(null!=f&&"AutoSelect"!=f&&"Manual"!=f){e=getFeatureFromPT(b,addPrivatePrefix("PagePrintMediaSize"));if(null!=e){e=getOptionFromPT(b,addPrivatePrefix("PagePrintMediaSize"));"AutoSelect"==e&&(e=getOptionFromPT(b,addPskPrefix("PageMediaSize")));for(var h=0;h<c.MediaSources.length;h++)if(c.MediaSources[h].Value==f){for(f=0;f<c.MediaSources[h].MediaSizes.length;f++)if(c.MediaSources[h].MediaSizes[f].Value==
e){d=!1;break}break}}else d=!1;1==d&&(checkFeatureNode(b,addPskPrefix("JobInputBin")),e=createFeatureNodePT(a,b,addPskPrefix("JobInputBin")),null!=e&&createOptionNodePT(a,e,addPskPrefix("AutoSelect")))}}}function asciiStringToBin(a,b,c,d){for(var e=0;c<b.length&&e<a.length&&e<d;c++,e+=2)b[c]=e+1<a.length&&e+1<d?a.charCodeAt(e)|a.charCodeAt(e+1)<<8:a.charCodeAt(e)}
function asciiBinToString(a,b,c){for(var d="",e=0,f=b;e<c;e+=2,f++)b=String.fromCharCode(a[f]&127),d+=b,e+1<c&&(b=String.fromCharCode(a[f]>>8&127),d+=b);return d}function binCopy(a,b,c,d){if(a.length<=b.length-c)for(var e=0;e<a.length&&e<d;e++)b[c+e]=a[e]}function stringToBin(a,b,c,d){if(a.length<=b.length-c)for(var e=0;e<a.length&&e<d;e++)b[c+e]=a.charCodeAt(e)}
function binToString(a,b,c){for(var d="",e=0;e<c&&0!=a[b];e++,b++)a[b]&55296?55296==(a[b]&55296)&&e+1<c&&56320==(a[b+1]&56320)&&(d+=String.fromCharCode(a[b],a[b+1])):d+=String.fromCharCode(a[b]);return d}function hexStringToArray(a){for(var b=a.length/4,c=[],d=0;d<b;d++)c[d]=parseInt(a.substr(4*d+2,2)+a.substr(4*d,2),16);return c}
function arrayToHexString(a){for(var b="",c,d=0;d<a.length;d++)c=(a[d]&65535).toString(16),b=1==c.length?b+("0"+c+"00"):2==c.length?b+(c+"00"):3==c.length?b+(c.substr(1,2)+"0"+c.substr(0,1)):4==c.length?b+(c.substr(2,2)+c.substr(0,2)):b+"0000";return b}
function base64StringToArray(a){if(0==(a.length&3)){for(var b=a.length>>2,c=[],d=0,e=0;e<b;e++){var f=getBase64Data(a.charAt(4*e)),h=getBase64Data(a.charAt(4*e+1)),k=getBase64Data(a.charAt(4*e+2)),g=getBase64Data(a.charAt(4*e+3));0==(e&1)?(null!=f&&null!=h&&null!=k?c[3*(e>>1)]=f<<2|h>>4|(h&15)<<12|(k&60)<<6:null!=f&&null!=h&&null==k&&(c[3*(e>>1)]=f<<2|h>>4),null!=k&&null!=g&&(d=(k&3)<<6|g,e+1==b&&(c[3*(e>>1)+1]=d))):(null!=f&&null!=h&&(c[3*(e>>1)+1]=d|f<<10|(h&48)<<4),null!=h&&null!=k&&null!=g?c[3*
(e>>1)+2]=(h&15)<<4|(k&60)>>2|(k&3)<<14|g<<8:null!=h&&null!=k&&null==g&&(c[3*(e>>1)+2]=(h&15)<<4|(k&60)>>2));if(null==f||null==h||null==k&&null!=g)return null}return c}return null}function getBase64Data(a){if("+"==a)return 62;if("/"==a)return 63;if("="!=a){a=a.charCodeAt(0);if(65<=a&&90>=a)return a-65;if(97<=a&&122>=a)return a-71;if(48<=a&&57>=a)return a+4}return null}
function arraySectionToBase64String(a,b,c){for(var d="",e=0;b<a.length&&e<c;b+=3,e+=3)b+2<a.length&&e+2<c?(d+=getBase64Char((a[b]&252)>>2&63),d+=getBase64Char(((a[b]&3)<<4|(a[b]&61440)>>12)&63),d+=getBase64Char(((a[b]&3840)>>6|(a[b+1]&192)>>6)&63),d+=getBase64Char(a[b+1]&63),d+=getBase64Char((a[b+1]&64512)>>10&63),d+=getBase64Char(((a[b+1]&768)>>4|(a[b+2]&240)>>4)&63),d+=getBase64Char(((a[b+2]&15)<<2|(a[b+2]&49152)>>14)&63),d+=getBase64Char((a[b+2]&16128)>>8&63)):(b+1<a.length&&e+1<c?(d+=getBase64Char((a[b]&
252)>>2&63),d+=getBase64Char(((a[b]&3)<<4|(a[b]&61440)>>12)&63),d+=getBase64Char(((a[b]&3840)>>6|(a[b+1]&192)>>6)&63),d+=getBase64Char(a[b+1]&63),d+=getBase64Char((a[b+1]&64512)>>10&63),d+=getBase64Char((a[b+1]&768)>>4&63),d+="="):(d+=getBase64Char((a[b]&252)>>2&63),d+=getBase64Char(((a[b]&3)<<4|(a[b]&61440)>>12)&63),d+=getBase64Char((a[b]&3840)>>6&63)),d+="=");return d}
function arrayToBase64String(a){for(var b="",c=0;c<a.length;c+=3)c+2<a.length?(b+=getBase64Char((a[c]&252)>>2&63),b+=getBase64Char(((a[c]&3)<<4|(a[c]&61440)>>12)&63),b+=getBase64Char(((a[c]&3840)>>6|(a[c+1]&192)>>6)&63),b+=getBase64Char(a[c+1]&63),b+=getBase64Char((a[c+1]&64512)>>10&63),b+=getBase64Char(((a[c+1]&768)>>4|(a[c+2]&240)>>4)&63),b+=getBase64Char(((a[c+2]&15)<<2|(a[c+2]&49152)>>14)&63),b+=getBase64Char((a[c+2]&16128)>>8&63)):(c+1<a.length?(b+=getBase64Char((a[c]&252)>>2&63),b+=getBase64Char(((a[c]&
3)<<4|(a[c]&61440)>>12)&63),b+=getBase64Char(((a[c]&3840)>>6|(a[c+1]&192)>>6)&63),b+=getBase64Char(a[c+1]&63),b+=getBase64Char((a[c+1]&64512)>>10&63),b+=getBase64Char((a[c+1]&768)>>4&63),b+="="):(b+=getBase64Char((a[c]&252)>>2&63),b+=getBase64Char(((a[c]&3)<<4|(a[c]&61440)>>12)&63),b+=getBase64Char((a[c]&3840)>>6&63)),b+="=");return b}
function getBase64Char(a){return 0<=a&&25>=a?String.fromCharCode(a+65):26<=a&&51>=a?String.fromCharCode(a+71):52<=a&&61>=a?String.fromCharCode(a-4):62==a?"+":63==a?"/":"="}function DevModeReader(a){this._devModeProperties=a;this._devModeDataForPublicPT;this._devModeDataForPrivatePT;this.publicFeatureReader;this.privateFeatureReader}
DevModeReader.prototype.initialize=function(){this.publicFeatureReader=new DevModeDataReaderV0001(null);this.privateFeatureReader=new DevModeDataReaderV0001(null);try{var a=this._devModeProperties.GetString("PublicSettings"),b=this._devModeProperties.GetString("PrivateSettings");if(null!=a&&null!=b&&(this._devModeDataForPublicPT=base64StringToArray(a),this._devModeDataForPrivatePT=base64StringToArray(b),null!=this._devModeDataForPublicPT&&null!=this._devModeDataForPrivatePT&&2<this._devModeDataForPublicPT.length&&
2<this._devModeDataForPrivatePT.length&&3072>=this._devModeDataForPublicPT.length&&7680>=this._devModeDataForPrivatePT.length&&19780==this._devModeDataForPublicPT[0]&&19780==this._devModeDataForPrivatePT[0])){if(1==this._devModeDataForPublicPT[1])this.publicFeatureReader=new DevModeDataReaderV0001(this._devModeDataForPublicPT);else return!1;if(1==this._devModeDataForPrivatePT[1])this.privateFeatureReader=new DevModeDataReaderV0001(this._devModeDataForPrivatePT);else return!1;return!0}}catch(c){}return!1};
DevModeReader.prototype.finalize=function(){return!0};
function DevModeDataReaderV0001(a){this._devModeData=a;this.featureList=[];if(null!=this._devModeData&&10<this._devModeData.length&&(a=this._devModeData[2],this._devModeData.length>a+2&&65535==this._devModeData[a])){var b=this._devModeData[a+2];if(b<=featuresEnum.MAX&&this._devModeData.length==a+3+2*b){for(var c=0;c<b;c++)this.featureList[c]={feature:this._devModeData[a+3+2*c],index:this._devModeData[a+3+2*c+1]};c=getHash(this._devModeData,11);if(null==c||8!=c.length||this._devModeData[3]!=c[0]||
this._devModeData[4]!=c[1]||this._devModeData[5]!=c[2]||this._devModeData[6]!=c[3]||this._devModeData[7]!=c[4]||this._devModeData[8]!=c[5]||this._devModeData[9]!=c[6]||this._devModeData[10]!=c[7])this.featureList=[];if(null!=this.featureList&&0<this.featureList.length)for(var d=-1,c=0;c<b;c++)if(this.featureList[c].feature<=d||this.featureList[c].feature>featuresEnum.MAX||this.featureList[c].index>=a){this.featureList=[];break}else d=this.featureList[c].feature}}}
DevModeDataReaderV0001.prototype._findFeature=function(a){try{var b=0,c=this.featureList.length-1;if(0<c){do{var d=c+b>>1;if(this.featureList[d].feature<a)if(1<c-d)b=d;else{if(this.featureList[c].feature==a)return this.featureList[c].index;break}else if(this.featureList[d].feature>a)c=d;else if(this.featureList[d].feature==a)return this.featureList[d].index}while(b<c)}}catch(e){}return null};
DevModeDataReaderV0001.prototype.read=function(a,b,c){var d=this._findFeature(a),e=null;try{if(null!=d&&0<d&&this._devModeData.length>d+1&&a==this._devModeData[d]&&2<this._devModeData[d+1]&&this._devModeData.length>d+this._devModeData[d+1]-1){var f=Array(this._devModeData[d+1]-2);for(a=0;a<f.length;a++)f[a]=this._devModeData[d+2+a];null!=b&&(e=b(f))}}catch(h){}null==e&&null!=c&&(e=c());return e};
function DevModeWriter(a){this._devModeProperties=a;this._devModeDataForPublicPT=[];this._devModeDataForPrivatePT=[];this.publicFeatureWriter=new DevModeDataWriterV0001(this._devModeDataForPublicPT);this.privateFeatureWriter=new DevModeDataWriterV0001(this._devModeDataForPrivatePT)}DevModeWriter.prototype.initialize=function(){return!0};
DevModeWriter.prototype.finalize=function(){try{return this.publicFeatureWriter.finalize(),this.privateFeatureWriter.finalize(),3072>=this._devModeDataForPublicPT.length&&this._devModeProperties.SetString("PublicSettings",arrayToBase64String(this._devModeDataForPublicPT)),7680>=this._devModeDataForPrivatePT.length&&this._devModeProperties.SetString("PrivateSettings",arrayToBase64String(this._devModeDataForPrivatePT)),!0}catch(a){}return!1};
function DevModeDataWriterV0001(a){this._devModeData=a;this._nextIndex=11;this._featureSortedLinkedList=null;this._devModeData[0]=19780;this._devModeData[1]=1}
DevModeDataWriterV0001.prototype._insertFeatureToLinkedList=function(a,b){if(null==this._featureSortedLinkedList)this._featureSortedLinkedList={feature:a,index:b,next:null};else if(this._featureSortedLinkedList.feature>a)this._featureSortedLinkedList={feature:a,index:b,next:this._featureSortedLinkedList};else for(var c=this._featureSortedLinkedList;null!=c&&c.feature<a;){if(null==c.next||c.next.feature>a){c.next={feature:a,index:b,next:c.next};break}else if(c.next.feature==a){c.next.index=b;break}c=
c.next}};DevModeDataWriterV0001.prototype.write=function(a,b,c){try{if(0<=this._nextIndex){var d=Array(b);null!=c&&c(d);if(d.length==b){this._devModeData[this._nextIndex]=a;this._devModeData[this._nextIndex+1]=b+2;for(c=0;c<d.length;c++)this._devModeData[this._nextIndex+2+c]=d[c];this._insertFeatureToLinkedList(a,this._nextIndex);this._nextIndex+=b+2;return!0}}}catch(e){}return!1};
DevModeDataWriterV0001.prototype.finalize=function(){this._devModeData[2]=this._nextIndex;this._devModeData[this._nextIndex]=65535;for(var a=this._featureSortedLinkedList,b=0,c=this._nextIndex+3;null!=a;c+=2,b++)this._devModeData[c]=a.feature,this._devModeData[c+1]=a.index,a=a.next;this._devModeData[this._nextIndex+1]=2*b+3;this._devModeData[this._nextIndex+2]=b;a=getHash(this._devModeData,11);null!=a&&8==a.length&&(this._devModeData[3]=a[0],this._devModeData[4]=a[1],this._devModeData[5]=a[2],this._devModeData[6]=
a[3],this._devModeData[7]=a[4],this._devModeData[8]=a[5],this._devModeData[9]=a[6],this._devModeData[10]=a[7]);return!0};function getHash(a,b){for(var c=[0,0,0,0,0,0,0,0],d=b,e=0;d<a.length;d++,e++)c[e&7]^=a[d];return c};
