[Rd] bug and proposed fix in print.trellis 1.7.0 (PR#2859)

rmh at surfer.sbm.temple.edu rmh at surfer.sbm.temple.edu
Sun Apr 27 08:58:03 MEST 2003


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime at docserver.cac.washington.edu for more info.

---1678264062-154654637-1051422990=:2626055
Content-Type: TEXT/PLAIN; charset=US-ASCII


---1678264062-154654637-1051422990=:2626055
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="pt-R.bug.report"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.SGI.4.32.0304270156300.2626055 at surfer.sbm.temple.edu>
Content-Description: description
Content-Disposition: attachment; filename="pt-R.bug.report"

IyBZb3VyIG1haWxlciBpcyBzZXQgdG8gIm5vbmUiIChkZWZhdWx0IG9uIFdp
bmRvd3MpLA0NCiMgaGVuY2Ugd2UgY2Fubm90IHNlbmQgdGhlIGJ1ZyByZXBv
cnQgZGlyZWN0bHkgZnJvbSBSLg0NCiMgUGxlYXNlIGNvcHkgdGhlIGJ1ZyBy
ZXBvcnQgKGFmdGVyIGZpbmlzaGluZyBpdCkgdG8NDQojIHlvdXIgZmF2b3Jp
dGUgZW1haWwgcHJvZ3JhbSBhbmQgc2VuZCBpdCB0bw0NCiMNDQojICAgICAg
IHItYnVnc0ByLXByb2plY3Qub3JnDQ0KIw0NCiMjIyMjIyMjIyMjIyMjIyMj
IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIw0NCg0NCg0N
ClRoZSBuZXcgZmVhdHVyZSBkZXNjcmliZWQgaW4gcncxMDcwL2xpYnJhcnkv
bGF0dGljZS9DaGFuZ2VzIGlzIHZlcnkNDQp1c2VmdWwgYW5kIGlzIG5lZWRl
ZCBmb3Igc2V2ZXJhbCBvZiB0aGUgZXhhbXBsZXMgSSBzaG93ZWQgYXQgRFND
LTIwMDMuDQ0KDQ0KPiBzY2FsZXMNDQo+IC0tLS0tLQ0NCj4gS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HMsIHBh
Y2thZ2U6Y3Rlc3QsIHBhY2thZ2U6bXZhLCBwYWNrYWdlOm1vZHJlZywgcGFj
a2FnZTpubHMsIHBhY2thZ2U6dHMsIEF1dG9sb2FkcywgcGFja2FnZTpiYXNl
DQ0K
---1678264062-154654637-1051422990=:2626055
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="pt-test.r"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.SGI.4.32.0304270156301.2626055 at surfer.sbm.temple.edu>
Content-Description: illustration
Content-Disposition: attachment; filename="pt-test.r"

IyMgcHJpbnQudHJlbGxpcyBidWcgaW4gUiAxLjcuMA0KDQp0bXAgPC0gZGF0
YS5mcmFtZShhPWZhY3RvcihjKCJhIiwiYiIsImMiKSksDQogICAgICAgICAg
ICAgICAgICBiPWZhY3RvcihjKCJkIiwiZSIsImYiKSksDQogICAgICAgICAg
ICAgICAgICBkPWZhY3RvcihjKDEsMSwyKSkpDQoNCnh5cGxvdChhIH4gYiB8
IGQsIGRhdGE9dG1wLCAgIyMgd29ya3MNCiAgICAgICAgc2NhbGVzPWxpc3Qo
YWx0ZXJuYXRpbmc9RikpDQoNCnh5cGxvdChhIH4gYiB8IGQsIGRhdGE9dG1w
LCAgIyMgSW52YWxpZCB2YWx1ZSBmb3IgbGFiZWxzDQogICAgICAgc2NhbGVz
PWxpc3QoeD1saXN0KGxhYmVscz1saXN0KGMoImQiLCJlIiwiIiksYygiIiwi
IiwiZiIpKSwNCiAgICAgICAgICAgICAgICAgICAgIGFsdGVybmF0aW5nPUYp
KSkNCg0Kc291cmNlKCJwcmludC50cmVsbGlzLnIiKSAgICAjIyBybWggcHJv
cG9zZWQgZml4DQoNCnh5cGxvdChhIH4gYiB8IGQsIGRhdGE9dG1wLCAgIyMg
bm93IGl0IHdvcmtzDQogICAgICAgc2NhbGVzPWxpc3QoeD1saXN0KGxhYmVs
cz1saXN0KGMoImQiLCJlIiwiIiksYygiIiwiIiwiZiIpKSwNCiAgICAgICAg
ICAgICAgICAgICAgIGFsdGVybmF0aW5nPUYpKSkNCg==
---1678264062-154654637-1051422990=:2626055
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="print.trellis.r"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.SGI.4.32.0304270156302.2626055 at surfer.sbm.temple.edu>
Content-Description: proposed fix
Content-Disposition: attachment; filename="print.trellis.r"

cHJpbnQudHJlbGxpcyA8LQ0KZnVuY3Rpb24gKHgsIHBvc2l0aW9uLCBzcGxp
dCwgbW9yZSA9IEZBTFNFLCBuZXdwYWdlID0gVFJVRSwgcGFuZWwuaGVpZ2h0
ID0gbGlzdCgxLCANCiAgICAibnVsbCIpLCBwYW5lbC53aWR0aCA9IGxpc3Qo
MSwgIm51bGwiKSwgLi4uKSANCnsNCiAgICBpZiAoaXMubnVsbChkZXYubGlz
dCgpKSkgDQogICAgICAgIHRyZWxsaXMuZGV2aWNlKCkNCiAgICBlbHNlIGlm
IChpcy5udWxsKHRyZWxsaXMucGFyLmdldCgpKSkgDQogICAgICAgIHRyZWxs
aXMuZGV2aWNlKGRldmljZSA9IC5EZXZpY2UsIG5ldyA9IEZBTFNFKQ0KICAg
IGJnID0gdHJlbGxpcy5wYXIuZ2V0KCJiYWNrZ3JvdW5kIikkY29sDQogICAg
bmV3IDwtIFRSVUUNCiAgICBpZiAoLmxhdHRpY2UucHJpbnQubW9yZSB8fCAh
bmV3cGFnZSkgDQogICAgICAgIG5ldyA8LSBGQUxTRQ0KICAgIC5sYXR0aWNl
LnByaW50Lm1vcmUgPDwtIG1vcmUNCiAgICB1c3VhbCA8LSAobWlzc2luZyhw
b3NpdGlvbikgJiBtaXNzaW5nKHNwbGl0KSkNCiAgICBmb250c2l6ZS5kZWZh
dWx0IDwtIHRyZWxsaXMucGFyLmdldCgiZm9udHNpemUiKSRkZWZhdWx0DQog
ICAgaWYgKCFtaXNzaW5nKHBvc2l0aW9uKSkgew0KICAgICAgICBpZiAobGVu
Z3RoKHBvc2l0aW9uKSAhPSA0K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4JHgubGltaXRzLCBhdCA9IHgkeC5zY2FsZXMk
YXQsIA0KICAgICAgICAgICAgICAgIGxhYmVscyA9IHgkeC5zY2FsZXMkbGFi
LCBoYXZlLmxvZyA9IGhhdmUueGxvZywgDQogICAgICAgICAgICAgICAgbG9n
YmFzZSA9IHhsb2diYXNlLCBsb2dwYXN0ZSA9IHhsb2dwYXN0ZSwgYWJicmV2
aWF0ZSA9IHgkeC5zY2FsZXMkYWJiciwgDQogICAgICAgICAgICAgICAgbWlu
bGVuZ3RoID0geCR4LnNjYWxlcyRtaW5sLCBuID0geCR4LnNjYWxlcyR0aWNr
Lm51bWJlcikkbGFiDQojIyAgICAgICAgICBpZiAoaXMuY2hhcmFjdGVyKGxh
YikpIA0KICAgICAgICAgICAgaWYgKGFsbChzYXBwbHkobGFiLCBpcy5jaGFy
YWN0ZXIpKSkgICMjIHJtaA0KICAgICAgICAgICAgICAgIHN0cmJhciA8LSBh
cy5saXN0KGxhYikNCiAgICAgICAgICAgIGVsc2UgaWYgKGlzLmV4cHJlc3Np
b24obGFiKSkgew0KICAgICAgICAgICAgICAgIHN0cmJhciA8LSBsaXN0KCkN
CiAgICAgICAgICAgICAgICBmb3IgKHNzIGluIHNlcShhbG9uZyA9IGxhYikp
IHN0cmJhciA8LSBjKHN0cmJhciwgDQogICAgICAgICAgICAgICAgICBsaXN0
KGxhYltzc10pKQ0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSBz
dG9wKCJJbnZhbGlkIHZhbHVlIGZvciBsYWJlbHMiKQ0KICAgICAgICAgICAg
aGVpZ2h0cy54WzVdIDwtIDAuNSArIG1heCgwLjAwMSwgeCR4LnNjYWxlcyR0
Y2tbMl0pICogDQogICAgICAgICAgICAgICAgMC4zDQogICAgICAgICAgICBo
ZWlnaHRzLnhbbi5yb3cgLSA1XSA8LSAwLjUgKyBtYXgoMC4wMDEsIHgkeC5z
Y2FsZXMkdGNrWzFdKSAqIA0KICAgICAgICAgICAgICAgIDAuMw0KICAgICAg
ICAgICAgaWYgKGFueSh4LmFsdGVybmF0aW5nID09IDIgfCB4LmFsdGVybmF0
aW5nID09IDMpKSB7DQogICAgICAgICAgICAgICAgaWYgKHhheGlzLnJvdFsy
XSAlaW4lIGMoMCwgMTgwKSkgew0KICAgICAgICAgICAgICAgICAgaGVpZ2h0
cy5pbnNlcnRsaXN0LnBvc2l0aW9uIDwtIGMoaGVpZ2h0cy5pbnNlcnRsaXN0
LnBvc2l0aW9uLCANCiAgICAgICAgICAgICAgICAgICAgNCkNCiAgICAgICAg
ICAgICAgICAgIGhlaWdodHMuaW5zZXJ0bGlzdC51bml0IDwtIHVuaXQuYyho
ZWlnaHRzLmluc2VydGxpc3QudW5pdCwgDQogICAgICAgICAgICAgICAgICAg
IG1heCh1bml0KHJlcCgxICogeGF4aXMuY2V4WzJdLCBsZW5ndGgoc3RyYmFy
KSksIA0KICAgICAgICAgICAgICAgICAgICAgICJzdHJoZWlnaHQiLCBzdHJi
YXIpKSkNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgZWxz
ZSB7DQogICAgICAgICAgICAgICAgICBoZWlnaHRzLmluc2VydGxpc3QucG9z
aXRpb24gPC0gYyhoZWlnaHRzLmluc2VydGxpc3QucG9zaXRpb24sIA0KICAg
ICAgICAgICAgICAgICAgICA0KQ0KICAgICAgICAgICAgICAgICAgaGVpZ2h0
cy5pbnNlcnRsaXN0LnVuaXQgPC0gdW5pdC5jKGhlaWdodHMuaW5zZXJ0bGlz
dC51bml0LCANCiAgICAgICAgICAgICAgICAgICAgbWF4KHVuaXQocmVwKDEg
KiB4YXhpcy5jZXhbMl0gKiBhYnMoc2luKHhheGlzLnJvdFsyXSAqIA0KICAg
ICAgICAgICAgICAgICAgICAgIGJhc2U6OnBpLzE4MCkpLCBsZW5ndGgoc3Ry
YmFyKSksICJzdHJ3aWR0aCIsIA0KICAgICAgICAgICAgICAgICAgICAgIHN0
cmJhcikpKQ0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgIH0NCiAg
ICAgICAgICAgIGlmIChhbnkoeC5hbHRlcm5hdGluZyA9PSAxIHwgeC5hbHRl
cm5hdGluZyA9PSAzKSkgew0KICAgICAgICAgICAgICAgIGlmICh4YXhpcy5y
b3RbMV0gJWluJSBjKDAsIDE4MCkpIHsNCiAgICAgICAgICAgICAgICAgIGhl
aWdodHMuaW5zZXJ0bGlzdC5wb3NpdGlvbiA8LSBjKGhlaWdodHMuaW5zZXJ0
bGlzdC5wb3NpdGlvbiwgDQogICAgICAgICAgICAgICAgICAgIG4ucm93IC0g
NCkNCiAgICAgICAgICAgICAgICAgIGhlaWdodHMuaW5zZXJ0bGlzdC51bml0
IDwtIHVuaXQuYyhoZWlnaHRzLmluc2VydGxpc3QudW5pdCwgDQogICAgICAg
ICAgICAgICAgICAgIG1heCh1bml0KHJlcCgxICogeGF4aXMuY2V4WzFdLCBs
ZW5ndGgoc3RyYmFyKSksIA0KICAgICAgICAgICAgICAgICAgICAgICJzdHJo
ZWlnaHQiLCBzdHJiYXIpKSkNCiAgICAgICAgICAgICAgICB9DQogICAgICAg
ICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgICBoZWlnaHRzLmlu
c2VydGxpc3QucG9zaXRpb24gPC0gYyhoZWlnaHRzLmluc2VydGxpc3QucG9z
aXRpb24sIA0KICAgICAgICAgICAgICAgICAgICBuLnJvdyAtIDQpDQogICAg
ICAgICAgICAgICAgICBoZWlnaHRzLmluc2VydGxpc3QudW5pdCA8LSB1bml0
LmMoaGVpZ2h0cy5pbnNlcnRsaXN0LnVuaXQsIA0KICAgICAgICAgICAgICAg
ICAgICBtYXgodW5pdChyZXAoMSAqIHhheGlzLmNleFsxXSAqIGFicyhzaW4o
eGF4aXMucm90WzFdICogDQogICAgICAgICAgICAgICAgICAgICAgYmFzZTo6
cGkvMTgwKSksIGxlbmd0aChzdHJiYXIpKSwgInN0cndpZHRoIiwgDQogICAg
ICAgICAgICAgICAgICAgICAgc3RyYmFyKSkpDQogICAgICAgICAgICAgICAg
fQ0KICAgICAgICAgICAgfQ0KICAgICAgICB9DQogICAgICAgIGVsc2Ugew0K
ICAgICAgICAgICAgbGFiZWxDaGFycyA8LSBjaGFyYWN0ZXIoMCkNCiAgICAg
ICAgICAgIGxhYmVsRXhwcnMgPC0gZXhwcmVzc2lvbigwKQ0KICAgICAgICAg
ICAgZm9yIChpIGluIHNlcShhbG9uZyA9IHgkeC5saW1pdHMpKSB7DQogICAg
ICAgICAgICAgICAgbGFiIDwtIGNhbGN1bGF0ZUF4aXNDb21wb25lbnRzKHgg
PSB4JHgubGltaXRzW1tpXV0sIA0KICAgICAgICAgICAgICAgICAgYXQgPSBp
ZiAoaXMubGlzdCh4JHguc2NhbGVzJGF0KSkgDQogICAgICAgICAgICAgICAg
ICAgIHgkeC5zY2FsZXMkYXRbW2ldXQ0KICAgICAgICAgICAgICAgICAgZWxz
ZSB4JHguc2NhbGVzJGF0LCBsYWJlbHMgPSBpZiAoaXMubGlzdCh4JHguc2Nh
bGVzJGxhYikpIA0KICAgICAgICAgICAgICAgICAgICB4JHguc2NhbGVzJGxh
YltbaV1dDQogICAgICAgICAgICAgICAgICBlbHNlIHgkeC5zY2FsZXMkbGFi
LCBoYXZlLmxvZyA9IGhhdmUueGxvZywgDQogICAgICAgICAgICAgICAgICBs
b2diYXNlID0geGxvZ2Jhc2UsIGxvZ3Bhc3RlID0geGxvZ3Bhc3RlLCBhYmJy
ZXZpYXRlID0geCR4LnNjYWxlcyRhYmJyLCANCiAgICAgICAgICAgICAgICAg
IG1pbmxlbmd0aCA9IHgkeC5zY2FsZXMkbWlubCwgbiA9IHgkeC5zY2FsZXMk
dGljay5udW1iZXIpJGxhYg0KICAgICAgICAgICAgICAgIGlmIChpcy5jaGFy
YWN0ZXIobGFiKSkgDQogICAgICAgICAgICAgICAgICBsYWJlbENoYXJzIDwt
IGMobGFiZWxDaGFycywgbGFiKQ0KICAgICAgICAgICAgICAgIGVsc2UgaWYg
KGlzLmV4cHJlc3Npb24obGFiKSkgDQogICAgICAgICAgICAgICAgICBsYWJl
bEV4cHJzIDwtIGMobGFiZWxFeHBycywgbGFiKQ0KICAgICAgICAgICAgfQ0K
ICAgICAgICAgICAgbGFiZWxDaGFycyA8LSB1bmlxdWUobGFiZWxDaGFycykN
CiAgICAgICAgICAgIHN0cmJhciA8LSBsaXN0KCkNCiAgICAgICAgICAgIGZv
ciAoc3MgaW4gbGFiZWxDaGFycykgc3RyYmFyIDwtIGMoc3RyYmFyLCBsaXN0
KHNzKSkNCiAgICAgICAgICAgIGZvciAoc3MgaW4gc2VxKGFsb25nID0gbGFi
ZWxFeHBycykpIHN0cmJhciA8LSBjKHN0cmJhciwgDQogICAgICAgICAgICAg
ICAgbGlzdChsYWJlbEV4cHJzW3NzXSkpDQogICAgICAgICAgICBpZiAoeGF4
aXMucm90WzFdICVpbiUgYygwLCAxODApKSB7DQogICAgICAgICAgICAgICAg
aGVpZ2h0cy54W251bWJlci5vZi5jb25kICsgNyArICgxOnJvd3MucGVyLnBh
Z2UgLSANCiAgICAgICAgICAgICAgICAgIDEpICogKG51bWJlci5vZi5jb25k
ICsgNCldIDwtIG1heCgwLjAwMSwgeCR4LnNjYWxlcyR0Y2tbMV0pICogDQog
ICAgICAgICAgICAgICAgICAwLjMNCiAgICAgICAgICAgICAgICBoZWlnaHRz
Lmluc2VydGxpc3QucG9zaXRpb24gPC0gYyhoZWlnaHRzLmluc2VydGxpc3Qu
cG9zaXRpb24sIA0KICAgICAgICAgICAgICAgICAgbnVtYmVyLm9mLmNvbmQg
KyA4ICsgKDE6cm93cy5wZXIucGFnZSAtIDEpICogDQogICAgICAgICAgICAg
ICAgICAgIChudW1iZXIub2YuY29uZCArIDQpKQ0KICAgICAgICAgICAgICAg
IGZvciAoaSBpbiAxOnJvd3MucGVyLnBhZ2UpIGhlaWdodHMuaW5zZXJ0bGlz
dC51bml0IDwtIHVuaXQuYyhoZWlnaHRzLmluc2VydGxpc3QudW5pdCwgDQog
ICAgICAgICAgICAgICAgICBtYXgodW5pdChyZXAoMS41ICogeGF4aXMuY2V4
WzFdLCBsZW5ndGgoc3RyYmFyKSksIA0KICAgICAgICAgICAgICAgICAgICAi
c3RyaGVpZ2h0Iiwgc3RyYmFyKSkpDQogICAgICAgICAgICB9DQogICAgICAg
ICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICBoZWlnaHRzLnhbbnVtYmVy
Lm9mLmNvbmQgKyA3ICsgKDE6cm93cy5wZXIucGFnZSAtIA0KICAgICAgICAg
ICAgICAgICAgMSkgKiAobnVtYmVyLm9mLmNvbmQgKyA0KV0gPC0gbWF4KDAu
MDAxLCB4JHguc2NhbGVzJHRja1sxXSkgKiANCiAgICAgICAgICAgICAgICAg
IDAuMw0KICAgICAgICAgICAgICAgIGhlaWdodHMuaW5zZXJ0bGlzdC5wb3Np
dGlvbiA8LSBjKGhlaWdodHMuaW5zZXJ0bGlzdC5wb3NpdGlvbiwgDQogICAg
ICAgICAgICAgICAgICBudW1iZXIub2YuY29uZCArIDggKyAoMTpyb3dzLnBl
ci5wYWdlIC0gMSkgKiANCiAgICAgICAgICAgICAgICAgICAgKG51bWJlci5v
Zi5jb25kICsgNCkpDQogICAgICAgICAgICAgICAgZm9yIChpIGluIDE6cm93
cy5wZXIucGFnZSkgaGVpZ2h0cy5pbnNlcnRsaXN0LnVuaXQgPC0gdW5pdC5j
KGhlaWdodHMuaW5zZXJ0bGlzdC51bml0LCANCiAgICAgICAgICAgICAgICAg
IG1heCh1bml0KHJlcCgxLjUgKiB4YXhpcy5jZXhbMV0gKiBhYnMoc2luKHhh
eGlzLnJvdFsxXSAqIA0KICAgICAgICAgICAgICAgICAgICBiYXNlOjpwaS8x
ODApKSwgbGVuZ3RoKHN0cmJhcikpLCAic3Ryd2lkdGgiLCANCiAgICAgICAg
ICAgICAgICAgICAgc3RyYmFyKSkpDQogICAgICAgICAgICB9DQogICAgICAg
IH0NCiAgICB9DQogICAgaGVpZ2h0cy54W24ucm93IC0gM10gPC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gICBpZiAoYWxsKHNhcHBseShsYWIsIGlzLmNoYXJhY3Rlcikp
KSAgIyMgcm1oDQogICAgICAgICAgICAgICAgc3RyYmFyIDwtIGFzLmxpc3Qo
bGFiKQ0KICAgICAgICAgICAgZWxzZSBpZiAoaXMuZXhwcmVzc2lvbihsYWIp
KSB7DQogICAgICAgICAgICAgICAgc3RyYmFyIDwtIGxpc3QoKQ0KICAgICAg
ICAgICAgICAgIGZvciAoc3MgaW4gc2VxKGFsb25nID0gbGFiKSkgc3RyYmFy
IDwtIGMoc3RyYmFyLCANCiAgICAgICAgICAgICAgICAgIGxpc3QobGFiW3Nz
XSkpDQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHN0b3AoIklu
dmFsaWQgdmFsdWUgZm9yIGxhYmVscyIpDQogICAgICAgICAgICB3aWR0aHMu
eFs1XSA8LSAwLjUgKyBtYXgoMC4wMDEsIHgkeS5zY2FsZXMkdGNrWzFdKSAq
IA0KICAgICAgICAgICAgICAgIDAuMw0KICAgICAgICAgICAgd2lkdGhzLnhb
bi5jb2wgLSAzXSA8LSBtYXgoMSwgeCR5LnNjYWxlcyR0Y2tbMl0pICogDQog
ICAgICAgICAgICAgICAgMC41DQogICAgICAgICAgICBpZiAoYW55KHkuYWx0
ZXJuYXRpbmcgPT0gMSB8IHkuYWx0ZXJuYXRpbmcgPT0gMykpIHsNCiAgICAg
ICAgICAgICAgICBpZiAoYWJzKHlheGlzLnJvdFsxXSkgPT0gOTApIHsNCiAg
ICAgICAgICAgICAgICAgIHdpZHRocy5pbnNlcnRsaXN0LnBvc2l0aW9uIDwt
IGMod2lkdGhzLmluc2VydGxpc3QucG9zaXRpb24sIA0KICAgICAgICAgICAg
ICAgICAgICA0KQ0KICAgICAgICAgICAgICAgICAgd2lkdGhzLmluc2VydGxp
c3QudW5pdCA8LSB1bml0LmMod2lkdGhzLmluc2VydGxpc3QudW5pdCwgDQog
ICAgICAgICAgICAgICAgICAgIG1heCh1bml0KDEgKiByZXAoeWF4aXMuY2V4
WzFdLCBsZW5ndGgoc3RyYmFyKSksIA0KICAgICAgICAgICAgICAgICAgICAg
ICJzdHJoZWlnaHQiLCBkYXRhID0gc3RyYmFyKSkpDQogICAgICAgICAgICAg
ICAgfQ0KICAgICAgICAgICAgICAgIGVsc2Ugew0KICAgICAgICAgICAgICAg
ICAgd2lkdGhzLmluc2VydGxpc3QucG9zaXRpb24gPC0gYyh3aWR0aHMuaW5z
ZXJ0bGlzdC5wb3NpdGlvbiwgDQogICAgICAgICAgICAgICAgICAgIDQpDQog
ICAgICAgICAgICAgICAgICB3aWR0aHMuaW5zZXJ0bGlzdC51bml0IDwtIHVu
aXQuYyh3aWR0aHMuaW5zZXJ0bGlzdC51bml0LCANCiAgICAgICAgICAgICAg
ICAgICAgbWF4KHVuaXQocmVwKDEgKiB5YXhpcy5jZXhbMV0gKiBhYnMoY29z
KHlheGlzLnJvdFsxXSAqIA0KICAgICAgICAgICAgICAgICAgICAgIGJhc2U6
OnBpLzE4MCkpLCBsZW5ndGgoc3RyYmFyKSksICJzdHJ3aWR0aCIsIA0KICAg
ICAgICAgICAgICAgICAgICAgIHN0cmJhcikpKQ0KICAgICAgICAgICAgICAg
IH0NCiAgICAgICAgICAgIH0NCiAgICAgICAgICAgIGlmIChhbnkoeS5hbHRl
cm5hdGluZyA9PSAyIHwgeS5hbHRlcm5hdGluZyA9PSAzKSkgew0KICAgICAg
ICAgICAgICAgIGlmIChhYnMoeWF4aXMucm90WzJdKSA9PSA5MCkgew0KICAg
ICAgICAgICAgICAgICAgd2lkdGhzLmluc2VydGxpc3QucG9zaXRpb24gPC0g
Yyh3aWR0aHMuaW5zZXJ0bGlzdC5wb3NpdGlvbiwgDQogICAgICAgICAgICAg
ICAgICAgIG4uY29sIC0gMikNCiAgICAgICAgICAgICAgICAgIHdpZHRocy5p
bnNlcnRsaXN0LnVuaXQgPC0gdW5pdC5jKHdpZHRocy5pbnNlcnRsaXN0LnVu
aXQsIA0KICAgICAgICAgICAgICAgICAgICBtYXgodW5pdChyZXAoMSAqIHlh
eGlzLmNleFsyXSwgbGVuZ3RoKHN0cmJhcikpLCANCiAgICAgICAgICAgICAg
ICAgICAgICAic3RyaGVpZ2h0Iiwgc3RyYmFyKSkpDQogICAgICAgICAgICAg
ICAgfQ0KICAgICAgICAgICAgICAgIGVsc2Ugew0KICAgICAgICAgICAgICAg
ICAgd2lkdGhzLmluc2VydGxpc3QucG9zaXRpb24gPC0gYyh3aWR0aHMuaW5z
ZXJ0bGlzdC5wb3NpdGlvbiwgDQogICAgICAgICAgICAgICAgICAgIG4uY29s
IC0gMikNCiAgICAgICAgICAgICAgICAgIHdpZHRocy5pbnNlcnRsaXN0LnVu
aXQgPC0gdW5pdC5jKHdpZHRocy5pbnNlcnRsaXN0LnVuaXQsIA0KICAgICAg
ICAgICAgICAgICAgICBtYXgodW5pdChyZXAoMSAqIHlheGlzLmNleFsyXSAq
IGFicyhjb3MoeWF4aXMucm90WzJdICogDQogICAgICAgICAgICAgICAgICAg
ICAgYmFzZTo6cGkvMTgwKSksIGxlbmd0aChzdHJiYXIpKSwgInN0cndpZHRo
IiwgDQogICAgICAgICAgICAgICAgICAgICAgc3RyYmFyKSkpDQogICAgICAg
ICAgICAgICAgfQ0KICAgICAgICAgICAgfQ0KICAgICAgICB9DQogICAgICAg
IGVsc2Ugew0KICAgICAgICAgICAgbGFiZWxDaGFycyA8LSBjaGFyYWN0ZXIo
MCkNCiAgICAgICAgICAgIGxhYmVsRXhwcnMgPC0gZXhwcmVzc2lvbigwKQ0K
ICAgICAgICAgICAgZm9yIChpIGluIHNlcShhbG9uZyA9IHgkeS5saW1pdHMp
KSB7DQogICAgICAgICAgICAgICAgbGFiIDwtIGNhbGN1bGF0ZUF4aXNDb21w
b25lbnRzKHggPSB4JHkubGltaXRzW1tpXV0sIA0KICAgICAgICAgICAgICAg
ICAgYXQgPSBpZiAoaXMubGlzdCh4JHkuc2NhbGVzJGF0KSkgDQogICAgICAg
ICAgICAgICAgICAgIHgkeS5zY2FsZXMkYXRbW2ldXQ0KICAgICAgICAgICAg
ICAgICAgZWxzZSB4JHkuc2NhbGVzJGF0LCBsYWJlbHMgPSBpZiAoaXMubGlz
dCh4JHkuc2NhbGVzJGxhYikpIA0KICAgICAgICAgICAgICAgICAgICB4JHku
c2NhbGVzJGxhYltbaV1dDQogICAgICAgICAgICAgICAgICBlbHNlIHgkeS5z
Y2FsZXMkbGFiLCBoYXZlLmxvZyA9IGhhdmUueWxvZywgDQogICAgICAgICAg
ICAgICAgICBsb2diYXNlID0geWxvZ2Jhc2UsIGxvZ3Bhc3RlID0geWxvZ3Bh
c3RlLCBhYmJyZXZpYXRlID0geCR5LnNjYWxlcyRhYmJyLCANCiAgICAgICAg
ICAgICAgICAgIG1pbmxlbmd0aCA9IHgkeS5zY2FsZXMkbWlubCwgbiA9IHgk
eS5zY2FsZXMkdGljay5udW1iZXIpJGxhYg0KICAgICAgICAgICAgICAgIGlm
IChpcy5jaGFyYWN0ZXIobGFiKSkgDQogICAgICAgICAgICAgICAgICBsYWJl
bENoYXJzIDwtIGMobGFiZWxDaGFycywgbGFiKQ0KICAgICAgICAgICAgICAg
IGVsc2UgaWYgKGlzLmV4cHJlc3Npb24obGFiKSkgDQogICAgICAgICAgICAg
ICAgICBsYWJlbEV4cHJzIDwtIGMobGFiZWxFeHBycywgbGFiKQ0KICAgICAg
ICAgICAgfQ0KICAgICAgICAgICAgbGFiZWxDaGFycyA8LSB1bmlxdWUobGFi
ZWxDaGFycykNCiAgICAgICAgICAgIHN0cmJhciA8LSBsaXN0KCkNCiAgICAg
ICAgICAgIGZvciAoc3MgaW4gbGFiZWxDaGFycykgc3RyYmFyIDwtIGMoc3Ry
YmFyLCBsaXN0KHNzKSkNCiAgICAgICAgICAgIGZvciAoc3MgaW4gc2VxKGFs
b25nID0gbGFiZWxFeHBycykpIHN0cmJhciA8LSBjKHN0cmJhciwgDQogICAg
ICAgICAgICAgICAgbGlzdChsYWJlbEV4cHJzW3NzXSkpDQogICAgICAgICAg
ICBpZiAoYWJzKHlheGlzLnJvdFsxXSkgPT0gOTApIHsNCiAgICAgICAgICAg
ICAgICB3aWR0aHMueFsoMTpjb2xzLnBlci5wYWdlIC0gMSkgKiA0ICsgN10g
PC0gbWF4KDAuMDAxLCANCiAgICAgICAgICAgICAgICAgIHgkeS5zY2FsZXMk
dGNrWzFdKSAqIDAuMw0KICAgICAgICAgICAgICAgIHdpZHRocy5pbnNlcnRs
aXN0LnBvc2l0aW9uIDwtIGMod2lkdGhzLmluc2VydGxpc3QucG9zaXRpb24s
IA0KICAgICAgICAgICAgICAgICAgKDE6Y29scy5wZXIucGFnZSAtIDEpICog
NCArIDYpDQogICAgICAgICAgICAgICAgZm9yIChpIGluIDE6Y29scy5wZXIu
cGFnZSkgd2lkdGhzLmluc2VydGxpc3QudW5pdCA8LSB1bml0LmMod2lkdGhz
Lmluc2VydGxpc3QudW5pdCwgDQogICAgICAgICAgICAgICAgICBtYXgodW5p
dChyZXAoMS41ICogeWF4aXMuY2V4WzFdLCBsZW5ndGgoc3RyYmFyKSksIA0K
ICAgICAgICAgICAgICAgICAgICAic3RyaGVpZ2h0Iiwgc3RyYmFyKSkpDQog
ICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAg
ICAgICB3aWR0aHMueFsoMTpjb2xzLnBlci5wYWdlIC0gMSkgKiA0ICsgN10g
PC0gbWF4KDAuMDAxLCANCiAgICAgICAgICAgICAgICAgIHgkeS5zY2FsZXMk
dGNrWzFdKSAqIDAuMw0KICAgICAgICAgICAgICAgIHdpZHRocy5pbnNlcnRs
aXN0LnBvc2l0aW9uIDwtIGMod2lkdGhzLmluc2VydGxpc3QucG9zaXRpb24s
IA0KICAgICAgICAgICAgICAgICAgKDE6Y29scy5wZXIucGFnZSAtIDEpICog
NCArIDYpDQogICAgICAgICAgICAgICAgZm9yIChpIGluIDE6Y29scy5wZXIu
cGFnZSkgd2lkdGhzLmluc2VydGxpc3QudW5pdCA8LSB1bml0LmMod2lkdGhz
Lmluc2VydGxpc3QudW5pdCwgDQogICAgICAgICAgICAgICAgICBtYXgodW5p
dChyZXAoMS4yICogeWF4aXMuY2V4WzFdICogYWJzKGNvcyh5YXhpcy5yb3Rb
MV0gKiANCiAgICAgICAgICAgICAgICAgICAgYmFzZTo6cGkvMTgwKSksIGxl
bmd0aChzdHJiYXIpKSwgInN0cndpZHRoIiwgDQogICAgICAgICAgICAgICAg
ICAgIHN0cmJhcikpKQ0KICAgICAgICAgICAgfQ0KICAgICAgICB9DQogICAg
fQ0KICAgIGlmICghaXMubnVsbCh4JGtleSkgfHwgIWlzLm51bGwoeCRjb2xv
cmtleSkpIHsNCiAgICAgICAgaWYgKGtleS5zcGFjZSA9PSAibGVmdCIpIHsN
CiAgICAgICAgICAgIHdpZHRocy54WzJdIDwtIDEuMg0KICAgICAgICAgICAg
d2lkdGhzLnVuaXRzWzJdIDwtICJncm9id2lkdGgiDQogICAgICAgICAgICB3
aWR0aHMuZGF0YVtbMl1dIDwtIGtleS5nZg0KICAgICAgICB9DQogICAgICAg
IGVsc2UgaWYgKGtleS5zcGFjZSA9PSAicmlnaHQiKSB7DQogICAgICAgICAg
ICB3aWR0aHMueFtuLmNvbCAtIDFdIDwtIDEuMg0KICAgICAgICAgICAgd2lk
dGhzLnVuaXRzW24uY29sIC0gMV0gPC0gImdyb2J3aWR0aCINCiAgICAgICAg
ICAgIHdpZHRocy5kYXRhW1tuLmNvbCAtIDFdXSA8LSBrZXkuZ2YNCiAgICAg
ICAgfQ0KICAgICAgICBlbHNlIGlmIChrZXkuc3BhY2UgPT0gInRvcCIpIHsN
CiAgICAgICAgICAgIGhlaWdodHMueFszXSA8LSAxLjINCiAgICAgICAgICAg
IGhlaWdodHMudW5pdHNbM10gPC0gImdyb2JoZWlnaHQiDQogICAgICAgICAg
ICBoZWlnaHRzLmRhdGFbWzNdXSA8LSBrZXkuZ2YNCiAgICAgICAgfQ0KICAg
ICAgICBlbHNlIGlmIChrZXkuc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gIHBhZ2UubGF5b3V0IDwtIGdyaWQubGF5b3V0KG5y
b3cgPSBuLnJvdywgbmNvbCA9IG4uY29sLCB3aWR0aHMgPSBsYXlvdXQud2lk
dGhzLCANCiAgICAgICAgaGVpZ2h0cyA9IGxheW91dC5oZWlnaHRzLCByZXNw
ZWN0ID0gbGF5b3V0LnJlc3BlY3QpDQogICAgY29uZC5jdXJyZW50LmxldmVs
IDwtIHJlcCgxLCBudW1iZXIub2YuY29uZCkNCiAgICBwYW5lbC5udW1iZXIg
PC0gMQ0KICAgIGZvciAocGFnZS5udW1iZXIgaW4gMTpudW1iZXIub2YucGFn
ZXMpIGlmICghYW55KGNvbmQubWF4LmxldmVsIC0gDQogICAgICAgIGNvbmQu
Y3VycmVudC5sZXZlbCA8IDApKSB7DQogICAgICAgIGlmICh1c3VhbCkgew0K
ICAgICAgICAgICAgaWYgKG5ldykgDQogICAgICAgICAgICAgICAgZ3JpZC5u
ZXdwYWdlKCkNCiAgICAgICAgICAgIGdyaWQucmVjdChncCA9IGdwYXIoZmls
bCA9IGJnLCBjb2wgPSAidHJhbnNwYXJlbnQiKSkNCiAgICAgICAgICAgIG5l
dyA8LSBUUlVFDQogICAgICAgIH0NCiAgICAgICAgcHVzaC52aWV3cG9ydCh2
aWV3cG9ydChsYXlvdXQgPSBwYWdlLmxheW91dCwgZ3AgPSBncGFyKGZvbnRz
aXplID0gZm9udHNpemUuZGVmYXVsdCwgDQogICAgICAgICAgICBjb2wgPSBh
eGlzLmxpbmUkY29sLCBsdHkgPSBheGlzLmxpbmUkbHR5LCBsd2QgPSBheGlz
LmxpbmUkbHdkKSkpDQogICAgICAgIGlmIChoYXZlLm1haW4pIA0KICAgICAg
ICAgICAgZ3JpZC50ZXh0KGxhYmVsID0geCRtYWluJGxhYmVsLCBncCA9IGdw
YXIoY29sID0geCRtYWluJGNvbCwgDQogICAgICAgICAgICAgICAgZm9udCA9
IHgkbWFpbiRmb250LCBmb250c2l6ZSA9IGZvbnRzaXplLmRlZmF1bHQgKiAN
CiAgICAgICAgICAgICAgICAgIHgkbWFpbiRjZXgpLCB2cCA9IHZpZXdwb3J0
KGxheW91dC5wb3Mucm93ID0gMikpDQogICAgICAgIGlmIChoYXZlLnN1Yikg
DQogICAgICAgICAgICBncmlkLnRleHQobGFiZWwgPSB4JHN1YiRsYWJlbCwg
Z3AgPSBncGFyKGNvbCA9IHgkc3ViJGNvbCwgDQogICAgICAgICAgICAgICAg
Zm9udCA9IHgkc3ViJGZvbnQsIGZvbnRzaXplID0gZm9udHNpemUuZGVmYXVs
dCAqIA0KICAgICAgICAgICAgICAgICAgeCRzdWIkY2V4KSwgdnAgPSB2aWV3
cG9ydChsYXlvdXQucG9zLnJvdyA9IG4ucm93IC0gDQogICAgICAgICAgICAg
ICAgMSkpDQogICAgICAgIGlmIChoYXZlLnhsYWIpIA0KICAgICAgICAgICAg
Z3JpZC50ZXh0KGxhYmVsID0geCR4bGFiJGxhYmVsLCBncCA9IGdwYXIoY29s
ID0geCR4bGFiJGNvbCwgDQogICAgICAgICAgICAgICAgZm9udCA9IHgkeGxh
YiRmb250LCBmb250c2l6ZSA9IGZvbnRzaXplLmRlZmF1bHQgKiANCiAgICAg
ICAgICAgICAgICAgIHgkeGxhYiRjZXgpLCB2cCA9IHZpZXdwb3J0KGxheW91
dC5wb3Mucm93ID0gbi5yb3cgLSANCiAgICAgICAgICAgICAgICAzLCBsYXlv
dXQucG9zLmNvbCA9IGMoNiwgbi5jb2wgLSA0KSkpDQogICAgICAgIGlmICho
YXZlLnlsYWIpIA0KICAgICAgICAgICAgZ3JpZC50ZXh0KGxhYmVsID0geCR5
bGFiJGxhYmVsLCByb3QgPSA5MCwgZ3AgPSBncGFyKGNvbCA9IHgkeWxhYiRj
b2wsIA0KICAgICAgICAgICAgICAgIGZvbnQgPSB4JHlsYWIkZm9udCwgZm9u
dHNpemUgPSBmb250c2l6ZS5kZWZhdWx0ICogDQogICAgICAgICAgICAgICAg
ICB4JHlsYWIkY2V4KSwgdnAgPSB2aWV3cG9ydChsYXlvdXQucG9zLmNvbCA9
IDMsIA0KICAgICAgICAgICAgICAgIGxheW91dC5wb3Mucm93ID0gYyg2LCBu
LnJvdyAtIDYpKSkNCiAgICAgICAgZm9yIChyb3cgaW4gMTpyb3dzLnBlci5w
YWdlKSBmb3IgKGNvbHVtbiBpbiAxOmNvbHMucGVyLnBhZ2UpIGlmICghYW55
KGNvbmQubWF4LmxldmVsIC0gDQogICAgICAgICAgICBjb25kLmN1cnJlbnQu
bGV2ZWwgPCAwKSAmJiAocm93IC0gMSkgKiBjb2xzLnBlci5wYWdlICsgDQog
ICAgICAgICAgICBjb2x1bW4gPD0gcGxvdHMucGVyLnBhZ2UpIHsNCiAgICAg
ICAgICAgIGlmICghaXMubGlzdCh4JHBhbmVsLmFyZ3NbW3BhbmVsLm51bWJl
cl1dKSkgDQogICAgICAgICAgICAgICAgcGFuZWwubnVtYmVyIDwtIHBhbmVs
Lm51bWJlciArIDENCiAgICAgICAgICAgIGVsc2Ugew0KICAgICAgICAgICAg
ICAgIGFjdHVhbC5yb3cgPC0gaWYgKHgkYXMudGFibGUpIA0KICAgICAgICAg
ICAgICAgICAgKHJvd3MucGVyLnBhZ2UgLSByb3cgKyAxKQ0KICAgICAgICAg
ICAgICAgIGVsc2Ugcm93DQogICAgICAgICAgICAgICAgcG9zLnJvdyA8LSA2
ICsgbnVtYmVyLm9mLmNvbmQgKyAocm93cy5wZXIucGFnZSAtIA0KICAgICAg
ICAgICAgICAgICAgYWN0dWFsLnJvdykgKiAobnVtYmVyLm9mLmNvbmQgKyA0
KQ0KICAgICAgICAgICAgICAgIHBvcy5jb2wgPC0gKGNvbHVtbiAtIDEpICog
NCArIDgNCiAgICAgICAgICAgICAgICB4bGFiZWxpbmZvIDwtIGNhbGN1bGF0
ZUF4aXNDb21wb25lbnRzKHggPSBpZiAoeC5yZWxhdGlvbi5zYW1lKSANCiAg
ICAgICAgICAgICAgICAgIHgkeC5saW1pdHMNCiAgICAgICAgICAgIC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CiAgICAgICAgICAgICAgICBkby5jYWxsKCJwYW5l
bCIsIHBhcmdzKQ0KICAgICAgICAgICAgICAgIGdyaWQucmVjdCgpDQogICAg
ICAgICAgICAgICAgcG9wLnZpZXdwb3J0KCkNCiAgICAgICAgICAgICAgICBp
ZiAoIXgucmVsYXRpb24uc2FtZSAmJiB4JHguc2NhbGVzJGRyYXcpIHsNCiAg
ICAgICAgICAgICAgICAgIGF4cyA8LSB4JHguc2NhbGVzDQogICAgICAgICAg
ICAgICAgICBvayA8LSAoeGxhYmVsaW5mbyRhdCA+PSB4c2NhbGVbMV0gJiB4
bGFiZWxpbmZvJGF0IDw9IA0KICAgICAgICAgICAgICAgICAgICB4c2NhbGVb
Ml0pDQogICAgICAgICAgICAgICAgICBwdXNoLnZpZXdwb3J0KHZpZXdwb3J0
KGxheW91dC5wb3Mucm93ID0gcG9zLnJvdyArIA0KICAgICAgICAgICAgICAg
ICAgICAxLCBsYXlvdXQucG9zLmNvbCA9IHBvcy5jb2wsIHhzY2FsZSA9IHhz
Y2FsZSkpDQogICAgICAgICAgICAgICAgICBpZiAoYXhzJHRja1sxXSAhPSAw
ICYmIGFueShvaykpIA0KICAgICAgICAgICAgICAgICAgICBncmlkLnNlZ21l
bnRzKHkwID0gdW5pdChyZXAoMSwgc3VtKG9rKSksIA0KICAgICAgICAgICAg
ICAgICAgICAgICJucGMiKSwgeTEgPSB1bml0KHJlcCgxLCBzdW0ob2spKSwg
Im5wYyIpIC0gDQogICAgICAgICAgICAgICAgICAgICAgdW5pdChyZXAoMC4z
ICogYXhzJHRja1sxXSwgc3VtKG9rKSksICJsaW5lcyIpLCANCiAgICAgICAg
ICAgICAgICAgICAgICB4MCA9IHVuaXQoeGxhYmVsaW5mbyRhdFtva10sICJu
YXRpdmUiKSwgDQogICAgICAgICAgICAgICAgICAgICAgeDEgPSB1bml0KHhs
YWJlbGluZm8kYXRbb2tdLCAibmF0aXZlIiksIA0KICAgICAgICAgICAgICAg
ICAgICAgIGdwID0gZ3Bhcihjb2wgPSB4YXhpcy5jb2wpKQ0KICAgICAgICAg
ICAgICAgICAgcG9wLnZpZXdwb3J0KCkNCiAgICAgICAgICAgICAgICAgIGlm
IChhbnkob2spKSANCiAgICAgICAgICAgICAgICAgICAgZ3JpZC50ZXh0KGxh
YmVsID0geGxhYmVsaW5mbyRsYWJlbFtva10sIHggPSB1bml0KHhsYWJlbGlu
Zm8kYXRbb2tdLCANCiAgICAgICAgICAgICAgICAgICAgICAibmF0aXZlIiks
IHkgPSB1bml0KGlmICh4YXhpcy5yb3RbMV0gJWluJSANCiAgICAgICAgICAg
ICAgICAgICAgICBjKDAsIDE4MCkpIA0KICAgICAgICAgICAgICAgICAgICAg
IDAuNQ0KICAgICAgICAgICAgICAgICAgICBlbHNlIDAuOTUsICJucGMiKSwg
anVzdCA9IGlmICh4YXhpcy5yb3RbMV0gPT0gDQogICAgICAgICAgICAgICAg
ICAgICAgMCkgDQogICAgICAgICAgICAgICAgICAgICAgYygiY2VudHJlIiwg
ImNlbnRyZSIpDQogICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHhheGlz
LnJvdFsxXSA9PSAxODApIA0KICAgICAgICAgICAgICAgICAgICAgIGMoImNl
bnRyZSIsICJjZW50cmUiKQ0KICAgICAgICAgICAgICAgICAgICBlbHNlIGlm
ICh4YXhpcy5yb3RbMV0gPiAwKSANCiAgICAgICAgICAgICAgICAgICAgICBj
KCJyaWdodCIsICJjZW50cmUiKQ0KICAgICAgICAgICAgICAgICAgICBlbHNl
IGMoImxlZnQiLCAiY2VudHJlIiksIHJvdCA9IHhheGlzLnJvdFsxXSwgDQog
ICAgICAgICAgICAgICAgICAgICAgY2hlY2sub3ZlcmxhcCA9IHhsYWJlbGlu
Zm8kY2hlY2sub3ZlcmxhcCwgDQogICAgICAgICAgICAgICAgICAgICAgZ3Ag
PSBncGFyKGNvbCA9IHhheGlzLmNvbCwgZm9udCA9IHhheGlzLmZvbnQsIA0K
ICAgICAgICAgICAgICAgICAgICAgICAgZm9udHNpemUgPSBheHMkY2V4WzFd
ICogZm9udHNpemUuZGVmYXVsdCksIA0KICAgICAgICAgICAgICAgICAgICAg
IHZwID0gdmlld3BvcnQobGF5b3V0LnBvcy5yb3cgPSBwb3Mucm93ICsgDQog
ICAgICAgICAgICAgICAgICAgICAgICAyLCBsYXlvdXQucG9zLmNvbCA9IHBv
cy5jb2wsIHhzY2FsZSA9IHhzY2FsZSkpDQogICAgICAgICAgICAgICAgfQ0K
ICAgICAgICAgICAgICAgIGlmICgheS5yZWxhdGlvbi5zYW1lICYmIHgkeS5z
Y2FsZXMkZHJhdykgew0KICAgICAgICAgICAgICAgICAgYXhzIDwtIHgkeS5z
Y2FsZXMNCiAgICAgICAgICAgICAgICAgIG9rIDwtICh5bGFiZWxpbmZvJGF0
ID49IHlzY2FsZVsxXSAmIHlsYWJlbGluZm8kYXQgPD0gDQogICAgICAgICAg
ICAgICAgICAgIHlzY2FsZVsyXSkNCiAgICAgICAgICAgICAgICAgIHB1c2gu
dmlld3BvcnQodmlld3BvcnQobGF5b3V0LnBvcy5yb3cgPSBwb3Mucm93LCAN
CiAgICAgICAgICAgICAgICAgICAgbGF5b3V0LnBvcy5jb2wgPSBwb3MuY29s
IC0gMSwgeXNjYWxlID0geXNjYWxlKSkNCiAgICAgICAgICAgICAgICAgIGlm
IChheHMkdGNrWzFdICE9IDAgJiYgYW55KG9rKSkgDQogICAgICAgICAgICAg
ICAgICAgIGdyaWQuc2VnbWVudHMoeDAgPSB1bml0KHJlcCgxLCBzdW0ob2sp
KSwgDQogICAgICAgICAgICAgICAgICAgICAgIm5wYyIpLCB4MSA9IHVuaXQo
cmVwKDEsIHN1bShvaykpLCAibnBjIikgLSANCiAgICAgICAgICAgICAgICAg
ICAgICB1bml0KHJlcCgwLjMgKiBheHMkdGNrWzFdLCBzdW0ob2spKSwgImxp
bmVzIiksIA0KICAgICAgICAgICAgICAgICAgICAgIHkwID0gdW5pdCh5bGFi
ZWxpbmZvJGF0W29rXSwgIm5hdGl2ZSIpLCANCiAgICAgICAgICAgICAgICAg
ICAgICB5MSA9IHVuaXQoeWxhYmVsaW5mbyRhdFtva10sICJuYXRpdmUiKSwg
DQogICAgICAgICAgICAgICAgICAgICAgZ3AgPSBncGFyKGNvbCA9IHlheGlz
LmNvbCkpDQogICAgICAgICAgICAgICAgICBwb3Audmlld3BvcnQoKQ0KICAg
ICAgICAgICAgICAgICAgaWYgKGFueShvaykpIA0KICAgICAgICAgICAgICAg
ICAgICBncmlkLnRleHQobGFiZWwgPSB5bGFiZWxpbmZvJGxhYmVsW29rXSwg
eSA9IHVuaXQoeWxhYmVsaW5mbyRhdFtva10sIA0KICAgICAgICAgICAgICAg
ICAgICAgICJuYXRpdmUiKSwgeCA9IHVuaXQoaWYgKGFicyh5YXhpcy5yb3Rb
MV0pID09IA0KICAgICAgICAgICAgICAgICAgICAgIDkwKSANCiAgICAgICAg
ICAgICAgICAgICAgICAwLjUNCiAgICAgICAgICAgICAgICAgICAgZWxzZSAw
Ljk1LCAibnBjIiksIGp1c3QgPSBpZiAoeWF4aXMucm90WzFdID09IA0KICAg
ICAgICAgICAgICAgICAgICAgIDkwKSANCiAgICAgICAgICAgICAgICAgICAg
ICBjKCJjZW50cmUiLCAiY2VudHJlIikNCiAgICAgICAgICAgICAgICAgICAg
ZWxzZSBpZiAoeWF4aXMucm90WzFdID09IC05MCkgDQogICAgICAgICAgICAg
ICAgICAgICAgYygiY2VudHJlIiwgImNlbnRyZSIpDQogICAgICAgICAgICAg
ICAgICAgIGVsc2UgaWYgKHlheGlzLnJvdFsxXSA+IC05MCAmJiB5YXhpcy5y
b3RbMV0gPCANCiAgICAgICAgICAgICAgICAgICAgICA5MCkgDQogICAgICAg
ICAgICAgICAgICAgICAgYygicmlnaHQiLCAiY2VudHJlIikNCiAgICAgICAg
ICAgICAgICAgICAgZWxzZSBjKCJsZWZ0IiwgImNlbnRyZSIpLCByb3QgPSB5
YXhpcy5yb3RbMV0sIA0KICAgICAgICAgICAgICAgICAgICAgIGNoZWNrLm92
ZXJsYXAgPSB5bGFiZWxpbmZvJGNoZWNrLm92ZXJsYXAsIA0KICAgICAgICAg
ICAgICAgICAgICAgIGdwID0gZ3Bhcihjb2wgPSB5YXhpcy5jb2wsIGZvbnQg
PSB4YXhpcy5mb250LCANCiAgICAgICAgICAgICAgICAgICAgICAgIGZvbnRz
aXplID0gYXhzJGNleFsxXSAqIGZvbnRzaXplLmRlZmF1bHQpLCANCiAgICAg
ICAgICAgICAgICAgICAgICB2cCA9IHZpZXdwb3J0KGxheW91dC5wb3Mucm93
ID0gcG9zLnJvdywgDQogICAgICAgICAgICAgICAgICAgICAgICBsYXlvdXQu
cG9zLmNvbCA9IHBvcy5jb2wgLSAyLCB5c2NhbGUgPSB5c2NhbGUpKQ0KICAg
ICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAoeS5yZWxhdGlv
bi5zYW1lICYmIHgkeS5zY2FsZXMkZHJhdykgew0KICAgICAgICAgICAgICAg
ICAgaWYgKGNvbHVtbiA9PSAxKSB7DQogICAgICAgICAgICAgICAgICAgIGF4
cyA8LSB4JHkuc2NhbGVzDQogICAgICAgICAgICAgICAgICAgIG9rIDwtICh5
bGFiZWxpbmZvJGF0ID49IHlzY2FsZVsxXSAmIHlsYWJlbGluZm8kYXQgPD0g
DQogICAgICAgICAgICAgICAgICAgICAgeXNjYWxlWzJdKQ0KICAgICAgICAg
ICAgICAgICAgICBwdXNoLnZpZXdwb3J0KHZpZXdwb3J0KGxheW91dC5wb3Mu
cm93ID0gcG9zLnJvdywgDQogICAgICAgICAgICAgICAgICAgICAgbGF5b3V0
LnBvcy5jb2wgPSBwb3MuY29sIC0gMywgeXNjYWxlID0geXNjYWxlKSkNCiAg
ICAgICAgICAgICAgICAgICAgaWYgKGF4cyR0Y2tbMV0gIT0gMCAmJiBhbnko
b2spKSANCiAgICAgICAgICAgICAgICAgICAgICBncmlkLnNlZ21lbnRzKHgw
ID0gdW5pdChyZXAoMSwgc3VtKG9rKSksIA0KICAgICAgICAgICAgICAgICAg
ICAgICAgIm5wYyIpLCB4MSA9IHVuaXQocmVwKDEsIHN1bShvaykpLCAibnBj
IikgLSANCiAgICAgICAgICAgICAgICAgICAgICAgIHVuaXQocmVwKDAuMyAq
IGF4cyR0Y2tbMV0sIHN1bShvaykpLCANCiAgICAgICAgICAgICAgICAgICAg
ICAgICAgImxpbmVzIiksIHkwID0gdW5pdCh5bGFiZWxpbmZvJGF0W29rXSwg
DQogICAgICAgICAgICAgICAgICAgICAgICAibmF0aXZlIiksIHkxID0gdW5p
dCh5bGFiZWxpbmZvJGF0W29rXSwgDQogICAgICAgICAgICAgICAgICAgICAg
ICAibmF0aXZlIiksIGdwID0gZ3Bhcihjb2wgPSB5YXhpcy5jb2wpKQ0KICAg
ICAgICAgICAgICAgICAgICBwb3Audmlld3BvcnQoKQ0KICAgICAgICAgICAg
ICAgICAgICBpZiAoeS5hbHRlcm5hdGluZ1thY3R1YWwucm93XSA9PSAxIHx8
IHkuYWx0ZXJuYXRpbmdbYWN0dWFsLnJvd10gPT0gDQogICAgICAgICAgICAg
ICAgICAgICAgMykgDQogICAgICAgICAgICAgICAgICAgICAgaWYgKGFueShv
aykpIA0KICAgICAgICAgICAgICAgICAgICAgICAgZ3JpZC50ZXh0KGxhYmVs
ID0geWxhYmVsaW5mbyRsYWJbb2tdLCANCiAgICAgICAgICAgICAgICAgICAg
ICAgICAgeSA9IHVuaXQoeWxhYmVsaW5mbyRhdFtva10sICJuYXRpdmUiKSwg
DQogICAgICAgICAgICAgICAgICAgICAgICAgIHggPSB1bml0KGlmIChhYnMo
eWF4aXMucm90WzFdKSA9PSA5MCkgDQogICAgICAgICAgICAgICAgICAgICAg
ICAgICAgMC41DQogICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgMSwg
Im5wYyIpLCBqdXN0ID0gaWYgKHlheGlzLnJvdFsxXSA9PSANCiAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAtOTApIA0KICAgICAgICAgICAgICAgICAg
ICAgICAgICAgIGMoImNlbnRyZSIsICJjZW50cmUiKQ0KICAgICAgICAgICAg
ICAgICAgICAgICAgICBlbHNlIGlmICh5YXhpcy5yb3RbMV0gPT0gOTApIA0K
ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGMoImNlbnRyZSIsICJjZW50
cmUiKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICh5YXhp
cy5yb3RbMV0gPiAtOTAgJiYgeWF4aXMucm90WzFdIDwgDQogICAgICAgICAg
ICAgICAgICAgICAgICAgICAgOTApIA0KICAgICAgICAgICAgICAgICAgICAg
ICAgICAgIGMoInJpZ2h0IiwgImNlbnRyZSIpDQogICAgICAgICAgICAgICAg
ICAgICAgICAgIGVsc2UgYygibGVmdCIsICJjZW50cmUiKSwgcm90ID0geWF4
aXMucm90WzFdLCANCiAgICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2su
b3ZlcmxhcCA9IHlsYWJlbGluZm8kY2hlY2sub3ZlcmxhcCwgDQogICAgICAg
ICAgICAgICAgICAgICAgICAgIGdwID0gZ3Bhcihjb2wgPSB5YXhpcy5jb2ws
IGZvbnQgPSB5YXhpcy5mb250LCANCiAgICAgICAgICAgICAgICAgICAgICAg
ICAgICBmb250c2l6ZSA9IGF4cyRjZXhbMV0gKiBmb250c2l6ZS5kZWZhdWx0
KSwgDQogICAgICAgICAgICAgICAgICAgICAgICAgIHZwID0gdmlld3BvcnQo
bGF5b3V0LnBvcy5yb3cgPSBwb3Mucm93LCANCiAgICAgICAgICAgICAgICAg
ICAgICAgICAgICBsYXlvdXQucG9zLmNvbCA9IHBvcy5jb2wgLSA0LCB5c2Nh
bGUgPSB5c2NhbGUpKQ0KICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAg
ICAgICAgICAgaWYgKGNvbHVtbiA9PSBjb2xzLnBlci5wYWdlKSB7DQogICAg
ICAgICAgICAgICAgICAgIGF4cyA8LSB4JHkuc2NhbGVzDQogICAgICAgICAg
ICAgICAgICAgIG9rIDwtICh5bGFiZWxpbmZvJGF0ID49IHlzY2FsZVsxXSAm
IHlsYWJlbGluZm8kYXQgPD0gDQogICAgICAgICAgICAgICAgICAgICAgeXNj
YWxlWzJdKQ0KICAgICAgICAgICAgICAgICAgICBwdXNoLnZpZXdwb3J0KHZp
ZXdwb3J0KGxheW91dC5wb3Mucm93ID0gcG9zLnJvdywgDQogICAgICAgICAg
ICAgICAgICAgICAgbGF5b3V0LnBvcy5jb2wgPSBwb3MuY29sICsgMSwgeXNj
YWxlID0geXNjYWxlKSkNCiAgICAgICAgICAgICAgICAgICAgaWYgKGF4cyR0
Y2tbMl0gIT0gMCAmJiBhbnkob2spKSANCiAgICAgICAgICAgICAgICAgICAg
ICBncmlkLnNlZ21lbnRzKHgwID0gdW5pdChyZXAoMCwgc3VtKG9rKSksIA0K
ICAgICAgICAgICAgICAgICAgICAgICAgIm5wYyIpLCB4MSA9IHVuaXQocmVw
KDAuMyAqIGF4cyR0Y2tbMl0sIA0KICAgICAgICAgICAgICAgICAgICAgICAg
c3VtKG9rKSksICJsaW5lcyIpLCB5MCA9IHVuaXQoeWxhYmVsaW5mbyRhdFtv
a10sIA0KICAgICAgICAgICAgICAgICAgICAgICAgIm5hdGl2ZSIpLCB5MSA9
IHVuaXQoeWxhYmVsaW5mbyRhdFtva10sIA0KICAgICAgICAgICAgICAgICAg
ICAgICAgIm5hdGl2ZSIpLCBncCA9IGdwYXIoY29sID0geWF4aXMuY29sKSkN
CiAgICAgICAgICAgICAgICAgICAgcG9wLnZpZXdwb3J0KCkNCiAgICAgICAg
ICAgICAgICAgICAgaWYgKHkuYWx0ZXJuYXRpbmdbYWN0dWFsLnJvd10gPT0g
MiB8fCB5LmFsdGVybmF0aW5nW2FjdHVhbC5yb3ddID09IA0KICAgICAgICAg
ICAgICAgICAgICAgIDMpIA0KICAgICAgICAgICAgICAgICAgICAgIGlmIChh
bnkob2spKSANCiAgICAgICAgICAgICAgICAgICAgICAgIGdyaWQudGV4dChs
YWJlbCA9IHlsYWJlbGluZm8kbGFiZWxbb2tdLCANCiAgICAgICAgICAgICAg
ICAgICAgICAgICAgeSA9IHVuaXQoeWxhYmVsaW5mbyRhdFtva10sICJuYXRp
dmUiKSwgDQogICAgICAgICAgICAgICAgICAgICAgICAgIHggPSB1bml0KGlm
IChhYnMoeWF4aXMucm90WzJdKSA9PSA5MCkgDQogICAgICAgICAgICAgICAg
ICAgICAgICAgICAgMC41DQogICAgICAgICAgICAgICAgICAgICAgICAgIGVs
c2UgMCwgIm5wYyIpLCBqdXN0ID0gaWYgKHlheGlzLnJvdFsyXSA9PSANCiAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAtOTApIA0KICAgICAgICAgICAg
ICAgICAgICAgICAgICAgIGMoImNlbnRyZSIsICJjZW50cmUiKQ0KICAgICAg
ICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICh5YXhpcy5yb3RbMl0gPT0g
OTApIA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGMoImNlbnRyZSIs
ICJjZW50cmUiKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlm
ICh5YXhpcy5yb3RbMl0gPiAtOTAgJiYgeWF4aXMucm90WzJdIDwgDQogICAg
ICAgICAgICAgICAgICAgICAgICAgICAgOTApIA0KICAgICAgICAgICAgICAg
ICAgICAgICAgICAgIGMoImxlZnQiLCAiY2VudHJlIikNCiAgICAgICAgICAg
ICAgICAgICAgICAgICAgZWxzZSBjKCJyaWdodCIsICJjZW50cmUiKSwgcm90
ID0geWF4aXMucm90WzJdLCANCiAgICAgICAgICAgICAgICAgICAgICAgICAg
Y2hlY2sub3ZlcmxhcCA9IHlsYWJlbGluZm8kY2hlY2sub3ZlcmxhcCwgDQog
ICAgICAgICAgICAgICAgICAgICAgICAgIGdwID0gZ3Bhcihjb2wgPSB5YXhp
cy5jb2wsIGZvbnQgPSB5YXhpcy5mb250LCANCiAgICAgICAgICAgICAgICAg
ICAgICAgICAgICBmb250c2l6ZSA9IGF4cyRjZXhbMl0gKiBmb250c2l6ZS5k
ZWZhdWx0KSwgDQogICAgICAgICAgICAgICAgICAgICAgICAgIHZwID0gdmll
d3BvcnQobGF5b3V0LnBvcy5yb3cgPSBwb3Mucm93LCANCiAgICAgICAgICAg
ICAgICAgICAgICAgICAgICBsYXlvdXQucG9zLmNvbCA9IHBvcy5jb2wgKyAy
LCB5c2NhbGUgPSB5c2NhbGUpKQ0KICAgICAgICAgICAgICAgICAgfQ0KICAg
ICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAoeC5yZWxhdGlv
bi5zYW1lICYmIHgkeC5zY2FsZXMkZHJhdykgew0KICAgICAgICAgICAgICAg
ICAgaWYgKGFjdHVhbC5yb3cgPT0gMSkgew0KICAgICAgICAgICAgICAgICAg
ICBheHMgPC0geCR4LnNjYWxlcw0KICAgICAgICAgICAgICAgICAgICBvayA8
LSAoeGxhYmVsaW5mbyRhdCA+PSB4c2NhbGVbMV0gJiB4bGFiZWxpbmZvJGF0
IDw9IA0KICAgICAgICAgICAgICAgICAgICAgIHhzY2FsZVsyXSkNCiAgICAg
ICAgICAgICAgICAgICAgcHVzaC52aWV3cG9ydCh2aWV3cG9ydChsYXlvdXQu
cG9zLnJvdyA9IHBvcy5yb3cgKyANCiAgICAgICAgICAgICAgICAgICAgICAz
LCBsYXlvdXQucG9zLmNvbCA9IHBvcy5jb2wsIHhzY2FsZSA9IHhzY2FsZSkp
DQogICAgICAgICAgICAgICAgICAgIGlmIChheHMkdGNrWzFdICE9IDAgJiYg
YW55KG9rKSkgDQogICAgICAgICAgICAgICAgICAgICAgZ3JpZC5zZWdtZW50
cyh5MCA9IHVuaXQocmVwKDEsIHN1bShvaykpLCANCiAgICAgICAgICAgICAg
ICAgICAgICAgICJucGMiKSwgeTEgPSB1bml0KHJlcCgxLCBzdW0ob2spKSwg
Im5wYyIpIC0gDQogICAgICAgICAgICAgICAgICAgICAgICB1bml0KHJlcCgw
LjMgKiBheHMkdGNrWzFdLCBzdW0ob2spKSwgDQogICAgICAgICAgICAgICAg
ICAgICAgICAgICJsaW5lcyIpLCB4MCA9IHVuaXQoeGxhYmVsaW5mbyRhdFtv
a10sIA0KICAgICAgICAgICAgICAgICAgICAgICAgIm5hdGl2ZSIpLCB4MSA9
IHVuaXQoeGxhYmVsaW5mbyRhdFtva10sIA0KICAgICAgICAgICAgICAgICAg
ICAgICAgIm5hdGl2ZSIpLCBncCA9IGdwYXIoY29sID0geGF4aXMuY29sKSkN
CiAgICAgICAgICAgICAgICAgICAgcG9wLnZpZXdwb3J0KCkNCiAgICAgICAg
ICAgICAgICAgICAgaWYgKHguYWx0ZXJuYXRpbmdbY29sdW1uXSA9PSAxIHx8
IHguYWx0ZXJuYXRpbmdbY29sdW1uXSA9PSANCiAgICAgICAgICAgICAgICAg
ICAgICAzKSANCiAgICAgICAgICAgICAgICAgICAgICBpZiAoYW55KG9rKSkg
ew0KICAgICAgICAgICAgICAgICAgICAgICAgZ3JpZC50ZXh0KGxhYmVsID0g
eGxhYmVsaW5mbyRsYWJbb2tdLCANCiAgICAgICAgICAgICAgICAgICAgICAg
ICAgeCA9IHVuaXQoeGxhYmVsaW5mbyRhdFtva10sICJuYXRpdmUiKSwgDQog
ICAgICAgICAgICAgICAgICAgICAgICAgIHkgPSB1bml0KGlmICh4YXhpcy5y
b3RbMV0gJWluJSBjKDAsIA0KICAgICAgICAgICAgICAgICAgICAgICAgICAg
IDE4MCkpIA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAuNQ0KICAg
ICAgICAgICAgICAgICAgICAgICAgICBlbHNlIDEsICJucGMiKSwganVzdCA9
IGlmICh4YXhpcy5yb3RbMV0gPT0gDQogICAgICAgICAgICAgICAgICAgICAg
ICAgICAgMCkgDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgYygiY2Vu
dHJlIiwgImNlbnRyZSIpDQogICAgICAgICAgICAgICAgICAgICAgICAgIGVs
c2UgaWYgKHhheGlzLnJvdFsxXSA9PSAxODApIA0KICAgICAgICAgICAgICAg
ICAgICAgICAgICAgIGMoImNlbnRyZSIsICJjZW50cmUiKQ0KICAgICAgICAg
ICAgICAgICAgICAgICAgICBlbHNlIGlmICh4YXhpcy5yb3RbMV0gPiAwKSAN
CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjKCJyaWdodCIsICJjZW50
cmUiKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGMoImxlZnQi
LCAiY2VudHJlIiksIHJvdCA9IHhheGlzLnJvdFsxXSwgDQogICAgICAgICAg
ICAgICAgICAgICAgICAgIGNoZWNrLm92ZXJsYXAgPSB4bGFiZWxpbmZvJGNo
ZWNrLm92ZXJsYXAsIA0KICAgICAgICAgICAgICAgICAgICAgICAgICBncCA9
IGdwYXIoY29sID0geGF4aXMuY29sLCBmb250ID0geGF4aXMuZm9udCwgDQog
ICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9udHNpemUgPSBheHMkY2V4
WzFdICogZm9udHNpemUuZGVmYXVsdCksIA0KICAgICAgICAgICAgICAgICAg
ICAgICAgICB2cCA9IHZpZXdwb3J0KGxheW91dC5wb3Mucm93ID0gcG9zLnJv
dyArIA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQsIGxheW91dC5w
b3MuY29sID0gcG9zLmNvbCwgeHNjYWxlID0geHNjYWxlKSkNCiAgICAgICAg
ICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICB9DQogICAgICAg
ICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIGlmICghaXMubG9naWNhbCh4
JHN0cmlwKSkgDQogICAgICAgICAgICAgICAgICBmb3IgKGkgaW4gMTpudW1i
ZXIub2YuY29uZCkgew0KICAgICAgICAgICAgICAgICAgICBwdXNoLnZpZXdw
b3J0KHZpZXdwb3J0KGxheW91dC5wb3Mucm93ID0gcG9zLnJvdyAtIA0KICAg
ICAgICAgICAgICAgICAgICAgIGksIGxheW91dC5wb3MuY29sID0gcG9zLmNv
bCwgY2xpcCA9IFRSVUUsIA0KICAgICAgICAgICAgICAgICAgICAgIGdwID0g
Z3Bhcihmb250c2l6ZSA9IGZvbnRzaXplLmRlZmF1bHQpKSkNCiAgICAgICAg
ICAgICAgICAgICAgZ3JpZC5yZWN0KCkNCiAgICAgICAgICAgICAgICAgICAg
eCRzdHJpcCh3aGljaC5naXZlbiA9IGksIHdoaWNoLnBhbmVsID0gY29uZC5j
dXJyZW50LmxldmVsLCANCiAgICAgICAgICAgICAgICAgICAgICB2YXIubmFt
ZSA9IG5hbWVzKHgkY29uZCksIGZhY3Rvci5sZXZlbHMgPSBpZiAoIWlzLmxp
c3QoeCRjb25kW1tpXV0pKSANCiAgICAgICAgICAgICAgICAgICAgICAgIHgk
Y29uZFtbaV1dDQogICAgICAgICAgICAgICAgICAgICAgZWxzZSBOVUxMLCBz
aGluZ2xlLmludGVydmFscyA9IGlmIChpcy5saXN0KHgkY29uZFtbaV1dKSkg
DQogICAgICAgICAgICAgICAgICAgICAgICBkby5jYWxsKCJyYmluZCIsIHgk
Y29uZFtbaV1dKQ0KICAgICAgICAgICAgICAgICAgICAgIGVsc2UgTlVMTCwg
YmcgPSBzdHJpcC5jb2wuZGVmYXVsdC5iZ1tpXSwgDQogICAgICAgICAgICAg
ICAgICAgICAgZmcgPSBzdHJpcC5jb2wuZGVmYXVsdC5mZ1tpXSwgcGFyLnN0
cmlwLnRleHQgPSB4JHBhci5zdHJpcC50ZXh0KQ0KICAgICAgICAgICAgICAg
ICAgICBwb3Audmlld3BvcnQoKQ0KICAgICAgICAgICAgICAgICAgfQ0KICAg
ICAgICAgICAgICAgIGlmICh4LnJlbGF0aW9uLnNhbWUgJiYgeCR4LnNjYWxl
cyRkcmF3KSANCiAgICAgICAgICAgICAgICAgIGlmIChhY3R1YWwucm93ID09
IHJvd3MucGVyLnBhZ2UpIHsNCiAgICAgICAgICAgICAgICAgICAgYXhzIDwt
IHgkeC5zY2FsZXMNCiAgICAgICAgICAgICAgICAgICAgb2sgPC0gKHhsYWJl
bGluZm8kYXQgPj0geHNjYWxlWzFdICYgeGxhYmVsaW5mbyRhdCA8PSANCiAg
ICAgICAgICAgICAgICAgICAgICB4c2NhbGVbMl0pDQogICAgICAgICAgICAg
ICAgICAgIHB1c2gudmlld3BvcnQodmlld3BvcnQobGF5b3V0LnBvcy5yb3cg
PSBwb3Mucm93IC0gDQogICAgICAgICAgICAgICAgICAgICAgMSAtIG51bWJl
ci5vZi5jb25kLCBsYXlvdXQucG9zLmNvbCA9IHBvcy5jb2wsIA0KICAgICAg
ICAgICAgICAgICAgICAgIHhzY2FsZSA9IHhzY2FsZSkpDQogICAgICAgICAg
ICAgICAgICAgIGlmIChheHMkdGNrWzJdICE9IDAgJiYgYW55KG9rKSkgDQog
ICAgICAgICAgICAgICAgICAgICAgZ3JpZC5zZWdtZW50cyh5MCA9IHVuaXQo
cmVwKDAsIHN1bShvaykpLCANCiAgICAgICAgICAgICAgICAgICAgICAgICJu
cGMiKSwgeTEgPSB1bml0KHJlcCgwLjMgKiBheHMkdGNrWzJdLCANCiAgICAg
ICAgICAgICAgICAgICAgICAgIHN1bShvaykpLCAibGluZXMiKSwgeDAgPSB1
bml0KHhsYWJlbGluZm8kYXRbb2tdLCANCiAgICAgICAgICAgICAgICAgICAg
ICAgICJuYXRpdmUiKSwgeDEgPSB1bml0KHhsYWJlbGluZm8kYXRbb2tdLCAN
CiAgICAgICAgICAgICAgICAgICAgICAgICJuYXRpdmUiKSwgZ3AgPSBncGFy
KGNvbCA9IHhheGlzLmNvbCkpDQogICAgICAgICAgICAgICAgICAgIHBvcC52
aWV3cG9ydCgpDQogICAgICAgICAgICAgICAgICAgIGlmICh4LmFsdGVybmF0
aW5nW2NvbHVtbl0gPT0gMiB8fCB4LmFsdGVybmF0aW5nW2NvbHVtbl0gPT0g
DQogICAgICAgICAgICAgICAgICAgICAgMykgDQogICAgICAgICAgICAgICAg
ICAgICAgaWYgKGFueShvaykpIA0KICAgICAgICAgICAgICAgICAgICAgICAg
Z3JpZC50ZXh0KGxhYmVsID0geGxhYmVsaW5mbyRsYWJlbFtva10sIA0KICAg
ICAgICAgICAgICAgICAgICAgICAgICB4ID0gdW5pdCh4bGFiZWxpbmZvJGF0
W29rXSwgIm5hdGl2ZSIpLCANCiAgICAgICAgICAgICAgICAgICAgICAgICAg
eSA9IHVuaXQoaWYgKHhheGlzLnJvdFsyXSAlaW4lIGMoMCwgDQogICAgICAg
ICAgICAgICAgICAgICAgICAgICAgMTgwKSkgDQogICAgICAgICAgICAgICAg
ICAgICAgICAgICAgMC41DQogICAgICAgICAgICAgICAgICAgICAgICAgIGVs
c2UgMCwgIm5wYyIpLCBqdXN0ID0gaWYgKHhheGlzLnJvdFsyXSA9PSANCiAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAwKSANCiAgICAgICAgICAgICAg
ICAgICAgICAgICAgICBjKCJjZW50cmUiLCAiY2VudHJlIikNCiAgICAgICAg
ICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoeGF4aXMucm90WzJdID09IDE4
MCkgDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgYygiY2VudHJlIiwg
ImNlbnRyZSIpDQogICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYg
KHhheGlzLnJvdFsyXSA+IDApIA0KICAgICAgICAgICAgICAgICAgICAgICAg
ICAgIGMoImxlZnQiLCAiY2VudHJlIikNCiAgICAgICAgICAgICAgICAgICAg
ICAgICAgZWxzZSBjKCJyaWdodCIsICJjZW50cmUiKSwgcm90ID0geGF4aXMu
cm90WzJdLCANCiAgICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2sub3Zl
cmxhcCA9IHhsYWJlbGluZm8kY2hlY2sub3ZlcmxhcCwgDQogICAgICAgICAg
ICAgICAgICAgICAgICAgIGdwID0gZ3Bhcihjb2wgPSB4YXhpcy5jb2wsIGZv
bnQgPSB4YXhpcy5mb250LCANCiAgICAgICAgICAgICAgICAgICAgICAgICAg
ICBmb250c2l6ZSA9IGF4cyRjZXhbMl0gKiBmb250c2l6ZS5kZWZhdWx0KSwg
DQogICAgICAgICAgICAgICAgICAgICAgICAgIHZwID0gdmlld3BvcnQobGF5
b3V0LnBvcy5yb3cgPSBwb3Mucm93IC0gDQogICAgICAgICAgICAgICAgICAg
ICAgICAgICAgMiAtIG51bWJlci5vZi5jb25kLCBsYXlvdXQucG9zLmNvbCA9
IHBvcy5jb2wsIA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHhzY2Fs
ZSA9IHhzY2FsZSkpDQogICAgICAgICAgICAgICAgICB9DQogICAgICAgICAg
ICAgICAgY29uZC5jdXJyZW50LmxldmVsIDwtIGN1cGRhdGUoY29uZC5jdXJy
ZW50LmxldmVsLCANCiAgICAgICAgICAgICAgICAgIGNvbmQubWF4LmxldmVs
KQ0KICAgICAgICAgICAgICAgIHBhbmVsLm51bWJlciA8LSBwYW5lbC5udW1i
ZXIgKyAxDQogICAgICAgICAgICB9DQogICAgICAgIH0NCiAgICAgICAgaWYg
KCFpcy5udWxsKHgka2V5KSB8fCAhaXMubnVsbCh4JGNvbG9ya2V5KSkgew0K
ICAgICAgICAgICAgaWYgKGtleS5zcGFjZSA9PSAibGVmdCIpIHsNCiAgICAg
ICAgICAgICAgICBwdXNoLnZpZXdwb3J0KHZpZXdwb3J0KGxheW91dC5wb3Mu
Y29sID0gMiwgbGF5b3V0LnBvcy5yb3cgPSBjKDYsIA0KICAgICAgICAgICAg
ICAgICAgbi5yb3cgLSA2KSkpDQogICAgICAgICAgICAgICAgZ3JpZC5kcmF3
KGtleS5nZikNCiAgICAgICAgICAgICAgICBwb3Audmlld3BvcnQoKQ0KICAg
ICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSBpZiAoa2V5LnNwYWNlID09
ICJyaWdodCIpIHsNCiAgICAgICAgICAgICAgICBwdXNoLnZpZXdwb3J0KHZp
ZXdwb3J0KGxheW91dC5wb3MuY29sID0gbi5jb2wgLSANCiAgICAgICAgICAg
ICAgICAgIDEsIGxheW91dC5wb3Mucm93ID0gYyg2LCBuLnJvdyAtIDYpKSkN
CiAgICAgICAgICAgICAgICBncmlkLmRyYXcoa2V5LmdmKQ0KICAgICAgICAg
ICAgICAgIHBvcC52aWV3cG9ydCgpDQogICAgICAgICAgICB9DQogICAgICAg
ICAgICBlbHNlIGlmIChrZXkuc3BhY2UgPT0gInRvcCIpIHsNCiAgICAgICAg
ICAgICAgICBwdXNoLnZpZXdwb3J0KHZpZXdwb3J0KGxheW91dC5wb3Mucm93
ID0gMywgbGF5b3V0LnBvcy5jb2wgPSBjKDYsIA0KICAgICAgICAgICAgICAg
ICAgbi5jb2wgLSA0KSkpDQogICAgICAgICAgICAgICAgZ3JpZC5kcmF3KGtl
eS5nZikNCiAgICAgICAgICAgICAgICBwb3Audmlld3BvcnQoKQ0KICAgICAg
ICAgICAgfQ0KICAgICAgICAgICAgZWxzZSBpZiAoa2V5LnNwYWNlID09ICJi
b3R0b20iKSB7DQogICAgICAgICAgICAgICAgcHVzaC52aWV3cG9ydCh2aWV3
cG9ydChsYXlvdXQucG9zLnJvdyA9IG4ucm93IC0gDQogICAgICAgICAgICAg
ICAgICAyLCBsYXlvdXQucG9zLmNvbCA9IGMoNiwgbi5jb2wgLSA0KSkpDQog
ICAgICAgICAgICAgICAgZ3JpZC5kcmF3KGtleS5nZikNCiAgICAgICAgICAg
ICAgICBwb3Audmlld3BvcnQoKQ0KICAgICAgICAgICAgfQ0KICAgICAgICAg
ICAgZWxzZSBpZiAoa2V5LnNwYWNlID09ICJpbnNpZGUiKSB7DQogICAgICAg
ICAgICAgICAgcHVzaC52aWV3cG9ydCh2aWV3cG9ydChsYXlvdXQucG9zLnJv
dyA9IGMoMSwgDQogICAgICAgICAgICAgICAgICBuLnJvdyksIGxheW91dC5w
b3MuY29sID0gYygxLCBuLmNvbCkpKQ0KICAgICAgICAgICAgICAgIGlmIChp
cy5udWxsKHgka2V5JGNvcm5lcikpIA0KICAgICAgICAgICAgICAgICAgeCRr
ZXkkY29ybmVyIDwtIGMoMCwgMSkNCiAgICAgICAgICAgICAgICBpZiAoaXMu
bnVsbCh4JGtleSR4KSkgDQogICAgICAgICAgICAgICAgICB4JGtleSR4IDwt
IHgka2V5JGNvcm5lclsxXQ0KICAgICAgICAgICAgICAgIGlmIChpcy5udWxs
KHgka2V5JHkpKSANCiAgICAgICAgICAgICAgICAgIHgka2V5JHkgPC0geCRr
ZXkkY29ybmVyWzJdDQogICAgICAgICAgICAgICAgaWYgKGFsbCh4JGtleSRj
b3JuZXIgPT0gYygwLCAxKSkpIHsNCiAgICAgICAgICAgICAgICAgIHB1c2gu
dmlld3BvcnQodmlld3BvcnQobGF5b3V0ID0gZ3JpZC5sYXlvdXQobnJvdyA9
IDMsIA0KICAgICAgICAgICAgICAgICAgICBuY29sID0gMywgd2lkdGhzID0g
dW5pdChjKHgka2V5JHgsIDEsIDEpLCANCiAgICAgICAgICAgICAgICAgICAg
ICBjKCJucGMiLCAiZ3JvYndpZHRoIiwgIm51bGwiKSwgbGlzdCgxLCANCiAg
ICAgICAgICAgICAgICAgICAgICAgIGtleS5nZiwgMSkpLCBoZWlnaHRzID0g
dW5pdChjKDEgLSB4JGtleSR5LCANCiAgICAgICAgICAgICAgICAgICAgICAx
LCAxKSwgYygibnBjIiwgImdyb2JoZWlnaHQiLCAibnVsbCIpLCANCiAgICAg
ICAgICAgICAgICAgICAgICBsaXN0KDEsIGtleS5nZiwgMSkpKSkpDQogICAg
ICAgICAgICAgICAgICBwdXNoLnZpZXdwb3J0KHZpZXdwb3J0KGxheW91dC5w
b3Mucm93ID0gMiwgDQogICAgICAgICAgICAgICAgICAgIGxheW91dC5wb3Mu
Y29sID0gMikpDQogICAgICAgICAgICAgICAgICBncmlkLmRyYXcoa2V5Lmdm
KQ0KICAgICAgICAgICAgICAgICAgcG9wLnZpZXdwb3J0KCkNCiAgICAgICAg
ICAgICAgICAgIHBvcC52aWV3cG9ydCgpDQogICAgICAgICAgICAgICAgfQ0K
ICAgICAgICAgICAgICAgIGlmIChhbGwoeCRrZXkkY29ybmVyID09IGMoMSwg
MSkpKSB7DQogICAgICAgICAgICAgICAgICBwdXNoLnZpZXdwb3J0KHZpZXdw
b3J0KGxheW91dCA9IGdyaWQubGF5b3V0KG5yb3cgPSAzLCANCiAgICAgICAg
ICAgICAgICAgICAgbmNvbCA9IDMsIGhlaWdodHMgPSB1bml0KGMoMSAtIHgk
a2V5JHksIDEsIA0KICAgICAgICAgICAgICAgICAgICAgIDEpLCBjKCJucGMi
LCAiZ3JvYmhlaWdodCIsICJudWxsIiksIGxpc3QoMSwgDQogICAgICAgICAg
ICAgICAgICAgICAga2V5LmdmLCAxKSksIHdpZHRocyA9IHVuaXQoYygxLCAx
LCAxIC0gDQogICAgICAgICAgICAgICAgICAgICAgeCRrZXkkeCksIGMoIm51
bGwiLCAiZ3JvYndpZHRoIiwgIm5wYyIpLCANCiAgICAgICAgICAgICAgICAg
ICAgICBsaXN0KDEsIGtleS5nZiwgMSkpKSkpDQogICAgICAgICAgICAgICAg
ICBwdXNoLnZpZXdwb3J0KHZpZXdwb3J0KGxheW91dC5wb3Mucm93ID0gMiwg
DQogICAgICAgICAgICAgICAgICAgIGxheW91dC5wb3MuY29sID0gMikpDQog
ICAgICAgICAgICAgICAgICBncmlkLmRyYXcoa2V5LmdmKQ0KICAgICAgICAg
ICAgICAgICAgcG9wLnZpZXdwb3J0KCkNCiAgICAgICAgICAgICAgICAgIHBv
cC52aWV3cG9ydCgpDQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAg
ICAgIGlmIChhbGwoeCRrZXkkY29ybmVyID09IGMoMCwgMCkpKSB7DQogICAg
ICAgICAgICAgICAgICBwdXNoLnZpZXdwb3J0KHZpZXdwb3J0KGxheW91dCA9
IGdyaWQubGF5b3V0KG5yb3cgPSAzLCANCiAgICAgICAgICAgICAgICAgICAg
bmNvbCA9IDMsIHdpZHRocyA9IHVuaXQoYyh4JGtleSR4LCAxLCAxKSwgDQog
ICAgICAgICAgICAgICAgICAgICAgYygibnBjIiwgImdyb2J3aWR0aCIsICJu
dWxsIiksIGxpc3QoMSwgDQogICAgICAgICAgICAgICAgICAgICAgICBrZXku
Z2YsIDEpKSwgaGVpZ2h0cyA9IHVuaXQoYygxLCAxLCB4JGtleSR5KSwgDQog
ICAgICAgICAgICAgICAgICAgICAgYygibnVsbCIsICJncm9iaGVpZ2h0Iiwg
Im5wYyIpLCBsaXN0KDEsIA0KICAgICAgICAgICAgICAgICAgICAgICAga2V5
LmdmLCAxKSkpKSkNCiAgICAgICAgICAgICAgICAgIHB1c2gudmlld3BvcnQo
dmlld3BvcnQobGF5b3V0LnBvcy5yb3cgPSAyLCANCiAgICAgICAgICAgICAg
ICAgICAgbGF5b3V0LnBvcy5jb2wgPSAyKSkNCiAgICAgICAgICAgICAgICAg
IGdyaWQuZHJhdyhrZXkuZ2YpDQogICAgICAgICAgICAgICAgICBwb3Audmll
d3BvcnQoKQ0KICAgICAgICAgICAgICAgICAgcG9wLnZpZXdwb3J0KCkNCiAg
ICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgaWYgKGFsbCh4JGtl
eSRjb3JuZXIgPT0gYygxLCAwKSkpIHsNCiAgICAgICAgICAgICAgICAgIHB1
c2gudmlld3BvcnQodmlld3BvcnQobGF5b3V0ID0gZ3JpZC5sYXlvdXQobnJv
dyA9IDMsIA0KICAgICAgICAgICAgICAgICAgICBuY29sID0gMywgd2lkdGhz
ID0gdW5pdChjKDEsIDEsIDEgLSB4JGtleSR4KSwgDQogICAgICAgICAgICAg
ICAgICAgICAgYygibnVsbCIsICJncm9id2lkdGgiLCAibnBjIiksIGxpc3Qo
MSwgDQogICAgICAgICAgICAgICAgICAgICAgICBrZXkuZ2YsIDEpKSwgaGVp
Z2h0cyA9IHVuaXQoYygxLCAxLCB4JGtleSR5KSwgDQogICAgICAgICAgICAg
ICAgICAgICAgYygibnVsbCIsICJncm9iaGVpZ2h0IiwgIm5wYyIpLCBsaXN0
KDEsIA0KICAgICAgICAgICAgICAgICAgICAgICAga2V5LmdmLCAxKSkpKSkN
CiAgICAgICAgICAgICAgICAgIHB1c2gudmlld3BvcnQodmlld3BvcnQobGF5
b3V0LnBvcy5yb3cgPSAyLCANCiAgICAgICAgICAgICAgICAgICAgbGF5b3V0
LnBvcy5jb2wgPSAyKSkNCiAgICAgICAgICAgICAgICAgIGdyaWQuZHJhdyhr
ZXkuZ2YpDQogICAgICAgICAgICAgICAgICBwb3Audmlld3BvcnQoKQ0KICAg
ICAgICAgICAgICAgICAgcG9wLnZpZXdwb3J0KCkNCiAgICAgICAgICAgICAg
ICB9DQogICAgICAgICAgICAgICAgcG9wLnZpZXdwb3J0KCkNCiAgICAgICAg
ICAgIH0NCiAgICAgICAgfQ0KICAgICAgICBwdXNoLnZpZXdwb3J0KHZpZXdw
b3J0KGxheW91dC5wb3Mucm93ID0gYygxLCBuLnJvdyksIA0KICAgICAgICAg
ICAgbGF5b3V0LnBvcy5jb2wgPSBjKDEsIG4uY29sKSkpDQogICAgICAgIGlm
ICghaXMubnVsbCh4JHBhZ2UpKSANCiAgICAgICAgICAgIHgkcGFnZShwYWdl
Lm51bWJlcikNCiAgICAgICAgcG9wLnZpZXdwb3J0KCkNCiAgICAgICAgcG9w
LnZpZXdwb3J0KCkNCiAgICB9DQogICAgaWYgKCFtaXNzaW5nKHBvc2l0aW9u
KSkgew0KICAgICAgICBpZiAoIW1pc3Npbmcoc3BsaXQpKSB7DQogICAgICAg
ICAgICBwb3Audmlld3BvcnQoKQ0KICAgICAgICAgICAgcG9wLnZpZXdwb3J0
KCkNCiAgICAgICAgfQ0KICAgICAgICBwb3Audmlld3BvcnQoKQ0KICAgIH0N
CiAgICBlbHNlIGlmICghbWlzc2luZyhzcGxpdCkpIHsNCiAgICAgICAgcG9w
LnZpZXdwb3J0KCkNCiAgICAgICAgcG9wLnZpZXdwb3J0KCkNCiAgICB9DQog
ICAgaW52aXNpYmxlKHBhZ2UubGF5b3V0KQ0KfQ0K
---1678264062-154654637-1051422990=:2626055--



More information about the R-devel mailing list